mirar.pipelines package
Central location for all pipelines. This is where you should add new pipelines.
- exception mirar.pipelines.PipelineConfigError[source]
Bases:
ProcessorError,KeyErrorError raised when a pipeline is not found
- mirar.pipelines.get_pipeline(instrument: str, *args, selected_configurations=None, **kwargs) Pipeline[source]
Function to get pipeline
- Parameters:
instrument – Name of instrument
args – args
selected_configurations – Configurations to use
kwargs – kwargs
- Returns:
pipeline
Subpackages
- mirar.pipelines.gmos package
- mirar.pipelines.lmi package
- Subpackages
- mirar.pipelines.lmi.config package
- mirar.pipelines.lmi.generator package
lmi_astrometric_catalog_generator()lmi_photometric_catalog_generator()lmi_reference_image_generator()lmi_reference_image_resampler()lmi_reference_psfex()lmi_reference_sextractor()lmi_sdss_reference_cat_purifier()lmi_zogy_catalogs_purifier()- Submodules
- mirar.pipelines.lmi.generator.sources module
- mirar.pipelines.lmi.generator.stacks module
- mirar.pipelines.lmi.generator.target module
- Submodules
- mirar.pipelines.lmi.blocks module
- mirar.pipelines.lmi.lmi_pipeline module
- mirar.pipelines.lmi.load_lmi_image module
- Subpackages
- mirar.pipelines.sedmv2 package
- mirar.pipelines.summer package
- mirar.pipelines.wasp package
- Subpackages
- mirar.pipelines.wasp.config package
- mirar.pipelines.wasp.generator package
wasp_astrometric_catalog_generator()wasp_photometric_catalog_generator()wasp_reference_image_generator()wasp_reference_image_resampler()wasp_reference_psfex()wasp_reference_sextractor()wasp_sdss_reference_cat_purifier()wasp_zogy_catalogs_purifier()- Submodules
- mirar.pipelines.wasp.generator.stacks module
- mirar.pipelines.wasp.generator.target module
- Submodules
- mirar.pipelines.wasp.blocks module
- mirar.pipelines.wasp.load_wasp_image module
- mirar.pipelines.wasp.wasp_pipeline module
- Subpackages
- mirar.pipelines.winter package
- Subpackages
- mirar.pipelines.winter.config package
- mirar.pipelines.winter.generator package
- Submodules
- mirar.pipelines.winter.generator.astrometry module
- mirar.pipelines.winter.generator.candidates module
- mirar.pipelines.winter.generator.photometry module
- mirar.pipelines.winter.generator.realbogus module
- mirar.pipelines.winter.generator.reduce module
- mirar.pipelines.winter.generator.references module
- mirar.pipelines.winter.generator.utils module
- mirar.pipelines.winter.models package
- 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.fourier_bkg_model module
- mirar.pipelines.winter.ingest_references module
- mirar.pipelines.winter.load_winter_image module
- mirar.pipelines.winter.nlc module
- mirar.pipelines.winter.run module
- mirar.pipelines.winter.validator module
- mirar.pipelines.winter.winter_pipeline module
- mirar.pipelines.winter.write_obslog module
- Subpackages
- 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
- get_flowchart_output_path() Path[source]
Generates a unique path for the flowchart summary, in the output data directory. Makes the parent directory structure if needed.
- Returns:
path for error summary
- get_latest_configuration() list[BaseProcessor][source]
Get the latest configuration used by the pipeline
- Returns:
list of processors
- 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 = {'git': <class 'mirar.pipelines.git.git_pipeline.GITPipeline'>, 'gmos': <class 'mirar.pipelines.gmos.gmos_pipeline.GMOSPipeline'>, 'lmi': <class 'mirar.pipelines.lmi.lmi_pipeline.LMIPipeline'>, 'sedmv2': <class 'mirar.pipelines.sedmv2.sedmv2_pipeline.SEDMv2Pipeline'>, 'summer': <class 'mirar.pipelines.summer.summer_pipeline.SummerPipeline'>, 'wasp': <class 'mirar.pipelines.wasp.wasp_pipeline.WASPPipeline'>, '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