Source code for ecpi.analysis.pipeline.create_mask_ijdet
'''
Created on 11 juin 2019
@author: Colley CNRS/IN2P3/APC
script de correction de l'orientation du masque en convention ijDET
'''
import ecpi.common.instru.ref_geom as rg
from ecpi.common import add_path_data_ref_eclairs
from astropy.io import fits
import matplotlib.pyplot as plt
import numpy as np
[docs]def create_mask_ref_ijdet():
hdul = fits.open(add_path_data_ref_eclairs('instru/maskECLAIRs.fits'))
mask = hdul[0].data
eg = rg.ECLAIRsGeom()
mask = np.transpose(mask)
plt.figure()
plt.title("masque ijDET")
plt.imshow(mask)
eg.save_with_kw_geom_eclairs(mask, add_path_data_ref_eclairs('instru/maskECLAIRs_xxx.fits'), 'IJDET')
hdul.close()
[docs]def create_mask_rebinned_ref_ijdet():
hdul = fits.open(add_path_data_ref_eclairs('instru/maskECLAIRs_rebinned.fits'))
mask = hdul[0].data
eg = rg.ECLAIRsGeom()
mask = np.transpose(mask)
plt.figure()
plt.title("masque rebiné ijDET")
plt.imshow(mask)
eg.save_with_kw_geom_eclairs(mask, add_path_data_ref_eclairs('instru/maskECLAIRs_rebinned_xxx.fits'), 'IJDET')
hdul.close()