Source code for process.pipeline.ecpi_config
'''pipeline configuration module
Created on 31 mai 2018
@author: Catalano Camille, APC
'''
from process.imag.core.config import ImagConfiguration
from 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):
"""
: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)
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, version, src_subimage_size, snr_limit, ref_catalog_fov=None, off_axis=None):
"""
:param version: pipeline version to determine which deconv and simu module to use ['1' or '1.1']
:type version: string
:param src_subimage_size: nb of pixels around the detected source (radius) kept in the final sky image
:type src_subimage_size: int
:param snr_limit: snr limit to stop at the source detection algorithm
:type snr_limit: float >0
:param ref_catalog_fov: FOV x-ray sources reference catalog (default=None)
:type ref_catalog_fov: CatalogFOV_ECLAIRs
:param off_axis: off axis correction. Default=None
:type off_axis: None, cos_theta or irf
"""
self.imag = ImagConfiguration(version, src_subimage_size, snr_limit, ref_catalog_fov, off_axis)
self.imag.build()
if self.imag.error_code != "OK":
self.error_code = self.imag.error_code
self.error_message = self.imag.error_message