Modified code to select usecases based on integer number.
This commit is contained in:
@ -30,7 +30,11 @@ created_at = now_tz_aware.strftime('%Y-%m-%d')+'_UTC-OFST_' + tz
|
|||||||
# Make created at timestamp with tz information
|
# Make created at timestamp with tz information
|
||||||
#created_at = now.isoformat()
|
#created_at = now.isoformat()
|
||||||
|
|
||||||
if group_id == 'smog_chamber':
|
usecase = 1
|
||||||
|
|
||||||
|
if usecase == 1:
|
||||||
|
|
||||||
|
group_id == 'smog_chamber'
|
||||||
user_initials = 'NG'
|
user_initials = 'NG'
|
||||||
#from smog_chamber_file_reader import read_txt_files_as_dict
|
#from smog_chamber_file_reader import read_txt_files_as_dict
|
||||||
#from g5505_file_reader import copy_file_in_group
|
#from g5505_file_reader import copy_file_in_group
|
||||||
@ -51,34 +55,40 @@ if group_id == 'smog_chamber':
|
|||||||
'.TXT': scf_reader.read_txt_files_as_dict,
|
'.TXT': scf_reader.read_txt_files_as_dict,
|
||||||
'.h5': g5505f_reader.copy_file_in_group}
|
'.h5': g5505f_reader.copy_file_in_group}
|
||||||
|
|
||||||
elif group_id == '5505':
|
elif usecase == 2 :
|
||||||
|
|
||||||
|
group_id == '5505'
|
||||||
user_initials = 'TBR'
|
user_initials = 'TBR'
|
||||||
outputfile_dir = 'output_files'
|
outputfile_dir = 'output_files'
|
||||||
output_filename = 'test_sls_data_v8.h5'
|
#output_filename = 'test_sls_data_v8.h5'
|
||||||
inputfile_dir = '//fs101/5505/People/Juan/TypicalBeamTime'
|
inputfile_dir = '//fs101/5505/People/Juan/TypicalBeamTime'
|
||||||
select_file_keywords=[]
|
select_file_keywords=[]
|
||||||
select_dir_keywords = ['NEXAFS', 'Notes', 'Photos', 'Pressure', 'RGA', 'SES']
|
select_dir_keywords = ['NEXAFS', 'Notes', 'Photos', 'Pressure', 'RGA', 'SES']
|
||||||
|
|
||||||
#output_filename = output_filename_tempate(group_id,created_at,user_initials)
|
output_filename = output_filename_tempate(group_id,created_at,user_initials)
|
||||||
output_filename = 'unified_file_5505_2024-03-19_UTC-OFST_+0100_TBR.h5'
|
#output_filename = 'unified_file_5505_2024-03-19_UTC-OFST_+0100_TBR.h5'
|
||||||
|
|
||||||
#user_initials = 'LL'
|
ext_to_reader_dict = {'.ibw': g5505f_reader.read_xps_ibw_file_as_dict,
|
||||||
#outputfile_dir = 'output_files'
|
'.txt': g5505f_reader.read_txt_files_as_dict,
|
||||||
#output_filename = output_filename_tempate(group_id,created_at,user_initials)
|
'.dat': g5505f_reader.read_txt_files_as_dict,
|
||||||
|
'.h5': g5505f_reader.copy_file_in_group}
|
||||||
|
elif usecase == 3:
|
||||||
|
user_initials = 'LL'
|
||||||
|
outputfile_dir = 'output_files'
|
||||||
|
output_filename = output_filename_tempate(group_id,created_at,user_initials)
|
||||||
|
|
||||||
#inputfile_dir = '//fs101/5505/Data'
|
inputfile_dir = '//fs101/5505/Data'
|
||||||
|
|
||||||
#select_dir_keywords = ['Lopap', 'Humidity_Sensors', 'ICAD/HONO', 'ICAD/NO2', 'T200_NOX', 'T360U_CO2']
|
#select_dir_keywords = ['Lopap', 'Humidity_Sensors', 'ICAD/HONO', 'ICAD/NO2', 'T200_NOX', 'T360U_CO2']
|
||||||
# TODO: make sure in the code composite keywords are broken down into single keywords
|
# TODO: make sure in the code composite keywords are broken down into single keywords
|
||||||
|
|
||||||
##select_dir_keywords = ['Humidity_Sensors','ICAD/HONO','ICAD/NO2']
|
##select_dir_keywords = ['Humidity_Sensors','ICAD/HONO','ICAD/NO2']
|
||||||
#select_dir_keywords = ['Humidity_Sensors/2022','ICAD/HONO/2022','ICAD/NO2/2022', '2022/01_Jan', '2022/02_Feb', '2022/03_März']
|
select_dir_keywords = ['Humidity_Sensors/2022','ICAD/HONO/2022','ICAD/NO2/2022', '2022/01_Jan', '2022/02_Feb', '2022/03_März']
|
||||||
|
|
||||||
#dates = pd.read_excel(os.path.abspath(os.path.join('input_files','date_experiments_for Juan.xlsx')))
|
dates = pd.read_excel(os.path.abspath(os.path.join('input_files','date_experiments_for Juan.xlsx')))
|
||||||
|
|
||||||
#select_file_keywords=[item.strftime('%Y-%m-%d') for item in dates.loc[0:2,'experiment_date']]
|
select_file_keywords=[item.strftime('%Y-%m-%d') for item in dates.loc[0:2,'experiment_date']]
|
||||||
#select_file_keywords= select_file_keywords + [item.strftime('%Y%m%d') for item in dates.loc[0:2,'experiment_date']]
|
select_file_keywords= select_file_keywords + [item.strftime('%Y%m%d') for item in dates.loc[0:2,'experiment_date']]
|
||||||
|
|
||||||
ext_to_reader_dict = {'.ibw': g5505f_reader.read_xps_ibw_file_as_dict,
|
ext_to_reader_dict = {'.ibw': g5505f_reader.read_xps_ibw_file_as_dict,
|
||||||
'.txt': g5505f_reader.read_txt_files_as_dict,
|
'.txt': g5505f_reader.read_txt_files_as_dict,
|
||||||
|
Reference in New Issue
Block a user