_util.py 662 Bytes
Newer Older
Fang Yuedong's avatar
Fang Yuedong committed
1
2
3

def get_obs_id(img_type='SCI', project_cycle=6, run_counter=0, pointing_num=0):
    obs_type = {'SCI': '01', 'BIAS': '03', 'DARK': '07', 'FLAT': '11', 'CRS': '98', 'CRD': '99'}
4
5
    # obs_id = '1'+ obs_type[img_type] + str(int(project_cycle)) + str(int(run_counter)).rjust(2, '0') + str(pointing_num).rjust(5,'0')
    obs_id = '1'+ obs_type[img_type] + str(int(project_cycle)).rjust(2, '0') + str(int(run_counter)) + str(pointing_num).rjust(8,'0')
Fang Yuedong's avatar
Fang Yuedong committed
6
7
8
9
10
    return obs_id

def get_file_type(img_type='SCI'):
    file_type = {'SCI':'SCIE', 'BIAS':'BIAS', 'DARK':'DARK', 'FLAT':'FLAT', 'CRS':'CRS', 'CRD':'CRD','CALS':'CALS','CALF':'CALF'}
    return file_type[img_type]