Commit 8d23c4e8 authored by Arthur Vigan's avatar Arthur Vigan
Browse files

Remove shift of non-centered data, save vector shift

parent 372805c4
......@@ -802,6 +802,7 @@ 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)
......@@ -812,12 +813,13 @@ if __name__ == '__main__':
#print(shift_value*MASperPIXEL)
SHIFT_vector[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)
I_temp_nomask[k] = shift(I_temp_nomask[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_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')
......@@ -840,8 +842,10 @@ if __name__ == '__main__':
fits.setval(image_filename_nomask, 'DISPELEM', value=BAND)
fits.setval(image_filename_nomask, 'APODIZER', value=APODIZER)
fits.setval(image_filename_nomask, 'FPM', value=FPM)
fits.writeto(shift_filename, SHIFT_vector)
SR_filename = path_directory + 'SR.fits'.format(i)
SR_filename = path_directory + 'SR.fits'
fits.writeto(SR_filename, SR)
log.info('Total time: {0:.2f} min'.format((time.time()-start_time)/60))
......
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