Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.

Commit

Permalink
Deploy-2018-1.0: edited all acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrakitin authored and yugangzhang committed Jan 11, 2018
1 parent de18553 commit 16537ed
Show file tree
Hide file tree
Showing 24 changed files with 50 additions and 54 deletions.
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/#02-dscan_s1.py#
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['s1_xc', 'xray_eye3_stats1_total', 'xray_eye3_stats2_total']),
LivePlot('xray_eye3_stats1_total', 's1_xc')]
print(s1.xc.read())
RE(DeltaScanPlan([xray_eye3], s1.xc, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], s1.xc, -.1, .1, 3), subs)
print(s1.xc.read())
exit
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/#03-camera_eiger4m_s.py#
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['diff_xh', 'eiger4m_single_stats1_total', 'eiger4m_single_stats2_total']),
LivePlot('eiger4m_single_stats1_total', 'diff_xh')]
print ( 'The fast shutter will open/close three times, motor is diff.xh, camera is eiger4m_single')
RE(DeltaScanPlan([eiger4m_single], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([eiger4m_single], diff.xh, -.1, .1, 3), subs)

#can we change only one mater file for the same dscan?
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/01-count_eiger1m.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from bluesky.plans import Count
from bluesky.plans import count
from bluesky.callbacks import LiveTable, LivePlot


Expand All @@ -8,5 +8,5 @@
eiger1m.tr.acquire_period.value = aq_p
eiger1m.tr.num_images.value = 10
print("describe what to see")
RE(Count([eiger1m]),
RE(count([eiger1m]),
LiveTable(['eiger1m_stats1_total', 'eiger1m_stats2_total']))
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/01-count_eiger1m_s.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from bluesky.plans import Count
from bluesky.plans import count
from bluesky.callbacks import LiveTable, LivePlot


Expand All @@ -8,5 +8,5 @@
eiger1m_single.cam.acquire_period.value = aq_p
eiger1m_single.cam.num_images.value = 10
print("describe what to see")
RE(Count([eiger1m_single]),
RE(count([eiger1m_single]),
LiveTable(['eiger1m_single_stats1_total', 'eiger1m_single_stats2_total']))
10 changes: 3 additions & 7 deletions profile_collection/acceptance_tests/01-count_eiger4m.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from bluesky.plans import Count
from bluesky.plans import count
from bluesky.callbacks import LiveTable, LivePlot


Expand All @@ -8,12 +8,8 @@
eiger4m.tr.acquire_period.value = aq_p
eiger4m.tr.num_images.value = 10
print("The fast shutter should open and close for 10 times")
RE(Count([eiger4m]),
LiveTable(['eiger4m_stats1_total', 'eiger4m_stats2_total'])

)


RE(count([eiger4m]),
LiveTable(['eiger4m_stats1_total', 'eiger4m_stats2_total']))

img = get_images(db[-1], 'image');print('show the first image');plt.imshow( img[0][0] )

4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/01-count_eiger4m_s.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from bluesky.plans import Count
from bluesky.plans import count
from bluesky.callbacks import LiveTable, LivePlot


Expand All @@ -9,7 +9,7 @@
eiger4m_single.cam.num_images.value = 5
eiger4m.tr.num_images.value = 1
print("collect five images")
RE(Count([eiger4m_single]),
RE(count([eiger4m_single]),
LiveTable(['eiger4m_single_stats1_total', 'eiger4m_single_stats2_total']))

img = get_images(db[-1], 'eiger4m_single_image');print('show the first image');plt.imshow( img[0][0] )
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/02-dscan-gsl.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot
subs = [LiveTable(['gsl_xc', 'xray_eye3_stats4_total', 'xray_eye3_stats4_total']),
LivePlot('xray_eye3_stats4_total', 'gsl_xc')]
print(gsl.xc.read())
RE(DeltaScanPlan([xray_eye3], gsl.xc, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], gsl.xc, -.1, .1, 3), subs)
print(gsl.xc.read())
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/02-dscan_dcm.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['dcm_b', 'xray_eye3_stats1_total', 'xray_eye3_stats2_total']),
LivePlot('xray_eye3_stats1_total', 'dcm_b')]
print(dcm.b.read())
RE(DeltaScanPlan([xray_eye3], dcm.b, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], dcm.b, -.1, .1, 3), subs)
print(dcm.b.read())
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/02-dscan_diff.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['diff_xh', 'xray_eye3_stats1_total', 'xray_eye3_stats2_total']),
LivePlot('xray_eye3_stats1_total', 'diff_xh')]
RE(DeltaScanPlan([xray_eye3], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], diff.xh, -.1, .1, 3), subs)
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/02-dscan_gsl.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot
subs = [LiveTable(['gsl_xc_readback', 'xray_eye3_stats1_total', 'xray_eye3_stats2_total']),
LivePlot('xray_eye3_stats1_total', 'gsl_xc_readback')]
print(gsl.xc.read())
RE(DeltaScanPlan([xray_eye3], gsl.xc, -.1, .1, 10), subs)
RE(rel_scan([xray_eye3], gsl.xc, -.1, .1, 10), subs)
print(gsl.xc.read())

print( 'here' )
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/02-dscan_ivu.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot
subs = [LiveTable(['ivu_gap', 'xray_eye3_stats1_total', 'xray_eye3_stats1_total']),
LivePlot('xray_eye3_stats1_total', 'ivu_gap')]
print(ivu_gap.read())
RE(DeltaScanPlan([xray_eye3], ivu_gap, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], ivu_gap, -.1, .1, 3), subs)
print(ivu_gap.read())
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/02-dscan_mbs.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['mbs_xc', 'xray_eye3_stats1_total', 'xray_eye3_stats2_total']),
LivePlot('xray_eye3_stats1_total', 'mbs_xc')]
print(mbs.xc.read())
RE(DeltaScanPlan([xray_eye3], mbs.xc, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], mbs.xc, -.1, .1, 3), subs)
print(mbs.xc.read())
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/02-dscan_s1.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['s1_xc', 'xray_eye3_stats1_total', 'xray_eye3_stats2_total']),
LivePlot('xray_eye3_stats1_total', 's1_xc')]
print(s1.xc.read())
RE(DeltaScanPlan([xray_eye3], s1.xc, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], s1.xc, -.1, .1, 3), subs)
print(s1.xc.read())
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/02-dscan_s2.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['s1_xc', 'xray_eye3_stats1_total', 'xray_eye3_stats2_total']),
LivePlot('xray_eye3_stats1_total', 's1_xc')]
print(s1.xc.read())
RE(DeltaScanPlan([xray_eye3], s1.xc, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], s1.xc, -.1, .1, 3), subs)
print(s1.xc.read())
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/02-dscan_s4.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot
subs = [LiveTable(['s4_xc', 'xray_eye3_stats4_total', 'xray_eye3_stats4_total']),
LivePlot('xray_eye3_stats4_total', 's4_xc')]
print(s4.xc.read())
RE(DeltaScanPlan([xray_eye3], s4.xc, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], s4.xc, -.1, .1, 3), subs)
print(s4.xc.read())
6 changes: 3 additions & 3 deletions profile_collection/acceptance_tests/02-dscan_slow_motor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


Expand All @@ -8,6 +8,6 @@

subs = [LiveTable(['diff_yh', 'xray_eye3_stats1_total', 'xray_eye3_stats2_total']),
LivePlot('xray_eye3_stats1_total', 'diff_yh')]
print ('A DeltaScan of diff_yh with xray_eye3 as camera')
RE(DeltaScanPlan([xray_eye3], diff.yh, -.1, .1, 3), subs)
print('A rel_scan of diff_yh with xray_eye3 as camera')
RE(rel_scan([xray_eye3], diff.yh, -.1, .1, 3), subs)

4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/03-camera_eiger1m_s.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['diff_xh', 'eiger1m_single_stats1_total', 'eiger1m_single_stats2_total']),
LivePlot('eiger1m_single_stats1_total', 'diff_xh')]
print ( 'The fast shutter will open/close three times, motor is diff.xh, camera is eiger1m_single')
RE(DeltaScanPlan([eiger1m_single], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([eiger1m_single], diff.xh, -.1, .1, 3), subs)

img = get_images(db[-1], 'eiger1m_single_image')
print('show the first image')
Expand Down
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/03-camera_eiger4m_s.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['diff_xh', 'eiger4m_single_stats1_total', 'eiger4m_single_stats2_total']),
LivePlot('eiger4m_single_stats1_total', 'diff_xh')]
print ( 'The fast shutter will open/close three times, motor is diff.xh, camera is eiger4m_single')
RE(DeltaScanPlan([eiger4m_single], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([eiger4m_single], diff.xh, -.1, .1, 3), subs)

img = get_images(db[-1], 'eiger4m_single_image')
print('show the first image')
Expand Down
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/03-camera_xe1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['diff_xh', 'xray_eye1_stats1_total', 'xray_eye1_stats2_total']),
LivePlot('xray_eye1_stats1_total', 'diff_xh')]
RE(DeltaScanPlan([xray_eye1], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([xray_eye1], diff.xh, -.1, .1, 3), subs)
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/03-camera_xe1_cam.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot
subs = [LiveTable(['diff_xh', 'xray_eye1_stats1_total', 'xray_eye1_stats2_total']),
LivePlot('xray_eye1_stats1_total', 'diff_xh')]
print ( 'Motor is diff.xh, camera is xray_eye1 with saving images')
RE(DeltaScanPlan([xray_eye1_writing], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([xray_eye1_writing], diff.xh, -.1, .1, 3), subs)

img = get_images(db[-1], 'xray_eye1_image')
print('show the first image')
Expand Down
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/03-camera_xe2.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['diff_xh', 'xray_eye2_stats1_total', 'xray_eye2_stats2_total']),
LivePlot('xray_eye2_stats1_total', 'diff_xh')]
print ( ' Motor is diff.xh, camera is xray_eye2')
RE(DeltaScanPlan([xray_eye2], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([xray_eye2], diff.xh, -.1, .1, 3), subs)
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/03-camera_xe2_cam.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['diff_xh', 'xray_eye2_stats1_total', 'xray_eye2_stats2_total']),
LivePlot('xray_eye2_stats1_total', 'diff_xh')]
print ( 'Motor is diff.xh, camera is xray_eye2 with saving images')
RE(DeltaScanPlan([xray_eye2_writing], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([xray_eye2_writing], diff.xh, -.1, .1, 3), subs)

img = get_images(db[-1], 'xray_eye2_image')
print('show the first image')
Expand Down
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/03-camera_xe3.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


Expand All @@ -8,4 +8,4 @@
print ( 'Motor is diff.xh, camera is xray_eye3')

#print ( 'The fast shutter will open/close three times, motor is diff.xh, camera is xray_eye3')
RE(DeltaScanPlan([xray_eye3], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3], diff.xh, -.1, .1, 3), subs)
4 changes: 2 additions & 2 deletions profile_collection/acceptance_tests/03-camera_xe3_cam.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

from bluesky.plans import DeltaScanPlan
from bluesky.plans import rel_scan
from bluesky.callbacks import LiveTable, LivePlot


subs = [LiveTable(['diff_xh', 'xray_eye3_stats1_total', 'xray_eye3_stats2_total']),
LivePlot('xray_eye3_stats1_total', 'diff_xh')]
print ( 'Motor is diff.xh, camera is xray_eye3 with saving images')
RE(DeltaScanPlan([xray_eye3_writing], diff.xh, -.1, .1, 3), subs)
RE(rel_scan([xray_eye3_writing], diff.xh, -.1, .1, 3), subs)


img = get_images(db[-1], 'xray_eye3_image')
Expand Down

0 comments on commit 16537ed

Please sign in to comment.