mirar.pipelines package
Subpackages
- mirar.pipelines.sedmv2 package
- mirar.pipelines.summer package
- mirar.pipelines.winter package
- Subpackages
- Submodules
- mirar.pipelines.winter.blocks module
- mirar.pipelines.winter.build_references module
- mirar.pipelines.winter.constants module
- mirar.pipelines.winter.fix_headers module
- mirar.pipelines.winter.generator module
ReductionQualityErrorcheck_winter_local_catalog_overlap()ref_sextractor()select_winter_flat_images()winter_astrometric_ref_catalog_generator()winter_astrometric_ref_catalog_namer()winter_astrometry_sextractor_catalog_purifier()winter_astrostat_catalog_purifier()winter_candidate_annotator_filterer()winter_candidate_avro_fields_calculator()winter_candidate_quality_filterer()winter_fourier_filtered_image_generator()winter_photometric_catalog_generator()winter_photometric_ref_catalog_namer()winter_ref_catalog_namer()winter_ref_photometric_img_catalog_purifier()winter_reference_generator()winter_reference_image_resampler_for_zogy()winter_reference_phot_calibrator()winter_reference_psfex()winter_reference_sextractor()winter_reference_stack_annotator()winter_stackid_annotator()winter_wfau_component_image_stacker()
- mirar.pipelines.winter.load_winter_image module
- mirar.pipelines.winter.winter_pipeline module
- mirar.pipelines.wirc package
Submodules
mirar.pipelines.base_pipeline module
- Module containing the base of the
Pipeline class.
Each Pipeline will have several
configurations. A configuration corresponds to a list of
BaseProcessor objects.
The pipeline will process data using a chosen list of these individual
BaseProcessor objects.
- class mirar.pipelines.base_pipeline.Pipeline(selected_configurations: str | list[str] = 'default', night: int | str = '')[source]
Bases:
objectBase class for pipelines.
- Each pipeline must have the following class variables:
a name (the name of the instrument
pipeline configurations
gain
a
_load_raw_image()function
to load raw images and modify the headers etc as required
- add_configuration(configuration_name: str, configuration: list[BaseProcessor])[source]
Add a new configuration to the pipeline.
- Parameters:
configuration_name – Name of new configuration
configuration – the list of processors
- Returns:
None
- property all_pipeline_configurations
Dictionary containing all pipeline configurations
- static configure_processors(processors: list[BaseProcessor], sub_dir: str = '') list[BaseProcessor][source]
Propagates the correct nightly setting to a list of processors.
- Parameters:
processors – Processors to configure
sub_dir – night sub directory to use
- Returns:
Updated processors
- default_cal_requirements = None
- static download_raw_images_for_night(night: str | int)[source]
Function to download images from a remote server
- Parameters:
night – Night of data to download
- Returns:
None
- get_error_output_path() Path[source]
Generates a unique path for the error summary, in the output data directory. Makes the parent directory structure if needed.
- Returns:
path for error summary
- load_pipeline_configuration(configuration: str = 'default') list[BaseProcessor][source]
Load a particular named configuration from self.all_pipeline_configurations
- Parameters:
configuration – configuration to be used
- Returns:
list of processors
- load_raw_image(path: str) ImageBatch[source]
Function to load in a raw image and create an
Imageobject which can then be processed further- Parameters:
path – path of raw image
- Returns:
Image object
- property name
Unique name of pipeline , used to call it from the command via
get_pipeline(). Should be the name of the instrument.
- property non_linear_level
Non-linear level of instrument
- pipelines = {'sedmv2': <class 'mirar.pipelines.sedmv2.sedmv2_pipeline.SEDMv2Pipeline'>, 'summer': <class 'mirar.pipelines.summer.summer_pipeline.SummerPipeline'>, 'winter': <class 'mirar.pipelines.winter.winter_pipeline.WINTERPipeline'>, 'wirc': <class 'mirar.pipelines.wirc.wirc_pipeline.WircPipeline'>}
- postprocess_configuration(errorstack: ErrorStack, selected_configurations: str | list[str], processed_images: list[str] | None = None) list[BaseProcessor][source]
Generate a postprocessing/cleanup processor sequence, Used by
Monitorclass for realtime processing. The first step is to update the header of images with any saved errors in errorstack.- Parameters:
errorstack – Caught errors
selected_configurations – Configurations to use.
processed_images – list of processed images
- Returns:
list of postprocess processors
- reduce_images(dataset: Dataset | None = None, output_error_path: str | None = None, catch_all_errors: bool = True, selected_configurations: str | list[str] | None = None) tuple[Dataset, ErrorStack][source]
Function to process a given dataset.
- Parameters:
dataset – dataset to process (can be empty)
output_error_path – optional path to write error summary
catch_all_errors – Either catch errors, or just immediately raise them
selected_configurations – Configuration to use
- Returns:
Post-processing dataset and summary of errors caught
- set_configuration(new_configuration: str = 'default') list[BaseProcessor][source]
Loads a new configuration for the pipeline
- Parameters:
new_configuration – name of configuration
- Returns:
list of corresponding processors