DetectorImages¶
-
class
DetectorImages(shadowgrams, shadowgrams_var, obs_time, energy_ranges)[source]¶ Bases:
objectbuild and save detector images for a defined observation time
constructor
Parameters: - shadowgrams (list(2D array)) – detector images
- shadowgrams_var (list(2D array)) – detector variance images
- obs_time (float) – observation time
- energy_ranges ([[int, int]]) – different energy ranges (in PI) to extract the images [[low_energy, high_energy],[]]
Methods Summary
background_correction(mode)Correct the shadowgrams from the background background_nonuniformity_correction([…])Correct background non uniformity using the pixel detector efficiencies. flat_background_correction()Correct the shadowgrams from a flat background get_shadowgrams()Return attribute shadowgrams get_shadowgrams_var()Return attribute shadowgrams_var modelbased_background_correction([cxb_filename])Correct the shadowgrams from a CXB model read from a file shapebased_background_correction([…])Correct the shadowgrams from a CXB shape read from a pixel solid angle file. shapebased_background_correction_fit([…])Correct the shadowgram from a shape based on the pixel solid angle image Methods Documentation
-
background_correction(mode)[source]¶ Correct the shadowgrams from the background
available choices for mode are: ‘no_correction’ or ‘shape_based’
Parameters: mode (str) – CXB background correction mode.
-
background_nonuniformity_correction(efficiency_filename='/home/user/projet/ECLAIRs/ecpi/common/data/instru/efficiency_matrix.fits', nonunif_filename='/home/user/projet/ECLAIRs/ecpi/common/data/instru/non_uniformity_matrix.fits')[source]¶ Correct background non uniformity using the pixel detector efficiencies.
Parameters: - efficiency_filename (string) – PATH/filename of the detector efficiency array
- nonunif_filename (string) – PATH/filename of the detector non-uniformity array
-
flat_background_correction()[source]¶ Correct the shadowgrams from a flat background
Warning
dead code ??
the correction is made by the subtraction of the mean of the shadowgrams corrected shadowgrams is saved in self.shadowgrams_bgcorrected
-
modelbased_background_correction(cxb_filename='/home/user/projet/ECLAIRs/ecpi/common/data/instru/cxb_model_per_channel_1s.fits')[source]¶ Correct the shadowgrams from a CXB model read from a file
Parameters: cxb_filename (string) – PATH/filename of the CXB model file
-
shapebased_background_correction(solidangle_filename='/home/user/projet/ECLAIRs/ecpi/common/data/instru/pixels_solid_angle.fits')[source]¶ Correct the shadowgrams from a CXB shape read from a pixel solid angle file.
Parameters: solidangle_filename (string) – PATH/filename of the solid angle image
-
shapebased_background_correction_fit(solidangle_filename='/home/user/projet/ECLAIRs/ecpi/common/data/instru/pixels_solid_angle.fits')[source]¶ Correct the shadowgram from a shape based on the pixel solid angle image
Warning
to be updated from ADD
the pixel solid angle shape and an offset are fitted to the shadowgrams
Parameters: solidangle_filename (string) – PATH/filename of the solid angle image