NSLS-II / Bug-Reports

Unified issue-tracker for bugs in the data acquisition, management, and analysis software at NSLS-II
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

Issues with reciprocal space (tardis, 6 circle module) #134

Open ambarb opened 8 years ago

ambarb commented 8 years ago

Scanning ascan with tardis.l changes tardis.k 'motor'. We thought that this worked in the past (constant tardis.h and tardis.k during the tardis.l scan).

Below, K= -0.33759 at the start of the scan. After the scan, it returns to the starting point. K = -0.3100. This is a huge error in reciprocal space. When the scan returned to the "starting position", the spot was not on the detector (and was never seen during the scan). IF it is present the entire timre or just a few frames is what we would need to know so accuracy is important.

Users moved on, but there could be a potiential to fake with tardis.h and k held constant. Needs to be tested.

In [332]: wh_pos(tardis)

+--------------+---------------------------------+--------------------------------+--------------------------------+
| Positioner   |                           Value |                      Low Limit |                     High Limit |
+--------------+---------------------------------+--------------------------------+--------------------------------+
| tardis       | [ 0.004206 -0.337589  1.340483] | TardisPseudoPos(h=0, k=0, l=0) | TardisPseudoPos(h=0, k=0, l=0) |
| tardis_chi   |                         0.00000 |                              0 |                              0 |
| tardis_delta |                       145.80000 |                       -3.20000 |                      181.00000 |
| tardis_gamma |                         3.99980 |                       -2.50000 |                      180.50000 |
| tardis_h     |                         0.00421 |                              0 |                              0 |
| tardis_k     |                        -0.33759 |                              0 |                              0 |
| tardis_l     |                         1.34048 |                              0 |                              0 |
| tardis_omega |                         0.00000 |                              0 |                              0 |
| tardis_phi   |                         0.00000 |                              0 |                              0 |
| tardis_theta |                        37.17640 |                      164.35747 |                      164.35747 |
+--------------+---------------------------------+--------------------------------+--------------------------------+

In [333]: RE(dscan(tardis.l,-.1,.1,20))
Transient Scan ID: 68344
Persistent Unique Scan ID: 'ea72543a-fc03-49a2-9d0f-e02dc13332e4'
+-----------+------------+------------+------------+-------------------+-------------------+-------------------+
|   seq_num |       time |   tardis_l |     temp_a | fccd_stats3_total | fccd_stats4_total | fccd_stats5_total |
+-----------+------------+------------+------------+-------------------+-------------------+-------------------+
|         1 | 17:15:59.2 |      1.240 |     63.994 |            593308 |            692564 |        3681254955 |
|         2 | 17:16:09.9 |      1.250 |     64.012 |            685019 |            698245 |        3681311841 |
|         3 | 17:16:21.0 |      1.260 |     63.993 |           1591593 |           1159033 |        3684158442 |
|         4 | 17:16:31.4 |      1.270 |     64.002 |            598658 |            757434 |        3681275816 |
|         5 | 17:16:40.8 |      1.280 |     63.982 |           3656024 |           1847022 |        3690102349 |
|         6 | 17:16:51.2 |      1.290 |     64.001 |            886151 |            794743 |        3682030260 |
|         7 | 17:17:01.3 |      1.300 |     64.009 |           2490285 |           1388531 |        3686830178 |
|         8 | 17:17:11.3 |      1.310 |     63.989 |            756170 |            767408 |        3681927625 |
|         9 | 17:17:21.5 |      1.320 |     63.993 |            824479 |            754116 |        3681735244 |
|        10 | 17:17:31.1 |      1.330 |     63.997 |            544646 |            608131 |        3680924387 |
|        11 | 17:17:40.8 |      1.340 |     63.998 |            994070 |            751846 |        3681975631 |
|        12 | 17:17:51.3 |      1.350 |     63.999 |           2112725 |           1353070 |        3685912822 |
|        13 | 17:18:01.3 |      1.360 |     63.994 |            504601 |            595757 |        3680874761 |
|        14 | 17:18:11.3 |      1.370 |     63.994 |           3349620 |           1764430 |        3689303814 |
|        15 | 17:18:22.2 |      1.380 |     63.998 |           1394455 |            936457 |        3683275677 |
|        16 | 17:18:31.9 |      1.390 |     63.991 |           1284198 |            913652 |        3683208321 |
|        17 | 17:18:43.6 |      1.400 |     63.995 |           1069822 |            884788 |        3682633698 |
|        18 | 17:18:54.1 |      1.410 |     63.996 |           2002461 |           1333991 |        3685761510 |
|        19 | 17:19:05.0 |      1.420 |     63.999 |           2072660 |           1347800 |        3686063692 |
|        20 | 17:19:16.5 |      1.430 |     63.998 |           1417853 |            978091 |        3683743615 |
|        21 | 17:19:27.1 |      1.440 |     63.999 |           2332685 |           1285561 |        3686579349 |
+-----------+------------+------------+------------+-------------------+-------------------+-------------------+
generator dscan ['ea7254'] (scan num: 68344)
Out[333]: ['ea72543a-fc03-49a2-9d0f-e02dc13332e4']

In [334]: wh_pos(tardis)

+--------------+---------------------------------+--------------------------------+--------------------------------+
| Positioner   |                           Value |                      Low Limit |                     High Limit |
+--------------+---------------------------------+--------------------------------+--------------------------------+
| tardis       | [ 0.004202 -0.31      1.340483] | TardisPseudoPos(h=0, k=0, l=0) | TardisPseudoPos(h=0, k=0, l=0) |
| tardis_chi   |                         0.00000 |                              0 |                              0 |
| tardis_delta |                       136.20240 |                       -3.20000 |                      181.00000 |
| tardis_gamma |                         4.07290 |                       -2.50000 |                      180.50000 |
| tardis_h     |                         0.00420 |                              0 |                              0 |
| tardis_k     |                        -0.31000 |                              0 |                              0 |
| tardis_l     |                         1.34048 |                              0 |                              0 |
| tardis_omega |                         0.00000 |                              0 |                              0 |
| tardis_phi   |                         0.00000 |                              0 |                              0 |
| tardis_theta |                        34.71040 |                      164.35747 |                      164.35747 |
+--------------+---------------------------------+--------------------------------+--------------------------------+

In [335]: tardis.move([0.00421,-0.33759,1.34048])
Out[335]: MoveStatus(done=True, pos=tardis, elapsed=12.0, success=True, settle_time=0.0)

In [336]: RE(dscan(tardis.l,-.1,.1,20))
Transient Scan ID: 68345
Persistent Unique Scan ID: 'a4a560f3-992e-43e6-b47d-e8ecc884b319'
+-----------+------------+------------+------------+-------------------+-------------------+-------------------+
|   seq_num |       time |   tardis_l |     temp_a | fccd_stats3_total | fccd_stats4_total | fccd_stats5_total |
+-----------+------------+------------+------------+-------------------+-------------------+-------------------+
|         1 | 17:21:51.3 |      1.241 |     64.009 |           1248633 |           1000103 |        3683758263 |
|         2 | 17:22:01.1 |      1.250 |     63.994 |           2448180 |           1553021 |        3687227420 |
|         3 | 17:22:11.1 |      1.260 |     63.997 |            546035 |            690945 |        3681170191 |
|         4 | 17:22:21.0 |      1.270 |     63.993 |           1690750 |           1153036 |        3684687296 |
|         5 | 17:22:31.1 |      1.280 |     64.002 |            270937 |            665174 |        3680831030 |
|         6 | 17:22:41.4 |      1.290 |     64.011 |            -68856 |            464717 |        3679654457 |
|         7 | 17:22:51.0 |      1.300 |     63.989 |            712478 |            771963 |        3681788405 |
|         8 | 17:23:01.0 |      1.310 |     64.002 |           1949982 |           1289464 |        3685891401 |
|         9 | 17:23:11.0 |      1.320 |     64.008 |             39426 |            520251 |        3680046858 |
|        10 | 17:23:21.0 |      1.330 |     63.995 |            581907 |            654052 |        3681395453 |
|        11 | 17:23:31.1 |      1.340 |     63.992 |           2145700 |           1384207 |        3686256963 |
^CA 'deferred pause' has been requested. The RunEngine will pause at the next checkpoint. To pause immediately, hit Ctrl+C again in the next 10 seconds.
Deferred pause acknowledged. Continuing to checkpoint.
^C
Your RunEngine is entering a paused state. These are your options for changing
the state of the RunEngine:

resume()  --> will resume the scan
 abort()  --> will kill the scan with an 'aborted' state to indicate
              the scan was interrupted
  stop()  --> will kill the scan with a 'finished' state to indicate
              the scan stopped normally

Pro Tip: Next time, if you want to abort, tap Ctrl+C three times quickly.

Pausing...
Out[336]: ['a4a560f3-992e-43e6-b47d-e8ecc884b319']

In [337]: stop()
Stopping: running cleanup and marking exit_status as 'success'...
+-----------+------------+------------+------------+-------------------+-------------------+-------------------+
generator dscan ['a4a560'] (scan num: 68345)

In [338]: tardis.move([0.00421,-0.33759,1.34048])
Out[338]: MoveStatus(done=True, pos=tardis, elapsed=12.1, success=True, settle_time=0.0)

In [339]: tardis.move([0.00421,-0.33759,1.35])
Out[339]: MoveStatus(done=True, pos=tardis, elapsed=4.4, success=True, settle_time=0.0)

In [340]: wh_pos(tardis)

+--------------+---------------------------------+--------------------------------+--------------------------------+
| Positioner   |                           Value |                      Low Limit |                     High Limit |
+--------------+---------------------------------+--------------------------------+--------------------------------+
| tardis       | [ 0.004208 -0.33759   1.35    ] | TardisPseudoPos(h=0, k=0, l=0) | TardisPseudoPos(h=0, k=0, l=0) |
| tardis_chi   |                         0.00000 |                              0 |                              0 |
| tardis_delta |                       147.52320 |                       -3.20000 |                      181.00000 |
| tardis_gamma |                         4.02920 |                       -2.50000 |                      180.50000 |
| tardis_h     |                         0.00421 |                              0 |                              0 |
| tardis_k     |                        -0.33759 |                              0 |                              0 |
| tardis_l     |                         1.35000 |                              0 |                              0 |
| tardis_omega |                         0.00000 |                              0 |                              0 |
| tardis_phi   |                         0.00000 |                              0 |                              0 |
| tardis_theta |                        38.23220 |                      164.35747 |                      164.35747 |
+--------------+---------------------------------+--------------------------------+--------------------------------+
klauer commented 8 years ago

(*) Perhaps we should reconsider this.

ambarb commented 8 years ago

Thanks for the response @klauer. @cmazzoli and I will try to digest.

In the mean time, we tried to use a d3scan. it looks like only two of the 3 motor positions are set, but the two that are set, are correct.


In [382]: RE(d3scan(tardis.h,-0.0001,0.0001,tardis.k,0.08,-0.06,tardis.l,-0.0001,0.0001,28))
subscribe: (None), ('all', <bluesky.callbacks.core.LiveTable object at 0x7f3ba4154d68>), {}
subscribe: (None), ('all', <bluesky.callbacks.core.LivePlot object at 0x7f3b81981898>), {}
subscribe: (None), ('all', <bluesky.callbacks.scientific.PeakStats object at 0x7f3ba44f7ef0>), {}
stage: (EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Th}Mtr', name='theta', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])), (), {}
stage: (EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Del}Mtr', name='delta', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])), (), {}
stage: (EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Gam}Mtr', name='gamma', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])), (), {}
stage: (EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:X}Mtr', name='sx', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])), (), {}
stage: (EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Y}Mtr', name='say', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])), (), {}
stage: (EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Z}Mtr', name='saz', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])), (), {}
stage: (Cryoangle(prefix='', name='cryoangle', settle_time=0.0, timeout=None, read_attrs=['readback', 'setpoint'], configuration_attrs=[], limits=None, egu='')), (), {}
stage: (SamplePosVirtualMotor(prefix='XF:23ID1-ES{Dif-Ax:SY}', name='sy', settle_time=0.0, timeout=None, read_attrs=['readback', 'setpoint'], configuration_attrs=[], limits=None, egu='')), (), {}
stage: (SamplePosVirtualMotor(prefix='XF:23ID1-ES{Dif-Ax:SZ}', name='sz', settle_time=0.0, timeout=None, read_attrs=['readback', 'setpoint'], configuration_attrs=[], limits=None, egu='')), (), {}
stage: (Temperature(prefix='XF:23ID1-ES{TCtrl:1', name='temp', read_attrs=['a', 'b'], configuration_attrs=[])), (), {}
stage: (EpicsSignal(read_pv='UT:SB1-Cu:1{}T:Spply_Ld-I', name='uw_temp', value=85.07492065429688, timestamp=1471645016.099978, tolerance=0.01, pv_kw={}, auto_monitor=False, string=False, write_pv='UT:SB1-Cu:1{}T:Spply_Ld-I', limits=False, put_complete=False)), (), {}
stage: (PGM(prefix='XF:23ID1-OP{Mono', name='pgm', read_attrs=['energy', 'pit', 'x', 'grt_pit', 'grt_x'], configuration_attrs=[])), (), {}
stage: (EPU1(prefix='XF:23ID-ID{EPU:1', name='epu1', read_attrs=['gap', 'phase'], configuration_attrs=[])), (), {}
stage: (EPU2(prefix='XF:23ID-ID{EPU:2', name='epu2', read_attrs=['gap', 'phase'], configuration_attrs=[])), (), {}
stage: (SlitsGapCenter(prefix='XF:23ID1-OP{Slt:1', name='slt1', read_attrs=['xg', 'xc', 'yg', 'yc'], configuration_attrs=[])), (), {}
stage: (SlitsGapCenter(prefix='XF:23ID1-OP{Slt:2', name='slt2', read_attrs=['xg', 'xc', 'yg', 'yc'], configuration_attrs=[])), (), {}
stage: (SlitsXY(prefix='XF:23ID1-OP{Slt:3', name='slt3', read_attrs=['x', 'y'], configuration_attrs=[])), (), {}
stage: (Mirror(prefix='XF:23IDA-OP:1{Mir:1', name='m1a', read_attrs=['z', 'y', 'x', 'pit', 'yaw', 'rol'], configuration_attrs=[])), (), {}
stage: (MotorMirror(prefix='XF:23ID1-OP{Mir:3', name='m3a', read_attrs=['x', 'pit', 'bdr'], configuration_attrs=[])), (), {}
stage: (EpicsSignal(read_pv='XF:23ID1-OP{TCtrl:1-Chan:A}T-I', name='mono_tempa', value=302.751, timestamp=1471645015.80343, tolerance=0.001, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-OP{TCtrl:1-Chan:A}T-I', limits=False, put_complete=False)), (), {}
stage: (EpicsSignal(read_pv='XF:23ID1-OP{TCtrl:1-Chan:B}T-I', name='mono_tempb', value=302.753, timestamp=1471645015.883738, tolerance=0.001, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-OP{TCtrl:1-Chan:B}T-I', limits=False, put_complete=False)), (), {}
stage: (EpicsSignal(read_pv='XF:23ID1-OP{Mon-Grt:1}T-I', name='grt1_temp', value=34.0, timestamp=1471645016.623995, tolerance=0.1, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-OP{Mon-Grt:1}T-I', limits=False, put_complete=False)), (), {}
stage: (EpicsSignal(read_pv='XF:23ID1-OP{Mon-Grt:2}T-I', name='grt2_temp', value=28.8, timestamp=1471645016.624002, tolerance=0.1, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-OP{Mon-Grt:2}T-I', limits=False, put_complete=False)), (), {}
stage: (EpicsSignal(read_pv='XF:23ID-SR{}I-I', name='ring_curr', value=250.01087342797885, timestamp=1471645016.556569, tolerance=0.01, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID-SR{}I-I', limits=False, put_complete=False)), (), {}
stage: (Nanopositioner(prefix='XF:23ID1-ES{Dif:Lens', name='nanop', read_attrs=['tx', 'ty', 'tz', 'bx', 'by', 'bz'], configuration_attrs=[])), (), {}
stage: (EpicsScaler(prefix='XF:23ID1-ES{Sclr:1}', name='sclr', read_attrs=['channels', 'time'], configuration_attrs=['preset_time', 'presets', 'gates'])), (), {}
stage: (EpicsSignal(read_pv='XF:23ID1-BI{Diag:6-Cam:1}Stats1:Total_RBV', name='diag6_monitor', value=350063670.0, timestamp=1471645016.98173, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-BI{Diag:6-Cam:1}Stats1:Total_RBV', limits=False, put_complete=False)), (), {}
stage: (ProductionCam(prefix='XF:23ID1-ES{FCCD}', name='fccd', read_attrs=['hdf5', 'acquire_time', 'num_images_captured', 'plugin_num_images', 'stats1', 'stats2', 'stats3', 'stats4', 'stats5'], configuration_attrs=[])), (), {}
stage: (Tardis(prefix='', name='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', read_attrs=['h', 'k', 'l', 'theta', 'omega', 'chi', 'phi', 'delta', 'gamma'], configuration_attrs=['UB', 'energy'], concurrent=True)), (), {}
open_run: (None), (), {'plan_args': {'args': ["PseudoSingle(name='tardis_h', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=0)", -0.0001, 0.0001, "PseudoSingle(name='tardis_k', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=1)", 0.08, -0.06, "PseudoSingle(name='tardis_l', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=2)", -0.0001, 0.0001], 'num': 29, 'per_step': 'None', 'detectors': ["EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Th}Mtr', name='theta', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])", "EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Del}Mtr', name='delta', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])", "EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Gam}Mtr', name='gamma', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])", "EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:X}Mtr', name='sx', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])", "EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Y}Mtr', name='say', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])", "EpicsMotor(prefix='XF:23ID1-ES{Dif-Ax:Z}Mtr', name='saz', settle_time=0.0, timeout=None, read_attrs=['user_readback', 'user_setpoint'], configuration_attrs=['motor_egu'])", "Cryoangle(prefix='', name='cryoangle', settle_time=0.0, timeout=None, read_attrs=['readback', 'setpoint'], configuration_attrs=[], limits=None, egu='')", "SamplePosVirtualMotor(prefix='XF:23ID1-ES{Dif-Ax:SY}', name='sy', settle_time=0.0, timeout=None, read_attrs=['readback', 'setpoint'], configuration_attrs=[], limits=None, egu='')", "SamplePosVirtualMotor(prefix='XF:23ID1-ES{Dif-Ax:SZ}', name='sz', settle_time=0.0, timeout=None, read_attrs=['readback', 'setpoint'], configuration_attrs=[], limits=None, egu='')", "Temperature(prefix='XF:23ID1-ES{TCtrl:1', name='temp', read_attrs=['a', 'b'], configuration_attrs=[])", "EpicsSignal(read_pv='UT:SB1-Cu:1{}T:Spply_Ld-I', name='uw_temp', value=85.07492065429688, timestamp=1471645016.099978, tolerance=0.01, pv_kw={}, auto_monitor=False, string=False, write_pv='UT:SB1-Cu:1{}T:Spply_Ld-I', limits=False, put_complete=False)", "PGMEnergy(prefix='XF:23ID1-OP{Mono', name='pgm_en', parent='pgm', settle_time=0.0, timeout=None, read_attrs=['readback', 'setpoint', 'stop_signal'], configuration_attrs=[], limits=None, egu='')", "EPU1(prefix='XF:23ID-ID{EPU:1', name='epu1', read_attrs=['gap', 'phase'], configuration_attrs=[])", "EPU2(prefix='XF:23ID-ID{EPU:2', name='epu2', read_attrs=['gap', 'phase'], configuration_attrs=[])", "SlitsGapCenter(prefix='XF:23ID1-OP{Slt:1', name='slt1', read_attrs=['xg', 'xc', 'yg', 'yc'], configuration_attrs=[])", "SlitsGapCenter(prefix='XF:23ID1-OP{Slt:2', name='slt2', read_attrs=['xg', 'xc', 'yg', 'yc'], configuration_attrs=[])", "SlitsXY(prefix='XF:23ID1-OP{Slt:3', name='slt3', read_attrs=['x', 'y'], configuration_attrs=[])", "Mirror(prefix='XF:23IDA-OP:1{Mir:1', name='m1a', read_attrs=['z', 'y', 'x', 'pit', 'yaw', 'rol'], configuration_attrs=[])", "MotorMirror(prefix='XF:23ID1-OP{Mir:3', name='m3a', read_attrs=['x', 'pit', 'bdr'], configuration_attrs=[])", "EpicsSignal(read_pv='XF:23ID1-OP{TCtrl:1-Chan:A}T-I', name='mono_tempa', value=302.751, timestamp=1471645015.80343, tolerance=0.001, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-OP{TCtrl:1-Chan:A}T-I', limits=False, put_complete=False)", "EpicsSignal(read_pv='XF:23ID1-OP{TCtrl:1-Chan:B}T-I', name='mono_tempb', value=302.753, timestamp=1471645015.883738, tolerance=0.001, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-OP{TCtrl:1-Chan:B}T-I', limits=False, put_complete=False)", "EpicsSignal(read_pv='XF:23ID1-OP{Mon-Grt:1}T-I', name='grt1_temp', value=34.0, timestamp=1471645016.623995, tolerance=0.1, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-OP{Mon-Grt:1}T-I', limits=False, put_complete=False)", "EpicsSignal(read_pv='XF:23ID1-OP{Mon-Grt:2}T-I', name='grt2_temp', value=28.8, timestamp=1471645016.624002, tolerance=0.1, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-OP{Mon-Grt:2}T-I', limits=False, put_complete=False)", "EpicsSignal(read_pv='XF:23ID-SR{}I-I', name='ring_curr', value=250.01087342797885, timestamp=1471645016.556569, tolerance=0.01, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID-SR{}I-I', limits=False, put_complete=False)", "Nanopositioner(prefix='XF:23ID1-ES{Dif:Lens', name='nanop', read_attrs=['tx', 'ty', 'tz', 'bx', 'by', 'bz'], configuration_attrs=[])", "EpicsScaler(prefix='XF:23ID1-ES{Sclr:1}', name='sclr', read_attrs=['channels', 'time'], configuration_attrs=['preset_time', 'presets', 'gates'])", "EpicsSignal(read_pv='XF:23ID1-BI{Diag:6-Cam:1}Stats1:Total_RBV', name='diag6_monitor', value=352020033.0, timestamp=1471645016.690542, pv_kw={}, auto_monitor=False, string=False, write_pv='XF:23ID1-BI{Diag:6-Cam:1}Stats1:Total_RBV', limits=False, put_complete=False)", "ProductionCam(prefix='XF:23ID1-ES{FCCD}', name='fccd', read_attrs=['hdf5', 'acquire_time', 'num_images_captured', 'plugin_num_images', 'stats1', 'stats2', 'stats3', 'stats4', 'stats5'], configuration_attrs=[])", "Tardis(prefix='', name='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', read_attrs=['h', 'k', 'l', 'theta', 'omega', 'chi', 'phi', 'delta', 'gamma'], configuration_attrs=['UB', 'energy'], concurrent=True)"]}, 'motors': ['tardis_k', 'tardis_l', 'tardis_h'], 'detectors': ['theta', 'delta', 'gamma', 'sx', 'say', 'saz', 'cryoangle', 'sy', 'sz', 'temp', 'uw_temp', 'pgm_en', 'epu1', 'epu2', 'slt1', 'slt2', 'slt3', 'm1a', 'm3a', 'mono_tempa', 'mono_tempb', 'grt1_temp', 'grt2_temp', 'ring_curr', 'nanop', 'sclr', 'diag6_monitor', 'fccd', 'tardis'], 'plan_pattern': 'inner_product', 'count_time': None, 'num_steps': 29, 'plan_name': 'd3scan', 'plan_pattern_args': {'num': 29, 'args': ["PseudoSingle(name='tardis_h', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=0)", -0.0001, 0.0001, "PseudoSingle(name='tardis_k', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=1)", 0.08, -0.06, "PseudoSingle(name='tardis_l', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=2)", -0.0001, 0.0001]}, 'plan_pattern_module': 'bluesky.plan_patterns'}
Transient Scan ID: 68355
Persistent Unique Scan ID: '5ec36bc9-b3fd-477a-85f8-c0d718b87757'
create: (None), (), {'name': 'baseline'}
read: (PseudoSingle(name='tardis_h', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=0)), (), {}
read: (PseudoSingle(name='tardis_k', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=1)), (), {}
read: (PseudoSingle(name='tardis_l', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=2)), (), {}
save: (None), (), {}
checkpoint: (None), (), {}
set: (PseudoSingle(name='tardis_k', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=1)), (-0.24567159059493443,), {'group': 'set-ccb3c4'}
set: (PseudoSingle(name='tardis_l', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=2)), (1.3995881461700104,), {'group': 'set-ccb3c4'}
set: (PseudoSingle(name='tardis_k', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=1)), (-0.32567159059493445,), {'group': 'reset-94896f'}
set: (PseudoSingle(name='tardis_l', parent='tardis', settle_time=0.0, timeout=None, egu='', limits=(0, 0), source='computed', idx=2)), (1.3996881461700104,), {'group': 'reset-94896f'}
wait: (None), (), {'group': 'reset-94896f'}
LivePlot did not get any data that corresponds to the x axis. tardis_h
LivePlot did not get any data that corresponds to the y axis. fccd_stats3_total
generator d3scan ['5ec36b'] (scan num: 68355)
---------------------------------------------------------------------------
FailedStatus                              Traceback (most recent call last)
/home/xf23id1/Users/2016_08_Ricci/2016_08_18_evening.py in <module>()
----> 1 RE(d3scan(tardis.h,-0.0001,0.0001,tardis.k,0.08,-0.06,tardis.l,-0.0001,0.0001,28))

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/run_engine.py in __call__(self, plan, subs, raise_if_interrupted, **metadata_kw)
    601                 exc = self._task.exception()
    602                 if exc is not None:
--> 603                     raise exc
    604             if raise_if_interrupted and self._interrupted:
    605                 raise RunEngineInterrupted("RunEngine was interrupted.")

/home/xf23id1/conda_envs/collection/lib/python3.4/asyncio/tasks.py in _step(***failed resolving arguments***)
    237                 # We use the `send` method directly, because coroutines
    238                 # don't have `__iter__` and `__next__` methods.
--> 239                 result = coro.send(None)
    240             else:
    241                 result = coro.throw(exc)

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/run_engine.py in _run(self)
    982             self.log.error("Run aborted")
    983             self.log.error("%r", err)
--> 984             raise err
    985         finally:
    986             # call stop() on every movable object we ever set()

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/run_engine.py in _run(self)
    880                         resp = self._response_stack.pop()
    881                         try:
--> 882                             msg = self._plan_stack[-1].send(resp)
    883                         # We have exhausted the top generator
    884                         except StopIteration:

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/spec_api.py in d3scan(time, md, *args)
    346         md = {}
    347     md = ChainMap(md, {'plan_name': 'd3scan'})
--> 348     return (yield from d2scan(*args, time=time, md=md))
    349 d3scan.__doc__ = d2scan.__doc__
    350 

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in wrapped(*args, **kwargs)
     69         gen_stack = func(*args, **kwargs)
     70         for g in gen_stack:
---> 71             yield from g
     72 
     73     return wrapped

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in configure_count_time_wrapper(plan, time)
   1484     if time is None:
   1485         # no-op
-> 1486         return (yield from plan)
   1487     else:
   1488         return (yield from finalize_wrapper(plan_mutator(plan, insert_set),

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in baseline_wrapper(plan, devices, name)
   1526         return (yield from plan)
   1527     else:
-> 1528         return (yield from plan_mutator(plan, insert_baseline))
   1529 
   1530 

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in plan_mutator(plan, msg_proc)
    164                 continue
    165             else:
--> 166                 raise ex
    167 
    168         # if inserting / mutating, put new generator on the stack

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in plan_mutator(plan, msg_proc)
    120             # send last result to the top most generator in the
    121             # stack this may raise StopIteration
--> 122             msg = plan_stack[-1].send(ret)
    123 
    124         except StopIteration:

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in wrapped(*args, **kwargs)
     69         gen_stack = func(*args, **kwargs)
     70         for g in gen_stack:
---> 71             yield from g
     72 
     73     return wrapped

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in reset_positions_wrapper(plan, devices)
   1436 
   1437     return (yield from finalize_wrapper(plan_mutator(plan, insert_reads),
-> 1438                                         reset()))
   1439 
   1440 

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in finalize_wrapper(plan, final_plan)
    938     cleanup = True
    939     try:
--> 940         ret = yield from plan
    941     except GeneratorExit:
    942         cleanup = False

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in plan_mutator(plan, msg_proc)
    192             inner_ret = yield msg
    193         except Exception as ex:
--> 194             msg = plan.throw(ex)
    195             plan_stack.append(single_gen(msg))
    196             result_stack.append(None)

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in relative_set_wrapper(plan, devices)
   1386     plan = plan_mutator(plan, insert_reads)
   1387     plan = msg_mutator(plan, rewrite_pos)
-> 1388     return (yield from plan)
   1389 
   1390 

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in msg_mutator(plan, msg_proc)
    233                 ret = None
    234                 continue
--> 235             ret = yield msg
    236         except StopIteration:
    237             break

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in plan_mutator(plan, msg_proc)
    190         try:
    191             # yield out the 'current message' and collect the return
--> 192             inner_ret = yield msg
    193         except Exception as ex:
    194             msg = plan.throw(ex)

/home/xf23id1/conda_envs/collection/lib/python3.4/site-packages/bluesky/plans.py in plan_mutator(plan, msg_proc)
    190         try:
    191             # yield out the 'current message' and collect the return
--> 192             inner_ret = yield msg
    193         except Exception as ex:
    194             msg = plan.throw(ex)

FailedStatus: MoveStatus(done=True, pos=tardis, elapsed=0.0, success=False, settle_time=0.0)
ambarb commented 8 years ago

@klauer I looked at the collected data and [tardis_h, tardis_k, and tardis_l] are recorded in the database as what one would expect (per the plan). However, I am puzzled by the output from tardis.position before and after the dscan() because dscan() is supposed to return to the position prior to scan execution. Plus, not seeing the peak on the images during and immediately after the scan tells me that there is something strange. We will test more tomorrow and get back to you.

BEFORE SCAN

| tardis_h     |                         0.00421 |                              0 |                              0 |
| tardis_k     |                        -0.33759 |                              0 |                              0 |
| tardis_l     |                         1.34048 |                              0 |                              0 |

AFTER SCAN

| tardis_h     |                         0.00420 |                              0 |                              0 |
| tardis_k     |                        -0.31000 |                              0 |                              0 |
| tardis_l     |                         1.34048 |                              0 |                              0 |

Maybe there is some arguments to be made for during the scan regarding triggering, but the behavior at scan cleanup is not what we expect.

ambarb commented 8 years ago

Here is the data recorded in data broker. K should be -0.33759 and not -0.31 as below. I assume that the zeros are dropped from K when recorded? @cmazzoli, @stuwilkins - thoughts?

Also, maybe the NaN at the beginning and end of the scan may be related to this issue, as Tardis is a pseudo motor and moves many. Obviously, this could have impact on CSX for sy and sz. See https://github.com/NSLS-II/Bug-Reports/issues/138 4th comment.

SCAN OUTPUT

    H               K   L
1   0.004212    -0.31   1.240483
2   0.004211    -0.31   1.250483
3   0.004210    -0.31   1.260483
4   0.004211    -0.31   1.270483
5   0.004211    -0.31   1.280483
6   0.004210    -0.31   1.290483
7   0.004209    -0.31   1.300483
8   0.004210    -0.31   1.310483
9   0.004209    -0.31   1.320483
10  0.004207    -0.31   1.330483
11  0.004206    -0.31   1.340483
12  0.004206    -0.31   1.350483
13  0.004206    -0.31   1.360483
14  0.004204    -0.31   1.370483
15  0.004203    -0.31   1.380483
16  0.004203    -0.31   1.390483
17  0.004202    -0.31   1.400483
18  0.004200    -0.31   1.410483
19  0.004200    -0.31   1.420483
20  0.004199    -0.31   1.430483
21  0.004198    -0.31   1.440483
1   NaN          NaN    1.340483
2   NaN          NaN    1.440483
ambarb commented 8 years ago

@tacaswell @danielballan @klauer Can you guys take a look at the last two entries? I think I've demonstrated that there is an issue, but I think it could be an interface between your areas or how pseudo motors are treated by bluesky/ophyd (nothing to do with reciprocal space).

If you want more data, I can generate it. Do you have specific requests?

tacaswell commented 8 years ago

You need to get an afternoon or so of @klauer 's + someone else's time to sort this out / do knowledege transfer

cmazzoli commented 8 years ago

Ok @tacaswell, you are right. @klauer, when will you have time in the next two weeks? (09/08-09 I am busy, for the rest I will find the time)

klauer commented 8 years ago

I have some time tomorrow morning. @danielballan / @tacaswell, who wants to be on the receiving end of the hkl brain dump?