SkyImages

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

Bases: object

Build and save computed sky images

Constructor

exposure = deconvolution_module.remove_padding_from_sky(deconvolution_module.A) * time_exp_mn * 60

3 group of sky images:
  • initial_sky : set by the constructor
  • cleaned_sky : initial_sky cleaned by a source model, keeping the source
  • remains_sky : initial_sky entirely cleaned by a source model
Parameters:
  • sky_count (2D array) – a deconvolved sky array
  • sky_var (2D array) – a deconvolved variance sky array
  • src_subimage_size – nb of pixels around the detected

source (radius) kept in the final sky image :type src_subimage_size: int :param exposure: exposure from the deconvolution of sky_count :type exposure: 2D array :param time_exp_mn: observation time in min :type time_exp_mn: float :param attitude: [ra, dec, ori] in degrees :type attitude: [float, float, float]

Methods Summary

arf_correction(dpix, energy_range) Apply the arf correction on the sky count image
build_wcs(attitude) build the wcs object from the attitude
compute_snr(sky_count, sky_var) compute snr image from sky_count and sky_var
cos_theta_correction([instru_eclairs]) Apply off axis corrections on the sky images
irf_correction(dpix) Apply the irf correction matrix on the sky count image
remove_src_model(model_shadowgram, …) substract the src model from the sky
sin_theta(image, instru_eclairs) Return the sin theta image

Methods Documentation

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