Startup
This commit is contained in:
@@ -9,14 +9,15 @@ GAINS = ["SINDI02-DBLM084:M06-1-CH03-V-MM","SINDI02-DBLM084:M06-1-CH03-V-MM2",]
|
||||
BLMS = ["SINDI02-DBLM025", "SINDI02-DBLM085", "S10DI01-DBLM045"]
|
||||
ATTENUATORS = ["SINDI02-DBLM084:M06-1-ATT2-VAL", "SINDI02-DBLM084:M06-2-ATT2-VAL", "S10DI01-DBLM113:M06-1-ATT2-VAL"]
|
||||
RANGE = [0.5, 1.1]
|
||||
STEP_SIZE = 0.01
|
||||
STEP_SIZE = 0.1
|
||||
SETTLING_TIME = 0.5
|
||||
SIMULATION = True
|
||||
do_elog = True
|
||||
|
||||
|
||||
gain_positioners = []
|
||||
for i in range(len(GAINS)):
|
||||
#gain_positioners.append(Channel(GAINS[i], alias = "gain " + str(i+1)))
|
||||
gain_positioners.append( DummyPositioner("gain " + str(i+1)))
|
||||
gain_positioners.append( DummyPositioner("gain " + str(i+1)) if SIMULATION else Channel(GAINS[i], alias = "gain " + str(i+1)))
|
||||
|
||||
attenuators = []
|
||||
for i in range(len(ATTENUATORS)):
|
||||
@@ -58,8 +59,14 @@ setup_plotting( line_plots = line_plots)
|
||||
|
||||
|
||||
#Metadata
|
||||
set_attribute("/", "Samples" , SAMPLES)
|
||||
set_attribute("/", "BLM" , BLMS)
|
||||
set_attribute("/", "Gain" , GAINS)
|
||||
set_attribute("/", "Range" , RANGE)
|
||||
set_attribute("/", "Attenuators" , ATTENUATORS)
|
||||
set_attribute("/", "StepSize" , STEP_SIZE)
|
||||
set_attribute("/", "SamplingTime" , SETTLING_TIME)
|
||||
|
||||
for att in attenuators:
|
||||
set_attribute("/", att.setpoint.channelName, att.read())
|
||||
|
||||
@@ -68,3 +75,23 @@ try:
|
||||
finally:
|
||||
st.close()
|
||||
|
||||
|
||||
# save the entry in the logbook
|
||||
if do_elog:
|
||||
if get_option("Generated data file:\n" + get_exec_pars().path + "\n\n" + "Save to ELOG?", "YesNo") == "Yes":
|
||||
gsa_log_msg = "Data file: " + get_exec_pars().path
|
||||
gsa_log_msg = gsa_log_msg + "\nSamples = " + str(SAMPLES)
|
||||
gsa_log_msg = gsa_log_msg + "\nBLM = " + str(BLMS)
|
||||
gsa_log_msg = gsa_log_msg + "\nGain = " + str(GAINS)
|
||||
gsa_log_msg = gsa_log_msg + "\nRange = " + str(RANGE)
|
||||
gsa_log_msg = gsa_log_msg + "\nAttenuators = " + str(ATTENUATORS)
|
||||
gsa_log_msg = gsa_log_msg + "\nStepSize = " + str(STEP_SIZE)
|
||||
gsa_log_msg = gsa_log_msg + "\nSamplingTime = " + str(SETTLING_TIME)
|
||||
|
||||
plots = get_plot_snapshots()
|
||||
save=[]
|
||||
for i in range(len(BLMS)):
|
||||
save.append(plots[3*i])
|
||||
elog("Wire Scan", gsa_log_msg, save)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user