diff --git a/src/spec2nexus/data/usaxs-bluesky-specwritercallback.dat b/src/spec2nexus/data/usaxs-bluesky-specwritercallback.dat
index 0d10f34..2d2b962 100644
--- a/src/spec2nexus/data/usaxs-bluesky-specwritercallback.dat
+++ b/src/spec2nexus/data/usaxs-bluesky-specwritercallback.dat
@@ -1,377 +1,378 @@
-#F 04_19_test.dat
-#E 1555686229
-#D Fri Apr 19 10:03:49 2019
-#C BlueSky  user = usaxs  host = usaxscontrol.xray.aps.anl.gov
-
-#S 2  TuneAxis.tune()
-#D Fri Apr 19 10:04:44 2019
-#C Fri Apr 19 10:04:44 2019.  plan_type = generator
-#C Fri Apr 19 10:04:44 2019.  uid = 91beb53c-a5df-4c95-a845-df57d439f380
-#MD APSTOOLS_VERSION = 1.1.0
-#MD BLUESKY_VERSION = 1.5.2
-#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
-#MD EPICS_HOST_ARCH = linux-x86_64
-#MD OPHYD_VERSION = 1.3.2
-#MD beamline_id = APS USAXS 9-ID-C
-#MD datetime = 2019-04-19 10:04:44.400750
-#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
-#MD pid = 27062
-#MD proposal_id = testing Bluesky installation
-#MD purpose = tuner
-#MD tune_md = {'width': -0.004, 'initial_position': 8.824885, 'time_iso8601': '2019-04-19 10:04:44.402643'}
-#MD tune_parameters = {'num': 31, 'width': -0.004, 'initial_position': 8.824885, 'peak_choice': 'com', 'x_axis': 'm_stage_r', 'y_axis': 'I0_USAXS'}
-#N 31
-#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  m_stage_r  m_stage_r_user_setpoint  m_stage_r_soft_limit_lo  m_stage_r_soft_limit_hi
-2.424184560775757 2 1000000.0 166.0 3110.0 1315.0 1.0 226.0 0.1 5.0 8.826885 8.826885 -7.856115 37.143885
-2.8740737438201904 3 1000000.0 173.0 3111.0 1363.0 1.0 226.0 0.1 5.0 8.826751 8.826751666666667 -7.856115 37.143885
-3.3133506774902344 3 1000000.0 191.0 3111.0 1739.0 1.0 226.0 0.1 5.0 8.826618 8.826618333333334 -7.856115 37.143885
-3.7464096546173096 4 1000000.0 218.0 3110.0 2360.0 1.0 225.0 0.1 5.0 8.826485 8.826485 -7.856115 37.143885
-4.169032096862793 4 1000000.0 263.0 3110.0 3565.0 1.0 226.0 0.1 5.0 8.826350999999999 8.826351666666667 -7.856115 37.143885
-4.582501173019409 5 1000000.0 331.0 3110.0 6112.0 1.0 224.0 0.1 5.0 8.826218 8.826218333333333 -7.856115 37.143885
-5.732854127883911 6 1000000.0 480.0 3110.0 12381.0 1.0 225.0 0.1 5.0 8.826084999999999 8.826085 -7.856115 37.143885
-6.232714414596558 6 1000000.0 831.0 3107.0 32104.0 1.0 225.0 0.1 5.0 8.825951 8.825951666666667 -7.856115 37.143885
-6.648759126663208 7 1000000.0 2135.0 3099.0 99999.0 1.0 225.0 0.1 5.0 8.825818 8.825818333333334 -7.856115 37.143885
-7.074079751968384 7 1000000.0 7035.0 3098.0 99999.0 1.0 225.0 0.1 5.0 8.825685 8.825685 -7.856115 37.143885
-7.4988579750061035 7 1000000.0 15946.0 3096.0 99999.0 1.0 225.0 0.1 5.0 8.825551 8.825551666666668 -7.856115 37.143885
-7.91678524017334 8 1000000.0 27090.0 3094.0 99999.0 1.0 225.0 0.1 5.0 8.825417999999999 8.825418333333333 -7.856115 37.143885
-8.334335803985596 8 1000000.0 36085.0 3094.0 99999.0 1.0 225.0 0.1 5.0 8.825285000000001 8.825285000000001 -7.856115 37.143885
-8.749109983444214 9 1000000.0 41581.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.825151 8.825151666666667 -7.856115 37.143885
-9.182162046432495 9 1000000.0 43316.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.825018 8.825018333333334 -7.856115 37.143885
-9.598440885543823 10 1000000.0 43527.0 3092.0 99999.0 1.0 225.0 0.1 5.0 8.824885 8.824885 -7.856115 37.143885
-10.024555206298828 10 1000000.0 43353.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.824751 8.824751666666666 -7.856115 37.143885
-10.460494756698608 10 1000000.0 42338.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.824618000000001 8.824618333333333 -7.856115 37.143885
-10.884761571884155 11 1000000.0 38399.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.824485 8.824485 -7.856115 37.143885
-11.298949956893921 11 1000000.0 29213.0 3095.0 99999.0 1.0 225.0 0.1 5.0 8.824351 8.824351666666667 -7.856115 37.143885
-11.730870485305786 12 1000000.0 18421.0 3096.0 99999.0 1.0 224.0 0.1 5.0 8.824218 8.824218333333333 -7.856115 37.143885
-12.149333000183105 12 1000000.0 9069.0 3098.0 99999.0 1.0 224.0 0.1 5.0 8.824085 8.824085 -7.856115 37.143885
-12.57930874824524 13 1000000.0 3351.0 3099.0 100000.0 1.0 226.0 0.1 5.0 8.823951000000001 8.823951666666666 -7.856115 37.143885
-13.07323408126831 13 1000000.0 1209.0 3099.0 96464.0 1.0 225.0 0.1 5.0 8.823818 8.823818333333334 -7.856115 37.143885
-13.499373435974121 13 1000000.0 592.0 3107.0 28112.0 1.0 225.0 0.1 5.0 8.823685 8.823685 -7.856115 37.143885
-14.033109664916992 14 1000000.0 370.0 3110.0 11058.0 1.0 224.0 0.1 5.0 8.823551 8.823551666666667 -7.856115 37.143885
-14.44892406463623 14 1000000.0 276.0 3110.0 5657.0 1.0 224.0 0.1 5.0 8.823418 8.823418333333333 -7.856115 37.143885
-14.873764276504517 15 1000000.0 220.0 3110.0 3261.0 1.0 224.0 0.1 5.0 8.823284999999998 8.823285 -7.856115 37.143885
-15.299394607543945 15 1000000.0 188.0 3110.0 1999.0 1.0 224.0 0.1 5.0 8.823151 8.823151666666666 -7.856115 37.143885
-15.72576117515564 16 1000000.0 167.0 3111.0 1456.0 1.0 225.0 0.1 5.0 8.823018 8.823018333333334 -7.856115 37.143885
-16.14872455596924 16 1000000.0 154.0 3111.0 1058.0 1.0 225.0 0.1 5.0 8.822885 8.822885 -7.856115 37.143885
-#C Fri Apr 19 10:05:01 2019.  num_events_baseline = 2
-#C Fri Apr 19 10:05:01 2019.  num_events_primary = 31
-#C Fri Apr 19 10:05:01 2019.  num_events_PeakStats = 1
-#C Fri Apr 19 10:05:01 2019.  exit_status = success
-
-#S 3  TuneAxis.tune()
-#D Fri Apr 19 10:05:02 2019
-#C Fri Apr 19 10:05:02 2019.  plan_type = generator
-#C Fri Apr 19 10:05:02 2019.  uid = c49c7f9a-9aee-410a-be62-6283c03d60d2
-#MD APSTOOLS_VERSION = 1.1.0
-#MD BLUESKY_VERSION = 1.5.2
-#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
-#MD EPICS_HOST_ARCH = linux-x86_64
-#MD OPHYD_VERSION = 1.3.2
-#MD beamline_id = APS USAXS 9-ID-C
-#MD datetime = 2019-04-19 10:05:02.904407
-#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
-#MD pid = 27062
-#MD proposal_id = testing Bluesky installation
-#MD purpose = tuner
-#MD tune_md = {'width': -8, 'initial_position': 18.852700000000002, 'time_iso8601': '2019-04-19 10:05:02.907725'}
-#MD tune_parameters = {'num': 21, 'width': -8, 'initial_position': 18.852700000000002, 'peak_choice': 'com', 'x_axis': 'm_stage_r2p', 'y_axis': 'I0_USAXS'}
-#N 21
-#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  m_stage_r2p  m_stage_r2p_user_setpoint  m_stage_r2p_soft_limit_lo  m_stage_r2p_soft_limit_hi
-1.3263635635375977 1 1000000.0 8203.0 3098.0 99999.0 1.0 224.0 0.1 5.0 22.852700000000002 22.852700000000002 -20.0 90.0
-1.66495680809021 2 1000000.0 10621.0 3097.0 99999.0 1.0 225.0 0.1 5.0 22.4527 22.452700000000004 -20.0 90.0
-1.9055912494659424 2 1000000.0 16161.0 3097.0 99999.0 1.0 225.0 0.1 5.0 22.0527 22.0527 -20.0 90.0
-2.1283459663391113 2 1000000.0 22802.0 3095.0 99999.0 1.0 226.0 0.1 5.0 21.6527 21.652700000000003 -20.0 90.0
-2.378723621368408 2 1000000.0 29831.0 3095.0 99999.0 1.0 225.0 0.1 5.0 21.2527 21.2527 -20.0 90.0
-2.631176233291626 3 1000000.0 37118.0 3093.0 99999.0 1.0 225.0 0.1 5.0 20.852700000000002 20.852700000000002 -20.0 90.0
-2.8459906578063965 3 1000000.0 44623.0 3092.0 99999.0 1.0 225.0 0.1 5.0 20.4527 20.4527 -20.0 90.0
-3.0810608863830566 3 1000000.0 52973.0 3092.0 99999.0 1.0 226.0 0.1 5.0 20.0527 20.0527 -20.0 90.0
-3.3123385906219482 3 1000000.0 61570.0 3089.0 99999.0 1.0 226.0 0.1 5.0 19.6527 19.652700000000003 -20.0 90.0
-4.712848663330078 5 1000000.0 68876.0 3089.0 99999.0 1.0 225.0 0.1 5.0 19.2527 19.2527 -20.0 90.0
-4.846937894821167 5 1000000.0 70566.0 3089.0 100000.0 1.0 225.0 0.1 5.0 18.852700000000002 18.852700000000002 -20.0 90.0
-5.111504554748535 5 1000000.0 65556.0 3089.0 99999.0 1.0 226.0 0.1 5.0 18.4527 18.4527 -20.0 90.0
-5.270373582839966 5 1000000.0 57467.0 3090.0 99999.0 1.0 225.0 0.1 5.0 18.0527 18.0527 -20.0 90.0
-5.435962200164795 5 1000000.0 47836.0 3092.0 99999.0 1.0 225.0 0.1 5.0 17.6527 17.652700000000003 -20.0 90.0
-5.578095197677612 6 1000000.0 37772.0 3094.0 99999.0 1.0 225.0 0.1 5.0 17.2527 17.2527 -20.0 90.0
-5.813758373260498 6 1000000.0 26264.0 3095.0 99999.0 1.0 226.0 0.1 5.0 16.852700000000002 16.852700000000002 -20.0 90.0
-6.037451982498169 6 1000000.0 15133.0 3097.0 99999.0 1.0 226.0 0.1 5.0 16.4527 16.4527 -20.0 90.0
-6.263959169387817 6 1000000.0 7545.0 3098.0 99999.0 1.0 225.0 0.1 5.0 16.0527 16.0527 -20.0 90.0
-6.477849960327148 6 1000000.0 4022.0 3098.0 99999.0 1.0 226.0 0.1 5.0 15.652700000000001 15.652700000000003 -20.0 90.0
-6.611781358718872 7 1000000.0 2077.0 3098.0 99999.0 1.0 226.0 0.1 5.0 15.2527 15.2527 -20.0 90.0
-6.830210208892822 7 1000000.0 1007.0 3099.0 99999.0 1.0 226.0 0.1 5.0 14.8527 14.852700000000002 -20.0 90.0
-#C Fri Apr 19 10:05:10 2019.  num_events_baseline = 2
-#C Fri Apr 19 10:05:10 2019.  num_events_primary = 21
-#C Fri Apr 19 10:05:10 2019.  num_events_PeakStats = 1
-#C Fri Apr 19 10:05:10 2019.  exit_status = success
-
-#S 4  TuneAxis.tune()
-#D Fri Apr 19 10:05:12 2019
-#C Fri Apr 19 10:05:12 2019.  plan_type = generator
-#C Fri Apr 19 10:05:12 2019.  uid = 6f968239-26ad-40e4-b4d3-3527ea8a5ce0
-#MD APSTOOLS_VERSION = 1.1.0
-#MD BLUESKY_VERSION = 1.5.2
-#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
-#MD EPICS_HOST_ARCH = linux-x86_64
-#MD OPHYD_VERSION = 1.3.2
-#MD beamline_id = APS USAXS 9-ID-C
-#MD datetime = 2019-04-19 10:05:12.597494
-#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
-#MD pid = 27062
-#MD proposal_id = testing Bluesky installation
-#MD purpose = tuner
-#MD tune_md = {'width': -0.004, 'initial_position': 8.883730900000002, 'time_iso8601': '2019-04-19 10:05:12.599316'}
-#MD tune_parameters = {'num': 35, 'width': -0.004, 'initial_position': 8.883730900000002, 'peak_choice': 'com', 'x_axis': 'a_stage_r', 'y_axis': 'PD_USAXS'}
-#N 35
-#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  a_stage_r  a_stage_r_user_setpoint  a_stage_r_soft_limit_lo  a_stage_r_soft_limit_hi
-1.7970309257507324 2 1000000.0 55898.0 3103.0 1.0 1.0 226.0 0.1 5.0 8.8857309 8.885730900000002 -5.0 30.0
-2.3183534145355225 2 1000000.0 55818.0 3103.0 1.0 1.0 226.0 0.1 5.0 8.885613200000002 8.885613252941178 -5.0 30.0
-2.735879421234131 3 1000000.0 55972.0 3103.0 1.0 1.0 226.0 0.1 5.0 8.8854956 8.885495605882355 -5.0 30.0
-3.1499643325805664 3 1000000.0 55995.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8853779 8.88537795882353 -5.0 30.0
-4.025444030761719 4 1000000.0 56017.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8852603 8.885260311764707 -5.0 30.0
-4.451297998428345 4 1000000.0 56211.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.885142700000001 8.885142664705885 -5.0 30.0
-4.872895956039429 5 1000000.0 56122.0 3102.0 2.0 1.0 226.0 0.1 5.0 8.885025 8.885025017647061 -5.0 30.0
-5.300731897354126 5 1000000.0 56135.0 3103.0 4.0 1.0 227.0 0.1 5.0 8.884907400000001 8.884907370588238 -5.0 30.0
-5.732980251312256 6 1000000.0 56169.0 3103.0 5.0 1.0 226.0 0.1 5.0 8.8847897 8.884789723529414 -5.0 30.0
-6.150254011154175 6 1000000.0 56176.0 3103.0 7.0 1.0 226.0 0.1 5.0 8.884672100000001 8.88467207647059 -5.0 30.0
-6.676549911499023 7 1000000.0 56318.0 3102.0 19.0 1.0 226.0 0.1 5.0 8.8845544 8.884554429411766 -5.0 30.0
-7.100552320480347 7 1000000.0 56091.0 3103.0 155.0 1.0 226.0 0.1 5.0 8.884436800000001 8.884436782352942 -5.0 30.0
-7.533323526382446 8 1000000.0 56197.0 3102.0 3971.0 1.0 226.0 0.1 5.0 8.8843191 8.884319135294119 -5.0 30.0
-7.952568769454956 8 1000000.0 56313.0 3100.0 27806.0 1.0 227.0 0.1 5.0 8.884201500000001 8.884201488235297 -5.0 30.0
-8.37877631187439 8 1000000.0 56384.0 3096.0 57429.0 1.0 227.0 0.1 5.0 8.8840838 8.884083841176473 -5.0 30.0
-8.900550127029419 9 1000000.0 56385.0 3093.0 81437.0 1.0 227.0 0.1 5.0 8.883966200000001 8.883966194117649 -5.0 30.0
-9.333159446716309 9 1000000.0 56337.0 3093.0 78946.0 1.0 226.0 0.1 5.0 8.883848500000001 8.883848547058825 -5.0 30.0
-9.749623775482178 10 1000000.0 56285.0 3097.0 50788.0 1.0 226.0 0.1 5.0 8.883730900000002 8.883730900000002 -5.0 30.0
-10.183768272399902 10 1000000.0 56211.0 3100.0 21409.0 1.0 226.0 0.1 5.0 8.883613200000001 8.883613252941178 -5.0 30.0
-10.600857973098755 11 1000000.0 56239.0 3102.0 1945.0 1.0 226.0 0.1 5.0 8.883495600000002 8.883495605882354 -5.0 30.0
-11.02475905418396 11 1000000.0 56135.0 3103.0 61.0 1.0 226.0 0.1 5.0 8.883377900000001 8.88337795882353 -5.0 30.0
-11.453195571899414 11 1000000.0 56401.0 3103.0 14.0 1.0 226.0 0.1 5.0 8.8832603 8.883260311764706 -5.0 30.0
-11.877732276916504 12 1000000.0 56427.0 3103.0 8.0 1.0 226.0 0.1 5.0 8.8831427 8.883142664705884 -5.0 30.0
-12.311777830123901 12 1000000.0 56491.0 3103.0 5.0 1.0 226.0 0.1 5.0 8.883025 8.88302501764706 -5.0 30.0
-12.734466314315796 13 1000000.0 56535.0 3103.0 4.0 1.0 226.0 0.1 5.0 8.8829074 8.882907370588237 -5.0 30.0
-13.18036413192749 13 1000000.0 56344.0 3103.0 3.0 1.0 226.0 0.1 5.0 8.8827897 8.882789723529413 -5.0 30.0
-13.599994897842407 14 1000000.0 56544.0 3102.0 3.0 1.0 226.0 0.1 5.0 8.8826721 8.88267207647059 -5.0 30.0
-14.029167175292969 14 1000000.0 56518.0 3102.0 2.0 1.0 226.0 0.1 5.0 8.8825544 8.882554429411766 -5.0 30.0
-14.495427370071411 14 1000000.0 56633.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8824368 8.882436782352942 -5.0 30.0
-14.91699504852295 15 1000000.0 56794.0 3102.0 2.0 1.0 227.0 0.1 5.0 8.8823191 8.882319135294118 -5.0 30.0
-15.350300073623657 15 1000000.0 56934.0 3103.0 2.0 1.0 227.0 0.1 5.0 8.8822015 8.882201488235296 -5.0 30.0
-15.767798900604248 16 1000000.0 56949.0 3102.0 1.0 1.0 228.0 0.1 5.0 8.8820838 8.882083841176472 -5.0 30.0
-16.179961681365967 16 1000000.0 56903.0 3103.0 2.0 1.0 227.0 0.1 5.0 8.8819662 8.881966194117648 -5.0 30.0
-16.68332839012146 17 1000000.0 56940.0 3103.0 1.0 1.0 227.0 0.1 5.0 8.8818485 8.881848547058825 -5.0 30.0
-17.10040545463562 17 1000000.0 57078.0 3103.0 1.0 1.0 227.0 0.1 5.0 8.8817309 8.8817309 -5.0 30.0
-#C Fri Apr 19 10:05:30 2019.  num_events_baseline = 2
-#C Fri Apr 19 10:05:30 2019.  num_events_primary = 35
-#C Fri Apr 19 10:05:30 2019.  num_events_PeakStats = 1
-#C Fri Apr 19 10:05:30 2019.  exit_status = success
-
-#S 5  TuneAxis.tune()
-#D Fri Apr 19 10:05:32 2019
-#C Fri Apr 19 10:05:32 2019.  plan_type = generator
-#C Fri Apr 19 10:05:32 2019.  uid = df7795eb-44ef-49b2-acd9-cf1ebbf4abed
-#MD APSTOOLS_VERSION = 1.1.0
-#MD BLUESKY_VERSION = 1.5.2
-#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
-#MD EPICS_HOST_ARCH = linux-x86_64
-#MD OPHYD_VERSION = 1.3.2
-#MD beamline_id = APS USAXS 9-ID-C
-#MD datetime = 2019-04-19 10:05:32.291807
-#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
-#MD pid = 27062
-#MD proposal_id = testing Bluesky installation
-#MD purpose = tuner
-#MD tune_md = {'width': -8, 'initial_position': 38.4243, 'time_iso8601': '2019-04-19 10:05:32.295550'}
-#MD tune_parameters = {'num': 31, 'width': -8, 'initial_position': 38.4243, 'peak_choice': 'com', 'x_axis': 'a_stage_r2p', 'y_axis': 'PD_USAXS'}
-#N 31
-#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  a_stage_r2p  a_stage_r2p_user_setpoint  a_stage_r2p_soft_limit_lo  a_stage_r2p_soft_limit_hi
-1.2613587379455566 1 1000000.0 57117.0 3102.0 399.0 1.0 226.0 0.1 5.0 42.4243 42.4243 -20.0 90.0
-1.5930070877075195 2 1000000.0 57188.0 3103.0 69.0 1.0 227.0 0.1 5.0 42.1576 42.15763333333334 -20.0 90.0
-1.7389733791351318 2 1000000.0 57142.0 3103.0 105.0 1.0 227.0 0.1 5.0 41.8909 41.89096666666667 -20.0 90.0
-1.888202428817749 2 1000000.0 57138.0 3103.0 160.0 1.0 227.0 0.1 5.0 41.624300000000005 41.624300000000005 -20.0 90.0
-2.10569429397583 2 1000000.0 57192.0 3102.0 270.0 1.0 226.0 0.1 5.0 41.357600000000005 41.35763333333333 -20.0 90.0
-2.339432954788208 2 1000000.0 57205.0 3103.0 503.0 1.0 227.0 0.1 5.0 41.090900000000005 41.09096666666667 -20.0 90.0
-2.5782394409179688 3 1000000.0 57251.0 3103.0 1097.0 1.0 227.0 0.1 5.0 40.8243 40.8243 -20.0 90.0
-2.834535837173462 3 1000000.0 57347.0 3102.0 2662.0 1.0 227.0 0.1 5.0 40.5576 40.557633333333335 -20.0 90.0
-3.0808637142181396 3 1000000.0 57239.0 3102.0 6321.0 1.0 227.0 0.1 5.0 40.2909 40.29096666666667 -20.0 90.0
-3.3274171352386475 3 1000000.0 57328.0 3101.0 16297.0 1.0 227.0 0.1 5.0 40.024300000000004 40.024300000000004 -20.0 90.0
-3.5393311977386475 4 1000000.0 57218.0 3099.0 33008.0 1.0 227.0 0.1 5.0 39.757600000000004 39.75763333333334 -20.0 90.0
-3.776230812072754 4 1000000.0 57167.0 3097.0 50484.0 1.0 227.0 0.1 5.0 39.4909 39.49096666666667 -20.0 90.0
-3.9929299354553223 4 1000000.0 57123.0 3095.0 68356.0 1.0 227.0 0.1 5.0 39.2243 39.2243 -20.0 90.0
-4.224080562591553 4 1000000.0 57130.0 3093.0 82791.0 1.0 227.0 0.1 5.0 38.9576 38.957633333333334 -20.0 90.0
-4.477696418762207 4 1000000.0 57149.0 3092.0 86931.0 1.0 227.0 0.1 5.0 38.6909 38.69096666666667 -20.0 90.0
-4.616499900817871 5 1000000.0 57173.0 3093.0 86437.0 1.0 227.0 0.1 5.0 38.4243 38.4243 -20.0 90.0
-4.8610053062438965 5 1000000.0 56991.0 3092.0 82988.0 1.0 227.0 0.1 5.0 38.1576 38.15763333333334 -20.0 90.0
-5.089857816696167 5 1000000.0 57094.0 3094.0 72675.0 1.0 227.0 0.1 5.0 37.8909 37.89096666666667 -20.0 90.0
-5.306164264678955 5 1000000.0 57170.0 3096.0 56216.0 1.0 228.0 0.1 5.0 37.624300000000005 37.624300000000005 -20.0 90.0
-5.506078004837036 6 1000000.0 57040.0 3099.0 38567.0 1.0 227.0 0.1 5.0 37.357600000000005 37.35763333333334 -20.0 90.0
-5.643139839172363 6 1000000.0 56992.0 3100.0 21250.0 1.0 227.0 0.1 5.0 37.090900000000005 37.09096666666667 -20.0 90.0
-5.879587650299072 6 1000000.0 57054.0 3102.0 8671.0 1.0 227.0 0.1 5.0 36.8243 36.8243 -20.0 90.0
-6.00601053237915 6 1000000.0 57000.0 3103.0 3981.0 1.0 227.0 0.1 5.0 36.5576 36.557633333333335 -20.0 90.0
-6.260035514831543 6 1000000.0 57169.0 3102.0 1697.0 1.0 226.0 0.1 5.0 36.2909 36.29096666666667 -20.0 90.0
-6.4898717403411865 6 1000000.0 57033.0 3103.0 712.0 1.0 226.0 0.1 5.0 36.024300000000004 36.024300000000004 -20.0 90.0
-6.7060301303863525 7 1000000.0 57048.0 3102.0 340.0 1.0 226.0 0.1 5.0 35.757600000000004 35.75763333333334 -20.0 90.0
-6.929247617721558 7 1000000.0 56821.0 3103.0 187.0 1.0 226.0 0.1 5.0 35.4909 35.490966666666665 -20.0 90.0
-7.075521230697632 7 1000000.0 56867.0 3103.0 117.0 1.0 226.0 0.1 5.0 35.2243 35.2243 -20.0 90.0
-7.306581258773804 7 1000000.0 57031.0 3103.0 70.0 1.0 227.0 0.1 5.0 34.9576 34.957633333333334 -20.0 90.0
-7.525092363357544 8 1000000.0 57025.0 3102.0 45.0 1.0 227.0 0.1 5.0 34.6909 34.69096666666667 -20.0 90.0
-7.73984694480896 8 1000000.0 57121.0 3103.0 29.0 1.0 227.0 0.1 5.0 34.4243 34.4243 -20.0 90.0
-#C Fri Apr 19 10:05:40 2019.  num_events_baseline = 2
-#C Fri Apr 19 10:05:40 2019.  num_events_primary = 31
-#C Fri Apr 19 10:05:40 2019.  num_events_PeakStats = 1
-#C Fri Apr 19 10:05:40 2019.  exit_status = success
-
-#S 6  TuneAxis.tune()
-#D Fri Apr 19 10:08:55 2019
-#C Fri Apr 19 10:08:55 2019.  plan_type = generator
-#C Fri Apr 19 10:08:55 2019.  uid = 6b2f29ab-33dc-4657-bacf-915bc54fdf14
-#MD APSTOOLS_VERSION = 1.1.0
-#MD BLUESKY_VERSION = 1.5.2
-#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
-#MD EPICS_HOST_ARCH = linux-x86_64
-#MD OPHYD_VERSION = 1.3.2
-#MD beamline_id = APS USAXS 9-ID-C
-#MD datetime = 2019-04-19 10:08:55.507154
-#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
-#MD pid = 27062
-#MD proposal_id = testing Bluesky installation
-#MD purpose = tuner
-#MD tune_md = {'width': -0.004, 'initial_position': 8.824867, 'time_iso8601': '2019-04-19 10:08:55.508993'}
-#MD tune_parameters = {'num': 31, 'width': -0.004, 'initial_position': 8.824867, 'peak_choice': 'com', 'x_axis': 'm_stage_r', 'y_axis': 'I0_USAXS'}
-#N 31
-#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  m_stage_r  m_stage_r_user_setpoint  m_stage_r_soft_limit_lo  m_stage_r_soft_limit_hi
-1.3442771434783936 1 1000000.0 191.0 3111.0 44.0 1.0 226.0 0.1 5.0 8.826867 8.826867 -7.856115 37.143885
-1.7606616020202637 2 1000000.0 214.0 3109.0 20504.0 1.0 226.0 0.1 5.0 8.826733 8.826733666666666 -7.856115 37.143885
-2.174447536468506 2 1000000.0 251.0 3111.0 2251.0 1.0 226.0 0.1 5.0 8.8266 8.826600333333333 -7.856115 37.143885
-2.5923538208007812 3 1000000.0 308.0 3103.0 71243.0 1.0 227.0 0.1 5.0 8.826467000000001 8.826467 -7.856115 37.143885
-3.0077178478240967 3 1000000.0 428.0 3110.0 7418.0 1.0 229.0 0.1 5.0 8.826333 8.826333666666667 -7.856115 37.143885
-3.4247965812683105 3 1000000.0 635.0 3109.0 16618.0 1.0 226.0 0.1 5.0 8.8262 8.826200333333333 -7.856115 37.143885
-3.8530466556549072 4 1000000.0 1269.0 3105.0 49815.0 1.0 227.0 0.1 5.0 8.826067 8.826067 -7.856115 37.143885
-4.275469064712524 4 1000000.0 3472.0 3098.0 99999.0 1.0 226.0 0.1 5.0 8.825933 8.825933666666666 -7.856115 37.143885
-4.690694093704224 5 1000000.0 10396.0 3107.0 14424.0 1.0 226.0 0.1 5.0 8.825800000000001 8.825800333333333 -7.856115 37.143885
-5.117584943771362 5 1000000.0 22893.0 3103.0 39069.0 1.0 226.0 0.1 5.0 8.825667 8.825667 -7.856115 37.143885
-5.650650501251221 6 1000000.0 38179.0 3093.0 99999.0 1.0 227.0 0.1 5.0 8.825533 8.825533666666667 -7.856115 37.143885
-6.073930740356445 6 1000000.0 48861.0 3103.0 10542.0 1.0 227.0 0.1 5.0 8.8254 8.825400333333333 -7.856115 37.143885
-6.492212533950806 6 1000000.0 54776.0 3091.0 99999.0 1.0 226.0 0.1 5.0 8.825267 8.825267 -7.856115 37.143885
-6.918388843536377 7 1000000.0 56318.0 3098.0 36964.0 1.0 226.0 0.1 5.0 8.825133000000001 8.825133666666666 -7.856115 37.143885
-7.324823379516602 7 1000000.0 56190.0 3095.0 70306.0 1.0 226.0 0.1 5.0 8.825 8.825000333333334 -7.856115 37.143885
-7.762248277664185 8 1000000.0 55528.0 3093.0 82789.0 1.0 226.0 0.1 5.0 8.824867 8.824867 -7.856115 37.143885
-8.291128396987915 8 1000000.0 53591.0 3095.0 63983.0 1.0 226.0 0.1 5.0 8.824733 8.824733666666665 -7.856115 37.143885
-8.708327770233154 9 1000000.0 47551.0 3100.0 31996.0 1.0 226.0 0.1 5.0 8.8246 8.824600333333333 -7.856115 37.143885
-9.149282693862915 9 1000000.0 36256.0 3097.0 73330.0 1.0 227.0 0.1 5.0 8.824466999999999 8.824466999999999 -7.856115 37.143885
-9.591164588928223 10 1000000.0 21430.0 3107.0 5290.0 1.0 226.0 0.1 5.0 8.824333 8.824333666666666 -7.856115 37.143885
-10.113401174545288 10 1000000.0 10481.0 3105.0 36804.0 1.0 226.0 0.1 5.0 8.8242 8.824200333333332 -7.856115 37.143885
-10.569620847702026 11 1000000.0 3605.0 3109.0 11974.0 1.0 226.0 0.1 5.0 8.824067 8.824067 -7.856115 37.143885
-11.006223440170288 11 1000000.0 1233.0 3110.0 6095.0 1.0 226.0 0.1 5.0 8.823933 8.823933666666665 -7.856115 37.143885
-11.424911975860596 11 1000000.0 649.0 3111.0 1670.0 1.0 225.0 0.1 5.0 8.823799999999999 8.823800333333333 -7.856115 37.143885
-11.848181009292603 12 1000000.0 416.0 3110.0 14468.0 1.0 226.0 0.1 5.0 8.823667 8.823666999999999 -7.856115 37.143885
-12.274287939071655 12 1000000.0 319.0 3110.0 6195.0 1.0 226.0 0.1 5.0 8.823533 8.823533666666666 -7.856115 37.143885
-12.692692041397095 13 1000000.0 249.0 3103.0 67221.0 1.0 226.0 0.1 5.0 8.8234 8.823400333333332 -7.856115 37.143885
-13.125089168548584 13 1000000.0 212.0 3104.0 50648.0 1.0 226.0 0.1 5.0 8.823267 8.823267 -7.856115 37.143885
-13.55994439125061 14 1000000.0 189.0 3108.0 20033.0 1.0 227.0 0.1 5.0 8.823132999999999 8.823133666666665 -7.856115 37.143885
-13.9749174118042 14 1000000.0 169.0 3108.0 21395.0 1.0 226.0 0.1 5.0 8.823 8.823000333333333 -7.856115 37.143885
-14.391009330749512 14 1000000.0 156.0 3110.0 11924.0 1.0 226.0 0.1 5.0 8.822866999999999 8.822866999999999 -7.856115 37.143885
-#C Fri Apr 19 10:09:10 2019.  num_events_baseline = 2
-#C Fri Apr 19 10:09:10 2019.  num_events_primary = 31
-#C Fri Apr 19 10:09:10 2019.  num_events_PeakStats = 1
-#C Fri Apr 19 10:09:10 2019.  exit_status = success
-
-#S 7  TuneAxis.tune()
-#D Fri Apr 19 10:09:12 2019
-#C Fri Apr 19 10:09:12 2019.  plan_type = generator
-#C Fri Apr 19 10:09:12 2019.  uid = 7a93dbcd-efcb-48ef-af65-5842768b4b55
-#MD APSTOOLS_VERSION = 1.1.0
-#MD BLUESKY_VERSION = 1.5.2
-#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
-#MD EPICS_HOST_ARCH = linux-x86_64
-#MD OPHYD_VERSION = 1.3.2
-#MD beamline_id = APS USAXS 9-ID-C
-#MD datetime = 2019-04-19 10:09:12.171858
-#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
-#MD pid = 27062
-#MD proposal_id = testing Bluesky installation
-#MD purpose = tuner
-#MD tune_md = {'width': -8, 'initial_position': 19.1722, 'time_iso8601': '2019-04-19 10:09:12.175169'}
-#MD tune_parameters = {'num': 21, 'width': -8, 'initial_position': 19.1722, 'peak_choice': 'com', 'x_axis': 'm_stage_r2p', 'y_axis': 'I0_USAXS'}
-#N 21
-#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  m_stage_r2p  m_stage_r2p_user_setpoint  m_stage_r2p_soft_limit_lo  m_stage_r2p_soft_limit_hi
-1.1383028030395508 1 1000000.0 4299.0 3111.0 56.0 1.0 226.0 0.1 5.0 23.1722 23.1722 -20.0 90.0
-1.3771731853485107 1 1000000.0 5412.0 3098.0 99999.0 1.0 226.0 0.1 5.0 22.7722 22.7722 -20.0 90.0
-1.608940601348877 2 1000000.0 7819.0 3106.0 27606.0 1.0 226.0 0.1 5.0 22.3721 22.3722 -20.0 90.0
-1.8246092796325684 2 1000000.0 12282.0 3105.0 40060.0 1.0 226.0 0.1 5.0 21.9722 21.9722 -20.0 90.0
-2.1249125003814697 2 1000000.0 19162.0 3101.0 63468.0 1.0 226.0 0.1 5.0 21.572100000000002 21.5722 -20.0 90.0
-2.385352611541748 2 1000000.0 26715.0 3095.0 99999.0 1.0 226.0 0.1 5.0 21.1722 21.1722 -20.0 90.0
-2.525242805480957 3 1000000.0 34882.0 3100.0 44273.0 1.0 226.0 0.1 5.0 20.772100000000002 20.772199999999998 -20.0 90.0
-2.6626944541931152 3 1000000.0 43902.0 3092.0 99999.0 1.0 226.0 0.1 5.0 20.3721 20.3722 -20.0 90.0
-2.909954309463501 3 1000000.0 53882.0 3092.0 91451.0 1.0 226.0 0.1 5.0 19.9722 19.9722 -20.0 90.0
-3.162280797958374 3 1000000.0 63055.0 3098.0 33129.0 1.0 226.0 0.1 5.0 19.572100000000002 19.5722 -20.0 90.0
-3.4098339080810547 3 1000000.0 70380.0 3088.0 99999.0 1.0 226.0 0.1 5.0 19.1722 19.1722 -20.0 90.0
-3.665832042694092 4 1000000.0 71635.0 3095.0 46511.0 1.0 226.0 0.1 5.0 18.772100000000002 18.772199999999998 -20.0 90.0
-3.8085601329803467 4 1000000.0 66602.0 3094.0 58702.0 1.0 226.0 0.1 5.0 18.3721 18.3722 -20.0 90.0
-4.043541669845581 4 1000000.0 57564.0 3094.0 69300.0 1.0 226.0 0.1 5.0 17.9722 17.9722 -20.0 90.0
-4.275780200958252 4 1000000.0 47647.0 3096.0 69908.0 1.0 226.0 0.1 5.0 17.572100000000002 17.5722 -20.0 90.0
-4.519298553466797 5 1000000.0 36965.0 3099.0 55438.0 1.0 226.0 0.1 5.0 17.1722 17.1722 -20.0 90.0
-4.749254941940308 5 1000000.0 25981.0 3102.0 37879.0 1.0 226.0 0.1 5.0 16.772100000000002 16.772199999999998 -20.0 90.0
-4.998044729232788 5 1000000.0 14595.0 3103.0 50069.0 1.0 226.0 0.1 5.0 16.3722 16.3722 -20.0 90.0
-5.339958190917969 5 1000000.0 7303.0 3098.0 99999.0 1.0 226.0 0.1 5.0 15.9722 15.9722 -20.0 90.0
-5.662503480911255 6 1000000.0 3797.0 3106.0 34501.0 1.0 226.0 0.1 5.0 15.5721 15.572199999999999 -20.0 90.0
-5.910281658172607 6 1000000.0 1949.0 3104.0 56387.0 1.0 225.0 0.1 5.0 15.1722 15.1722 -20.0 90.0
-#C Fri Apr 19 10:09:18 2019.  num_events_baseline = 2
-#C Fri Apr 19 10:09:18 2019.  num_events_primary = 21
-#C Fri Apr 19 10:09:18 2019.  num_events_PeakStats = 1
-#C Fri Apr 19 10:09:18 2019.  exit_status = success
-
-#S 8  TuneAxis.tune()
-#D Fri Apr 19 10:09:20 2019
-#C Fri Apr 19 10:09:20 2019.  plan_type = generator
-#C Fri Apr 19 10:09:20 2019.  uid = 4bd2bff9-4a43-4fda-835c-c1efbe4fc910
-#MD APSTOOLS_VERSION = 1.1.0
-#MD BLUESKY_VERSION = 1.5.2
-#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
-#MD EPICS_HOST_ARCH = linux-x86_64
-#MD OPHYD_VERSION = 1.3.2
-#MD beamline_id = APS USAXS 9-ID-C
-#MD datetime = 2019-04-19 10:09:20.507274
-#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
-#MD pid = 27062
-#MD proposal_id = testing Bluesky installation
-#MD purpose = tuner
-#MD tune_md = {'width': -0.004, 'initial_position': 8.8839199, 'time_iso8601': '2019-04-19 10:09:20.509031'}
-#MD tune_parameters = {'num': 35, 'width': -0.004, 'initial_position': 8.8839199, 'peak_choice': 'com', 'x_axis': 'a_stage_r', 'y_axis': 'PD_USAXS'}
-#N 35
-#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  a_stage_r  a_stage_r_user_setpoint  a_stage_r_soft_limit_lo  a_stage_r_soft_limit_hi
-1.3226919174194336 1 1000000.0 56605.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.885919900000001 8.885919900000001 -5.0 30.0
-1.745370864868164 2 1000000.0 56503.0 3103.0 1.0 1.0 226.0 0.1 5.0 8.8858023 8.885802252941177 -5.0 30.0
-2.2642550468444824 2 1000000.0 56464.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.885684600000001 8.885684605882354 -5.0 30.0
-2.679088830947876 3 1000000.0 56587.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.885567 8.88556695882353 -5.0 30.0
-3.0957388877868652 3 1000000.0 56518.0 3103.0 3.0 1.0 226.0 0.1 5.0 8.885449300000001 8.885449311764706 -5.0 30.0
-3.529817581176758 4 1000000.0 56449.0 3102.0 3.0 1.0 226.0 0.1 5.0 8.8853317 8.885331664705884 -5.0 30.0
-3.9475326538085938 4 1000000.0 56397.0 3103.0 3.0 1.0 225.0 0.1 5.0 8.885214000000001 8.88521401764706 -5.0 30.0
-4.3878092765808105 4 1000000.0 56380.0 3103.0 3.0 1.0 226.0 0.1 5.0 8.8850964 8.885096370588236 -5.0 30.0
-4.9385669231414795 5 1000000.0 56373.0 3103.0 5.0 1.0 226.0 0.1 5.0 8.884978700000001 8.884978723529413 -5.0 30.0
-5.379429578781128 5 1000000.0 56389.0 3102.0 7.0 1.0 226.0 0.1 5.0 8.8848611 8.884861076470589 -5.0 30.0
-5.8964524269104 6 1000000.0 56494.0 3103.0 13.0 1.0 226.0 0.1 5.0 8.884743400000001 8.884743429411765 -5.0 30.0
-6.338381290435791 6 1000000.0 56499.0 3103.0 63.0 1.0 226.0 0.1 5.0 8.8846258 8.884625782352941 -5.0 30.0
-6.772700786590576 7 1000000.0 56553.0 3103.0 1681.0 1.0 226.0 0.1 5.0 8.884508100000001 8.884508135294118 -5.0 30.0
-7.1790502071380615 7 1000000.0 56905.0 3100.0 21390.0 1.0 226.0 0.1 5.0 8.8843905 8.884390488235296 -5.0 30.0
-7.622541189193726 8 1000000.0 56932.0 3097.0 51690.0 1.0 227.0 0.1 5.0 8.884272900000001 8.884272841176472 -5.0 30.0
-8.046452522277832 8 1000000.0 57093.0 3093.0 79278.0 1.0 227.0 0.1 5.0 8.8841552 8.884155194117648 -5.0 30.0
-8.464685201644897 8 1000000.0 57011.0 3092.0 85463.0 1.0 226.0 0.1 5.0 8.884037600000001 8.884037547058824 -5.0 30.0
-8.979426860809326 9 1000000.0 56931.0 3095.0 64308.0 1.0 227.0 0.1 5.0 8.8839199 8.8839199 -5.0 30.0
-9.396026134490967 9 1000000.0 57146.0 3099.0 34311.0 1.0 227.0 0.1 5.0 8.883802300000001 8.883802252941177 -5.0 30.0
-9.8298659324646 10 1000000.0 57183.0 3102.0 6685.0 1.0 226.0 0.1 5.0 8.8836846 8.883684605882353 -5.0 30.0
-10.245903491973877 10 1000000.0 57126.0 3103.0 199.0 1.0 227.0 0.1 5.0 8.883567000000001 8.883566958823529 -5.0 30.0
-10.664265632629395 11 1000000.0 57131.0 3102.0 21.0 1.0 226.0 0.1 5.0 8.8834493 8.883449311764705 -5.0 30.0
-11.07904314994812 11 1000000.0 57092.0 3103.0 9.0 1.0 227.0 0.1 5.0 8.883331700000001 8.883331664705883 -5.0 30.0
-11.495566606521606 11 1000000.0 57152.0 3103.0 6.0 1.0 226.0 0.1 5.0 8.883214 8.88321401764706 -5.0 30.0
-11.928889036178589 12 1000000.0 57137.0 3103.0 5.0 1.0 227.0 0.1 5.0 8.883096400000001 8.883096370588236 -5.0 30.0
-12.365918636322021 12 1000000.0 57083.0 3103.0 4.0 1.0 226.0 0.1 5.0 8.8829787 8.882978723529412 -5.0 30.0
-12.79586124420166 13 1000000.0 56981.0 3103.0 3.0 1.0 226.0 0.1 5.0 8.882861100000001 8.882861076470588 -5.0 30.0
-13.21427869796753 13 1000000.0 56931.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8827434 8.882743429411764 -5.0 30.0
-13.629595518112183 14 1000000.0 56911.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.882625800000001 8.88262578235294 -5.0 30.0
-14.045937061309814 14 1000000.0 56994.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8825081 8.882508135294117 -5.0 30.0
-14.46888279914856 14 1000000.0 56994.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.882390500000001 8.882390488235295 -5.0 30.0
-14.895854234695435 15 1000000.0 57008.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8822729 8.882272841176471 -5.0 30.0
-15.329032182693481 15 1000000.0 57073.0 3103.0 2.0 1.0 227.0 0.1 5.0 8.882155200000001 8.882155194117647 -5.0 30.0
-15.749050378799438 16 1000000.0 56951.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8820376 8.882037547058824 -5.0 30.0
-16.17923855781555 16 1000000.0 57018.0 3103.0 2.0 1.0 227.0 0.1 5.0 8.881919900000002 8.8819199 -5.0 30.0
-#C Fri Apr 19 10:09:37 2019.  num_events_baseline = 2
-#C Fri Apr 19 10:09:37 2019.  num_events_primary = 35
-#C Fri Apr 19 10:09:37 2019.  num_events_PeakStats = 1
-#C Fri Apr 19 10:09:37 2019.  exit_status = success
+#F 04_19_test.dat
+#E 1555686229
+#D Fri Apr 19 10:03:49 2019
+#C BlueSky  user = usaxs  host = usaxscontrol.xray.aps.anl.gov
+
+#S 2  TuneAxis.tune()
+#D Fri Apr 19 10:04:44 2019
+#C Fri Apr 19 10:04:44 2019.  plan_type = generator
+#C Fri Apr 19 10:04:44 2019.  uid = 91beb53c-a5df-4c95-a845-df57d439f380
+#MD APSTOOLS_VERSION = 1.1.0
+#MD BLUESKY_VERSION = 1.5.2
+#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
+#MD EPICS_HOST_ARCH = linux-x86_64
+#MD OPHYD_VERSION = 1.3.2
+#MD beamline_id = APS USAXS 9-ID-C
+#MD datetime = 2019-04-19 10:04:44.400750
+#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
+#MD pid = 27062
+#MD proposal_id = testing Bluesky installation
+#MD purpose = tuner
+#MD tune_md = {'width': -0.004, 'initial_position': 8.824885, 'time_iso8601': '2019-04-19 10:04:44.402643'}
+#MD tune_parameters = {'num': 31, 'width': -0.004, 'initial_position': 8.824885, 'peak_choice': 'com', 'x_axis': 'm_stage_r', 'y_axis': 'I0_USAXS'}
+#MD badly-formed MD control line
+#N 31
+#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  m_stage_r  m_stage_r_user_setpoint  m_stage_r_soft_limit_lo  m_stage_r_soft_limit_hi
+2.424184560775757 2 1000000.0 166.0 3110.0 1315.0 1.0 226.0 0.1 5.0 8.826885 8.826885 -7.856115 37.143885
+2.8740737438201904 3 1000000.0 173.0 3111.0 1363.0 1.0 226.0 0.1 5.0 8.826751 8.826751666666667 -7.856115 37.143885
+3.3133506774902344 3 1000000.0 191.0 3111.0 1739.0 1.0 226.0 0.1 5.0 8.826618 8.826618333333334 -7.856115 37.143885
+3.7464096546173096 4 1000000.0 218.0 3110.0 2360.0 1.0 225.0 0.1 5.0 8.826485 8.826485 -7.856115 37.143885
+4.169032096862793 4 1000000.0 263.0 3110.0 3565.0 1.0 226.0 0.1 5.0 8.826350999999999 8.826351666666667 -7.856115 37.143885
+4.582501173019409 5 1000000.0 331.0 3110.0 6112.0 1.0 224.0 0.1 5.0 8.826218 8.826218333333333 -7.856115 37.143885
+5.732854127883911 6 1000000.0 480.0 3110.0 12381.0 1.0 225.0 0.1 5.0 8.826084999999999 8.826085 -7.856115 37.143885
+6.232714414596558 6 1000000.0 831.0 3107.0 32104.0 1.0 225.0 0.1 5.0 8.825951 8.825951666666667 -7.856115 37.143885
+6.648759126663208 7 1000000.0 2135.0 3099.0 99999.0 1.0 225.0 0.1 5.0 8.825818 8.825818333333334 -7.856115 37.143885
+7.074079751968384 7 1000000.0 7035.0 3098.0 99999.0 1.0 225.0 0.1 5.0 8.825685 8.825685 -7.856115 37.143885
+7.4988579750061035 7 1000000.0 15946.0 3096.0 99999.0 1.0 225.0 0.1 5.0 8.825551 8.825551666666668 -7.856115 37.143885
+7.91678524017334 8 1000000.0 27090.0 3094.0 99999.0 1.0 225.0 0.1 5.0 8.825417999999999 8.825418333333333 -7.856115 37.143885
+8.334335803985596 8 1000000.0 36085.0 3094.0 99999.0 1.0 225.0 0.1 5.0 8.825285000000001 8.825285000000001 -7.856115 37.143885
+8.749109983444214 9 1000000.0 41581.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.825151 8.825151666666667 -7.856115 37.143885
+9.182162046432495 9 1000000.0 43316.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.825018 8.825018333333334 -7.856115 37.143885
+9.598440885543823 10 1000000.0 43527.0 3092.0 99999.0 1.0 225.0 0.1 5.0 8.824885 8.824885 -7.856115 37.143885
+10.024555206298828 10 1000000.0 43353.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.824751 8.824751666666666 -7.856115 37.143885
+10.460494756698608 10 1000000.0 42338.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.824618000000001 8.824618333333333 -7.856115 37.143885
+10.884761571884155 11 1000000.0 38399.0 3093.0 99999.0 1.0 225.0 0.1 5.0 8.824485 8.824485 -7.856115 37.143885
+11.298949956893921 11 1000000.0 29213.0 3095.0 99999.0 1.0 225.0 0.1 5.0 8.824351 8.824351666666667 -7.856115 37.143885
+11.730870485305786 12 1000000.0 18421.0 3096.0 99999.0 1.0 224.0 0.1 5.0 8.824218 8.824218333333333 -7.856115 37.143885
+12.149333000183105 12 1000000.0 9069.0 3098.0 99999.0 1.0 224.0 0.1 5.0 8.824085 8.824085 -7.856115 37.143885
+12.57930874824524 13 1000000.0 3351.0 3099.0 100000.0 1.0 226.0 0.1 5.0 8.823951000000001 8.823951666666666 -7.856115 37.143885
+13.07323408126831 13 1000000.0 1209.0 3099.0 96464.0 1.0 225.0 0.1 5.0 8.823818 8.823818333333334 -7.856115 37.143885
+13.499373435974121 13 1000000.0 592.0 3107.0 28112.0 1.0 225.0 0.1 5.0 8.823685 8.823685 -7.856115 37.143885
+14.033109664916992 14 1000000.0 370.0 3110.0 11058.0 1.0 224.0 0.1 5.0 8.823551 8.823551666666667 -7.856115 37.143885
+14.44892406463623 14 1000000.0 276.0 3110.0 5657.0 1.0 224.0 0.1 5.0 8.823418 8.823418333333333 -7.856115 37.143885
+14.873764276504517 15 1000000.0 220.0 3110.0 3261.0 1.0 224.0 0.1 5.0 8.823284999999998 8.823285 -7.856115 37.143885
+15.299394607543945 15 1000000.0 188.0 3110.0 1999.0 1.0 224.0 0.1 5.0 8.823151 8.823151666666666 -7.856115 37.143885
+15.72576117515564 16 1000000.0 167.0 3111.0 1456.0 1.0 225.0 0.1 5.0 8.823018 8.823018333333334 -7.856115 37.143885
+16.14872455596924 16 1000000.0 154.0 3111.0 1058.0 1.0 225.0 0.1 5.0 8.822885 8.822885 -7.856115 37.143885
+#C Fri Apr 19 10:05:01 2019.  num_events_baseline = 2
+#C Fri Apr 19 10:05:01 2019.  num_events_primary = 31
+#C Fri Apr 19 10:05:01 2019.  num_events_PeakStats = 1
+#C Fri Apr 19 10:05:01 2019.  exit_status = success
+
+#S 3  TuneAxis.tune()
+#D Fri Apr 19 10:05:02 2019
+#C Fri Apr 19 10:05:02 2019.  plan_type = generator
+#C Fri Apr 19 10:05:02 2019.  uid = c49c7f9a-9aee-410a-be62-6283c03d60d2
+#MD APSTOOLS_VERSION = 1.1.0
+#MD BLUESKY_VERSION = 1.5.2
+#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
+#MD EPICS_HOST_ARCH = linux-x86_64
+#MD OPHYD_VERSION = 1.3.2
+#MD beamline_id = APS USAXS 9-ID-C
+#MD datetime = 2019-04-19 10:05:02.904407
+#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
+#MD pid = 27062
+#MD proposal_id = testing Bluesky installation
+#MD purpose = tuner
+#MD tune_md = {'width': -8, 'initial_position': 18.852700000000002, 'time_iso8601': '2019-04-19 10:05:02.907725'}
+#MD tune_parameters = {'num': 21, 'width': -8, 'initial_position': 18.852700000000002, 'peak_choice': 'com', 'x_axis': 'm_stage_r2p', 'y_axis': 'I0_USAXS'}
+#N 21
+#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  m_stage_r2p  m_stage_r2p_user_setpoint  m_stage_r2p_soft_limit_lo  m_stage_r2p_soft_limit_hi
+1.3263635635375977 1 1000000.0 8203.0 3098.0 99999.0 1.0 224.0 0.1 5.0 22.852700000000002 22.852700000000002 -20.0 90.0
+1.66495680809021 2 1000000.0 10621.0 3097.0 99999.0 1.0 225.0 0.1 5.0 22.4527 22.452700000000004 -20.0 90.0
+1.9055912494659424 2 1000000.0 16161.0 3097.0 99999.0 1.0 225.0 0.1 5.0 22.0527 22.0527 -20.0 90.0
+2.1283459663391113 2 1000000.0 22802.0 3095.0 99999.0 1.0 226.0 0.1 5.0 21.6527 21.652700000000003 -20.0 90.0
+2.378723621368408 2 1000000.0 29831.0 3095.0 99999.0 1.0 225.0 0.1 5.0 21.2527 21.2527 -20.0 90.0
+2.631176233291626 3 1000000.0 37118.0 3093.0 99999.0 1.0 225.0 0.1 5.0 20.852700000000002 20.852700000000002 -20.0 90.0
+2.8459906578063965 3 1000000.0 44623.0 3092.0 99999.0 1.0 225.0 0.1 5.0 20.4527 20.4527 -20.0 90.0
+3.0810608863830566 3 1000000.0 52973.0 3092.0 99999.0 1.0 226.0 0.1 5.0 20.0527 20.0527 -20.0 90.0
+3.3123385906219482 3 1000000.0 61570.0 3089.0 99999.0 1.0 226.0 0.1 5.0 19.6527 19.652700000000003 -20.0 90.0
+4.712848663330078 5 1000000.0 68876.0 3089.0 99999.0 1.0 225.0 0.1 5.0 19.2527 19.2527 -20.0 90.0
+4.846937894821167 5 1000000.0 70566.0 3089.0 100000.0 1.0 225.0 0.1 5.0 18.852700000000002 18.852700000000002 -20.0 90.0
+5.111504554748535 5 1000000.0 65556.0 3089.0 99999.0 1.0 226.0 0.1 5.0 18.4527 18.4527 -20.0 90.0
+5.270373582839966 5 1000000.0 57467.0 3090.0 99999.0 1.0 225.0 0.1 5.0 18.0527 18.0527 -20.0 90.0
+5.435962200164795 5 1000000.0 47836.0 3092.0 99999.0 1.0 225.0 0.1 5.0 17.6527 17.652700000000003 -20.0 90.0
+5.578095197677612 6 1000000.0 37772.0 3094.0 99999.0 1.0 225.0 0.1 5.0 17.2527 17.2527 -20.0 90.0
+5.813758373260498 6 1000000.0 26264.0 3095.0 99999.0 1.0 226.0 0.1 5.0 16.852700000000002 16.852700000000002 -20.0 90.0
+6.037451982498169 6 1000000.0 15133.0 3097.0 99999.0 1.0 226.0 0.1 5.0 16.4527 16.4527 -20.0 90.0
+6.263959169387817 6 1000000.0 7545.0 3098.0 99999.0 1.0 225.0 0.1 5.0 16.0527 16.0527 -20.0 90.0
+6.477849960327148 6 1000000.0 4022.0 3098.0 99999.0 1.0 226.0 0.1 5.0 15.652700000000001 15.652700000000003 -20.0 90.0
+6.611781358718872 7 1000000.0 2077.0 3098.0 99999.0 1.0 226.0 0.1 5.0 15.2527 15.2527 -20.0 90.0
+6.830210208892822 7 1000000.0 1007.0 3099.0 99999.0 1.0 226.0 0.1 5.0 14.8527 14.852700000000002 -20.0 90.0
+#C Fri Apr 19 10:05:10 2019.  num_events_baseline = 2
+#C Fri Apr 19 10:05:10 2019.  num_events_primary = 21
+#C Fri Apr 19 10:05:10 2019.  num_events_PeakStats = 1
+#C Fri Apr 19 10:05:10 2019.  exit_status = success
+
+#S 4  TuneAxis.tune()
+#D Fri Apr 19 10:05:12 2019
+#C Fri Apr 19 10:05:12 2019.  plan_type = generator
+#C Fri Apr 19 10:05:12 2019.  uid = 6f968239-26ad-40e4-b4d3-3527ea8a5ce0
+#MD APSTOOLS_VERSION = 1.1.0
+#MD BLUESKY_VERSION = 1.5.2
+#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
+#MD EPICS_HOST_ARCH = linux-x86_64
+#MD OPHYD_VERSION = 1.3.2
+#MD beamline_id = APS USAXS 9-ID-C
+#MD datetime = 2019-04-19 10:05:12.597494
+#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
+#MD pid = 27062
+#MD proposal_id = testing Bluesky installation
+#MD purpose = tuner
+#MD tune_md = {'width': -0.004, 'initial_position': 8.883730900000002, 'time_iso8601': '2019-04-19 10:05:12.599316'}
+#MD tune_parameters = {'num': 35, 'width': -0.004, 'initial_position': 8.883730900000002, 'peak_choice': 'com', 'x_axis': 'a_stage_r', 'y_axis': 'PD_USAXS'}
+#N 35
+#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  a_stage_r  a_stage_r_user_setpoint  a_stage_r_soft_limit_lo  a_stage_r_soft_limit_hi
+1.7970309257507324 2 1000000.0 55898.0 3103.0 1.0 1.0 226.0 0.1 5.0 8.8857309 8.885730900000002 -5.0 30.0
+2.3183534145355225 2 1000000.0 55818.0 3103.0 1.0 1.0 226.0 0.1 5.0 8.885613200000002 8.885613252941178 -5.0 30.0
+2.735879421234131 3 1000000.0 55972.0 3103.0 1.0 1.0 226.0 0.1 5.0 8.8854956 8.885495605882355 -5.0 30.0
+3.1499643325805664 3 1000000.0 55995.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8853779 8.88537795882353 -5.0 30.0
+4.025444030761719 4 1000000.0 56017.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8852603 8.885260311764707 -5.0 30.0
+4.451297998428345 4 1000000.0 56211.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.885142700000001 8.885142664705885 -5.0 30.0
+4.872895956039429 5 1000000.0 56122.0 3102.0 2.0 1.0 226.0 0.1 5.0 8.885025 8.885025017647061 -5.0 30.0
+5.300731897354126 5 1000000.0 56135.0 3103.0 4.0 1.0 227.0 0.1 5.0 8.884907400000001 8.884907370588238 -5.0 30.0
+5.732980251312256 6 1000000.0 56169.0 3103.0 5.0 1.0 226.0 0.1 5.0 8.8847897 8.884789723529414 -5.0 30.0
+6.150254011154175 6 1000000.0 56176.0 3103.0 7.0 1.0 226.0 0.1 5.0 8.884672100000001 8.88467207647059 -5.0 30.0
+6.676549911499023 7 1000000.0 56318.0 3102.0 19.0 1.0 226.0 0.1 5.0 8.8845544 8.884554429411766 -5.0 30.0
+7.100552320480347 7 1000000.0 56091.0 3103.0 155.0 1.0 226.0 0.1 5.0 8.884436800000001 8.884436782352942 -5.0 30.0
+7.533323526382446 8 1000000.0 56197.0 3102.0 3971.0 1.0 226.0 0.1 5.0 8.8843191 8.884319135294119 -5.0 30.0
+7.952568769454956 8 1000000.0 56313.0 3100.0 27806.0 1.0 227.0 0.1 5.0 8.884201500000001 8.884201488235297 -5.0 30.0
+8.37877631187439 8 1000000.0 56384.0 3096.0 57429.0 1.0 227.0 0.1 5.0 8.8840838 8.884083841176473 -5.0 30.0
+8.900550127029419 9 1000000.0 56385.0 3093.0 81437.0 1.0 227.0 0.1 5.0 8.883966200000001 8.883966194117649 -5.0 30.0
+9.333159446716309 9 1000000.0 56337.0 3093.0 78946.0 1.0 226.0 0.1 5.0 8.883848500000001 8.883848547058825 -5.0 30.0
+9.749623775482178 10 1000000.0 56285.0 3097.0 50788.0 1.0 226.0 0.1 5.0 8.883730900000002 8.883730900000002 -5.0 30.0
+10.183768272399902 10 1000000.0 56211.0 3100.0 21409.0 1.0 226.0 0.1 5.0 8.883613200000001 8.883613252941178 -5.0 30.0
+10.600857973098755 11 1000000.0 56239.0 3102.0 1945.0 1.0 226.0 0.1 5.0 8.883495600000002 8.883495605882354 -5.0 30.0
+11.02475905418396 11 1000000.0 56135.0 3103.0 61.0 1.0 226.0 0.1 5.0 8.883377900000001 8.88337795882353 -5.0 30.0
+11.453195571899414 11 1000000.0 56401.0 3103.0 14.0 1.0 226.0 0.1 5.0 8.8832603 8.883260311764706 -5.0 30.0
+11.877732276916504 12 1000000.0 56427.0 3103.0 8.0 1.0 226.0 0.1 5.0 8.8831427 8.883142664705884 -5.0 30.0
+12.311777830123901 12 1000000.0 56491.0 3103.0 5.0 1.0 226.0 0.1 5.0 8.883025 8.88302501764706 -5.0 30.0
+12.734466314315796 13 1000000.0 56535.0 3103.0 4.0 1.0 226.0 0.1 5.0 8.8829074 8.882907370588237 -5.0 30.0
+13.18036413192749 13 1000000.0 56344.0 3103.0 3.0 1.0 226.0 0.1 5.0 8.8827897 8.882789723529413 -5.0 30.0
+13.599994897842407 14 1000000.0 56544.0 3102.0 3.0 1.0 226.0 0.1 5.0 8.8826721 8.88267207647059 -5.0 30.0
+14.029167175292969 14 1000000.0 56518.0 3102.0 2.0 1.0 226.0 0.1 5.0 8.8825544 8.882554429411766 -5.0 30.0
+14.495427370071411 14 1000000.0 56633.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8824368 8.882436782352942 -5.0 30.0
+14.91699504852295 15 1000000.0 56794.0 3102.0 2.0 1.0 227.0 0.1 5.0 8.8823191 8.882319135294118 -5.0 30.0
+15.350300073623657 15 1000000.0 56934.0 3103.0 2.0 1.0 227.0 0.1 5.0 8.8822015 8.882201488235296 -5.0 30.0
+15.767798900604248 16 1000000.0 56949.0 3102.0 1.0 1.0 228.0 0.1 5.0 8.8820838 8.882083841176472 -5.0 30.0
+16.179961681365967 16 1000000.0 56903.0 3103.0 2.0 1.0 227.0 0.1 5.0 8.8819662 8.881966194117648 -5.0 30.0
+16.68332839012146 17 1000000.0 56940.0 3103.0 1.0 1.0 227.0 0.1 5.0 8.8818485 8.881848547058825 -5.0 30.0
+17.10040545463562 17 1000000.0 57078.0 3103.0 1.0 1.0 227.0 0.1 5.0 8.8817309 8.8817309 -5.0 30.0
+#C Fri Apr 19 10:05:30 2019.  num_events_baseline = 2
+#C Fri Apr 19 10:05:30 2019.  num_events_primary = 35
+#C Fri Apr 19 10:05:30 2019.  num_events_PeakStats = 1
+#C Fri Apr 19 10:05:30 2019.  exit_status = success
+
+#S 5  TuneAxis.tune()
+#D Fri Apr 19 10:05:32 2019
+#C Fri Apr 19 10:05:32 2019.  plan_type = generator
+#C Fri Apr 19 10:05:32 2019.  uid = df7795eb-44ef-49b2-acd9-cf1ebbf4abed
+#MD APSTOOLS_VERSION = 1.1.0
+#MD BLUESKY_VERSION = 1.5.2
+#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
+#MD EPICS_HOST_ARCH = linux-x86_64
+#MD OPHYD_VERSION = 1.3.2
+#MD beamline_id = APS USAXS 9-ID-C
+#MD datetime = 2019-04-19 10:05:32.291807
+#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
+#MD pid = 27062
+#MD proposal_id = testing Bluesky installation
+#MD purpose = tuner
+#MD tune_md = {'width': -8, 'initial_position': 38.4243, 'time_iso8601': '2019-04-19 10:05:32.295550'}
+#MD tune_parameters = {'num': 31, 'width': -8, 'initial_position': 38.4243, 'peak_choice': 'com', 'x_axis': 'a_stage_r2p', 'y_axis': 'PD_USAXS'}
+#N 31
+#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  a_stage_r2p  a_stage_r2p_user_setpoint  a_stage_r2p_soft_limit_lo  a_stage_r2p_soft_limit_hi
+1.2613587379455566 1 1000000.0 57117.0 3102.0 399.0 1.0 226.0 0.1 5.0 42.4243 42.4243 -20.0 90.0
+1.5930070877075195 2 1000000.0 57188.0 3103.0 69.0 1.0 227.0 0.1 5.0 42.1576 42.15763333333334 -20.0 90.0
+1.7389733791351318 2 1000000.0 57142.0 3103.0 105.0 1.0 227.0 0.1 5.0 41.8909 41.89096666666667 -20.0 90.0
+1.888202428817749 2 1000000.0 57138.0 3103.0 160.0 1.0 227.0 0.1 5.0 41.624300000000005 41.624300000000005 -20.0 90.0
+2.10569429397583 2 1000000.0 57192.0 3102.0 270.0 1.0 226.0 0.1 5.0 41.357600000000005 41.35763333333333 -20.0 90.0
+2.339432954788208 2 1000000.0 57205.0 3103.0 503.0 1.0 227.0 0.1 5.0 41.090900000000005 41.09096666666667 -20.0 90.0
+2.5782394409179688 3 1000000.0 57251.0 3103.0 1097.0 1.0 227.0 0.1 5.0 40.8243 40.8243 -20.0 90.0
+2.834535837173462 3 1000000.0 57347.0 3102.0 2662.0 1.0 227.0 0.1 5.0 40.5576 40.557633333333335 -20.0 90.0
+3.0808637142181396 3 1000000.0 57239.0 3102.0 6321.0 1.0 227.0 0.1 5.0 40.2909 40.29096666666667 -20.0 90.0
+3.3274171352386475 3 1000000.0 57328.0 3101.0 16297.0 1.0 227.0 0.1 5.0 40.024300000000004 40.024300000000004 -20.0 90.0
+3.5393311977386475 4 1000000.0 57218.0 3099.0 33008.0 1.0 227.0 0.1 5.0 39.757600000000004 39.75763333333334 -20.0 90.0
+3.776230812072754 4 1000000.0 57167.0 3097.0 50484.0 1.0 227.0 0.1 5.0 39.4909 39.49096666666667 -20.0 90.0
+3.9929299354553223 4 1000000.0 57123.0 3095.0 68356.0 1.0 227.0 0.1 5.0 39.2243 39.2243 -20.0 90.0
+4.224080562591553 4 1000000.0 57130.0 3093.0 82791.0 1.0 227.0 0.1 5.0 38.9576 38.957633333333334 -20.0 90.0
+4.477696418762207 4 1000000.0 57149.0 3092.0 86931.0 1.0 227.0 0.1 5.0 38.6909 38.69096666666667 -20.0 90.0
+4.616499900817871 5 1000000.0 57173.0 3093.0 86437.0 1.0 227.0 0.1 5.0 38.4243 38.4243 -20.0 90.0
+4.8610053062438965 5 1000000.0 56991.0 3092.0 82988.0 1.0 227.0 0.1 5.0 38.1576 38.15763333333334 -20.0 90.0
+5.089857816696167 5 1000000.0 57094.0 3094.0 72675.0 1.0 227.0 0.1 5.0 37.8909 37.89096666666667 -20.0 90.0
+5.306164264678955 5 1000000.0 57170.0 3096.0 56216.0 1.0 228.0 0.1 5.0 37.624300000000005 37.624300000000005 -20.0 90.0
+5.506078004837036 6 1000000.0 57040.0 3099.0 38567.0 1.0 227.0 0.1 5.0 37.357600000000005 37.35763333333334 -20.0 90.0
+5.643139839172363 6 1000000.0 56992.0 3100.0 21250.0 1.0 227.0 0.1 5.0 37.090900000000005 37.09096666666667 -20.0 90.0
+5.879587650299072 6 1000000.0 57054.0 3102.0 8671.0 1.0 227.0 0.1 5.0 36.8243 36.8243 -20.0 90.0
+6.00601053237915 6 1000000.0 57000.0 3103.0 3981.0 1.0 227.0 0.1 5.0 36.5576 36.557633333333335 -20.0 90.0
+6.260035514831543 6 1000000.0 57169.0 3102.0 1697.0 1.0 226.0 0.1 5.0 36.2909 36.29096666666667 -20.0 90.0
+6.4898717403411865 6 1000000.0 57033.0 3103.0 712.0 1.0 226.0 0.1 5.0 36.024300000000004 36.024300000000004 -20.0 90.0
+6.7060301303863525 7 1000000.0 57048.0 3102.0 340.0 1.0 226.0 0.1 5.0 35.757600000000004 35.75763333333334 -20.0 90.0
+6.929247617721558 7 1000000.0 56821.0 3103.0 187.0 1.0 226.0 0.1 5.0 35.4909 35.490966666666665 -20.0 90.0
+7.075521230697632 7 1000000.0 56867.0 3103.0 117.0 1.0 226.0 0.1 5.0 35.2243 35.2243 -20.0 90.0
+7.306581258773804 7 1000000.0 57031.0 3103.0 70.0 1.0 227.0 0.1 5.0 34.9576 34.957633333333334 -20.0 90.0
+7.525092363357544 8 1000000.0 57025.0 3102.0 45.0 1.0 227.0 0.1 5.0 34.6909 34.69096666666667 -20.0 90.0
+7.73984694480896 8 1000000.0 57121.0 3103.0 29.0 1.0 227.0 0.1 5.0 34.4243 34.4243 -20.0 90.0
+#C Fri Apr 19 10:05:40 2019.  num_events_baseline = 2
+#C Fri Apr 19 10:05:40 2019.  num_events_primary = 31
+#C Fri Apr 19 10:05:40 2019.  num_events_PeakStats = 1
+#C Fri Apr 19 10:05:40 2019.  exit_status = success
+
+#S 6  TuneAxis.tune()
+#D Fri Apr 19 10:08:55 2019
+#C Fri Apr 19 10:08:55 2019.  plan_type = generator
+#C Fri Apr 19 10:08:55 2019.  uid = 6b2f29ab-33dc-4657-bacf-915bc54fdf14
+#MD APSTOOLS_VERSION = 1.1.0
+#MD BLUESKY_VERSION = 1.5.2
+#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
+#MD EPICS_HOST_ARCH = linux-x86_64
+#MD OPHYD_VERSION = 1.3.2
+#MD beamline_id = APS USAXS 9-ID-C
+#MD datetime = 2019-04-19 10:08:55.507154
+#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
+#MD pid = 27062
+#MD proposal_id = testing Bluesky installation
+#MD purpose = tuner
+#MD tune_md = {'width': -0.004, 'initial_position': 8.824867, 'time_iso8601': '2019-04-19 10:08:55.508993'}
+#MD tune_parameters = {'num': 31, 'width': -0.004, 'initial_position': 8.824867, 'peak_choice': 'com', 'x_axis': 'm_stage_r', 'y_axis': 'I0_USAXS'}
+#N 31
+#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  m_stage_r  m_stage_r_user_setpoint  m_stage_r_soft_limit_lo  m_stage_r_soft_limit_hi
+1.3442771434783936 1 1000000.0 191.0 3111.0 44.0 1.0 226.0 0.1 5.0 8.826867 8.826867 -7.856115 37.143885
+1.7606616020202637 2 1000000.0 214.0 3109.0 20504.0 1.0 226.0 0.1 5.0 8.826733 8.826733666666666 -7.856115 37.143885
+2.174447536468506 2 1000000.0 251.0 3111.0 2251.0 1.0 226.0 0.1 5.0 8.8266 8.826600333333333 -7.856115 37.143885
+2.5923538208007812 3 1000000.0 308.0 3103.0 71243.0 1.0 227.0 0.1 5.0 8.826467000000001 8.826467 -7.856115 37.143885
+3.0077178478240967 3 1000000.0 428.0 3110.0 7418.0 1.0 229.0 0.1 5.0 8.826333 8.826333666666667 -7.856115 37.143885
+3.4247965812683105 3 1000000.0 635.0 3109.0 16618.0 1.0 226.0 0.1 5.0 8.8262 8.826200333333333 -7.856115 37.143885
+3.8530466556549072 4 1000000.0 1269.0 3105.0 49815.0 1.0 227.0 0.1 5.0 8.826067 8.826067 -7.856115 37.143885
+4.275469064712524 4 1000000.0 3472.0 3098.0 99999.0 1.0 226.0 0.1 5.0 8.825933 8.825933666666666 -7.856115 37.143885
+4.690694093704224 5 1000000.0 10396.0 3107.0 14424.0 1.0 226.0 0.1 5.0 8.825800000000001 8.825800333333333 -7.856115 37.143885
+5.117584943771362 5 1000000.0 22893.0 3103.0 39069.0 1.0 226.0 0.1 5.0 8.825667 8.825667 -7.856115 37.143885
+5.650650501251221 6 1000000.0 38179.0 3093.0 99999.0 1.0 227.0 0.1 5.0 8.825533 8.825533666666667 -7.856115 37.143885
+6.073930740356445 6 1000000.0 48861.0 3103.0 10542.0 1.0 227.0 0.1 5.0 8.8254 8.825400333333333 -7.856115 37.143885
+6.492212533950806 6 1000000.0 54776.0 3091.0 99999.0 1.0 226.0 0.1 5.0 8.825267 8.825267 -7.856115 37.143885
+6.918388843536377 7 1000000.0 56318.0 3098.0 36964.0 1.0 226.0 0.1 5.0 8.825133000000001 8.825133666666666 -7.856115 37.143885
+7.324823379516602 7 1000000.0 56190.0 3095.0 70306.0 1.0 226.0 0.1 5.0 8.825 8.825000333333334 -7.856115 37.143885
+7.762248277664185 8 1000000.0 55528.0 3093.0 82789.0 1.0 226.0 0.1 5.0 8.824867 8.824867 -7.856115 37.143885
+8.291128396987915 8 1000000.0 53591.0 3095.0 63983.0 1.0 226.0 0.1 5.0 8.824733 8.824733666666665 -7.856115 37.143885
+8.708327770233154 9 1000000.0 47551.0 3100.0 31996.0 1.0 226.0 0.1 5.0 8.8246 8.824600333333333 -7.856115 37.143885
+9.149282693862915 9 1000000.0 36256.0 3097.0 73330.0 1.0 227.0 0.1 5.0 8.824466999999999 8.824466999999999 -7.856115 37.143885
+9.591164588928223 10 1000000.0 21430.0 3107.0 5290.0 1.0 226.0 0.1 5.0 8.824333 8.824333666666666 -7.856115 37.143885
+10.113401174545288 10 1000000.0 10481.0 3105.0 36804.0 1.0 226.0 0.1 5.0 8.8242 8.824200333333332 -7.856115 37.143885
+10.569620847702026 11 1000000.0 3605.0 3109.0 11974.0 1.0 226.0 0.1 5.0 8.824067 8.824067 -7.856115 37.143885
+11.006223440170288 11 1000000.0 1233.0 3110.0 6095.0 1.0 226.0 0.1 5.0 8.823933 8.823933666666665 -7.856115 37.143885
+11.424911975860596 11 1000000.0 649.0 3111.0 1670.0 1.0 225.0 0.1 5.0 8.823799999999999 8.823800333333333 -7.856115 37.143885
+11.848181009292603 12 1000000.0 416.0 3110.0 14468.0 1.0 226.0 0.1 5.0 8.823667 8.823666999999999 -7.856115 37.143885
+12.274287939071655 12 1000000.0 319.0 3110.0 6195.0 1.0 226.0 0.1 5.0 8.823533 8.823533666666666 -7.856115 37.143885
+12.692692041397095 13 1000000.0 249.0 3103.0 67221.0 1.0 226.0 0.1 5.0 8.8234 8.823400333333332 -7.856115 37.143885
+13.125089168548584 13 1000000.0 212.0 3104.0 50648.0 1.0 226.0 0.1 5.0 8.823267 8.823267 -7.856115 37.143885
+13.55994439125061 14 1000000.0 189.0 3108.0 20033.0 1.0 227.0 0.1 5.0 8.823132999999999 8.823133666666665 -7.856115 37.143885
+13.9749174118042 14 1000000.0 169.0 3108.0 21395.0 1.0 226.0 0.1 5.0 8.823 8.823000333333333 -7.856115 37.143885
+14.391009330749512 14 1000000.0 156.0 3110.0 11924.0 1.0 226.0 0.1 5.0 8.822866999999999 8.822866999999999 -7.856115 37.143885
+#C Fri Apr 19 10:09:10 2019.  num_events_baseline = 2
+#C Fri Apr 19 10:09:10 2019.  num_events_primary = 31
+#C Fri Apr 19 10:09:10 2019.  num_events_PeakStats = 1
+#C Fri Apr 19 10:09:10 2019.  exit_status = success
+
+#S 7  TuneAxis.tune()
+#D Fri Apr 19 10:09:12 2019
+#C Fri Apr 19 10:09:12 2019.  plan_type = generator
+#C Fri Apr 19 10:09:12 2019.  uid = 7a93dbcd-efcb-48ef-af65-5842768b4b55
+#MD APSTOOLS_VERSION = 1.1.0
+#MD BLUESKY_VERSION = 1.5.2
+#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
+#MD EPICS_HOST_ARCH = linux-x86_64
+#MD OPHYD_VERSION = 1.3.2
+#MD beamline_id = APS USAXS 9-ID-C
+#MD datetime = 2019-04-19 10:09:12.171858
+#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
+#MD pid = 27062
+#MD proposal_id = testing Bluesky installation
+#MD purpose = tuner
+#MD tune_md = {'width': -8, 'initial_position': 19.1722, 'time_iso8601': '2019-04-19 10:09:12.175169'}
+#MD tune_parameters = {'num': 21, 'width': -8, 'initial_position': 19.1722, 'peak_choice': 'com', 'x_axis': 'm_stage_r2p', 'y_axis': 'I0_USAXS'}
+#N 21
+#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  m_stage_r2p  m_stage_r2p_user_setpoint  m_stage_r2p_soft_limit_lo  m_stage_r2p_soft_limit_hi
+1.1383028030395508 1 1000000.0 4299.0 3111.0 56.0 1.0 226.0 0.1 5.0 23.1722 23.1722 -20.0 90.0
+1.3771731853485107 1 1000000.0 5412.0 3098.0 99999.0 1.0 226.0 0.1 5.0 22.7722 22.7722 -20.0 90.0
+1.608940601348877 2 1000000.0 7819.0 3106.0 27606.0 1.0 226.0 0.1 5.0 22.3721 22.3722 -20.0 90.0
+1.8246092796325684 2 1000000.0 12282.0 3105.0 40060.0 1.0 226.0 0.1 5.0 21.9722 21.9722 -20.0 90.0
+2.1249125003814697 2 1000000.0 19162.0 3101.0 63468.0 1.0 226.0 0.1 5.0 21.572100000000002 21.5722 -20.0 90.0
+2.385352611541748 2 1000000.0 26715.0 3095.0 99999.0 1.0 226.0 0.1 5.0 21.1722 21.1722 -20.0 90.0
+2.525242805480957 3 1000000.0 34882.0 3100.0 44273.0 1.0 226.0 0.1 5.0 20.772100000000002 20.772199999999998 -20.0 90.0
+2.6626944541931152 3 1000000.0 43902.0 3092.0 99999.0 1.0 226.0 0.1 5.0 20.3721 20.3722 -20.0 90.0
+2.909954309463501 3 1000000.0 53882.0 3092.0 91451.0 1.0 226.0 0.1 5.0 19.9722 19.9722 -20.0 90.0
+3.162280797958374 3 1000000.0 63055.0 3098.0 33129.0 1.0 226.0 0.1 5.0 19.572100000000002 19.5722 -20.0 90.0
+3.4098339080810547 3 1000000.0 70380.0 3088.0 99999.0 1.0 226.0 0.1 5.0 19.1722 19.1722 -20.0 90.0
+3.665832042694092 4 1000000.0 71635.0 3095.0 46511.0 1.0 226.0 0.1 5.0 18.772100000000002 18.772199999999998 -20.0 90.0
+3.8085601329803467 4 1000000.0 66602.0 3094.0 58702.0 1.0 226.0 0.1 5.0 18.3721 18.3722 -20.0 90.0
+4.043541669845581 4 1000000.0 57564.0 3094.0 69300.0 1.0 226.0 0.1 5.0 17.9722 17.9722 -20.0 90.0
+4.275780200958252 4 1000000.0 47647.0 3096.0 69908.0 1.0 226.0 0.1 5.0 17.572100000000002 17.5722 -20.0 90.0
+4.519298553466797 5 1000000.0 36965.0 3099.0 55438.0 1.0 226.0 0.1 5.0 17.1722 17.1722 -20.0 90.0
+4.749254941940308 5 1000000.0 25981.0 3102.0 37879.0 1.0 226.0 0.1 5.0 16.772100000000002 16.772199999999998 -20.0 90.0
+4.998044729232788 5 1000000.0 14595.0 3103.0 50069.0 1.0 226.0 0.1 5.0 16.3722 16.3722 -20.0 90.0
+5.339958190917969 5 1000000.0 7303.0 3098.0 99999.0 1.0 226.0 0.1 5.0 15.9722 15.9722 -20.0 90.0
+5.662503480911255 6 1000000.0 3797.0 3106.0 34501.0 1.0 226.0 0.1 5.0 15.5721 15.572199999999999 -20.0 90.0
+5.910281658172607 6 1000000.0 1949.0 3104.0 56387.0 1.0 225.0 0.1 5.0 15.1722 15.1722 -20.0 90.0
+#C Fri Apr 19 10:09:18 2019.  num_events_baseline = 2
+#C Fri Apr 19 10:09:18 2019.  num_events_primary = 21
+#C Fri Apr 19 10:09:18 2019.  num_events_PeakStats = 1
+#C Fri Apr 19 10:09:18 2019.  exit_status = success
+
+#S 8  TuneAxis.tune()
+#D Fri Apr 19 10:09:20 2019
+#C Fri Apr 19 10:09:20 2019.  plan_type = generator
+#C Fri Apr 19 10:09:20 2019.  uid = 4bd2bff9-4a43-4fda-835c-c1efbe4fc910
+#MD APSTOOLS_VERSION = 1.1.0
+#MD BLUESKY_VERSION = 1.5.2
+#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
+#MD EPICS_HOST_ARCH = linux-x86_64
+#MD OPHYD_VERSION = 1.3.2
+#MD beamline_id = APS USAXS 9-ID-C
+#MD datetime = 2019-04-19 10:09:20.507274
+#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
+#MD pid = 27062
+#MD proposal_id = testing Bluesky installation
+#MD purpose = tuner
+#MD tune_md = {'width': -0.004, 'initial_position': 8.8839199, 'time_iso8601': '2019-04-19 10:09:20.509031'}
+#MD tune_parameters = {'num': 35, 'width': -0.004, 'initial_position': 8.8839199, 'peak_choice': 'com', 'x_axis': 'a_stage_r', 'y_axis': 'PD_USAXS'}
+#N 35
+#L Epoch_float  Epoch  seconds  I0_USAXS  I00_USAXS  PD_USAXS  TR diode  I000  scaler0_time  scaler0_display_rate  a_stage_r  a_stage_r_user_setpoint  a_stage_r_soft_limit_lo  a_stage_r_soft_limit_hi
+1.3226919174194336 1 1000000.0 56605.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.885919900000001 8.885919900000001 -5.0 30.0
+1.745370864868164 2 1000000.0 56503.0 3103.0 1.0 1.0 226.0 0.1 5.0 8.8858023 8.885802252941177 -5.0 30.0
+2.2642550468444824 2 1000000.0 56464.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.885684600000001 8.885684605882354 -5.0 30.0
+2.679088830947876 3 1000000.0 56587.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.885567 8.88556695882353 -5.0 30.0
+3.0957388877868652 3 1000000.0 56518.0 3103.0 3.0 1.0 226.0 0.1 5.0 8.885449300000001 8.885449311764706 -5.0 30.0
+3.529817581176758 4 1000000.0 56449.0 3102.0 3.0 1.0 226.0 0.1 5.0 8.8853317 8.885331664705884 -5.0 30.0
+3.9475326538085938 4 1000000.0 56397.0 3103.0 3.0 1.0 225.0 0.1 5.0 8.885214000000001 8.88521401764706 -5.0 30.0
+4.3878092765808105 4 1000000.0 56380.0 3103.0 3.0 1.0 226.0 0.1 5.0 8.8850964 8.885096370588236 -5.0 30.0
+4.9385669231414795 5 1000000.0 56373.0 3103.0 5.0 1.0 226.0 0.1 5.0 8.884978700000001 8.884978723529413 -5.0 30.0
+5.379429578781128 5 1000000.0 56389.0 3102.0 7.0 1.0 226.0 0.1 5.0 8.8848611 8.884861076470589 -5.0 30.0
+5.8964524269104 6 1000000.0 56494.0 3103.0 13.0 1.0 226.0 0.1 5.0 8.884743400000001 8.884743429411765 -5.0 30.0
+6.338381290435791 6 1000000.0 56499.0 3103.0 63.0 1.0 226.0 0.1 5.0 8.8846258 8.884625782352941 -5.0 30.0
+6.772700786590576 7 1000000.0 56553.0 3103.0 1681.0 1.0 226.0 0.1 5.0 8.884508100000001 8.884508135294118 -5.0 30.0
+7.1790502071380615 7 1000000.0 56905.0 3100.0 21390.0 1.0 226.0 0.1 5.0 8.8843905 8.884390488235296 -5.0 30.0
+7.622541189193726 8 1000000.0 56932.0 3097.0 51690.0 1.0 227.0 0.1 5.0 8.884272900000001 8.884272841176472 -5.0 30.0
+8.046452522277832 8 1000000.0 57093.0 3093.0 79278.0 1.0 227.0 0.1 5.0 8.8841552 8.884155194117648 -5.0 30.0
+8.464685201644897 8 1000000.0 57011.0 3092.0 85463.0 1.0 226.0 0.1 5.0 8.884037600000001 8.884037547058824 -5.0 30.0
+8.979426860809326 9 1000000.0 56931.0 3095.0 64308.0 1.0 227.0 0.1 5.0 8.8839199 8.8839199 -5.0 30.0
+9.396026134490967 9 1000000.0 57146.0 3099.0 34311.0 1.0 227.0 0.1 5.0 8.883802300000001 8.883802252941177 -5.0 30.0
+9.8298659324646 10 1000000.0 57183.0 3102.0 6685.0 1.0 226.0 0.1 5.0 8.8836846 8.883684605882353 -5.0 30.0
+10.245903491973877 10 1000000.0 57126.0 3103.0 199.0 1.0 227.0 0.1 5.0 8.883567000000001 8.883566958823529 -5.0 30.0
+10.664265632629395 11 1000000.0 57131.0 3102.0 21.0 1.0 226.0 0.1 5.0 8.8834493 8.883449311764705 -5.0 30.0
+11.07904314994812 11 1000000.0 57092.0 3103.0 9.0 1.0 227.0 0.1 5.0 8.883331700000001 8.883331664705883 -5.0 30.0
+11.495566606521606 11 1000000.0 57152.0 3103.0 6.0 1.0 226.0 0.1 5.0 8.883214 8.88321401764706 -5.0 30.0
+11.928889036178589 12 1000000.0 57137.0 3103.0 5.0 1.0 227.0 0.1 5.0 8.883096400000001 8.883096370588236 -5.0 30.0
+12.365918636322021 12 1000000.0 57083.0 3103.0 4.0 1.0 226.0 0.1 5.0 8.8829787 8.882978723529412 -5.0 30.0
+12.79586124420166 13 1000000.0 56981.0 3103.0 3.0 1.0 226.0 0.1 5.0 8.882861100000001 8.882861076470588 -5.0 30.0
+13.21427869796753 13 1000000.0 56931.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8827434 8.882743429411764 -5.0 30.0
+13.629595518112183 14 1000000.0 56911.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.882625800000001 8.88262578235294 -5.0 30.0
+14.045937061309814 14 1000000.0 56994.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8825081 8.882508135294117 -5.0 30.0
+14.46888279914856 14 1000000.0 56994.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.882390500000001 8.882390488235295 -5.0 30.0
+14.895854234695435 15 1000000.0 57008.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8822729 8.882272841176471 -5.0 30.0
+15.329032182693481 15 1000000.0 57073.0 3103.0 2.0 1.0 227.0 0.1 5.0 8.882155200000001 8.882155194117647 -5.0 30.0
+15.749050378799438 16 1000000.0 56951.0 3103.0 2.0 1.0 226.0 0.1 5.0 8.8820376 8.882037547058824 -5.0 30.0
+16.17923855781555 16 1000000.0 57018.0 3103.0 2.0 1.0 227.0 0.1 5.0 8.881919900000002 8.8819199 -5.0 30.0
+#C Fri Apr 19 10:09:37 2019.  num_events_baseline = 2
+#C Fri Apr 19 10:09:37 2019.  num_events_primary = 35
+#C Fri Apr 19 10:09:37 2019.  num_events_PeakStats = 1
+#C Fri Apr 19 10:09:37 2019.  exit_status = success
diff --git a/src/spec2nexus/plugins/apstools_specwriter_spec2nexus.py b/src/spec2nexus/plugins/apstools_specwriter_spec2nexus.py
new file mode 100644
index 0000000..49f2ea0
--- /dev/null
+++ b/src/spec2nexus/plugins/apstools_specwriter_spec2nexus.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python 
+# -*- coding: utf-8 -*-
+
+#-----------------------------------------------------------------------------
+# :author:    Pete R. Jemian
+# :email:     prjemian@gmail.com
+# :copyright: (c) 2014-2017, Pete R. Jemian
+#
+# Distributed under the terms of the Creative Commons Attribution 4.0 International Public License.
+#
+# The full license is in the file LICENSE.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
+"""
+**#MD** : Bluesky metadata from apstools SpecWriterCallback
+"""
+
+"""
+#MD APSTOOLS_VERSION = 1.1.0
+#MD BLUESKY_VERSION = 1.5.2
+#MD EPICS_CA_MAX_ARRAY_BYTES = 1280000
+#MD EPICS_HOST_ARCH = linux-x86_64
+#MD OPHYD_VERSION = 1.3.2
+#MD beamline_id = APS USAXS 9-ID-C
+#MD datetime = 2019-04-19 10:04:44.400750
+#MD login_id = usaxs@usaxscontrol.xray.aps.anl.gov
+#MD pid = 27062
+#MD proposal_id = testing Bluesky installation
+#MD purpose = tuner
+#MD tune_md = {'width': -0.004, 'initial_position': 8.824885, 'time_iso8601': '2019-04-19 10:04:44.402643'}
+#MD tune_parameters = {'num': 31, 'width': -0.004, 'initial_position': 8.824885, 'peak_choice': 'com', 'x_axis': 'm_stage_r', 'y_axis': 'I0_USAXS'}
+"""
+
+from collections import OrderedDict
+from spec2nexus.plugin import ControlLineHandler
+from spec2nexus import eznx
+
+class MD_apstools(ControlLineHandler):
+
+    """**#MD** -- Bluesky metadata from apstools SpecWriterCallback"""
+
+    key = '#MD\w*'
+    
+    def process(self, text, scan, *args, **kws):
+        if not hasattr(scan, 'MD'):
+            scan.MD = OrderedDict()
+
+        p = text.find("=")
+        if p > len("# MD "):
+            # f"#MD {key} = {value}"
+            key = text.split()[1]
+            value = text[p+1:].strip()
+        else:
+            # badly-formed #MD control line
+            key = "MD_line_%d" % (len(scan.MD)+1)
+            value = text.strip()
+        scan.MD[key] = value
+        scan.addH5writer(self.key, self.writer)
+    
+    def writer(self, h5parent, writer, scan, nxclass=None, *args, **kws):
+        """Describe how to store this data in an HDF5 NeXus file"""
+        nxclass = "NXcollection"
+        if hasattr(scan, 'MD') and len(scan.MD) > 0:
+            desc='Bluesky metadata (as written by apstools.SpecWriterCallback)'
+            group = eznx.makeGroup(h5parent, 'bluesky_metadata', nxclass, description=desc)
+            writer.save_dict(group, scan.MD)

plugin support for #MD control lines for USAXS instrument
related to https://github.com/APS-USAXS/ipython-usaxs/issues/143 and https://github.com/APS-USAXS/ipython-usaxs/issues/183

The [`SpecWriterCallback`](https://apstools.readthedocs.io/en/latest/source/filewriters.html#apstools.filewriters.SpecWriterCallback) writes bluesky scan metadata to SPEC data files as 

```python
f"#MD {key} = {value}"
```
diff --git a/tests/__init__.py b/tests/__init__.py
index dc6167d..22e8806 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -26,6 +26,7 @@ if _path not in sys.path:
 def suite(*args, **kw):
     from tests import data_03_06_JanTest
     from tests import test_extractSpecScan
+    from tests import test_md_apstools_specwriter
     from tests import test_plugin
     from tests import test_scanf
     from tests import test_spec
@@ -41,6 +42,7 @@ def suite(*args, **kw):
     test_list = [
         data_03_06_JanTest,
         test_extractSpecScan,
+        test_md_apstools_specwriter,
         test_plugin,
         test_scanf,
         test_spec,
diff --git a/tests/test_md_apstools_specwriter.py b/tests/test_md_apstools_specwriter.py
new file mode 100644
index 0000000..3c2238a
--- /dev/null
+++ b/tests/test_md_apstools_specwriter.py
@@ -0,0 +1,114 @@
+'''
+unit tests for a specific data file
+'''
+
+#-----------------------------------------------------------------------------
+# :author:    Pete R. Jemian
+# :email:     prjemian@gmail.com
+# :copyright: (c) 2014-2017, Pete R. Jemian
+#
+# Distributed under the terms of the Creative Commons Attribution 4.0 International Public License.
+#
+# The full license is in the file LICENSE.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
+from collections import OrderedDict
+import h5py
+import os
+import sys
+import unittest
+
+_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src'))
+if _path not in sys.path:
+    sys.path.insert(0, _path)
+
+import spec2nexus
+from spec2nexus import spec, writer
+
+_test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
+if _test_path not in sys.path:
+    sys.path.insert(0, _test_path)
+import tests.common
+
+
+class Test_USAXS_Bluesky_SpecWriterCallback(unittest.TestCase):
+    """
+    look for the metadata
+    """
+
+    def setUp(self):
+        pass
+
+    def tearDown(self):
+        pass
+    
+    def test_the_data_file(self):
+        '''
+        look for the metadata
+        '''
+        prefix = os.path.abspath(os.path.join(
+            _path, 
+            'spec2nexus', 
+            'data', 
+            'usaxs-bluesky-specwritercallback'))
+        file1 = prefix + '.dat'
+        hfile = tests.common.create_test_file()
+    
+        # writer interface has changed, must use new spec module to proceed
+        specfile = spec.SpecDataFile(file1)
+        self.assertTrue(isinstance(specfile, spec2nexus.spec.SpecDataFile), file1)
+        
+        for scan_num, scan in specfile.scans.items():
+            msg = "Scan %s MD test" % scan_num
+            scan.interpret()    # force lazy-loader to parse this scan
+            self.assertTrue(hasattr(scan, "MD"), msg)
+            self.assertTrue(isinstance(scan.MD, OrderedDict), msg)
+            self.assertGreater(len(scan.MD), 0, msg)
+        
+        # test the metadata in a NeXus file
+
+        specwriter = writer.Writer(specfile)
+        self.assertTrue(isinstance(specwriter, spec2nexus.writer.Writer), file1)
+         
+        specwriter.save(hfile, sorted(specfile.getScanNumbers()))
+        self.assertTrue(os.path.exists(hfile))
+         
+        def subgroup_list(parent, nxclass):
+            children = []
+            for item in sorted(parent):
+                obj = parent[item]
+                if isinstance(obj, h5py.Group):
+                    if obj.attrs.get('NX_class', '') == nxclass:
+                        children.append(obj)
+            return children
+         
+        fp = h5py.File(hfile, 'r')
+        for nxentry in subgroup_list(fp, 'NXentry'):
+            # nxinstrument_groups = subgroup_list(nxentry, 'NXinstrument')
+            # self.assertEqual(len(nxinstrument_groups), 1)
+            # nxinstrument = nxinstrument_groups[0]
+
+            nxcollection_groups = subgroup_list(nxentry, 'NXcollection')
+            self.assertGreater(len(nxcollection_groups), 0)
+            md_group = nxentry.get("bluesky_metadata")
+            self.assertIsNotNone(md_group, "bluesky_metadata in NeXus file")
+ 
+        fp.close()
+ 
+        os.remove(hfile)
+        self.assertFalse(os.path.exists(hfile))
+
+
+def suite(*args, **kw):
+    test_list = [
+        Test_USAXS_Bluesky_SpecWriterCallback,
+        ]
+    test_suite = unittest.TestSuite()
+    for test_case in test_list:
+        test_suite.addTest(unittest.makeSuite(test_case))
+    return test_suite
+
+
+if __name__ == "__main__":
+    runner=unittest.TextTestRunner()
+    runner.run(suite())

pip install -e .
parse_log_pytest
requirements.txt
pytest coverage docopt
apt-get update apt-get install -y gcc
3.6
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
cached-property==1.5.2
certifi==2021.5.30
coverage==6.2
cycler==0.11.0
docopt==0.6.2
h5py==3.1.0
importlib-metadata==4.8.3
iniconfig==1.1.1
kiwisolver==1.3.1
matplotlib==3.3.4
numpy==1.19.5
packaging==21.3
Pillow==8.4.0
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
six==1.17.0
-e git+https://github.com/prjemian/spec2nexus.git@c033bf665592e989648bd6be7873663cde759fe5#egg=spec2nexus
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.0

name: spec2nexus
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - cached-property==1.5.2
      - coverage==6.2
      - cycler==0.11.0
      - docopt==0.6.2
      - h5py==3.1.0
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - kiwisolver==1.3.1
      - matplotlib==3.3.4
      - numpy==1.19.5
      - packaging==21.3
      - pillow==8.4.0
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - six==1.17.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/spec2nexus

tests/test_md_apstools_specwriter.py::Test_USAXS_Bluesky_SpecWriterCallback::test_the_data_file
tests/test_XPCSplugin.py::Test::testVA tests/test_XPCSplugin.py::Test::testVD tests/test_XPCSplugin.py::Test::testVE tests/test_XPCSplugin.py::Test::testXPCS
src/spec2nexus/data/usaxs-bluesky-specwritercallback.dat src/spec2nexus/plugins/apstools_specwriter_spec2nexus.py
src/spec2nexus/data/usaxs-bluesky-specwritercallback.dat src/spec2nexus/plugins/apstools_specwriter_spec2nexus.py