diff --git a/script/RFscan/gun_scan1.py b/script/RFscan/gun_scan1.py index 5a49018..b604b94 100644 --- a/script/RFscan/gun_scan1.py +++ b/script/RFscan/gun_scan1.py @@ -6,7 +6,7 @@ import ch.psi.pshell.epics.ControlledVariable as ControlledVariable #nb = caget("SINEG01-RSYS:SET-NUM-AVERAGE") #lat = caget("SINEG01-RSYS:SET-SCAN-WAIT-TIME") start = 0.0 -stop = 360.0 +stop = 350.0 step = 10.0 nb = 1 lat = 0.100 @@ -22,20 +22,12 @@ phase.initialize() #st.initialize() q = Channel("SINEG01-DICT215:B1_CHARGE-SIM", type = 'd', alias='ICT-Q') -#update the plot dynamically -arr_phase,arr_charge = [],[] -def after(rec): - global disp, energy0 - arr_phase.append(rec.positions[0]) - arr_charge.append(rec.values[1].mean) - caput("SINEG01-RSYS:GET-PHASE-ARRAY", to_array(arr_phase, 'd')) - caput("SINEG01-RSYS:GET-CHARGE-ARRAY", to_array(arr_charge,'d')) - try: #qb = create_averager(q, nb, 0.100) - r = lscan(phase, (q), start, stop, step, latency=lat, after_read = after) + r = lscan(phase, (q), 0, 360, 19, latency=0.1) rf_phase = r.getPositions(0) - charge = [val.mean for val in r.getReadable(0)] + #charge = [val.mean for val in r.getReadable(0)] + charge = r.getReadable(0) caput("SINEG01-RSYS:GET-PHASE-ARRAY", to_array(rf_phase,'d')) caput("SINEG01-RSYS:GET-CHARGE-ARRAY", to_array(charge, 'd')) finally: