Commit 24fb2a33 authored by Arthur Vigan's avatar Arthur Vigan
Browse files

Save chromatic shift array

parent 8d23c4e8
......@@ -693,7 +693,8 @@ if __name__ == '__main__':
# |_____/|_____|_| |_|\____/|______/_/ \_\_| |_____|_| \_|\_____| |______/_/ \_\_| \____/|_____/ \____/|_| \_\______|_____/
#
SR = np.zeros((len(HA_vect), N_LD))
CHROMATIC_SHIFT = np.zeros((len(HA_vect), N_LD))
log.info('Computing the different exposures...')
for i in range(len(HA_vect)):
try:
......@@ -802,7 +803,6 @@ if __name__ == '__main__':
#MASK_temp = MASK
MASK_temp = shift(MASK, [-shift_pix_FPM, 0], output=None, order=1, mode='constant', cval=0.0, prefilter=True)
SHIFT_vector = np.zeros(N_LD)
for k in range(N_LD):
if ADC_flag == 1:
shift_value = 1000*DISPER_ADC(lambda_vect[0]*1e6, lambda_vect[k]*1e6, 90-ELEVATION(DEC, HA_0), z_min, z_max)
......@@ -813,14 +813,11 @@ if __name__ == '__main__':
#print(shift_value*MASperPIXEL)
SHIFT_vector[k] = shift_value
CHROMATIC_SHIFT[i, k] = shift_value
I_temp[k] = I_temp[k]*np.flipud(MASK_temp)
I_temp[k] = shift(I_temp[k], [shift_value, 0], output=None, order=1, mode='constant', cval=0.0, prefilter=True)
image_filename = path_directory + 'PSF_HALO_ON_masked_centered_Nexp{0:04d}.fits'.format(i)
image_filename_nomask = path_directory + 'PSF_HALO_ON_notmasked_notcentered_Nexp{0:04d}.fits'.format(i)
shift_filename = path_directory + 'SHIFT_VECTOR_Nexp{0:04d}.fits'.format(i)
fits.writeto(image_filename, I_temp)
fits.setval(image_filename, 'ORIGIN', value='ESO-ARMAZONES')
fits.setval(image_filename, 'TELESCOP', value='ESO-ELT')
......@@ -832,6 +829,7 @@ if __name__ == '__main__':
fits.setval(image_filename, 'APODIZER', value=APODIZER)
fits.setval(image_filename, 'FPM', value=FPM)
image_filename_nomask = path_directory + 'PSF_HALO_ON_notmasked_notcentered_Nexp{0:04d}.fits'.format(i)
fits.writeto(image_filename_nomask, I_temp_nomask)
fits.setval(image_filename_nomask, 'ORIGIN', value='ESO-ARMAZONES')
fits.setval(image_filename_nomask, 'TELESCOP', value='ESO-ELT')
......@@ -843,7 +841,8 @@ if __name__ == '__main__':
fits.setval(image_filename_nomask, 'APODIZER', value=APODIZER)
fits.setval(image_filename_nomask, 'FPM', value=FPM)
fits.writeto(shift_filename, SHIFT_vector)
shift_filename = path_directory + 'CHROMATIC_SHIFT.fits'
fits.writeto(shift_filename, CHROMATIC_SHIFT)
SR_filename = path_directory + 'SR.fits'
fits.writeto(SR_filename, SR)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment