diff --git a/build/lib/iexcode/instruments/ARPES.py b/build/lib/iexcode/instruments/ARPES.py index d156ced2d40c89bd1eb701f076106987e8ed1b9a..82be3b4f2402ae96d21c7d588c90211dff7cf70f 100644 --- a/build/lib/iexcode/instruments/ARPES.py +++ b/build/lib/iexcode/instruments/ARPES.py @@ -102,7 +102,7 @@ def ARPES_init(*userName,**kwargs): #enable cameras _enable_endstation_cameras() - print ('ARPES initalized') + print ('\nARPES initalized') #return any detectors or other parameters that you want access to from jupyter return tey,ca15 @@ -315,6 +315,7 @@ def _ARPES_log_dictionary(): Previously: scanlog """ + #header: pv, format d={ "x":(ARPES_Motors.get('x'),".2f"), "y":(ARPES_Motors.get('y'),".2f"), diff --git a/build/lib/iexcode/instruments/Scienta.py b/build/lib/iexcode/instruments/Scienta.py index 8417aac2d5f8e4558722fee2ebf07355d6ff227e..66ebb4e92b9938b4dd98348afcd250ff28df690c 100644 --- a/build/lib/iexcode/instruments/Scienta.py +++ b/build/lib/iexcode/instruments/Scienta.py @@ -79,6 +79,9 @@ class Scienta: #Camera Settings self.Frames = None + + #external variables + self.Motors = None pv = PV(self.PHV+"WorkFunction") time.sleep(1) @@ -97,7 +100,7 @@ class Scienta: """ for key in vars(self): - if key not in ["PHV","_Pcam","_savePlugin","_statsPlugin","wk","Frames","dtype","connected"]: + if key not in ["PHV","_Pcam","_savePlugin","_statsPlugin","wk","Frames","dtype","connected","Motors"]: vars(self)[key]=caget(self.PHV+key+".VAL") if key in ["LensMode","SpectraMode"]: vars(self)[key]=caget(self.PHV+key+".VAL",as_string=True) diff --git a/build/lib/iexcode/instruments/electron_analyzer.py b/build/lib/iexcode/instruments/electron_analyzer.py index 6c192f8a52bc64369e15db713f97f4fd8b8c93d2..9ae62cf6feae4851469d0295b166579967709c9e 100644 --- a/build/lib/iexcode/instruments/electron_analyzer.py +++ b/build/lib/iexcode/instruments/electron_analyzer.py @@ -262,8 +262,8 @@ def _scanEAPrefix(ptype,**kwargs): print(ptype) if ptype == "mda": - fpath = iex.BL.mda.filepath[0:-3]+EA.dtype - nextMDA = iex.BL.mda.fileNum + fpath = iex.BL.mda.filepath()[0:-3]+EA.dtype + nextMDA = iex.BL.mda.fileNum() prefix = "MDAscan"+str.zfill(str(nextMDA),kwargs["nzeros"]) else: prefix = ptype @@ -447,10 +447,10 @@ def scanFM(RoughPositions,thList,EAlist,**kwargs): if kwargs['debug']: print(x,y,z,th,chi,phi) - iex.BL.mda.fillin_table(EA.Motors._motor_dictionary("th")[1],EA.Motors._motor_dictionary("th")[0],th,positioner_num=1) - iex.BL.mda.fillin_table(EA.Motors._motor_dictionary("x")[1],EA.Motors._motor_dictionary("x")[0],x,positioner_num=2) - iex.BL.mda.fillin_table(EA.Motors._motor_dictionary("y")[1],EA.Motors._motor_dictionary("y")[0],y,positioner_num=3) - iex.BL.mda.fillin_table(EA.Motors._motor_dictionary("z")[1],EA.Motors._motor_dictionary("z")[0],z,positioner_num=4) + iex.BL.mda.fillin_table(EA.Motors._motor_dictionary["th"][1],EA.Motors._motor_dictionary["th"][0],th,positioner_num=1) + iex.BL.mda.fillin_table(EA.Motors._motor_dictionary["x"][1],EA.Motors._motor_dictionary["x"][0],x,positioner_num=2) + iex.BL.mda.fillin_table(EA.Motors._motor_dictionary["y"][1],EA.Motors._motor_dictionary["y"][0],y,positioner_num=3) + iex.BL.mda.fillin_table(EA.Motors._motor_dictionary["z"][1],EA.Motors._motor_dictionary["z"][0],z,positioner_num=4) #setting up EA EAkwargs={ diff --git a/build/lib/iexcode/instruments/scanRecord.py b/build/lib/iexcode/instruments/scanRecord.py index 3d58f0ea35ec70584dd99fb0416d0efa40a92aab..073218e45d42662ac418eecb6d4ae1491b28e8b0 100644 --- a/build/lib/iexcode/instruments/scanRecord.py +++ b/build/lib/iexcode/instruments/scanRecord.py @@ -403,13 +403,15 @@ class ScanRecord: print("Scan record "+self.ioc+" reset to default settings.") ### positioners - def positioners_clear(self,scan_dim,verbose=True): + def positioners_clear(self,verbose=True,**kwargs): """ Clear all extra scan positioners Previously: Clear_Scan_Positioners """ - scan_pv = self.ioc+"scan"+str(scan_dim) + kwargs.setdefault('scan_dim',1) + + scan_pv = self.ioc+"scan"+str(kwargs['scan_dim']) caput(scan_pv+".CMND",3) # Clear all Positionners if verbose: diff --git a/iexcode/instruments/ARPES.py b/iexcode/instruments/ARPES.py index d156ced2d40c89bd1eb701f076106987e8ed1b9a..82be3b4f2402ae96d21c7d588c90211dff7cf70f 100644 --- a/iexcode/instruments/ARPES.py +++ b/iexcode/instruments/ARPES.py @@ -102,7 +102,7 @@ def ARPES_init(*userName,**kwargs): #enable cameras _enable_endstation_cameras() - print ('ARPES initalized') + print ('\nARPES initalized') #return any detectors or other parameters that you want access to from jupyter return tey,ca15 @@ -315,6 +315,7 @@ def _ARPES_log_dictionary(): Previously: scanlog """ + #header: pv, format d={ "x":(ARPES_Motors.get('x'),".2f"), "y":(ARPES_Motors.get('y'),".2f"), diff --git a/iexcode/instruments/IEX_cameras.py b/iexcode/instruments/IEX_cameras.py index 764c5395f4701c9a8568afaac9a60d8cb630aef6..ab9a4ed6d3388e917328c9920b0c3c620aacb1ba 100644 --- a/iexcode/instruments/IEX_cameras.py +++ b/iexcode/instruments/IEX_cameras.py @@ -42,6 +42,7 @@ def _enable_endstation_cameras(unused_off=True): } # index of cam_list d=cam_pv_dictionary() + print("\nEnabling beamline cameras") for num in d.keys(): pv=d[num]+"cam1:Acquire" #camera in list diff --git a/iexcode/instruments/Octupole.py b/iexcode/instruments/Octupole.py index 4d5b2a5218891f7058b59e13dac0a1011279f546..be09d3367d15bcbe8525fc049b660d7dd8dd3e63 100644 --- a/iexcode/instruments/Octupole.py +++ b/iexcode/instruments/Octupole.py @@ -78,11 +78,10 @@ def Octupole_init(*userName,**kwargs): else: user_name = iex.BL.mda.user_name() - ## JM fix here - user_name='Freeland' + #update for default scanRecord advanced parameters - #iex.BL.mda.log('Octupole',user_name,_Octupole_dictionary) + iex.BL.mda.log('Octupole',user_name,_Octupole_log_dictionary) #global detectors mesh = SRS("29ide:scaler1.S2", '29idd:A4') @@ -98,7 +97,7 @@ def Octupole_init(*userName,**kwargs): if kwargs['reset']: Octupole_reset() - print ('Octupole initalized') + print ('\nOctupole initalized') #return any detectors or other parameters that you want access to from jupyter return tey,tfy,pd,mesh,diag,kbh,kbv ############################################################################################################## @@ -325,14 +324,13 @@ def _Octupole_log_header(): header_list = {'Octupole':h} return header_list -def _Octupole_dictionary(): +def _Octupole_log_dictionary(): """ enstation info for log file Previously: scanlog """ - - #m3r_centroid = vals['kphi'] ???? + #header: pv, format d={ "x":(Octupole_Motors.get('x'),".2f"), diff --git a/iexcode/instruments/Scienta.py b/iexcode/instruments/Scienta.py index 8417aac2d5f8e4558722fee2ebf07355d6ff227e..66ebb4e92b9938b4dd98348afcd250ff28df690c 100644 --- a/iexcode/instruments/Scienta.py +++ b/iexcode/instruments/Scienta.py @@ -79,6 +79,9 @@ class Scienta: #Camera Settings self.Frames = None + + #external variables + self.Motors = None pv = PV(self.PHV+"WorkFunction") time.sleep(1) @@ -97,7 +100,7 @@ class Scienta: """ for key in vars(self): - if key not in ["PHV","_Pcam","_savePlugin","_statsPlugin","wk","Frames","dtype","connected"]: + if key not in ["PHV","_Pcam","_savePlugin","_statsPlugin","wk","Frames","dtype","connected","Motors"]: vars(self)[key]=caget(self.PHV+key+".VAL") if key in ["LensMode","SpectraMode"]: vars(self)[key]=caget(self.PHV+key+".VAL",as_string=True) diff --git a/iexcode/instruments/electron_analyzer.py b/iexcode/instruments/electron_analyzer.py index 6c192f8a52bc64369e15db713f97f4fd8b8c93d2..9ae62cf6feae4851469d0295b166579967709c9e 100644 --- a/iexcode/instruments/electron_analyzer.py +++ b/iexcode/instruments/electron_analyzer.py @@ -262,8 +262,8 @@ def _scanEAPrefix(ptype,**kwargs): print(ptype) if ptype == "mda": - fpath = iex.BL.mda.filepath[0:-3]+EA.dtype - nextMDA = iex.BL.mda.fileNum + fpath = iex.BL.mda.filepath()[0:-3]+EA.dtype + nextMDA = iex.BL.mda.fileNum() prefix = "MDAscan"+str.zfill(str(nextMDA),kwargs["nzeros"]) else: prefix = ptype @@ -447,10 +447,10 @@ def scanFM(RoughPositions,thList,EAlist,**kwargs): if kwargs['debug']: print(x,y,z,th,chi,phi) - iex.BL.mda.fillin_table(EA.Motors._motor_dictionary("th")[1],EA.Motors._motor_dictionary("th")[0],th,positioner_num=1) - iex.BL.mda.fillin_table(EA.Motors._motor_dictionary("x")[1],EA.Motors._motor_dictionary("x")[0],x,positioner_num=2) - iex.BL.mda.fillin_table(EA.Motors._motor_dictionary("y")[1],EA.Motors._motor_dictionary("y")[0],y,positioner_num=3) - iex.BL.mda.fillin_table(EA.Motors._motor_dictionary("z")[1],EA.Motors._motor_dictionary("z")[0],z,positioner_num=4) + iex.BL.mda.fillin_table(EA.Motors._motor_dictionary["th"][1],EA.Motors._motor_dictionary["th"][0],th,positioner_num=1) + iex.BL.mda.fillin_table(EA.Motors._motor_dictionary["x"][1],EA.Motors._motor_dictionary["x"][0],x,positioner_num=2) + iex.BL.mda.fillin_table(EA.Motors._motor_dictionary["y"][1],EA.Motors._motor_dictionary["y"][0],y,positioner_num=3) + iex.BL.mda.fillin_table(EA.Motors._motor_dictionary["z"][1],EA.Motors._motor_dictionary["z"][0],z,positioner_num=4) #setting up EA EAkwargs={ diff --git a/iexcode/instruments/scanRecord.py b/iexcode/instruments/scanRecord.py index 3d58f0ea35ec70584dd99fb0416d0efa40a92aab..073218e45d42662ac418eecb6d4ae1491b28e8b0 100644 --- a/iexcode/instruments/scanRecord.py +++ b/iexcode/instruments/scanRecord.py @@ -403,13 +403,15 @@ class ScanRecord: print("Scan record "+self.ioc+" reset to default settings.") ### positioners - def positioners_clear(self,scan_dim,verbose=True): + def positioners_clear(self,verbose=True,**kwargs): """ Clear all extra scan positioners Previously: Clear_Scan_Positioners """ - scan_pv = self.ioc+"scan"+str(scan_dim) + kwargs.setdefault('scan_dim',1) + + scan_pv = self.ioc+"scan"+str(kwargs['scan_dim']) caput(scan_pv+".CMND",3) # Clear all Positionners if verbose: