Commit 9b86cbe3 authored by Arthur Vigan's avatar Arthur Vigan
Browse files

Update band seetings to match the values in HSIM

parent 00162a0f
......@@ -101,209 +101,225 @@ BAND = 'TEST_H' # %Choose between the bands defined hereafter (use a valid stri
### Bands ###
VIS_band = [0.463, 0.641, 0.820, 3500]
IZJ_band = [0.810, 1.090, 1.369, 3500]
HK_band = [1.45, 1.950, 2.45, 3500]
VIS_band = [0.458, 0.639, 0.820, 3100]
IZJ_band = [0.811, 1.090, 1.369, 3355]
HK_band = [1.450, 1.950, 2.450, 3355]
# Test band with R=7000 resolution, but only 43 wavelengths
H_small_band = [1.620, 1.625, 1.630, 7000]
IZ_band = [0.830, 0.940, 1.050, 7000]
J_band = [1.046, 1.185, 1.324, 7000]
H_band = [1.435, 1.625, 1.815, 7000]
K_band = [1.951, 2.210, 2.469, 7000]
IZ_band = [0.830, 0.940, 1.050, 7104]
J_band = [1.046, 1.185, 1.324, 7104]
H_band = [1.435, 1.625, 1.815, 7104]
K_band = [1.951, 2.210, 2.469, 7104]
Z_high = [0.829, 0.866, 0.902, 17000]
#J_high=[1.190, 1.245, 1.300, 17000] # not actually present in harmoni
H_high = [1.541, 1.609, 1.676, 17000]
#K_high=[2.093, 2.190, 2.287, 17000] # old definition ; not correct anymore
K1_high = [2.024, 2.113, 2.202, 17000]
K2_high = [2.197, 2.294, 2.390, 17000]
Z_high = [0.828, 0.865, 0.902, 17385]
H_high = [1.538, 1.608, 1.678, 17385]
K1_high = [2.017, 2.109, 2.201, 17385]
K2_high = [2.199, 2.300, 2.400, 17385]
if BAND=='TEST_H':
if BAND == 'TEST_H':
N_LD = 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_K_SP1_ADC.fits')
#MASK_OFFSET = -7 #mas
# MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
# 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 = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
# MASK_OFFSET = 0 # mas
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = 7 #mas
FPM = 'FPM_2'
#MASK = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
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 = -2#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 = -2#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 = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
# MASK_OFFSET = -22 # mas
MASK = fits.getdata(COM_DIR + 'FPM_H_SP2_ADC.fits')
MASK_OFFSET = -15 #mas
FPM = 'FPM_2'
#MASK = fits.getdata(COM_DIR + 'FPM_HK_SP1_ADC.fits')
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 = 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]))
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]))
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 = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
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]))
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 = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
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 = fits.getdata(COM_DIR + 'FPM_K_SP1_ADC.fits')
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 = fits.getdata(COM_DIR + 'FPM_HK_SP1_ADC.fits')
MASK_OFFSET = -15 # mas
FPM = 'FPM_H'
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 = fits.getdata(COM_DIR + 'FPM_HK_SP2_ADC.fits')
MASK_OFFSET = -30 # mas
FPM = 'FPM_K'
# MASK = fits.getdata(COM_DIR + 'FPM_HK_SP2_ADC.fits')
# Science wavelength vector
if N_LD==1:
if N_LD == 1:
lambda_vect = np.array([np.mean((LBD_min,LBD_max))])
else:
lambda_vect = np.linspace(LBD_min,LBD_max,N_LD)
......
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