pysiral.l2proc
Created on Fri Jul 24 14:04:27 2015
@author: Stefan
Submodules
Classes
A container providing the ordered list of processing steps |
|
Template for default pysiral class with logging/error handling capabilities |
|
Main configuration class for the Level-2 Processor |
Package Contents
- class pysiral.l2proc.Level2ProcessorStepOrder(cfg)
Bases:
pysiral.core.legacy_classes.DefaultLoggingClassA container providing the ordered list of processing steps as initialized classes for each trajectory
- cfg
- _classes = []
- get_procstep_classes()
Retrieves the required classes from the processor definition files and stores them in a list without initializing them. This way a freshly initialized version can be supplied to each l2 data object without risk of interference of class properties :return:
- get_algorithm_error_flag_bit(procstep_module)
Return the corresponding bit (0-15) for the procstep module :param procstep_module: str :return:
- validate() bool
Checkout the difference processing steps and validate input/output variables in the order of the steps :return:
- property class_list
Return a list of not initialized classes (class instances with the options from the level-2 :return:
- property class_instances
Return a list of initialized classes (class instances with the options from the level-2 processor definition file passed to the class instance) :return:
- class pysiral.l2proc.Level2Processor(product_def, auxclass_handler=None)
Bases:
pysiral.core.legacy_classes.DefaultLoggingClassTemplate for default pysiral class with logging/error handling capabilities
- _l2def
- _auxclass_handler = None
- _registered_auxdata_handlers = []
- _auxhandlers
- procsteps = None
- _output_handler
- _orbit
- _l1b_files = []
- _config
- _initialized = False
- set_l1b_files(l1b_files)
- process_l1b_files(l1b_files)
- run()
Run the processor
- initialize_processor()
Read required auxiliary data sets
- set_auxdata_handler()
Adds all auxdata types from the l2 config file to the Level-2 processor instance :return: None
- set_procstep_handler()
Add and initialize Level-2 processor items
- Returns:
None
- execute_l2_processor_steps(l1b, l2)
Executes all Level-2 processor steps.
- Note: This is where the algorithm are executed in their order defined
in the Level-2 processor definition file
- Parameters:
l1b
l2
- Returns:
None
- _report_output_location()
- _l2_processing_of_orbit_files()
Orbit-wise level2 processing
- _read_l1b_file(l1b_file)
Read a L1b data file (l1bdata netCDF)
- get_auxiliary_data(l1p: pysiral.l1data.L1bdataNCFile, l2: pysiral.l2data.Level2Data)
Transfer along-track data from all registered auxdata handler to the l2 data object
- _create_l2_outputs(l2)
- _add_to_orbit_collection(l2)
- property orbit
- property has_empty_file_list
- property l2def
- property registered_auxdata_handlers
- property l2_auxdata_source_dict
A dictionary that contains the descriptions of the auxiliary data sources
- class pysiral.l2proc.Level2ProductDefinition(l2_settings_file: str, force_l2def_record_type: bool = False)
Bases:
pysiral.core.legacy_classes.DefaultLoggingClassMain configuration class for the Level-2 Processor
- error
- _l2_settings_file
- _run_tag
- force_l2def_record_type = False
- _output_handler = []
- add_output_definition(output_def_file: str | pathlib.Path, period: str = 'default', overwrite_protection: bool = False) None
- _parse_l2_settings()
- _get_run_tag() str
Set the run tag (will be used for defining the output path)
- Returns:
- property run_tag
- property l2def
- property auxdata
- property procsteps
- property product_line
- property record_type
- property platform
- property version
- property file_version_tag
- property label
- property hemisphere
- property hemisphere_code
- property output_handler