Source code for ecpi.process.pipeline.ecpi_config

'''pipeline configuration module

Created on 31 mai 2018

@author: Catalano Camille, APC
'''


from ecpi.process.imag.core.config import ImagConfiguration
from ecpi.process.bube.core.config import BubeConfiguration
    
        
[docs]class PipelineConfiguration(object): """configuration parameters and modules for the pipeline """ def __init__(self, version): """**constructor** :param version: pipeline version to determine which deconv and simu module to use ['1' or '1.1'] :type version: string """ self.error_code = "OK" self.error_message = "I love it when a plan comes together." self.version = version self.create_name()
[docs] def create_name(self): """build the name of the pipeline, including the version name of the pipeline = "ECLAIRs pipeline v" + self.version """ self.name = "ECLAIRs pipeline v" + self.version
[docs] def build_bube_config(self, energy_ranges, bkg_correction_mode): """ :param energy_ranges: different energy ranges (in PI) to extract the images [[low_energy, high_energy],[]] :type energy_ranges: [[int, int]] """ self.bube = BubeConfiguration(energy_ranges, bkg_correction_mode) if self.bube.error_code != "OK": self.error_code = self.bube.error_code self.error_message = self.bube.error_message
[docs] def build_imag_config(self, dict_imag_cfg, ref_catalog_fov=None): """ :param dict_imag_cfg: dictionary containing the config parameters for IMAG. Values description below. :type dict_imag_cfg: dict :param ref_catalog_fov: FOV x-ray sources reference catalog (default=None) :type ref_catalog_fov: CatalogFOV_ECLAIRs. :var version: pipeline version to determine which deconv and simu module to use ['1' or '1.1'] :type version: string :var src_subimage_size: nb of pixels around the detected source (radius) kept in the final sky image :type src_subimage_size: int :var snr_limit: snr limit to stop at the source detection algorithm :type snr_limit: float >0 :var fit_function: function to fit the precise source location. :type fit_function: string :var fit_sigma: standard deviation of the gaussian fit_function. Default is 1.555. :type fit_sigma: float>0 :var off_axis: off axis correction. Default=None :type off_axis: None, cos_theta or irf """ self.imag = ImagConfiguration(dict_imag_cfg, ref_catalog_fov) self.imag.build() if self.imag.error_code != "OK": self.error_code = self.imag.error_code self.error_message = self.imag.error_message