This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| query_processor = QueryProcessor() | |
| query_results = query_processor.query_files_urls(target, mission, instrument, product_type, | |
| western_lon, eastern_lon, min_lat, max_lat, | |
| min_ob_time, max_ob_time, product_id, file_name, | |
| number_product_limit, result_offset_number) | |
| print("Total Number of Files of all bin types =", len(query_results.keys())) | |
| query_result_processor = QueryResultProcessor() | |
| should_continue = query_result_processor.download(query_results, bin_type) | |
| if should_continue: | |
| query_result_processor.process(SAVE_DIR_PREFIX, CHUNK_SIZE, SKIP_BLACK_IMAGES, ALIGN_AND_CROP_THRESHOLDS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Chunk Settings | |
| SAVE_DIR_PREFIX = './chunks' | |
| CHUNK_SIZE = 1024 | |
| SKIP_BLACK_IMAGES = True # Set to False to retain all images that contain black pixels | |
| # Default Settings to Align and Crop images with black margins | |
| MAX_BORDER_SIZE = 200 # Border to be checked around the image | |
| SAFETY_MARGIN = 0 # Removes extra pixels from the sides to make sure no black remains | |
| TOLERANCE = 10 # A gray value is more likely to be considered black when you increase the tolerance | |
| ALIGN_AND_CROP_THRESHOLDS = (MAX_BORDER_SIZE, SAFETY_MARGIN, TOLERANCE) # Set to None to prevent alignment and cropping |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| target = 'mars' # Aimed planetary body, i.e., Mars, Mercury, Moon, Phobos, or Venus | |
| mission = 'MRO' # Aimed mission, e.g., MGS or MRO | |
| instrument = 'HIRISE' # Aimed instrument from the mission, e.g., HIRISE or CRISM | |
| product_type = 'RDRV11' # Type of product to look for, e.g., DTM or RDRV11 | |
| western_lon = 234.24 # Western longitude to look for the data, from 0 to 360 | |
| eastern_lon = 234.25 # Eastern longitude to look for the data, from 0 to 360 | |
| min_lat = 68.21 # Minimal latitude to look for the data, from -90 to 90 | |
| max_lat = 68.22 # Maximal latitude to look for the data, from -90 to 90 | |
| product_id = '*RED*' # PDS Product Id to look for, with wildcards (*) allowed | |
| min_ob_time = '' # Minimal observation time in (even partial) UTC format, e.g., '2017-03-01' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ode_data_access.query_processor import QueryProcessor | |
| from ode_data_access.query_result_processor import QueryResultProcessor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ############################################################################### | |
| # | |
| # demo-magic.sh | |
| # | |
| # Copyright (c) 2015 Paxton Hare | |
| # | |
| # This script lets you script demos in bash. It runs through your demo script when you press | |
| # ENTER. It simulates typing and runs commands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| messages_df['Hour'].value_counts().head(10).sort_index(ascending=False).plot.barh() # Top 10 Hours of the day during which the most number of messages were sent | |
| plt.xlabel('Number of messages') | |
| plt.ylabel('Hour of Day') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| messages_df['Hour'] = messages_df['Time'].apply(lambda x : x.split(':')[0]) # The first token of a value in the Time Column contains the hour (Eg., "20" in "20:15") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| messages_df['Time'].value_counts().head(10).plot.barh() # Top 10 Times of the day at which the most number of messages were sent | |
| plt.xlabel('Number of messages') | |
| plt.ylabel('Time') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| messages_df['Date'].value_counts().head(10).plot.barh() # Top 10 Dates on which the most number of messages were sent | |
| plt.xlabel('Number of Messages') | |
| plt.ylabel('Date') |
NewerOlder