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

Strange dropping of data and not stopping scan expected #178

Closed ambarb closed 6 years ago

ambarb commented 6 years ago

This one is some what odd and not at all reproducible as I successfully completed a gap scan before and after the bad scan [82887). The same command was entered each time. The second scan [82887] didnt even drive epu gap to the requested position.

In [203]: RE(relative_scan(dets,epu2.gap,-.5,.5,20)) 
Transient Scan ID: 82886 @ 2017/09/09 12:25:30
Persistent Unique Scan ID: 'db9da7bc-0f7f-4115-8df5-5fd5009b0919'
epu2_gap  0%|                                                                                                                                                                        | 0.0/0.5 [00:00<?, ?/s]
/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/ophyd/status.py:336: RuntimeWarning: divide by zero encountered in double_scalars
+-----------+------------+-------------------+------------+                                                                                                                                                  
|   seq_num |       time | epu2_gap_readback |   sclr_ch2 |
+-----------+------------+-------------------+------------+
|         1 | 12:25:39.7 |           30.4923 |       1943 |
|         2 | 12:25:48.4 |           30.5456 |       2050 |                                                                                                                                                  
|         3 | 12:25:57.2 |           30.5980 |       1925 |                                                                                                                                                  
|         4 | 12:26:05.9 |           30.6506 |       1625 |                                                                                                                                                  
|         5 | 12:26:14.8 |           30.7033 |       1528 |                                                                                                                                                  
|         6 | 12:26:23.9 |           30.7559 |       1357 |                                                                                                                                                  
|         7 | 12:26:32.9 |           30.8085 |       1308 |                                                                                                                                                  
|         8 | 12:26:41.8 |           30.8612 |       1191 |                                                                                                                                                  
|         9 | 12:26:50.9 |           30.9138 |       1165 |                                                                                                                                                  
|        10 | 12:26:59.9 |           30.9664 |       1115 |                                                                                                                                                  
|        11 | 12:27:08.9 |           31.0190 |       1096 |                                                                                                                                                  
|        12 | 12:27:17.9 |           31.0717 |       1021 |                                                                                                                                                  
|        13 | 12:27:26.8 |           31.1243 |        905 |                                                                                                                                                  
|        14 | 12:27:35.5 |           31.1770 |        842 |                                                                                                                                                  
|        15 | 12:27:44.3 |           31.2296 |        807 |                                                                                                                                                  
|        16 | 12:27:53.0 |           31.2822 |        764 |                                                                                                                                                  
|        17 | 12:28:01.8 |           31.3349 |        711 |                                                                                                                                                  
|        18 | 12:28:10.8 |           31.3874 |        713 |                                                                                                                                                  
|        19 | 12:28:19.9 |           31.4401 |        677 |                                                                                                                                                  
|        20 | 12:28:28.6 |           31.4928 |        642 |                                                                                                                                                  
+-----------+------------+-------------------+------------+
generator relative_scan ['db9da7'] (scan num: 82886)
Out[203]: ['db9da7bc-0f7f-4115-8df5-5fd5009b0919']                                                                                                                                                           

In [204]: RE(relative_scan(dets,epu2.gap,-.5,.5,20)) 
Transient Scan ID: 82887 @ 2017/09/09 12:29:14
+-----------+------------+-------------------+------------+                                                                                                                                                  
|   seq_num |       time | epu2_gap_readback |   sclr_ch2 |
+-----------+------------+-------------------+------------+
|         1 | 12:29:16.0 |           30.5592 |       1982 |
|         5 | 12:29:21.0 |           30.5542 |       1997 |                                                                                                                                                  
|         9 | 12:29:26.0 |           30.5528 |       2126 |                                                                                                                                                  
|        13 | 12:29:31.0 |           30.5523 |       2009 |                                                                                                                                                  
epu2_gap  0%|                                                                                                                                                                      | 0.0/0.196 [00:00<?, ?/s]
/home/xf23id1/conda_envs/dev/lib/python3.6/site-packages/ophyd/status.py:336: RuntimeWarning: divide by zero encountered in double_scalars
|        17 | 12:29:36.0 |           30.5528 |       2004 |                                                                                                                                                  
|        20 | 12:29:39.8 |           30.5545 |       1815 |                                                                                                                                                  
+-----------+------------+-------------------+------------+
generator relative_scan ['84b2bf'] (scan num: 82887)
Out[204]: ['84b2bfd9-76b0-4a93-af9e-04ea0bf43635']                                                                                                                                                           

In [205]: 

In [205]: 

In [205]: RE(relative_scan(dets,epu2.gap,-.5,.5,20)) 
Transient Scan ID: 82888 @ 2017/09/09 12:30:07
Persistent Unique Scan ID: 'f8fcb6ce-b811-4a0b-97af-3265a84bd356'
+-----------+------------+-------------------+------------+                                                                                                                                                  
|   seq_num |       time | epu2_gap_readback |   sclr_ch2 |
+-----------+------------+-------------------+------------+
|         1 | 12:30:17.2 |           30.0497 |        234 |
|         2 | 12:30:25.9 |           30.1031 |        238 |                                                                                                                                                  
|         3 | 12:30:34.8 |           30.1555 |        239 |                                                                                                                                                  
|         4 | 12:30:43.9 |           30.2082 |        240 |                                                                                                                                                  
|         5 | 12:30:52.7 |           30.2608 |        241 |                                                                                                                                                  
|         6 | 12:31:01.5 |           30.3134 |        267 |                                                                                                                                                  
|         7 | 12:31:10.2 |           30.3661 |       1277 |                                                                                                                                                  
|         8 | 12:31:19.0 |           30.4187 |       1894 |                                                                                                                                                  
|         9 | 12:31:28.0 |           30.4714 |       2032 |                                                                                                                                                  
|        10 | 12:31:36.9 |           30.5240 |       1945 |                                                                                                                                                  
|        11 | 12:31:45.9 |           30.5766 |       1915 |                                                                                                                                                  
|        12 | 12:31:54.9 |           30.6292 |       1754 |                                       

strangeness

danielballan commented 6 years ago

That's a wild one! I want to understand if the plan skipped over these points (it's hard to imagine how that could happen) or if LiveTable/LivePlot merely failed to display them. What does db['84b2bf'].table() return?

ambarb commented 6 years ago

The data is in the database.

As verified in https://github.com/NSLS-II/bluesky/issues/829

In [39]: db['84b2bf'].table()
Out[39]: 
                              time  epu2_gap_readback  epu2_gap_setpoint  \
seq_num                                                                    
1       2017-09-09 12:29:16.069764          30.559230          30.063875   
2       2017-09-09 12:29:17.431385          30.554365          30.116507   
3       2017-09-09 12:29:18.625158          30.554272          30.169138   
4       2017-09-09 12:29:19.825968          30.554230          30.221770   
5       2017-09-09 12:29:21.060551          30.554187          30.274402   
6       2017-09-09 12:29:22.437309          30.553115          30.327033   
7       2017-09-09 12:29:23.638357          30.552965          30.379665   
8       2017-09-09 12:29:24.840091          30.552875          30.432296   
9       2017-09-09 12:29:26.048319          30.552782          30.484928   
10      2017-09-09 12:29:27.441708          30.552360          30.537559   
11      2017-09-09 12:29:28.644210          30.552306          30.590191   
12      2017-09-09 12:29:29.831919          30.552285          30.642823   
13      2017-09-09 12:29:31.037143          30.552272          30.695454   
14      2017-09-09 12:29:32.448842          30.552307          30.748086   
15      2017-09-09 12:29:33.646418          30.552448          30.800717   
16      2017-09-09 12:29:34.841456          30.552627          30.853349   
17      2017-09-09 12:29:36.053238          30.552755          30.905980   
18      2017-09-09 12:29:37.451394          30.554461          30.958612   
19      2017-09-09 12:29:38.648582          30.554475          31.011244   
20      2017-09-09 12:29:39.841663          30.554485          31.063875   

         epu2_gap_stop_signal    sclr_ch1  sclr_ch2  sclr_ch3  sclr_ch4  \
seq_num                                                                   
1                           0  50000005.0    1982.0      46.0      31.0   
2                           0  50000005.0    2017.0      45.0      31.0   
3                           0  50000005.0    2175.0      45.0      31.0   
4                           0  50000005.0    2109.0      46.0      31.0   
5                           0  50000005.0    1997.0      45.0      30.0   
6                           0  50000005.0    2041.0      46.0      30.0   
7                           0  50000005.0    2041.0      46.0      31.0   
8                           0  50000005.0    2032.0      46.0      31.0   
9                           0  50000005.0    2126.0      45.0      31.0   
10                          0  50000005.0    2050.0      45.0      31.0   
11                          0  50000005.0    1935.0      44.0      31.0   
12                          0  50000005.0    2010.0      46.0      31.0   
13                          0  50000005.0    2009.0      46.0      31.0   
14                          0  50000005.0    2246.0      46.0      32.0   
15                          0  50000005.0    2145.0      46.0      30.0   
16                          0  50000005.0    2137.0      47.0      31.0   
17                          0  50000005.0    2004.0      46.0      31.0   
18                          0  50000005.0    2030.0      46.0      31.0   
19                          0  50000005.0    1919.0      46.0      31.0   
20                          0  50000005.0    1815.0      46.0      31.0   

         sclr_ch5  sclr_ch6  sclr_time  
seq_num                                 
1          1362.0       0.0        1.0  
2          1362.0       0.0        1.0  
3          1360.0       0.0        1.0  
4          1359.0       0.0        1.0  
5          1358.0       0.0        1.0  
6          1358.0       0.0        1.0  
7          1360.0       0.0        1.0  
8          1364.0       0.0        1.0  
9          1366.0       0.0        1.0  
10         1367.0       0.0        1.0  
11         1367.0       0.0        1.0  
12         1366.0       0.0        1.0  
13         1370.0       0.0        1.0  
14         1371.0       0.0        1.0  
15         1371.0       0.0        1.0  
16         1372.0       0.0        1.0  
17         1372.0       0.0        1.0  
18         1373.0       0.0        1.0  
19         1373.0       0.0        1.0  
20         1362.0       0.0        1.0  
danielballan commented 6 years ago

I attribute the missing rows in LiveTable to the progress bar try to clean up after itself (i.e., clear itself off the screen) and accidentally take a row of the table with it. But the underlying issue is the epu_gap failing to move and also failing to report that problem correctly.

ambarb commented 6 years ago

@cmazzoli @wen-hu @stuwilkins @irawaluyo @adhuntbnl be aware that this happened to the epu.

@danielballan you are suggesting we either change our profile or look into the ioc, right. As such, we can close this and and open a report on https://github.com/NSLS-II-CSX/xf23id1_profiles/issues/5

danielballan commented 6 years ago

Yes.