Program Functionality Documentation#

Introduction#

This documentation provides an overview of the essential tools and classes within the coloc_sat program, detailing their functionalities and interactions. The following sections will guide you through the key components of the program.

Part A: Meta Objects#

For each satellite mission, specific classes define the meta objects:

Each of these classes defines various attributes that include:

  • start_date and stop_date to denote the acquisition time frame

  • dataset indicating the dataset used for the acquisition

  • acquisition_type specifying the acquisition mode (e.g., ‘swath’ or ‘daily_regular_grid’)

Furthermore, attributes like longitude_name, latitude_name, time_name, and wind_name provide crucial information for data manipulation and intersection. For missions with orbit segmentation, attributes like has_orbited_segmentation and orbit_segment_name offer additional context. Attributes minute_name and day_date enable proper time conversion for WindSat and SMAP datasets.

Notably, the class GetSarMeta is versatile, capable of processing various SAR missions (e.g., ‘RadarSat-2’, ‘RCM’, ‘Sentinel-1’) across different product levels.

Part B: Intersection Between 2 Products#

Within the coloc_sat framework, the class coloc_sat.intersection.ProductIntersection plays a pivotal role in determining the feasibility of co-location and generating co-located products. This class takes meta objects as input, along with delta_time and minimal_area parameters.

The has_intersection attribute verifies the existence of an intersection between two products. If required, data manipulation is performed, and resultant datasets are stored in _datasets, while the common footprint is stored in common_footprint. This optimized storage prevents redundant data processing during co-location product generation.

Functions like fill_common_zone_datasets() align datasets on the same grid, and format_datasets() standardize variable names and attributes. The property merge_datasets consolidates datasets into the co-located product.

Part C: Co-location product and listing Generation#

The core class for co-locating products is coloc_sat.generate_coloc.generateColoc. Upon initialization, this class extracts start and stop dates from the relevant meta object. Utilizing delta_time, it calculates product1_start_date and product1_stop_date.

The class then employs coloc_sat.tools.get_all_comparison_files() to locate products with matching dates, storing them in comparison_files.

Function fill_intersections() creates instances of coloc_sat.intersection.ProductIntersection for each product comparison, stored in intersections.

Subsequently, fill_colocated_files() identifies co-located files and stores them in colocated_files using coloc_sat.intersection.ProductIntersection.has_intersection.

Finally, save_results() generates listing files and co-location products, employing merge_datasets for each co-located file intersection.

By understanding these components, users can effectively leverage the power of coloc_sat for co-locating satellite data products.