Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specwriter problem #440

Closed
gfabbris opened this issue Oct 12, 2020 · 29 comments · Fixed by #482
Closed

Specwriter problem #440

gfabbris opened this issue Oct 12, 2020 · 29 comments · Fixed by #482
Assignees
Labels
Milestone

Comments

@gfabbris
Copy link
Collaborator

@prjemian: The specwriter didn't work for scan uid 624e776a. It looks like it's a problem related with how we move the undulator energy in moveE. If I move only the monochromator this issue doesn't happen.

@prjemian
Copy link
Contributor

Thanks for the report.

@prjemian prjemian added this to the 1.3.9 milestone Nov 15, 2020
@prjemian prjemian self-assigned this Nov 15, 2020
@prjemian prjemian added the bug label Nov 15, 2020
@prjemian
Copy link
Contributor

Found it:

>>> from databroker import catalog
>>> cat = catalog["4id_polar"]
>>> run = cat["624e776a"]
>>> run
BlueskyRun
  uid='624e776a-a914-4a74-8841-babf1591fb29'
  exit_status='success'
  2020-09-15 19:37:32.469 -- 2020-09-15 19:42:19.791
  Streams:
    * primary
    * baseline

@prjemian
Copy link
Contributor

Use databroker v0 interface: with the specwriter callback

Note, in the polar account, your databroker configuration is called mongodb_config, in my account, the same configuration is named 4id_polar.

import databroker
from apstools.filewriters import SpecWriterCallback

specwriter = SpecWriterCallback()

db = databroker.Broker.named('4id_polar')
for key, doc in db.get_documents(db["624e776a"]):
    specwriter.receiver(key, doc)
print("Look at SPEC data file: "+specwriter.spec_filename)

In the ipython session:

In [2]: import databroker
   ...: from apstools.filewriters import SpecWriterCallback
   ...: 
   ...: specwriter = SpecWriterCallback()
   ...: 
   ...: db = databroker.Broker.named('4id_polar')
   ...: for key, doc in db.get_documents(db["624e776a"]):
   ...:     specwriter.receiver(key, doc)
   ...: print("Look at SPEC data file: "+specwriter.spec_filename)
Look at SPEC data file: 20201114-222943.dat

In [3]: !code 20201114-222943.dat

Here is the content of the SPEC file:

#F 20201114-222943.dat
#E 1605414583
#D Sat Nov 14 22:29:43 2020
#C Bluesky  user = jemian  host = wow.xray.aps.anl.gov
#O0 
#o0 

#S 287  qxscan(detectors=['scalerd'], edge_energy=12.826, qx_setup={'num_preedge': 1, 'preedge_params': [{'relative_energy_start': -50.0, 'energy_increment': 2.0}], 'edge_params': {'relative_energy_start': -15.0, 'relative_energy_end': 15.0, 'energy_increment': 0.25}, 'num_postedge': 1, 'postedge_params': [{'relative_k_end': 5.0, 'k_increment': 0.07}], 'relative_energy': [0.09524955288842318, 0.09502847879559422, 0.0923832570623657, 0.08977537315386944, 0.0872048270701054, 0.08467161881107367, 0.0821757483767742, 0.07971721576720699, 0.07729602098237201, 0.07491216402226933, 0.07256564488689891, 0.07025646357626071, 0.0679846200903548, 0.06575011442918115, 0.06355294659273979, 0.06139311658103065, 0.059270624394053784, 0.05718547003180919, 0.055137653494296855, 0.05312717478151678, 0.05115403389346895, 0.049218230830153406, 0.047319765591570126, 0.045458638177719085, 0.04363484858860032, 0.041848396824213825, 0.04009928288455958, 0.03838750676963759, 0.03671306847944787, 0.03507596801399042, 0.033476205373265226, 0.031913780557272294, 0.030388693566011614, 0.02890094439948321, 0.027450533057687066, 0.026037459540623177, 0.02466172384829155, 0.023323325980692193, 0.0220222659378251, 0.02075854371969026, 0.01953215932628768, 0.01834311275761737, 0.017191404013679322, 0.016077033094473527, 0.015, 0.01475, 0.0145, 0.01425, 0.014, 0.01375, 0.0135, 0.01325, 0.013, 0.01275, 0.0125, 0.01225, 0.012, 0.01175, 0.0115, 0.01125, 0.011, 0.01075, 0.0105, 0.01025, 0.01, 0.00975, 0.0095, 0.00925, 0.009, 0.00875, 0.0085, 0.00825, 0.008, 0.00775, 0.0075, 0.00725, 0.007, 0.00675, 0.0065, 0.00625, 0.006, 0.00575, 0.0055, 0.00525, 0.005, 0.00475, 0.0045, 0.00425, 0.004, 0.00375, 0.0035, 0.00325, 0.003, 0.00275, 0.0025, 0.00225, 0.002, 0.00175, 0.0015, 0.00125, 0.001, 0.00075, 0.0005, 0.00025, 0.0, -0.00025, -0.0005, -0.00075, -0.001, -0.00125, -0.0015, -0.00175, -0.002, -0.00225, -0.0025, -0.00275, -0.003, -0.00325, -0.0035, -0.00375, -0.004, -0.00425, -0.0045, -0.00475, -0.005, -0.00525, -0.0055, -0.00575, -0.006, -0.00625, -0.0065, -0.00675, -0.007, -0.00725, -0.0075, -0.00775, -0.008, -0.00825, -0.0085, -0.00875, -0.009, -0.00925, -0.0095, -0.00975, -0.01, -0.01025, -0.0105, -0.01075, -0.011, -0.01125, -0.0115, -0.01175, -0.012, -0.01225, -0.0125, -0.01275, -0.013, -0.01325, -0.0135, -0.01375, -0.014, -0.01425, -0.0145, -0.01475, -0.015, -0.016, -0.018, -0.02, -0.022, -0.024, -0.026, -0.028, -0.03, -0.032, -0.034, -0.036, -0.038, -0.04, -0.042, -0.044, -0.046, -0.048, -0.05]})
#D Tue Sep 15 19:37:32 2020
#C Tue Sep 15 19:37:32 2020.  plan_type = generator
#C Tue Sep 15 19:37:32 2020.  uid = 624e776a-a914-4a74-8841-babf1591fb29
#MD uid = 624e776a-a914-4a74-8841-babf1591fb29
#MD beamline_id = 4-ID-Polar
#MD detectors = ['scalerd']
#MD edge = IrL2
#MD login_id = polar@elevate.xray.aps.anl.gov
#MD num_intervals = 182
#MD num_points = 183
#MD pid = 30808
#MD positioners = ['monochromator_energy', 'undulator_downstream_energy']
#MD pressure = 10.8
#MD proposal_id = testing
#MD versions = {'apstools': '1.3.4', 'bluesky': '1.6.5', 'databroker': '1.0.6', 'epics': '3.4.2', 'matplotlib': '3.2.2', 'numpy': '1.19.1', 'ophyd': '1.5.2', 'pyRestTable': '2020.0.2', 'spec2nexus': '2021.1.7'}
#P0 
#N 22
#L Epoch_float  Epoch  monochromator_energy  Time  Ion Ch 1  Ion Ch 2  Ion Ch 3  Ion Ch 4  Ion Ch 5  Cyber8C  CyberMagSCA3  Cyber YapSCA4  APDSector4  SCA1  SCA2  Photodiode  Lock DC  Lock AC  Lock AC off  scalerd_time  undulator_downstream_energy  scalerd
5.679307460784912 6 12.921257239814722 20376015.0 162035.0 166319.0 529.0 176000.0 175302.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 205631.0 1019816.0 1014891.0 2.0376015 13.051663398742676 0
7.450775861740112 7 12.921014554794395 15401653.0 146991.0 150915.0 397.0 176000.0 176957.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 154081.0 769835.0 767127.0 1.5401653 13.05100965499878 0
9.241223573684692 9 12.918386058280284 15139943.0 149540.0 153546.0 389.0 176000.0 177193.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 151434.0 756225.0 754092.0 1.5139943 13.05100965499878 0
11.118221521377563 11 12.915758643791925 16082220.0 148328.0 152302.0 416.0 176000.0 177371.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 160742.0 803119.0 801025.0 1.608222 13.044682502746582 0
12.880080461502075 13 12.913213104796206 15353085.0 147168.0 151098.0 396.0 176000.0 177227.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 153517.0 767799.0 764709.0 1.5353085 13.044248580932617 0
14.633421421051025 15 12.910668581034207 14737358.0 146800.0 150698.0 379.0 176000.0 176740.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 147583.0 734850.0 734040.0 1.4737358 13.044248580932617 0
16.420758724212646 16 12.908165437140322 15625659.0 146513.0 150403.0 404.0 176000.0 176780.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 156409.0 779299.0 778285.0 1.5625659 13.03727102279663 0
18.197298288345337 18 12.905703625003538 14945779.0 145400.0 149243.0 385.0 176000.0 176502.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 149716.0 746421.0 744421.0 1.4945779 13.03727102279663 0
19.88838481903076 20 12.903283097334555 14275695.0 144097.0 147896.0 367.0 176000.0 176597.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 142924.0 714616.0 711045.0 1.4275695 13.037045001983643 0
21.5949490070343 22 12.900903807663546 15021711.0 144419.0 148229.0 387.0 176000.0 175897.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 150698.0 750574.0 748203.0 1.5021711 13.031164169311523 0
23.31149458885193 23 12.898565710337877 14490058.0 144150.0 147950.0 373.0 176000.0 175927.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 145338.0 725531.0 721723.0 1.4490058 13.030946731567383 0
25.044495820999146 25 12.896268760519956 14857303.0 142835.0 146599.0 384.0 176000.0 175810.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 149010.0 743891.0 740015.0 1.4857303 13.026577949523926 0
26.747607231140137 27 12.893972638473329 14388194.0 143386.0 147149.0 371.0 176000.0 174571.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 144802.0 720449.0 716650.0 1.4388194 13.026144027709961 0
28.454760551452637 28 12.891757866409035 14753711.0 141242.0 144955.0 381.0 176000.0 173483.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 148786.0 736705.0 734855.0 1.4753711 13.022000312805176 0
30.175117015838623 30 12.889543864231076 14391454.0 142495.0 146222.0 371.0 176000.0 170810.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 146162.0 719115.0 716812.0 1.4391454 13.021568298339844 0
31.85799503326416 32 12.887411099251155 14781312.0 141913.0 145623.0 381.0 176000.0 167737.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 151277.0 738296.0 736230.0 1.4781312 13.017399787902832 0
33.53989005088806 34 12.885279048455214 14129034.0 140123.0 143779.0 364.0 176000.0 164308.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 145852.0 707463.0 703741.0 1.4129034 13.01718521118164 0
35.13767957687378 35 12.883187918786156 13781753.0 141062.0 144730.0 355.0 176000.0 160250.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 143809.0 689503.0 686444.0 1.3781753 13.01718521118164 0
36.88474678993225 37 12.881137670273434 14577783.0 138948.0 142561.0 376.0 176000.0 156099.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 153703.0 730109.0 726092.0 1.4577783 13.010198593139648 0
38.52408576011658 39 12.879128263746868 14132720.0 138862.0 142462.0 364.0 176000.0 151460.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 150885.0 708290.0 703924.0 1.413272 13.009970664978027 0
40.1574649810791 40 12.877159660834756 13641875.0 138130.0 141701.0 351.0 176000.0 147958.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 147032.0 682610.0 679476.0 1.3641875 13.009970664978027 0
41.77785110473633 42 12.875231823962034 14107288.0 137785.0 141341.0 363.0 176000.0 145097.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 153225.0 708274.0 702658.0 1.4107288 13.0056734085083 0
43.423001527786255 43 12.873304571205404 13797385.0 138789.0 142361.0 356.0 176000.0 144040.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 150382.0 691685.0 687222.0 1.3797385 13.005215167999268 0
44.96231532096863 45 12.871458168518235 13346493.0 137907.0 141453.0 344.0 176000.0 145275.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 144929.0 666972.0 664764.0 1.3346493 13.005215167999268 0
46.733243465423584 47 12.86965242364917 14445551.0 138911.0 142482.0 374.0 176000.0 148052.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 155687.0 721374.0 719507.0 1.4445551 12.998215675354004 0
48.36027479171753 48 12.867847191490947 13986706.0 137924.0 141460.0 361.0 176000.0 152058.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 149109.0 697356.0 696652.0 1.3986706 12.997989177703857 0
49.901872873306274 50 12.866082571141305 13397201.0 135868.0 139349.0 345.0 176000.0 156207.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 141223.0 668818.0 667290.0 1.3397201 12.997989177703857 0
51.488911867141724 51 12.864398617689112 13074369.0 135976.0 139446.0 337.0 176000.0 159856.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 136506.0 656389.0 651210.0 1.3074369 12.997989177703857 0
53.09723711013794 53 12.86271511031392 14008078.0 135275.0 138734.0 361.0 176000.0 162962.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 145064.0 701676.0 697716.0 1.4008078 12.991875171661377 0
54.7330276966095 55 12.861072116550881 13509890.0 133459.0 136870.0 347.0 176000.0 165767.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 138865.0 675672.0 672903.0 1.350989 12.991875171661377 0
56.27050590515137 56 12.859469605150048 13367589.0 135368.0 138816.0 344.0 176000.0 168059.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 136671.0 666875.0 665815.0 1.3367589 12.991875171661377 0
57.77972745895386 58 12.857907545643025 12932351.0 134173.0 137590.0 333.0 176000.0 170369.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 131416.0 645756.0 644137.0 1.2932351 12.991875171661377 0
59.43402290344238 59 12.85638590834152 13898250.0 134407.0 137838.0 360.0 176000.0 171505.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 140814.0 694421.0 692247.0 1.389825 12.986003398895264 0
61.02298712730408 61 12.854904664335953 13797798.0 136496.0 139972.0 356.0 176000.0 171381.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 139895.0 691737.0 687243.0 1.3797798 12.985553741455078 0
62.58205986022949 63 12.853463785494055 13486633.0 136654.0 140121.0 348.0 176000.0 170937.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 136928.0 674755.0 671744.0 1.3486633 12.985553741455078 0
64.1413893699646 64 12.852023233540534 12973012.0 134469.0 137869.0 333.0 176000.0 170053.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 131977.0 648158.0 646161.0 1.2973012 12.985326766967773 0
65.70801544189453 66 12.850663012303407 13648282.0 134179.0 137579.0 351.0 176000.0 170291.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 138718.0 681284.0 679796.0 1.3648282 12.980810165405273 0
67.24550485610962 67 12.849343076229248 13329939.0 133608.0 136988.0 343.0 176000.0 171864.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 134964.0 666011.0 663939.0 1.3329939 12.980360507965088 0
68.81617784500122 69 12.848023414565931 13054096.0 133581.0 136952.0 337.0 176000.0 175292.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 131052.0 650108.0 650201.0 1.3054096 12.980360507965088 0
70.30072283744812 70 12.84674400463304 12713307.0 132390.0 135731.0 327.0 176000.0 179942.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 126172.0 635306.0 633226.0 1.2713307 12.980360507965088 0
71.86979722976685 72 12.845544792024452 13529057.0 133200.0 136563.0 349.0 176000.0 184761.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 132699.0 676001.0 673858.0 1.3529057 12.975383281707764 0
73.47790002822876 73 12.844345805999026 13156433.0 132275.0 135600.0 339.0 176000.0 188338.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 127984.0 657055.0 655297.0 1.3156433 12.974933624267578 0
74.97373557090759 75 12.843187001494213 12853690.0 131680.0 134993.0 332.0 176000.0 191189.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 124166.0 642302.0 640218.0 1.285369 12.974933624267578 0
76.47189736366272 76 12.842068356558295 12845007.0 131676.0 134974.0 331.0 176000.0 192519.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 123713.0 642496.0 639786.0 1.2845007 12.974933624267578 0
78.02977418899536 78 12.840989850005977 13507560.0 132725.0 136049.0 350.0 176000.0 194112.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 129587.0 675912.0 672787.0 1.350756 12.974933624267578 0
79.65976929664612 80 12.840750206782312 14317658.0 132813.0 136152.0 372.0 176000.0 194735.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 137124.0 716978.0 713136.0 1.4317658 12.971090316772461 0
81.27913880348206 81 12.840510572611745 14187961.0 132904.0 136244.0 367.0 176000.0 195199.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 135750.0 710761.0 706676.0 1.4187961 12.970865249633789 0
82.9529435634613 83 12.840231010854183 13910727.0 132502.0 135831.0 360.0 176000.0 195978.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 132873.0 696004.0 692868.0 1.3910727 12.970865249633789 0
84.53425788879395 85 12.839991396296913 13531930.0 129727.0 132981.0 351.0 176000.0 196282.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 129159.0 677334.0 674000.0 1.353193 12.970640659332275 0
86.06017804145813 86 12.839751790791125 13317774.0 130789.0 134071.0 344.0 176000.0 197029.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 126891.0 666917.0 663334.0 1.3317774 12.970640659332275 0
87.58882713317871 88 12.839512194336313 13268615.0 131657.0 134957.0 342.0 176000.0 197755.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 126214.0 664496.0 660885.0 1.3268615 12.970640659332275 0
89.09472870826721 89 12.83923267657777 13011736.0 130441.0 133713.0 337.0 176000.0 198507.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 123551.0 651493.0 648091.0 1.3011736 12.970640659332275 0
90.59846782684326 91 12.838993099731642 12881199.0 130027.0 133289.0 333.0 176000.0 199094.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 122147.0 643497.0 641589.0 1.2881199 12.970640659332275 0
92.08028936386108 92 12.838753531934868 12790133.0 130087.0 133345.0 331.0 176000.0 199905.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 121053.0 638955.0 637053.0 1.2790133 12.970640659332275 0
93.58150029182434 94 12.83851397318694 12834368.0 131240.0 134530.0 331.0 176000.0 200638.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 121262.0 642017.0 639257.0 1.2834368 12.970640659332275 0
95.04403614997864 95 12.838234499417075 12637521.0 130089.0 133350.0 326.0 176000.0 201333.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 119226.0 631606.0 629451.0 1.2637521 12.970640659332275 0
96.50900840759277 97 12.837994960273223 12637354.0 130659.0 133932.0 325.0 176000.0 201947.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 119052.0 630979.0 629443.0 1.2637354 12.970640659332275 0
97.9622917175293 98 12.8377554301766 12512178.0 129905.0 133162.0 322.0 176000.0 202625.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 117687.0 625838.0 623209.0 1.2512178 12.970640659332275 0
99.4434289932251 99 12.837515909126692 12594937.0 131298.0 134585.0 325.0 176000.0 203015.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 118372.0 630064.0 627330.0 1.2594937 12.970640659332275 0
100.88923001289368 101 12.837236479335163 12454997.0 130450.0 133716.0 321.0 176000.0 203663.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 116875.0 623655.0 620361.0 1.2454997 12.970640659332275 0
102.3528220653534 102 12.836996977884722 12557884.0 132066.0 135368.0 324.0 176000.0 203684.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 117871.0 628593.0 625485.0 1.2557884 12.970640659332275 0
103.81347036361694 104 12.836757485479385 12322402.0 130010.0 133263.0 318.0 176000.0 204031.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 115522.0 616951.0 613755.0 1.2322402 12.970640659332275 0
105.3507866859436 105 12.836518002118636 13199950.0 130016.0 133277.0 341.0 176000.0 204033.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 123746.0 659889.0 657464.0 1.319995 12.967034339904785 0
106.87671041488647 107 12.836238616295107 13099760.0 129398.0 132646.0 339.0 176000.0 203888.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 122852.0 654759.0 652474.0 1.309976 12.966807842254639 0
108.4960868358612 108 12.83599915252922 13344095.0 132315.0 135638.0 345.0 176000.0 203579.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 125255.0 667323.0 664645.0 1.3344095 12.966807842254639 0
110.02471208572388 110 12.835759697806308 13279434.0 132113.0 135429.0 343.0 176000.0 203069.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 124805.0 663030.0 661424.0 1.3279434 12.966575145721436 0
111.53807544708252 112 12.835480345391547 13105834.0 131030.0 134315.0 339.0 176000.0 202357.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 123331.0 655230.0 652776.0 1.3105834 12.966575145721436 0
113.06293654441833 113 12.835240910259994 12995957.0 130452.0 133725.0 335.0 176000.0 201502.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 122537.0 649663.0 647304.0 1.2995957 12.966575145721436 0
114.60532069206238 115 12.835001484169807 12952024.0 130581.0 133850.0 333.0 176000.0 200271.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 122466.0 646653.0 645115.0 1.2952024 12.966575145721436 0
116.10684776306152 116 12.834762067120467 12918792.0 130781.0 134049.0 333.0 176000.0 198790.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 122582.0 645546.0 643461.0 1.2918792 12.966575145721436 0
117.58471918106079 118 12.834482758655517 12732448.0 129461.0 132702.0 330.0 176000.0 196971.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 121322.0 636555.0 634179.0 1.2732448 12.966349601745605 0
119.08403134346008 119 12.834243361192934 12719696.0 129701.0 132947.0 330.0 176000.0 195122.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 121717.0 634802.0 633544.0 1.2719696 12.966349601745605 0
120.58183860778809 121 12.834003972769585 12775504.0 130744.0 134013.0 330.0 176000.0 192916.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 122899.0 637931.0 636324.0 1.2775504 12.966349601745605 0
122.04636073112488 122 12.833764593384961 12655073.0 130021.0 133273.0 328.0 176000.0 190519.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 122408.0 632557.0 630325.0 1.2655073 12.966349601745605 0
123.52643322944641 124 12.833485328859496 12809042.0 132179.0 135483.0 332.0 176000.0 187367.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 124832.0 640512.0 637994.0 1.2809042 12.966349601745605 0
124.98981046676636 125 12.833245969057028 12599137.0 130481.0 133747.0 326.0 176000.0 184376.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 123664.0 629936.0 627539.0 1.2599137 12.966349601745605 0
126.44983410835266 126 12.833006618291671 12560869.0 130622.0 133890.0 326.0 176000.0 181029.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 124267.0 627879.0 625633.0 1.2560869 12.966349601745605 0
127.89257955551147 128 12.832767276562912 12477375.0 130297.0 133556.0 324.0 176000.0 177304.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 124577.0 624110.0 621474.0 1.2477375 12.966349601745605 0
129.32965636253357 129 12.832488055966605 12337597.0 129430.0 132669.0 320.0 176000.0 172461.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 124662.0 617671.0 614513.0 1.2337597 12.966123580932617 0
130.77924489974976 131 12.832248733815403 12281654.0 129279.0 132511.0 319.0 176000.0 168198.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 125434.0 614123.0 611726.0 1.2281654 12.966123580932617 0
132.40062165260315 132 12.832009420699185 13543586.0 130141.0 133410.0 352.0 176000.0 163209.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 140095.0 677461.0 674581.0 1.3543586 12.961384296417236 0
133.9843430519104 134 12.831730233482139 13544234.0 130267.0 133537.0 352.0 176000.0 157347.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 142263.0 677246.0 674613.0 1.3544234 12.961159706115723 0
135.53506183624268 136 12.831490939939977 13537243.0 130685.0 133966.0 352.0 176000.0 152038.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 144197.0 676571.0 674264.0 1.3537243 12.960925102233887 0
137.08969473838806 137 12.831251655431192 13609180.0 131812.0 135120.0 355.0 176000.0 146422.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 147180.0 678908.0 677848.0 1.360918 12.960925102233887 0
138.66383171081543 139 12.831012379955272 13487171.0 131139.0 134429.0 351.0 176000.0 140632.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 148229.0 673472.0 671771.0 1.3487171 12.960925102233887 0
140.20697593688965 140 12.830733236649218 13442007.0 131436.0 134731.0 349.0 176000.0 133810.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 150625.0 671877.0 669521.0 1.3442007 12.960925102233887 0
141.77394795417786 142 12.830493980742755 13300309.0 130486.0 133761.0 346.0 176000.0 127974.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 151630.0 665389.0 662463.0 1.3300309 12.960925102233887 0
143.30241107940674 143 12.830254733867541 13190836.0 129907.0 133164.0 343.0 176000.0 121933.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 153153.0 659091.0 657010.0 1.3190836 12.960710048675537 0
144.82952189445496 145 12.830015496023071 13174054.0 130328.0 133596.0 342.0 176000.0 116327.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 155646.0 659507.0 656176.0 1.3174054 12.960710048675537 0
146.36298942565918 146 12.8297363966177 13178167.0 130879.0 134160.0 341.0 176000.0 109937.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 158942.0 659607.0 656379.0 1.3178167 12.960710048675537 0
147.87587308883667 148 12.829497178338091 13091214.0 130603.0 133876.0 340.0 176000.0 104726.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 160660.0 652987.0 652048.0 1.3091214 12.960710048675537 0
149.37848901748657 149 12.829257969087609 12910644.0 129417.0 132657.0 335.0 176000.0 100095.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 161003.0 644286.0 643055.0 1.2910644 12.960710048675537 0
150.890695810318 151 12.82901876886575 13081714.0 131514.0 134801.0 338.0 176000.0 95929.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 165541.0 654533.0 651576.0 1.3081714 12.960710048675537 0
152.38252997398376 152 12.82873971335074 12877069.0 130073.0 133333.0 332.0 176000.0 92120.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 165243.0 645226.0 641383.0 1.2877069 12.960710048675537 0
153.86361527442932 154 12.82850053268915 12796743.0 129856.0 133105.0 331.0 176000.0 89506.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 165819.0 640171.0 637381.0 1.2796743 12.960710048675537 0
155.37868857383728 155 12.828261361054563 12736759.0 129756.0 132997.0 329.0 176000.0 87766.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 166141.0 634995.0 634394.0 1.2736759 12.960710048675537 0
156.84859657287598 157 12.827982338889338 12669534.0 129687.0 132925.0 327.0 176000.0 87032.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 165739.0 632793.0 631046.0 1.2669534 12.960710048675537 0
158.3807246685028 158 12.827743186811528 12584351.0 129201.0 132428.0 325.0 176000.0 87396.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 164426.0 628598.0 626803.0 1.2584351 12.960710048675537 0
159.85981845855713 160 12.827504043759117 12647266.0 130284.0 133536.0 327.0 176000.0 88817.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 164361.0 631949.0 629937.0 1.2647266 12.960710048675537 0
161.3130645751953 161 12.82726490973159 12495959.0 129188.0 132413.0 323.0 176000.0 91328.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 160892.0 625205.0 622400.0 1.2495959 12.960710048675537 0
162.77377200126648 163 12.826985931438585 12540483.0 130116.0 133368.0 324.0 176000.0 95585.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 159005.0 625979.0 624618.0 1.2540483 12.960476875305176 0
164.2250270843506 164 12.82674681696324 12435299.0 129632.0 132863.0 321.0 176000.0 100236.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 155132.0 623061.0 619379.0 1.2435299 12.960710048675537 0
165.78249049186707 166 12.826507711511171 13473052.0 130346.0 133608.0 349.0 176000.0 106202.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 164674.0 673828.0 671068.0 1.3473052 12.956860542297363 0
167.3344373703003 167 12.82626861508187 13506743.0 130880.0 134159.0 350.0 176000.0 112908.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 161504.0 674372.0 672746.0 1.3506743 12.956410884857178 0
168.91401958465576 169 12.825989680650787 13493338.0 131376.0 134663.0 349.0 176000.0 121701.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 156982.0 673378.0 672078.0 1.3493338 12.956410884857178 0
170.45056533813477 170 12.825750603769075 13338516.0 130325.0 133589.0 345.0 176000.0 130035.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 151299.0 668210.0 664367.0 1.3338516 12.956186294555664 0
171.99860191345215 172 12.825511535908522 13509574.0 132598.0 135908.0 349.0 176000.0 138711.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 149522.0 675291.0 672887.0 1.3509574 12.956186294555664 0
173.4987919330597 173 12.825232634805605 13005399.0 128192.0 131399.0 337.0 176000.0 149123.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 139747.0 649129.0 647775.0 1.3005399 12.956186294555664 0
175.00592231750488 175 12.824993586489152 13082652.0 129421.0 132659.0 340.0 176000.0 158402.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 137152.0 654610.0 651623.0 1.3082652 12.95596170425415 0
176.5152130126953 177 12.824754547192248 13030886.0 129556.0 132794.0 338.0 176000.0 167643.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 133384.0 651895.0 649044.0 1.3030886 12.95596170425415 0
178.01437067985535 178 12.82451551691438 13019018.0 129924.0 133172.0 338.0 176000.0 176620.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 130328.0 651714.0 648452.0 1.3019018 12.95596170425415 0
179.50164127349854 180 12.824236659655256 12896671.0 129434.0 132667.0 334.0 176000.0 186735.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 125953.0 645095.0 642360.0 1.2896671 12.95596170425415 0
181.02135062217712 181 12.8239976489169 12922341.0 130203.0 133455.0 335.0 176000.0 195050.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 123765.0 645953.0 643638.0 1.2922341 12.95596170425415 0
182.52409482002258 183 12.823758647195971 12942735.0 130961.0 134231.0 334.0 176000.0 203166.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 121671.0 645800.0 644653.0 1.2942735 12.95596170425415 0
184.07388019561768 184 12.823519654491967 12716547.0 129043.0 132271.0 330.0 176000.0 210421.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 117580.0 636235.0 633386.0 1.2716547 12.95596170425415 0
185.58308935165405 186 12.823240841066337 12844414.0 130853.0 134120.0 332.0 176000.0 218439.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 116704.0 642688.0 639755.0 1.2844414 12.95596170425415 0
187.04948210716248 187 12.823001867897256 12665472.0 129486.0 132724.0 327.0 176000.0 224943.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 113416.0 633430.0 630842.0 1.2665472 12.95596170425415 0
188.50267338752747 189 12.822762903743486 12565838.0 129080.0 132307.0 325.0 176000.0 230986.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 111061.0 628386.0 625880.0 1.2565838 12.95596170425415 0
189.98093819618225 190 12.822484123624431 12531118.0 129170.0 132395.0 325.0 176000.0 237429.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 109267.0 627129.0 624151.0 1.2531118 12.95596170425415 0
191.42252373695374 191 12.822245179002094 12397576.0 128306.0 131514.0 321.0 176000.0 242314.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 106981.0 620185.0 617500.0 1.2397576 12.95596170425415 0
192.8789610862732 193 12.822006243393465 12491014.0 129710.0 132949.0 324.0 176000.0 247006.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 106760.0 625596.0 622154.0 1.2491014 12.95596170425415 0
194.43312811851501 194 12.82176731679803 13529992.0 130586.0 133855.0 350.0 176000.0 251364.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 114596.0 677843.0 673903.0 1.3529992 12.951448917388916 0
195.9606475830078 196 12.82148858049436 13318706.0 128882.0 132110.0 346.0 176000.0 255942.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 111746.0 665426.0 663380.0 1.3318706 12.951448917388916 0
197.50985980033875 198 12.821249673425777 13273658.0 128877.0 132105.0 344.0 176000.0 259473.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 110576.0 663819.0 661136.0 1.3273658 12.95122241973877 0
199.02913665771484 199 12.821010775368784 13184254.0 128497.0 131715.0 342.0 176000.0 262693.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 109124.0 659296.0 656682.0 1.3184254 12.95122241973877 0
200.55461835861206 201 12.820732072357924 13242973.0 129771.0 133012.0 344.0 176000.0 266164.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 108867.0 662083.0 659608.0 1.3242973 12.95122241973877 0
202.1740117073059 202 12.820493193824296 13146697.0 129316.0 132549.0 343.0 176000.0 268983.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 107467.0 657863.0 654812.0 1.3146697 12.95122241973877 0
203.70105838775635 204 12.820254324300645 13189686.0 130154.0 133408.0 343.0 176000.0 271565.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 107268.0 660218.0 656953.0 1.3189686 12.950997829437256 0
205.21262645721436 205 12.820015463786465 12989589.0 128077.0 131275.0 339.0 176000.0 273805.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 105181.0 650524.0 646987.0 1.2989589 12.950997829437256 0
206.719055891037 207 12.81973680457289 12899652.0 129117.0 132333.0 336.0 176000.0 276422.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 103911.0 645154.0 642507.0 1.2899652 12.950997829437256 0
208.28750944137573 208 12.819497963577499 12926759.0 129866.0 133104.0 337.0 176000.0 278416.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 103739.0 647567.0 643858.0 1.2926759 12.950997829437256 0
209.7614724636078 210 12.81925913158997 12810282.0 129228.0 132449.0 333.0 176000.0 280160.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 102454.0 641676.0 638056.0 1.2810282 12.950997829437256 0
211.23619866371155 211 12.81898050565545 12736020.0 129142.0 132356.0 331.0 176000.0 282116.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 101474.0 637319.0 634357.0 1.273602 12.950772762298584 0
212.69947600364685 213 12.818741693183226 12699152.0 129228.0 132446.0 330.0 176000.0 283801.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 100845.0 635005.0 632521.0 1.2699152 12.950772762298584 0
214.17663097381592 214 12.818502889717257 12546910.0 128264.0 131457.0 325.0 176000.0 285117.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 99387.0 627182.0 624938.0 1.254691 12.950772762298584 0
215.62778568267822 216 12.818264095257037 12453013.0 127743.0 130922.0 322.0 176000.0 286451.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 98384.0 622555.0 620262.0 1.2453013 12.950772762298584 0
217.0792109966278 217 12.817985513101709 12494797.0 128748.0 131947.0 323.0 176000.0 287990.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98418.0 624253.0 622342.0 1.2494797 12.950772762298584 0
218.54941940307617 219 12.817746738152216 12533880.0 129627.0 132842.0 324.0 176000.0 289053.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98542.0 626448.0 624289.0 1.253388 12.950772762298584 0
220.00488018989563 220 12.817507972206863 12424466.0 129017.0 132218.0 320.0 176000.0 290315.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 97429.0 620593.0 618840.0 1.2424466 12.950772762298584 0
221.4188175201416 221 12.817269215265148 12243064.0 127437.0 130604.0 315.0 176000.0 291331.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 95809.0 612391.0 609804.0 1.2243064 12.950772762298584 0
222.83741068840027 223 12.816990676878737 12256129.0 128149.0 131333.0 316.0 176000.0 292423.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 95710.0 613313.0 610455.0 1.2256129 12.950772762298584 0
224.3907825946808 224 12.816751939443161 13280849.0 128434.0 131636.0 345.0 176000.0 293219.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 103571.0 663840.0 661495.0 1.3280849 12.946485996246338 0
225.92577505111694 226 12.816513211009621 13293786.0 128755.0 131959.0 345.0 176000.0 294025.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 103501.0 663184.0 662139.0 1.3293786 12.946259498596191 0
227.4493215084076 227 12.816234705880715 13196830.0 128454.0 131650.0 343.0 176000.0 294999.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 102555.0 658814.0 657310.0 1.319683 12.946259498596191 0
228.97948503494263 229 12.815995996949836 13229140.0 129270.0 132480.0 343.0 176000.0 295685.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 102677.0 660358.0 658919.0 1.322914 12.946259498596191 0
230.49111700057983 230 12.815757297019381 13056476.0 127979.0 131165.0 339.0 176000.0 296374.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 101195.0 650853.0 650318.0 1.3056476 12.946259498596191 0
232.00115704536438 232 12.815518606088846 13039909.0 128376.0 131568.0 338.0 176000.0 296944.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 100969.0 652374.0 649494.0 1.3039909 12.946036338806152 0
233.56385111808777 234 12.815240144710781 13021301.0 128763.0 131965.0 337.0 176000.0 297646.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 100687.0 651638.0 648567.0 1.3021301 12.946036338806152 0
235.0759539604187 235 12.815001473278333 12886428.0 127933.0 131113.0 333.0 176000.0 298160.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99548.0 645316.0 641849.0 1.2886428 12.946036338806152 0
236.5812063217163 237 12.8147628108442 12813831.0 127713.0 130882.0 332.0 176000.0 298660.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98886.0 641185.0 638233.0 1.2813831 12.946036338806152 0
238.0722143650055 238 12.814484382709903 12841543.0 128594.0 131785.0 333.0 176000.0 299287.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98987.0 642396.0 639613.0 1.2841543 12.946036338806152 0
239.5910029411316 240 12.814245739770382 12777948.0 128568.0 131759.0 330.0 176000.0 299651.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98439.0 638944.0 636446.0 1.2777948 12.946036338806152 0
241.07947778701782 241 12.814007105827564 12831470.0 129472.0 132685.0 332.0 176000.0 300121.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98759.0 641812.0 639112.0 1.283147 12.946036338806152 0
242.55555129051208 243 12.813768480880949 12600555.0 127632.0 130801.0 326.0 176000.0 300486.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 96907.0 631117.0 627610.0 1.2600555 12.946036338806152 0
244.0464804172516 244 12.813490096479427 12647489.0 128641.0 131835.0 327.0 176000.0 300918.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 97189.0 633301.0 629948.0 1.2647489 12.946036338806152 0
245.49949288368225 245 12.813251491022848 12535244.0 128130.0 131310.0 324.0 176000.0 301237.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 96268.0 626242.0 624358.0 1.2535244 12.946036338806152 0
246.96322560310364 247 12.81301289456087 12629941.0 129539.0 132752.0 327.0 176000.0 301377.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 96994.0 631194.0 629074.0 1.2629941 12.946036338806152 0
248.43793487548828 248 12.812734543389393 12531241.0 129157.0 132356.0 323.0 176000.0 301857.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 96127.0 626284.0 624158.0 1.2531241 12.946036338806152 0
249.88044095039368 250 12.812495966413971 12422112.0 128380.0 131563.0 320.0 176000.0 301984.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 95290.0 620699.0 618723.0 1.2422112 12.94580364227295 0
251.31589555740356 251 12.812257398431546 12344181.0 128102.0 131277.0 319.0 176000.0 302341.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 94608.0 617404.0 614841.0 1.2344181 12.94580364227295 0
252.75299787521362 253 12.812018839441611 12376746.0 128819.0 132014.0 320.0 176000.0 302534.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 94825.0 619461.0 616462.0 1.2376746 12.94580364227295 0
254.2619285583496 254 12.81174053198485 13137352.0 128291.0 131484.0 341.0 176000.0 302920.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 100578.0 657720.0 654347.0 1.3137352 12.941973209381104 0
255.78859949111938 256 12.8115019924769 13238545.0 129413.0 132634.0 342.0 176000.0 303187.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 101307.0 661503.0 659388.0 1.3238545 12.94175100326538 0
257.29416275024414 257 12.811263461959838 13077040.0 128273.0 131471.0 338.0 176000.0 303343.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 100036.0 652504.0 651344.0 1.307704 12.941524982452393 0
258.888386964798 259 12.810985187719401 13221418.0 130179.0 133421.0 342.0 176000.0 303570.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 101113.0 660352.0 658534.0 1.3221418 12.941524982452393 0
260.38158202171326 260 12.809991451027333 12902498.0 129223.0 132435.0 332.0 176000.0 304216.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98554.0 644769.0 642649.0 1.2902498 12.941524982452393 0
261.85409665107727 262 12.808004445714923 12684316.0 131264.0 134513.0 328.0 176000.0 305198.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 96732.0 633906.0 631782.0 1.2684316 12.941524982452393 0
263.4807093143463 263 12.806018064254234 13616118.0 131557.0 134825.0 353.0 176000.0 306046.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 103668.0 679271.0 678194.0 1.3616118 12.93588924407959 0
265.03062415122986 265 12.80399259755298 13475098.0 134409.0 137744.0 350.0 176000.0 306910.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 102486.0 672754.0 671170.0 1.3475098 12.93588924407959 0
266.5809111595154 267 12.80200747538062 12606616.0 130024.0 133248.0 326.0 176000.0 319579.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 93615.0 630576.0 627912.0 1.2606616 12.935431003570557 0
268.12656140327454 268 12.799983292545255 13443596.0 129385.0 132594.0 349.0 176000.0 306749.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 102199.0 671419.0 669600.0 1.3443596 12.928892612457275 0
269.6896631717682 270 12.79799942846903 12930513.0 128315.0 131490.0 336.0 176000.0 305597.0 0.0 0.0 0.0 3.0 0.0 0.0 0.0 98513.0 646595.0 644045.0 1.2930513 12.928666591644287 0
271.1838493347168 271 12.796016186771949 12634711.0 129508.0 132703.0 328.0 176000.0 305178.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 96366.0 631727.0 629311.0 1.2634711 12.928218364715576 0
272.7378966808319 273 12.793993921113483 12910704.0 128265.0 131427.0 336.0 176000.0 305108.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 98462.0 646545.0 643059.0 1.2910704 12.923699855804443 0
274.22263956069946 274 12.792011935732944 12603190.0 129388.0 132568.0 326.0 176000.0 304664.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 96212.0 631467.0 627742.0 1.260319 12.923476696014404 0
275.7042496204376 276 12.789990950911047 12081678.0 128052.0 131191.0 312.0 176000.0 304151.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 92309.0 604080.0 601766.0 1.2081678 12.923476696014404 0
277.20096826553345 277 12.788010220658597 12704062.0 128673.0 131822.0 329.0 176000.0 303482.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 97211.0 636177.0 632765.0 1.2704062 12.918304443359375 0
278.69198179244995 279 12.785990515461815 12297391.0 128723.0 131863.0 317.0 176000.0 303216.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 94134.0 616376.0 612511.0 1.2297391 12.918078422546387 0
280.1841650009155 280 12.784011039150498 12695920.0 127335.0 130445.0 327.0 176000.0 302803.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 97232.0 635185.0 632360.0 1.269592 12.912889957427979 0
281.66319513320923 282 12.781992612368908 12170792.0 125795.0 128863.0 314.0 176000.0 301928.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 93374.0 610092.0 606204.0 1.2170792 12.912666320800781 0
283.0623068809509 283 12.780014388813267 11987619.0 127767.0 130870.0 309.0 176000.0 301739.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 92007.0 600279.0 597081.0 1.1987619 12.912666320800781 0
284.5834515094757 285 12.777997239238458 12502896.0 127543.0 130646.0 324.0 176000.0 308905.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 94682.0 625500.0 622746.0 1.2502896 12.907702922821045 0
286.0008897781372 286 12.77598073413118 12191748.0 128345.0 131456.0 314.0 176000.0 298631.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 94130.0 609408.0 607248.0 1.2191748 12.907702922821045 0
#C Tue Sep 15 19:42:19 2020.  num_events_baseline = 2
#C Tue Sep 15 19:42:19 2020.  num_events_primary = 183
#C Tue Sep 15 19:42:19 2020.  exit_status = success

@prjemian
Copy link
Contributor

This file can be read by pymca and content is plotted.
Clipboard01

@gfabbris Did some other scan (uid) produce the same problem? I'm not seeing it with 624e776a. Can we reproduce it?

@gfabbris
Copy link
Collaborator Author

This is odd. This how that scan appears in the spec file generated during the scan:

Screen Shot 2020-11-16 at 11 18 33 AM

@prjemian
Copy link
Contributor

Indeed. Plot shows more than the 7 points described in the upper, left panel. Can you post the header block and the specific scan block from that file here? Use three ` characters on a line before and after each block.

@gfabbris
Copy link
Collaborator Author

Here is the header of that scan:

#S 287  qxscan(detectors=['scalerd'], edge_energy=12.826, qx_setup={'num_preedge': 1, 'preedge_params': [{'relative_energy_start': -50.0, 'energy_increment': 2.0}], 'edge_params': {'relative_energy_start': -15.0, 'relative_energy_end': 15.0, 'energy_increment': 0.25}, 'num_postedge': 1, 'postedge_params': [{'relative_k_end': 5.0, 'k_increment': 0.07}], 'relative_energy': array([ 0.09524955,  0.09502848,  0.09238326,  0.08977537,  0.08720483,
        0.08467162,  0.08217575,  0.07971722,  0.07729602,  0.07491216,
        0.07256564,  0.07025646,  0.06798462,  0.06575011,  0.06355295,
        0.06139312,  0.05927062,  0.05718547,  0.05513765,  0.05312717,
        0.05115403,  0.04921823,  0.04731977,  0.04545864,  0.04363485,
        0.0418484 ,  0.04009928,  0.03838751,  0.03671307,  0.03507597,
        0.03347621,  0.03191378,  0.03038869,  0.02890094,  0.02745053,
        0.02603746,  0.02466172,  0.02332333,  0.02202227,  0.02075854,
        0.01953216,  0.01834311,  0.0171914 ,  0.01607703,  0.015     ,
        0.01475   ,  0.0145    ,  0.01425   ,  0.014     ,  0.01375   ,
        0.0135    ,  0.01325   ,  0.013     ,  0.01275   ,  0.0125    ,
        0.01225   ,  0.012     ,  0.01175   ,  0.0115    ,  0.01125   ,
        0.011     ,  0.01075   ,  0.0105    ,  0.01025   ,  0.01      ,
        0.00975   ,  0.0095    ,  0.00925   ,  0.009     ,  0.00875   ,
        0.0085    ,  0.00825   ,  0.008     ,  0.00775   ,  0.0075    ,
        0.00725   ,  0.007     ,  0.00675   ,  0.0065    ,  0.00625   ,
        0.006     ,  0.00575   ,  0.0055    ,  0.00525   ,  0.005     ,
        0.00475   ,  0.0045    ,  0.00425   ,  0.004     ,  0.00375   ,
        0.0035    ,  0.00325   ,  0.003     ,  0.00275   ,  0.0025    ,
        0.00225   ,  0.002     ,  0.00175   ,  0.0015    ,  0.00125   ,
        0.001     ,  0.00075   ,  0.0005    ,  0.00025   ,  0.        ,
       -0.00025   , -0.0005    , -0.00075   , -0.001     , -0.00125   ,
       -0.0015    , -0.00175   , -0.002     , -0.00225   , -0.0025    ,
       -0.00275   , -0.003     , -0.00325   , -0.0035    , -0.00375   ,
       -0.004     , -0.00425   , -0.0045    , -0.00475   , -0.005     ,
       -0.00525   , -0.0055    , -0.00575   , -0.006     , -0.00625   ,
       -0.0065    , -0.00675   , -0.007     , -0.00725   , -0.0075    ,
       -0.00775   , -0.008     , -0.00825   , -0.0085    , -0.00875   ,
       -0.009     , -0.00925   , -0.0095    , -0.00975   , -0.01      ,
       -0.01025   , -0.0105    , -0.01075   , -0.011     , -0.01125   ,
       -0.0115    , -0.01175   , -0.012     , -0.01225   , -0.0125    ,
       -0.01275   , -0.013     , -0.01325   , -0.0135    , -0.01375   ,
       -0.014     , -0.01425   , -0.0145    , -0.01475   , -0.015     ,
       -0.016     , -0.018     , -0.02      , -0.022     , -0.024     ,
       -0.026     , -0.028     , -0.03      , -0.032     , -0.034     ,
       -0.036     , -0.038     , -0.04      , -0.042     , -0.044     ,
       -0.046     , -0.048     , -0.05      ])})
#D Tue Sep 15 19:37:32 2020
#C Tue Sep 15 19:37:32 2020.  plan_type = generator
#C Tue Sep 15 19:37:32 2020.  uid = 624e776a-a914-4a74-8841-babf1591fb29
#MD uid = 624e776a-a914-4a74-8841-babf1591fb29
#MD beamline_id = 4-ID-Polar
#MD detectors = ['scalerd']
#MD edge = IrL2
#MD login_id = polar@elevate.xray.aps.anl.gov
#MD num_intervals = 182
#MD num_points = 183
#MD pid = 30808
#MD positioners = ['monochromator_energy', 'undulator_downstream_energy']
#MD pressure = 10.8
#MD proposal_id = testing
#MD versions = {'apstools': '1.3.4', 'bluesky': '1.6.5', 'databroker': '1.0.6', 'epics': '3.4.2', 'matplotlib': '3.2.2', 'numpy': '1.19.1', 'ophyd': '1.5.2', 'pyRestTable': '2020.0.2', 'spec2nexus': '2021.1.7'}
#P0 
#N 22
#L Epoch_float  Epoch  monochromator_energy  Time  Ion Ch 1  Ion Ch 2  Ion Ch 3  Ion Ch 4  Ion Ch 5  Cyber8C  CyberMagSCA3  Cyber YapSCA4  APDSector4  SCA1  SCA2  Photodiode  Lock DC  Lock AC  Lock AC off  scalerd_time  undulator_downstream_energy  scalerd

@gfabbris
Copy link
Collaborator Author

it's interesting that the data is correctly saved into the file, but pymca can't read it for some reason. Also, this issue happens to every plan_name = 'qxscan' that was done with undulator.downstream.tracking = True. Some other uids:

["80189504", "66162013", "dbfb8569", "01c00ad3", "438c22f7", "fd556ea8", "44a37678", "e9ab3f2e", "99246337", 
"a9f017c0", "e36530e8", "0cf82df2", "33368365", "f7404f69", "2f97ffde", "ec074bf5", "2c8b8643", "b5356a90", 
"2b1ac1be", "d5cbe090", "ef420661", "e0cda546", "c5707e56", "da74c47a", "8909550b", "cc28bdba", "c13c24cc", 
"8fc1c55d", "f97300e5", "5a53bb8b", "20a5bc3c", "a884358c", "9e057ad8", "131a35c9", "24f668fe", "006ddfe2", 
"ba7e00ed", "54f60287", "9431b654", "6bf7a118", "1a61dfdb", "ce2af7a7", "b986595e", "391b4fc0", "84abba7e",
 "e0c618b5", "dd1c35c5", "c2d3dd52", "1989d9bb", "0f6d96cd", "992b92df", "b83c1c89", "b1667cc8", "4ff4527c", 
"efb51560", "e9b29d1b",]

@prjemian
Copy link
Contributor

If it is true that the #S line is multi-line (as shown) and not all on one line, that is the problem. The additional lines would be interpreted as data lines. In the example shown earlier, the #S line is all one one line.

@gfabbris
Copy link
Collaborator Author

Yeah, that's probably the issue, I tested in a text editor and It does break into lines. It's interesting that your SpecWriterCallback works, but the one at the beamline doesn't, was it updated recently? We are using apstools 1.3.4.

@gfabbris
Copy link
Collaborator Author

Note, by the way, that the qx_scan parameters are not saved in the start document anymore. They are now a device that is read in the baseline stream.

@prjemian
Copy link
Contributor

prjemian commented Nov 16, 2020 via email

@prjemian
Copy link
Contributor

You were running 1.3.4 but there have been no changes to the SPEC writer since that version.

In [1]: from databroker import catalog

In [2]: run = catalog["4id_polar"]["624e776a"]

In [4]: run._run_start_doc["versions"]["apstools"]
Out[4]: '1.3.4'

Same version as you have today, by the way:

In [5]: run = catalog["4id_polar"][-1]

In [6]: run
Out[6]: 
BlueskyRun
  uid='637992e6-3d7b-4e4a-9dd4-ed82d881e89e'
  exit_status='success'
  2020-11-19 11:15:48.774 -- 2020-11-19 11:16:20.291
  Streams:
    * primary
    * baseline


In [7]: run._run_start_doc["versions"]["apstools"]
Out[7]: '1.3.4'

@prjemian
Copy link
Contributor

Going through the same steps with the installation as-is on the polar account:

ipython steps
lift% bash
bash-4.2$ export CONDA_ACTIVATE=/APSshare/miniconda/x86_64/bin/activate
bash-4.2$ export CONDA_ENVIRONMENT=bluesky_2020_9
bash-4.2$ 
bash-4.2$ source ${CONDA_ACTIVATE} ${CONDA_ENVIRONMENT}
(bluesky_2020_9) bash-4.2$ ipython
Python 3.8.2 (default, Mar 26 2020, 15:53:00) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from databroker import catalog                                                                                        

In [4]: cat = catalog["mongodb_config"]                                                                                       

In [5]: db = cat.v1                                                                                                           

In [6]: h = db["624e776a"]                                                                                                    

In [7]: h.start["versions"]["apstools"]                                                                                       
Out[7]: '1.3.4'

In [8]: import apstools                                                                                                       

In [9]: apstools.__version__                                                                                                  
Out[9]: '1.3.4'

In [10]: from apstools.filewriters import SpecWriterCallback                                                                  

In [11]: specwriter = SpecWriterCallback()                                                                                    

In [12]: !pwd                                                                                                                 
/home/beams/POLAR

In [13]: for key, doc in db.get_documents(db["624e776a"]): 
    ...:     specwriter.receiver(key, doc) 
    ...:                                                                                                                      

In [14]: print("Look at SPEC data file: "+specwriter.spec_filename)                                                           
Look at SPEC data file: 20201119-150646.dat

In [15]: !code -n 20201119-150646.dat                                                                                         

Looking at the SPEC file these steps produced just now, the first line of the scan is all one line, not broken into several.

Clipboard01

@prjemian
Copy link
Contributor

@gfabbris : Can you reproduce the error with a new scan?

@prjemian prjemian modified the milestones: 1.3.9, 1.3.10 Nov 19, 2020
@gfabbris
Copy link
Collaborator Author

This issue came up when I had qx_setup as a variable passed to qxscan. But this is not how it's done anymore, these are now placed in the qxscan_params device. So, I think issue won't come up with this scan anymore.

I wonder if this has anything to do with having a plan with some "long" argument.

@gfabbris
Copy link
Collaborator Author

Ok, I could reproduce the problem, and also I think I understand what's causing it. It seems to me that the problem comes up if one of the argument is a numpy.array. Here it is:

Using my computer, I imported ophyd.sim.motor and ophyd.sim.det. I'm using apstools 1.2.6, and defined the plan below.

In [66]: def new_plan(detector,positioner,start,end,points,longvariable): 
    ...:   
    ...:     positioner = [positioner] 
    ...:     _md = {'detectors': [det.name for det in detector], 
    ...:            'motors': [pos.name for pos in positioner], 
    ...:            'num_points': points, 
    ...:            'num_intervals': points - 1, 
    ...:            'plan_args': {'detectors': list(map(repr, detector)), 
    ...:                          'motor': list(map(repr,positioner)), 
    ...:                          'start': start, 
    ...:                          'end': end, 
    ...:                          'points': points, 
    ...:                          'longvariable':longvariable}, 
    ...:            'plan_name': 'new_plan', 
    ...:            'hints': {}, 
    ...:            } 
    ...:      
    ...:     steps = np.linspace(start,end,points) 
    ...:  
    ...:     @run_decorator(md=_md) 
    ...:     def _innerscan(): 
    ...:         for step in steps: 
    ...:             grp = short_uid('set') 
    ...:             yield Msg('checkpoint') 
    ...:             yield from mv(positioner[0],step,group=grp) 
    ...:             yield from trigger_and_read(detector + positioner) 
    ...:      
    ...:     yield from _innerscan() 

Then I ran:

In [79]: short_var = {'short':np.linspace(0,10,2)}                                                                                                                                               

In [80]: RE(new_plan([det],motor,-1,1,10,short_var))                                                                                                                                             
Out[80]: ('15559cd9-12a6-4fb4-a49c-d7e30d8a171c',)

In [81]: long_var = {'long':np.linspace(0,10,100)}                                                                                                                                               

In [82]: RE(new_plan([det],motor,-1,1,10,long_var))                                                                                                                                              
Out[82]: ('66b3190b-9097-4278-907c-141e619859f2',)

In [83]: long_var = {'long':list(np.linspace(0,10,100))}                                                                                                                                         

In [84]: RE(new_plan([det],motor,-1,1,10,long_var))                                                                                                                                              
Out[84]: ('aa538833-776f-43d2-ae5c-2f6429e2eaa8',)

This is the spec file it generated.

#S 17  new_plan(detectors=['det'], motor=['motor'], start=-1, end=1, points=10, longvariable={'short': array([ 0., 10.])})
#D Sat Nov 21 17:38:31 2020
#C Sat Nov 21 17:38:31 2020.  plan_type = generator
#C Sat Nov 21 17:38:31 2020.  uid = 15559cd9-12a6-4fb4-a49c-d7e30d8a171c
#MD uid = 15559cd9-12a6-4fb4-a49c-d7e30d8a171c
#MD detectors = ['det']
#MD motors = ['motor']
#MD num_intervals = 9
#MD num_points = 10
#MD versions = {'ophyd': '1.5.2', 'bluesky': '1.6.4'}
#P0 
#N 5
#L motor  Epoch_float  Epoch  motor_setpoint  det
-1.0 0.015300989151000977 0 -1.0 0.6065306597126334
-0.7777777777777778 0.02045917510986328 0 -0.7777777777777778 0.7389912962803088
-0.5555555555555556 0.024955034255981445 0 -0.5555555555555556 0.8569968914352789
-0.33333333333333337 0.030132055282592773 0 -0.33333333333333337 0.9459594689067654
-0.11111111111111116 0.03316497802734375 0 -0.11111111111111116 0.9938461733264412
0.11111111111111116 0.03566908836364746 0 0.11111111111111116 0.9938461733264412
0.33333333333333326 0.038001060485839844 0 0.33333333333333326 0.9459594689067655
0.5555555555555554 0.0407719612121582 0 0.5555555555555554 0.856996891435279
0.7777777777777777 0.04359698295593262 0 0.7777777777777777 0.7389912962803089
1.0 0.05047798156738281 0 1.0 0.6065306597126334
#C Sat Nov 21 17:38:31 2020.  num_events_primary = 10
#C Sat Nov 21 17:38:31 2020.  exit_status = success

#S 18  new_plan(detectors=['det'], motor=['motor'], start=-1, end=1, points=10, longvariable={'long': array([ 0.        ,  0.1010101 ,  0.2020202 ,  0.3030303 ,  0.4040404 ,
        0.50505051,  0.60606061,  0.70707071,  0.80808081,  0.90909091,
        1.01010101,  1.11111111,  1.21212121,  1.31313131,  1.41414141,
        1.51515152,  1.61616162,  1.71717172,  1.81818182,  1.91919192,
        2.02020202,  2.12121212,  2.22222222,  2.32323232,  2.42424242,
        2.52525253,  2.62626263,  2.72727273,  2.82828283,  2.92929293,
        3.03030303,  3.13131313,  3.23232323,  3.33333333,  3.43434343,
        3.53535354,  3.63636364,  3.73737374,  3.83838384,  3.93939394,
        4.04040404,  4.14141414,  4.24242424,  4.34343434,  4.44444444,
        4.54545455,  4.64646465,  4.74747475,  4.84848485,  4.94949495,
        5.05050505,  5.15151515,  5.25252525,  5.35353535,  5.45454545,
        5.55555556,  5.65656566,  5.75757576,  5.85858586,  5.95959596,
        6.06060606,  6.16161616,  6.26262626,  6.36363636,  6.46464646,
        6.56565657,  6.66666667,  6.76767677,  6.86868687,  6.96969697,
        7.07070707,  7.17171717,  7.27272727,  7.37373737,  7.47474747,
        7.57575758,  7.67676768,  7.77777778,  7.87878788,  7.97979798,
        8.08080808,  8.18181818,  8.28282828,  8.38383838,  8.48484848,
        8.58585859,  8.68686869,  8.78787879,  8.88888889,  8.98989899,
        9.09090909,  9.19191919,  9.29292929,  9.39393939,  9.49494949,
        9.5959596 ,  9.6969697 ,  9.7979798 ,  9.8989899 , 10.        ])})
#D Sat Nov 21 17:38:39 2020
#C Sat Nov 21 17:38:39 2020.  plan_type = generator
#C Sat Nov 21 17:38:39 2020.  uid = 66b3190b-9097-4278-907c-141e619859f2
#MD uid = 66b3190b-9097-4278-907c-141e619859f2
#MD detectors = ['det']
#MD motors = ['motor']
#MD num_intervals = 9
#MD num_points = 10
#MD versions = {'ophyd': '1.5.2', 'bluesky': '1.6.4'}
#P0 
#N 5
#L motor  Epoch_float  Epoch  motor_setpoint  det
-1.0 0.01544499397277832 0 -1.0 0.6065306597126334
-0.7777777777777778 0.020952701568603516 0 -0.7777777777777778 0.7389912962803088
-0.5555555555555556 0.025393962860107422 0 -0.5555555555555556 0.8569968914352789
-0.33333333333333337 0.02995777130126953 0 -0.33333333333333337 0.9459594689067654
-0.11111111111111116 0.03400087356567383 0 -0.11111111111111116 0.9938461733264412
0.11111111111111116 0.036563873291015625 0 0.11111111111111116 0.9938461733264412
0.33333333333333326 0.03850078582763672 0 0.33333333333333326 0.9459594689067655
0.5555555555555554 0.04083895683288574 0 0.5555555555555554 0.856996891435279
0.7777777777777777 0.04688382148742676 0 0.7777777777777777 0.7389912962803089
1.0 0.04942893981933594 0 1.0 0.6065306597126334
#C Sat Nov 21 17:38:39 2020.  num_events_primary = 10
#C Sat Nov 21 17:38:39 2020.  exit_status = success

#S 19  new_plan(detectors=['det'], motor=['motor'], start=-1, end=1, points=10, longvariable={'long': [0.0, 0.10101010101010101, 0.20202020202020202, 0.30303030303030304, 0.40404040404040403, 0.5050505050505051, 0.6060606060606061, 0.7070707070707071, 0.8080808080808081, 0.9090909090909091, 1.0101010101010102, 1.1111111111111112, 1.2121212121212122, 1.3131313131313131, 1.4141414141414141, 1.5151515151515151, 1.6161616161616161, 1.7171717171717171, 1.8181818181818181, 1.9191919191919191, 2.0202020202020203, 2.121212121212121, 2.2222222222222223, 2.323232323232323, 2.4242424242424243, 2.525252525252525, 2.6262626262626263, 2.727272727272727, 2.8282828282828283, 2.929292929292929, 3.0303030303030303, 3.131313131313131, 3.2323232323232323, 3.3333333333333335, 3.4343434343434343, 3.5353535353535355, 3.6363636363636362, 3.7373737373737375, 3.8383838383838382, 3.9393939393939394, 4.040404040404041, 4.141414141414141, 4.242424242424242, 4.343434343434343, 4.444444444444445, 4.545454545454545, 4.646464646464646, 4.747474747474747, 4.848484848484849, 4.94949494949495, 5.05050505050505, 5.151515151515151, 5.252525252525253, 5.353535353535354, 5.454545454545454, 5.555555555555555, 5.656565656565657, 5.757575757575758, 5.858585858585858, 5.959595959595959, 6.0606060606060606, 6.161616161616162, 6.262626262626262, 6.363636363636363, 6.4646464646464645, 6.565656565656566, 6.666666666666667, 6.767676767676767, 6.8686868686868685, 6.96969696969697, 7.070707070707071, 7.171717171717171, 7.2727272727272725, 7.373737373737374, 7.474747474747475, 7.575757575757575, 7.6767676767676765, 7.777777777777778, 7.878787878787879, 7.979797979797979, 8.080808080808081, 8.181818181818182, 8.282828282828282, 8.383838383838384, 8.484848484848484, 8.585858585858587, 8.686868686868687, 8.787878787878787, 8.88888888888889, 8.98989898989899, 9.09090909090909, 9.191919191919192, 9.292929292929292, 9.393939393939394, 9.494949494949495, 9.595959595959595, 9.696969696969697, 9.797979797979798, 9.8989898989899, 10.0]})
#D Sat Nov 21 17:38:45 2020
#C Sat Nov 21 17:38:45 2020.  plan_type = generator
#C Sat Nov 21 17:38:45 2020.  uid = aa538833-776f-43d2-ae5c-2f6429e2eaa8
#MD uid = aa538833-776f-43d2-ae5c-2f6429e2eaa8
#MD detectors = ['det']
#MD motors = ['motor']
#MD num_intervals = 9
#MD num_points = 10
#MD versions = {'ophyd': '1.5.2', 'bluesky': '1.6.4'}
#P0 
#N 5
#L motor  Epoch_float  Epoch  motor_setpoint  det
-1.0 0.014036893844604492 0 -1.0 0.6065306597126334
-0.7777777777777778 0.018890857696533203 0 -0.7777777777777778 0.7389912962803088
-0.5555555555555556 0.02501082420349121 0 -0.5555555555555556 0.8569968914352789
-0.33333333333333337 0.03194999694824219 0 -0.33333333333333337 0.9459594689067654
-0.11111111111111116 0.03591489791870117 0 -0.11111111111111116 0.9938461733264412
0.11111111111111116 0.03852105140686035 0 0.11111111111111116 0.9938461733264412
0.33333333333333326 0.040413856506347656 0 0.33333333333333326 0.9459594689067655
0.5555555555555554 0.04235386848449707 0 0.5555555555555554 0.856996891435279
0.7777777777777777 0.04468393325805664 0 0.7777777777777777 0.7389912962803089
1.0 0.05132889747619629 0 1.0 0.6065306597126334
#C Sat Nov 21 17:38:45 2020.  num_events_primary = 10
#C Sat Nov 21 17:38:45 2020.  exit_status = success

And, since there is a line break in the second scan, pymca cannot read it:

Screen Shot 2020-11-21 at 5 40 14 PM

@prjemian
Copy link
Contributor

prjemian commented Nov 21, 2020 via email

@prjemian
Copy link
Contributor

prjemian commented Jan 14, 2021

bash command to extract the desired run:

# if not already installed
conda install databroker-pack -c nsls2forge 

echo 624e776a > /tmp/uids.txt
databroker-pack mongodb_config --copy-external --uids /tmp/uids.txt /tmp/440_specwriter_problem_run

but this failed to pack, reporting this error:

Error while exporting Run '624e776a'
Traceback (most recent call last):
  File "/home/beams/8IDIUSER/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/databroker_pack/_pack.py", line 112, in export_uids
    run = source_catalog[uid]
  File "/home/beams/8IDIUSER/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/intake/catalog/base.py", line 410, in __getitem__
    raise KeyError(key)
KeyError: '624e776a'

@prjemian
Copy link
Contributor

Aha. Not at 8ID, it's Polar 4-ID. Try again from my computer (4id_polar):

echo 624e776a > /tmp/uids.txt
databroker-pack   4id_polar  --copy-external --uids /tmp/uids.txt   /tmp/440_specwriter_problem_run

which showed this output to the console:

0it [00:00, ?it/s]/home/beams/JEMIAN/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/databroker/core.py:1103: UserWarning: The method canonical has been renamed documents. This alias may be removed in a future release.00:00<?, ?it/s]
  warnings.warn(

@prjemian
Copy link
Contributor

tar that directory for work on this issue

cd /tmp
tar czf 440_specwriter_problem_run.tar.gz 440_specwriter_problem_run/

@prjemian
Copy link
Contributor

Issue #479 will follow from here for extracting this databroker-pack

Documentation is here: https://blueskyproject.io/databroker-pack/usage.html#unpacking-a-packed-catalog

@prjemian
Copy link
Contributor

# extract the tar file
tar xzf 440_specwriter_problem_run.tar.gz

# unpack the databroker contents
databroker-unpack inplace 440_specwriter_problem_run issue440

# load the data in the python session
(bluesky_2021_1) prjemian@poof ~/.../apstools/tests $ ipython
Python 3.8.2 (default, Mar 26 2020, 15:53:00) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import databroker

In [3]: list(databroker.catalog)
Out[3]: ['issue440', 'quokka_intake', 'mongodb_config', 'test1']

In [5]: cat = databroker.catalog["issue440"]

In [6]: len(cat)
Out[6]: 1

In [7]: run = cat[-1]

In [8]: run
Out[8]: 
BlueskyRun
  uid='624e776a-a914-4a74-8841-babf1591fb29'
  exit_status='success'
  2020-09-15 19:37:32.469 -- 2020-09-15 19:42:19.791
  Streams:
    * primary
    * baseline

Ready for business! (P.S. Don't forget to delete the configuration file at ~/.local/share/intake/databroker_unpack_issue440.yml when finished with it!)

@prjemian
Copy link
Contributor

Hint, the search path can be learned from:

In [15]: databroker.catalog_search_path()
Out[15]: 
('/home/prjemian/.local/share/intake',
 '/home/prjemian/Apps/anaconda/envs/bluesky_2021_1/share/intake')

@prjemian
Copy link
Contributor

Also, for unit testing, best to untar that .tar.gz file into a temporary directory, such as /tmp

prjemian added a commit that referenced this issue Jan 14, 2021
@prjemian
Copy link
Contributor

Again, without the unpack step:

cp 440_specwriter_problem_run.tar.gz /tmp
cd /tmp
tar xzf 440_specwriter_problem_run.tar.gz
(bluesky_2021_1) prjemian@poof /tmp $ ipython
Python 3.8.2 (default, Mar 26 2020, 15:53:00) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import intake

In [2]: cat = intake.open_catalog("/tmp/440_specwriter_problem_run/catalog.yml")

In [3]: run = cat["packed_catalog"][-1]

In [4]: run
Out[4]: 
BlueskyRun
  uid='624e776a-a914-4a74-8841-babf1591fb29'
  exit_status='success'
  2020-09-15 19:37:32.469 -- 2020-09-15 19:42:19.791
  Streams:
    * baseline
    * primary

This way, no new catalog is added to the catalog_search_path.

@prjemian
Copy link
Contributor

Note this important comment from the documentation:

only works if the packed directory is in its original location. In a future release, it will also work if the directory has been moved or copied to a different location.

In our case, we packed it into /tmp/... so this is still good.

prjemian added a commit that referenced this issue Jan 14, 2021
prjemian added a commit that referenced this issue Jan 14, 2021
prjemian added a commit that referenced this issue Jan 14, 2021
@prjemian
Copy link
Contributor

prjemian commented Jan 14, 2021

@gfabbris - I have reproduced the problem in a unit test and have identified the one line of code that enables this problem (it makes an assumption which is too simplistic):

s = str(src)

A fix will involve a refactoring of the get_name() inner function:

def get_name(src):
to parse a nested structure of lists, dictionaries, numpy arrays, and ophyd structures.

prjemian added a commit that referenced this issue Jan 14, 2021
@prjemian
Copy link
Contributor

Actually, this line is the problem (with the expansion of _v:

s.append(f"{_k}={_v}")

Adding a new function to parse _v and expand it by structure type. If additional structure types become problematic, this will be the place to address them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants