diff --git a/build/lib/iexcode/instruments/ARPES.py b/build/lib/iexcode/instruments/ARPES.py index d052fc64d682b28667d70cc574a0e37bb51c2002..e2be0d49bc7cce4ea300e68114721e9ca03ca845 100644 --- a/build/lib/iexcode/instruments/ARPES.py +++ b/build/lib/iexcode/instruments/ARPES.py @@ -15,7 +15,7 @@ from iexcode.instruments.utilities import * from iexcode.instruments.userCalcs import userStringSeq_clear, userStringSeq_pvs from iexcode.instruments.scanRecord import ScanRecord -from iexcode.instruments.xrays import xrays_detector_dictionary,xrays_reset,xrays_get_all +from iexcode.instruments.xrays import BL_energy_tables, xrays_detector_dictionary,xrays_reset,xrays_get_all from iexcode.instruments.Motors import Motors from iexcode.instruments.current_amplifiers import * @@ -195,7 +195,7 @@ def folders_ARPES(user_name,**kwargs): else: print_warning_message("EA ioc is not running, h5 folder not set") -def ARPES_reset(): +def ARPES_reset(**kwargs): """ resets scanRecord, current amplifiers, mono limits and lakeshore """ @@ -210,7 +210,7 @@ def ARPES_reset(): scan_before_sequence = ARPES_scan_before_sequence(**kwargs) scan_after_sequence = ARPES_scan_after_sequence(**kwargs) - mda_scanRecord.reset_all(detector_dictionary,trigger_dictionary,scan_before_sequence,scan_after_sequence) + BL.mda.scanRecord.reset_all(detector_dictionary,trigger_dictionary,scan_before_sequence,scan_after_sequence) #resetting the current amplifiers if BL.xray: @@ -421,7 +421,7 @@ def ARPES_trigger_dictionary(**kwargs): need to do something """ trigger_dictionary = { - 1:ARPES_detector_triggers_sequence(scan_ioc,scan_dim,**kwargs), + 1:ARPES_detector_triggers_sequence(**kwargs), } return trigger_dictionary diff --git a/build/lib/iexcode/instruments/logfile.py b/build/lib/iexcode/instruments/logfile.py index d4b50bdbb59482bb042bc6bb85ee141b6661b0b1..b6cf44ea3680d1ab9468da7578fb02ffce3356fe 100644 --- a/build/lib/iexcode/instruments/logfile.py +++ b/build/lib/iexcode/instruments/logfile.py @@ -1,10 +1,9 @@ from os.path import join,isfile from epics import caget, caput -from iexcode.instruments.IEX_endstations import BL +#from iexcode.instruments.IEX_endstations import * from iexcode.instruments.utilities import today - ############################################################################################################## ############################## logging ############################## ############################################################################################################## @@ -12,14 +11,14 @@ def log_print(**kwargs): """ prints a comment to the logfile """ - #global BL + global BL logfile_print(BL.endstation_name,BL.ioc,kwargs['comment']) def log_update(): """ updates the log file with the last scan info """ - #global BL + global BL try: entry_list,pv_list, format_list = BL.log_entries() logfile_update(BL.endstation_name,BL.ioc,entry_list,pv_list,format_list) @@ -90,17 +89,15 @@ def logfile_fpath(endstation_name): Previously: logname, logname_generate """ - #global BL - #try: - filename = logfile_name_get(endstation_name) - print('filename = ',logfile_name_get(endstation_name)) - user_name = BL.mda.scanRecord_user() - print('user_name = ',BL.mda.scanRecord_user()) - fpath_with_subfolder = join(user_name,filename) - # except: - # fpath_with_subfolder = "logfile.txt" - # logfile_name_get(endstation_name) - # print("Couldn't read log file path, using: "+fpath_with_subfolder) + global BL + try: + filename = logfile_name_get(endstation_name) + user_name = BL.mda.scanRecord_user() + fpath_with_subfolder = join(user_name,filename) + except: + fpath_with_subfolder = "logfile.txt" + logfile_name_get(endstation_name) + print("Couldn't read log file path, using: "+fpath_with_subfolder) return fpath_with_subfolder @@ -137,7 +134,7 @@ def logfile_header(endstation_name,mda_ioc,header_list): Previously: SaveFile_Header """ version = '1.4' - #global BL + global BL fpath_with_subfolder=logfile_fpath(endstation_name) with open(fpath_with_subfolder, "w+") as f: diff --git a/iexcode/instruments/ARPES.py b/iexcode/instruments/ARPES.py index d052fc64d682b28667d70cc574a0e37bb51c2002..e2be0d49bc7cce4ea300e68114721e9ca03ca845 100644 --- a/iexcode/instruments/ARPES.py +++ b/iexcode/instruments/ARPES.py @@ -15,7 +15,7 @@ from iexcode.instruments.utilities import * from iexcode.instruments.userCalcs import userStringSeq_clear, userStringSeq_pvs from iexcode.instruments.scanRecord import ScanRecord -from iexcode.instruments.xrays import xrays_detector_dictionary,xrays_reset,xrays_get_all +from iexcode.instruments.xrays import BL_energy_tables, xrays_detector_dictionary,xrays_reset,xrays_get_all from iexcode.instruments.Motors import Motors from iexcode.instruments.current_amplifiers import * @@ -195,7 +195,7 @@ def folders_ARPES(user_name,**kwargs): else: print_warning_message("EA ioc is not running, h5 folder not set") -def ARPES_reset(): +def ARPES_reset(**kwargs): """ resets scanRecord, current amplifiers, mono limits and lakeshore """ @@ -210,7 +210,7 @@ def ARPES_reset(): scan_before_sequence = ARPES_scan_before_sequence(**kwargs) scan_after_sequence = ARPES_scan_after_sequence(**kwargs) - mda_scanRecord.reset_all(detector_dictionary,trigger_dictionary,scan_before_sequence,scan_after_sequence) + BL.mda.scanRecord.reset_all(detector_dictionary,trigger_dictionary,scan_before_sequence,scan_after_sequence) #resetting the current amplifiers if BL.xray: @@ -421,7 +421,7 @@ def ARPES_trigger_dictionary(**kwargs): need to do something """ trigger_dictionary = { - 1:ARPES_detector_triggers_sequence(scan_ioc,scan_dim,**kwargs), + 1:ARPES_detector_triggers_sequence(**kwargs), } return trigger_dictionary diff --git a/iexcode/instruments/logfile.py b/iexcode/instruments/logfile.py index e7481dbd00c9b5727334e9269a67c2f2fb7fccb4..b6cf44ea3680d1ab9468da7578fb02ffce3356fe 100644 --- a/iexcode/instruments/logfile.py +++ b/iexcode/instruments/logfile.py @@ -1,10 +1,9 @@ from os.path import join,isfile from epics import caget, caput -from iexcode.instruments.IEX_endstations import +#from iexcode.instruments.IEX_endstations import * from iexcode.instruments.utilities import today - ############################################################################################################## ############################## logging ############################## ############################################################################################################## @@ -91,16 +90,14 @@ def logfile_fpath(endstation_name): Previously: logname, logname_generate """ global BL - #try: - filename = logfile_name_get(endstation_name) - print('filename = ',logfile_name_get(endstation_name)) - user_name = BL.mda.scanRecord_user() - print('user_name = ',BL.mda.scanRecord_user()) - fpath_with_subfolder = join(user_name,filename) - # except: - # fpath_with_subfolder = "logfile.txt" - # logfile_name_get(endstation_name) - # print("Couldn't read log file path, using: "+fpath_with_subfolder) + try: + filename = logfile_name_get(endstation_name) + user_name = BL.mda.scanRecord_user() + fpath_with_subfolder = join(user_name,filename) + except: + fpath_with_subfolder = "logfile.txt" + logfile_name_get(endstation_name) + print("Couldn't read log file path, using: "+fpath_with_subfolder) return fpath_with_subfolder