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 (int) – nb of pixels around the detected source (radius) kept in the final sky image
  • exposure (2D array) – exposure from the deconvolution of sky_count
  • time_exp_mn (float) – observation time in min
  • attitude ([float, float, float]) – [ra, dec, ori] in degrees

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

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=<common.instru.model_geom.InstruECLAIRs object>)[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