diff --git a/iexcode/instruments/ARPES.py b/iexcode/instruments/ARPES.py index 43e798c1db0e34ae30f06c5cc4f9edf54b8ca80c..d770e831fb31c35f49e29a7bb9da759ab4fbe1db 100644 --- a/iexcode/instruments/ARPES.py +++ b/iexcode/instruments/ARPES.py @@ -40,7 +40,7 @@ def ARPES_init(*userName,**kwargs): **kwargs: set_folders: sets the mda and EA folders (default => True) - reset: to reset the detectors in the IOC, etc (default => True) + reset: to reset the detectors in the IOC, sets the logfile name, etc (default => False) xrays: sets global variable and detectors for x-ray (default => True) mode: used sets the detectors 'user ' / 'staff' (default => 'user' ) """ @@ -48,7 +48,7 @@ def ARPES_init(*userName,**kwargs): kwargs.setdefault('xrays',True) kwargs.setdefault('mode','user') kwargs.setdefault('set_folders',True) - kwargs.setdefault('reset',True) + kwargs.setdefault('reset',False) #motors physical_motors = ['x','y','z','th','chi','phi'] @@ -76,7 +76,7 @@ def ARPES_init(*userName,**kwargs): user_name = iex.BL.mda.user_name() #update for default scanRecord advanced parameters - iex.BL.mda.log=Logfile('ARPES',user_name,_ARPES_log_dictionary) + iex.BL.mda.log=Logfile('ARPES',user_name,_ARPES_log_dictionary,set_file=False) #EA if EA.connected: @@ -103,6 +103,8 @@ def ARPES_init(*userName,**kwargs): _enable_endstation_cameras() print ('\nARPES initalized') + print('\tpath = "'+iex.BL.mda.filepath()+'"') + print('\tprefix = "'+iex.BL.mda.prefix()+'"') #return any detectors or other parameters that you want access to from jupyter return tey,ca15 @@ -258,6 +260,9 @@ def ARPES_reset(): print("resetting ARPES Lakeshore") Lakeshore_reset(pv,LS_355_defaults) + #set the logfile name + iex.BL.mda.log.name_set() + ############################################################################################################## ############################## get all ############################## ############################################################################################################## diff --git a/iexcode/instruments/Logfile.py b/iexcode/instruments/Logfile.py index d2795cbe287d826346cf6af489ab83d10b4c1556..d49f283274f34bfc6e766a0164c19d9a84a747c1 100644 --- a/iexcode/instruments/Logfile.py +++ b/iexcode/instruments/Logfile.py @@ -42,7 +42,7 @@ def log_name_set(file_name): ############################## general logfile functions ############################## ############################################################################################################## class Logfile: - def __init__(self,endstation_name,user_name,log_dictionary): + def __init__(self,endstation_name,user_name,log_dictionary,set_file=False): """ endstation: used for filename pv ('ARPES' / 'Kappa' / 'Octupole' / 'Test') user_name: used for filepath @@ -55,7 +55,11 @@ class Logfile: self.filepath = self._fpath() self.log_dictionary = log_dictionary - self.name_set() + if set_file: + self.name_set() + else: + print('\n log_filename = '+caget(self._name_pv(),as_string=True)) + print('\tuse log_name_set to change') def _name_pv(self): """