Skip to content
Snippets Groups Projects
Commit c5f55f55 authored by rodolakis's avatar rodolakis
Browse files

moved logfile set to reset

parent d8488b17
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ def ARPES_init(*userName,**kwargs): ...@@ -40,7 +40,7 @@ def ARPES_init(*userName,**kwargs):
**kwargs: **kwargs:
set_folders: sets the mda and EA folders (default => True) 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) xrays: sets global variable and detectors for x-ray (default => True)
mode: used sets the detectors 'user ' / 'staff' (default => 'user' ) mode: used sets the detectors 'user ' / 'staff' (default => 'user' )
""" """
...@@ -48,7 +48,7 @@ def ARPES_init(*userName,**kwargs): ...@@ -48,7 +48,7 @@ def ARPES_init(*userName,**kwargs):
kwargs.setdefault('xrays',True) kwargs.setdefault('xrays',True)
kwargs.setdefault('mode','user') kwargs.setdefault('mode','user')
kwargs.setdefault('set_folders',True) kwargs.setdefault('set_folders',True)
kwargs.setdefault('reset',True) kwargs.setdefault('reset',False)
#motors #motors
physical_motors = ['x','y','z','th','chi','phi'] physical_motors = ['x','y','z','th','chi','phi']
...@@ -76,7 +76,7 @@ def ARPES_init(*userName,**kwargs): ...@@ -76,7 +76,7 @@ def ARPES_init(*userName,**kwargs):
user_name = iex.BL.mda.user_name() user_name = iex.BL.mda.user_name()
#update for default scanRecord advanced parameters #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 #EA
if EA.connected: if EA.connected:
...@@ -103,6 +103,8 @@ def ARPES_init(*userName,**kwargs): ...@@ -103,6 +103,8 @@ def ARPES_init(*userName,**kwargs):
_enable_endstation_cameras() _enable_endstation_cameras()
print ('\nARPES initalized') 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 any detectors or other parameters that you want access to from jupyter
return tey,ca15 return tey,ca15
...@@ -258,6 +260,9 @@ def ARPES_reset(): ...@@ -258,6 +260,9 @@ def ARPES_reset():
print("resetting ARPES Lakeshore") print("resetting ARPES Lakeshore")
Lakeshore_reset(pv,LS_355_defaults) Lakeshore_reset(pv,LS_355_defaults)
#set the logfile name
iex.BL.mda.log.name_set()
############################################################################################################## ##############################################################################################################
############################## get all ############################## ############################## get all ##############################
############################################################################################################## ##############################################################################################################
......
...@@ -42,7 +42,7 @@ def log_name_set(file_name): ...@@ -42,7 +42,7 @@ def log_name_set(file_name):
############################## general logfile functions ############################## ############################## general logfile functions ##############################
############################################################################################################## ##############################################################################################################
class Logfile: 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') endstation: used for filename pv ('ARPES' / 'Kappa' / 'Octupole' / 'Test')
user_name: used for filepath user_name: used for filepath
...@@ -55,7 +55,11 @@ class Logfile: ...@@ -55,7 +55,11 @@ class Logfile:
self.filepath = self._fpath() self.filepath = self._fpath()
self.log_dictionary = log_dictionary 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): def _name_pv(self):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment