ecpi.process.imag.core.mini_pipeline module

Section author: ECLAIRs GP team

Mini-pipeline used in IMAGING

Summary

Classes:

ImagingMiniPipeline

mini-pipeline block used in IMAGING.

SkyImages

Build and save computed sky images

Class diagram:

Reference

class ImagingMiniPipeline(catalog_simu=<ecpi.common.sky.catalog.CatalogFovBasic object>, simulator=None, deconvolver=None, src_finder=None)[source]

Bases: object

mini-pipeline block used in IMAGING.

includes simu shadowgrams, deconv sky, src finder and fit

deconv(decon_step='just_decon')[source]

Build the sky image of the source seen by ECLAIRs Need self.shadowgrams to be set before.

Set self.sky_count, self.sky_variance and self.sky_snr decon_step = with_init or with_prep (or just_decon)

Parameters

decon_step (string) – what deconvolution step to begin with. Choices={‘with_init’, ‘with_prep’}. Default=’just_decon’.

fit_source(snr_min, peak_position=None)[source]

Find then fit the source in the sky image Need self.sky_count and self.sky_snr to be set before.

Parameters
  • snr_min (float) – snr limit for the source localization. Default=5.

  • peak_position – position of the peak to be fitted,

if already known. [pix_y, pix_z]. Default=None :type peak_position: [float, float]

get_shadowgrams()[source]

Set shadowgrams attribute

get_shadowgrams_var()[source]

Set shadowgrams_var attribute

reset(catalog_simu=<ecpi.common.sky.catalog.CatalogFovBasic object>)[source]

Reset all attributes to 0

Parameters

catalog_simu (CatalogFovBasic) – sources catalog to be use by the simulator

set_shadowgrams(shds)[source]

Set shadowgrams attribute to new value

set_shadowgrams_var(shdsv)[source]

Set shadowgrams_var attribute to new value

simu_shadowgram(time_exp_s, normalized=False)[source]

Build the shadowgrams model of the source using the simulation module. No background is considered in this simulation.

Set self.shadowgrams

Parameters
  • time_exp_s (float) – observation time in s

  • normalized (bool) – to get shadowgram’s values between 0 and 1 (default=False)

class SkyImages(sky_count, sky_var, src_subimage_size, exposure, time_exp_mn, attitude)[source]

Bases: object

Build and save computed sky images

arf_correction(dpix, energy_range)[source]

Apply the arf correction on the sky count image

Warning

unused

Parameters
build_wcs(attitude)[source]

build the wcs object from the attitude

Parameters

attitude ([float, float, float]) – [ra, dec, ori] in degrees

Returns

wcs object from attitude

Return type

astropy.wcs.WCS

compute_snr(sky_count, sky_var)[source]

compute snr image from sky_count and sky_var

sky_snr cleaned of <1E-9 values in sky_var

Parameters
  • sky_count (2D array) – sky image

  • sky_var (2D array) – sky variance image

Returns

sky_snr

Return type

2D array

cos_theta_correction(instru_eclairs=          InstruECLAIRs object         =====================         Mask aperture: 0.4         Half-cross size (cm): 0.79468085         Detector pixel size (cm): 0.4         Detector pixel pitch size (cm): 0.45         Mask-detector distance (cm): 45.77         Mask pixel size (cm): 1.1393617         Number of mask pixels: 46         Mask total size (cm): 54                  Left-bottom submask         -------------------         y range: [-26.43031915, -1.364361749999997] | z range: [-26.43031915, -1.364361749999997]                  Right-bottom submask         -------------------         y range: [1.3643616838165284, 26.43031908381653] | z range: [-26.43031915, -1.364361749999997]                  Left-up submask         -------------------         y range: [-26.43031915, -1.364361749999997] | z range: [1.3643616838165284, 26.43031908381653]                  Right-up submask         -------------------         y range: [1.3643616838165284, 26.43031908381653] | z range: [1.3643616838165284, 26.43031908381653]         )[source]

Apply off axis corrections on the sky images

Parameters

instru_eclairs (InstruECLAIRs) – ECLAIRs instrument

irf_correction(dpix)[source]

Apply the irf correction matrix on the sky count image

Parameters

dpix (ECLAIRsDetectorEffectDefault) – instrument effects

remove_src_model(model_shadowgram, model_count, model_var, model_pos, model_name)[source]

substract the src model from the sky

build new cleaned sky images and new remains sky images add the source model image and name at self.models

model_count, model_var = src image model_pos = [pix_x, pix_y] src position

Parameters
  • model_shadowgram (2D array) – shadowgrams of the source model

  • model_count (2D array) – sky image of the source

  • model_var (2D array) – sky variance image of the source

  • model_pos (['', int, int]) – position of the source in the sky image [‘’, pix_x, pix_y]

  • model_name (string) – name of the source

sin_theta(image, instru_eclairs)[source]

Return the sin theta image

Parameters
  • image (2d-array) – sky image to be corrected

  • instru_eclairs (InstruECLAIRs) – ECLAIRs instrument

Returns

sin theta image (same shape as image)

Return type

2d array