Commit 8875a252 authored by Arthur Vigan's avatar Arthur Vigan
Browse files

Update band section

parent a76307cd
......@@ -114,186 +114,203 @@ H_high = [1.541, 1.609, 1.676, 17000]
K1_high = [2.024, 2.113, 2.202, 17000]
K2_high = [2.197, 2.294, 2.390, 17000]
if BAND=='TEST_H':
N_LD = 3
if BAND == 'TEST_H':
N_LD = 6
LBD_min = H_band[0]*1e-6
LBD_max = H_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_1'
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_NoADC.fits')
FPM = 'FPM_H'
else:
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
#MASK_OFFSET = -7 #mas
#MASK_OFFSET = -7 # mas
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_2'
elif BAND=='TEST_K':
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
elif BAND == 'TEST_K':
N_LD = 3
LBD_min = K_band[0]*1e-6
LBD_max = K_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_NoADC.fits')
FPM = 'FPM_K'
else:
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
#MASK_OFFSET = 0 #mas
#MASK_OFFSET = 0 # mas
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 7 #mas
FPM = 'FPM_2'
MASK_OFFSET = 7 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_3'
elif BAND=='HK':
N_LD=round((HK_band[2]-HK_band[0])/(HK_band[1]/HK_band[3]))
MASK_OFFSET = 0 # mas
FPM = 'FPM_K'
elif BAND == 'HK':
N_LD = round((HK_band[2]-HK_band[0])/(HK_band[1]/HK_band[3]))
LBD_min = HK_band[0]*1e-6
LBD_max = HK_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_HK_SP1_NoADC.fits')
FPM = 'FPM_HK'
else:
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
#MASK_OFFSET = -22 #mas
#MASK_OFFSET = -22 # mas
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = -15 #mas
FPM = 'FPM_2'
MASK_OFFSET = -15 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_HK_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_HK_SP2_NoADC.fits')
FPM = 'FPM_HK'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = -30 #mas
FPM = 'FPM_3'
MASK_OFFSET = -30 # mas
FPM = 'FPM_K'
#MASK = fits.getdata(COM_DIR + 'FPM_HK_SP2_ADC.fits')
elif BAND=='H':
N_LD=round((H_band[2]-H_band[0])/(H_band[1]/H_band[3]))
elif BAND == 'H':
N_LD = round((H_band[2]-H_band[0])/(H_band[1]/H_band[3]))
LBD_min = H_band[0]*1e-6
LBD_max = H_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_1'
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_2'
elif BAND=='K':
N_LD=round((K_band[2]-K_band[0])/(K_band[1]/K_band[3]))
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
elif BAND == 'K':
N_LD = round((K_band[2]-K_band[0])/(K_band[1]/K_band[3]))
LBD_min = K_band[0]*1e-6
LBD_max = K_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 7 #mas
FPM = 'FPM_2'
MASK_OFFSET = 7 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_3'
elif BAND=='H_high':
N_LD=round((H_high[2]-H_high[0])/(H_high[1]/H_high[3]))
MASK_OFFSET = 0 # mas
FPM = 'FPM_K'
elif BAND == 'H_high':
N_LD = round((H_high[2]-H_high[0])/(H_high[1]/H_high[3]))
LBD_min = H_high[0]*1e-6
LBD_max = H_high[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_1'
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_2'
#elif BAND=='K_high':
# N_LD=round((K_high[2]-K_high[0])/(K_high[1]/K_high[3]))
# LBD_min = K_high[0]*1e-6
# LBD_max = K_high[2]*1e-6
elif BAND=='K1_high':
N_LD=round((K1_high[2]-K1_high[0])/(K1_high[1]/K1_high[3]))
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
#elif BAND == 'K_high':
# N_LD=round((K_high[2]-K_high[0])/(K_high[1]/K_high[3]))
# LBD_min = K_high[0]*1e-6
# LBD_max = K_high[2]*1e-6
elif BAND == 'K1_high':
N_LD = round((K1_high[2]-K1_high[0])/(K1_high[1]/K1_high[3]))
LBD_min = K1_high[0]*1e-6
LBD_max = K1_high[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 7 #mas
FPM = 'FPM_2'
MASK_OFFSET = 7 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_3'
elif BAND=='K2_high':
N_LD=round((K2_high[2]-K2_high[0])/(K2_high[1]/K2_high[3]))
MASK_OFFSET = 0 # mas
FPM = 'FPM_K'
elif BAND == 'K2_high':
N_LD = round((K2_high[2]-K2_high[0])/(K2_high[1]/K2_high[3]))
LBD_min = K2_high[0]*1e-6
LBD_max = K2_high[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 7 #mas
FPM = 'FPM_2'
MASK_OFFSET = 7 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_3'
MASK_OFFSET = 0 # mas
FPM = 'FPM_K'
else:
#log.info('Invalid band ; switching to test band: 3 wavelengths (1.650, 1.925, 2.200 um)')
N_LD=3
N_LD = 3
LBD_min = 1.65e-6
LBD_max = 2.20e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_HK_SP1_NoADC.fits')
FPM = 'FPM_HK'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
#MASK = fits.getdata(COM_DIR + 'FPM_HK_SP1_ADC.fits')
MASK_OFFSET = -15 #mas
FPM = 'FPM_2'
MASK_OFFSET = -15 # mas
FPM = 'FPM_2'
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_HK_SP2_NoADC.fits')
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = -30 #mas
FPM = 'FPM_3'
MASK_OFFSET = -30 # mas
FPM = 'FPM_K'
#MASK = fits.getdata(COM_DIR + 'FPM_HK_SP2_ADC.fits')
# Science wavelength vector
......
......@@ -232,186 +232,203 @@ if __name__ == '__main__':
K1_high = [2.024, 2.113, 2.202, 17000]
K2_high = [2.197, 2.294, 2.390, 17000]
if BAND=='TEST_H':
if BAND == 'TEST_H':
N_LD = 6
LBD_min = H_band[0]*1e-6
LBD_max = H_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_1'
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_NoADC.fits')
FPM = 'FPM_H'
else:
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
#MASK_OFFSET = -7 #mas
#MASK_OFFSET = -7 # mas
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_2'
elif BAND=='TEST_K':
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
elif BAND == 'TEST_K':
N_LD = 3
LBD_min = K_band[0]*1e-6
LBD_max = K_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_NoADC.fits')
FPM = 'FPM_K'
else:
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
#MASK_OFFSET = 0 #mas
#MASK_OFFSET = 0 # mas
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 7 #mas
FPM = 'FPM_2'
MASK_OFFSET = 7 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_3'
elif BAND=='HK':
N_LD=round((HK_band[2]-HK_band[0])/(HK_band[1]/HK_band[3]))
MASK_OFFSET = 0 # mas
FPM = 'FPM_K'
elif BAND == 'HK':
N_LD = round((HK_band[2]-HK_band[0])/(HK_band[1]/HK_band[3]))
LBD_min = HK_band[0]*1e-6
LBD_max = HK_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_HK_SP1_NoADC.fits')
FPM = 'FPM_HK'
else:
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
#MASK_OFFSET = -22 #mas
#MASK_OFFSET = -22 # mas
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = -15 #mas
FPM = 'FPM_2'
MASK_OFFSET = -15 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_HK_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_HK_SP2_NoADC.fits')
FPM = 'FPM_HK'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = -30 #mas
FPM = 'FPM_3'
MASK_OFFSET = -30 # mas
FPM = 'FPM_K'
#MASK = fits.getdata(COM_DIR + 'FPM_HK_SP2_ADC.fits')
elif BAND=='H':
N_LD=round((H_band[2]-H_band[0])/(H_band[1]/H_band[3]))
elif BAND == 'H':
N_LD = round((H_band[2]-H_band[0])/(H_band[1]/H_band[3]))
LBD_min = H_band[0]*1e-6
LBD_max = H_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_1'
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_2'
elif BAND=='K':
N_LD=round((K_band[2]-K_band[0])/(K_band[1]/K_band[3]))
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
elif BAND == 'K':
N_LD = round((K_band[2]-K_band[0])/(K_band[1]/K_band[3]))
LBD_min = K_band[0]*1e-6
LBD_max = K_band[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 7 #mas
FPM = 'FPM_2'
MASK_OFFSET = 7 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_3'
elif BAND=='H_high':
N_LD=round((H_high[2]-H_high[0])/(H_high[1]/H_high[3]))
MASK_OFFSET = 0 # mas
FPM = 'FPM_K'
elif BAND == 'H_high':
N_LD = round((H_high[2]-H_high[0])/(H_high[1]/H_high[3]))
LBD_min = H_high[0]*1e-6
LBD_max = H_high[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP1_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_1'
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_NoADC.fits')
FPM = 'FPM_H'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_2'
#elif BAND=='K_high':
MASK_OFFSET = 0 # mas
FPM = 'FPM_H'
#elif BAND == 'K_high':
# N_LD=round((K_high[2]-K_high[0])/(K_high[1]/K_high[3]))
# LBD_min = K_high[0]*1e-6
# LBD_max = K_high[2]*1e-6
elif BAND=='K1_high':
N_LD=round((K1_high[2]-K1_high[0])/(K1_high[1]/K1_high[3]))
elif BAND == 'K1_high':
N_LD = round((K1_high[2]-K1_high[0])/(K1_high[1]/K1_high[3]))
LBD_min = K1_high[0]*1e-6
LBD_max = K1_high[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 7 #mas
FPM = 'FPM_2'
MASK_OFFSET = 7 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_3'
elif BAND=='K2_high':
N_LD=round((K2_high[2]-K2_high[0])/(K2_high[1]/K2_high[3]))
MASK_OFFSET = 0 # mas
FPM = 'FPM_K'
elif BAND == 'K2_high':
N_LD = round((K2_high[2]-K2_high[0])/(K2_high[1]/K2_high[3]))
LBD_min = K2_high[0]*1e-6
LBD_max = K2_high[2]*1e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 7 #mas
FPM = 'FPM_2'
MASK_OFFSET = 7 # mas
FPM = 'FPM_H'
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_NoADC.fits')
FPM = 'FPM_K'
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = 0 #mas
FPM = 'FPM_3'
MASK_OFFSET = 0 # mas
FPM = 'FPM_K'
else:
#log.info('Invalid band ; switching to test band: 3 wavelengths (1.650, 1.925, 2.200 um)')
N_LD=3
N_LD = 3
LBD_min = 1.65e-6
LBD_max = 2.20e-6
if APODIZER == 'SP_1':
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_HK_SP1_NoADC.fits')
FPM = 'FPM_HK'
else:
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
#MASK = fits.getdata(COM_DIR + 'FPM_HK_SP1_ADC.fits')
MASK_OFFSET = -15 #mas
MASK_OFFSET = -15 # mas
FPM = 'FPM_2'
else:
if ADC_flag == 0:
MASK = fits.getdata(COM_DIR + 'FPM_HK_SP2_NoADC.fits')
else:
MASK = fits.getdata(COM_DIR + 'FPM_K_SP2_ADC.fits')
MASK_OFFSET = -30 #mas
FPM = 'FPM_3'
MASK_OFFSET = -30 # mas
FPM = 'FPM_K'
#MASK = fits.getdata(COM_DIR + 'FPM_HK_SP2_ADC.fits')
# Science wavelength vector
......
Markdown is supported
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