Skip to content

Show "plot" json messages that have been broadcast to RabbitMQ on i15-1 UI #41

@RJCD-Diamond

Description

@RJCD-Diamond

When data analysis is done via workflows, the workflow will send json message to RabbitMQ with results, or useful pieces of information. One of these is a json message which contains all the info needed to plot data on the UI.

These plot json messages will be sent to "/topic/public.data.plot" for the RabbitMQ serving i15-1. This should be made generic, as may/likely be used on other beamlines.

data always be present, but any of diff, calc, background and marker may be empty if it's just data and not a fit to data.

json example:

{"data":{"x":[0.0,1.0083333333333333,2.0166666666666666,3.025,4.033333333333333,5.041666666666666,6.05,7.058333333333334,8.066666666666666,9.075,10.083333333333332,11.091666666666667,12.1,13.108333333333333,14.116666666666667,15.125,16.133333333333333,17.141666666666666,18.15,19.15833333333333,20.166666666666664,21.175,22.183333333333334,23.191666666666666,24.2,25.208333333333332,26.216666666666665,27.224999999999998,28.233333333333334,29.241666666666667,30.25,31.258333333333333,32.266666666666666,33.275,34.28333333333333,35.291666666666664,36.3,37.30833333333333,38.31666666666666,39.324999999999996,40.33333333333333,41.34166666666667,42.35,43.358333333333334,44.36666666666667,45.375,46.38333333333333,47.391666666666666,48.4,49.40833333333333,50.416666666666664,51.425,52.43333333333333,53.44166666666666,54.449999999999996,55.45833333333333,56.46666666666667,57.475,58.483333333333334,59.49166666666667,60.5,61.50833333333333,62.516666666666666,63.525,64.53333333333333,65.54166666666667,66.55,67.55833333333334,68.56666666666666,69.575,70.58333333333333,71.59166666666667,72.6,73.60833333333333,74.61666666666666,75.625,76.63333333333333,77.64166666666667,78.64999999999999,79.65833333333333,80.66666666666666,81.675,82.68333333333334,83.69166666666666,84.7,85.70833333333333,86.71666666666667,87.725,88.73333333333333,89.74166666666666,90.75,91.75833333333333,92.76666666666667,93.77499999999999,94.78333333333333,95.79166666666666,96.8,97.80833333333334,98.81666666666666,99.825,100.83333333333333,101.84166666666667,102.85,103.85833333333333,104.86666666666666,105.875,106.88333333333333,107.89166666666667,108.89999999999999,109.90833333333333,110.91666666666666,111.925,112.93333333333334,113.94166666666666,114.95,115.95833333333333,116.96666666666667,117.975,118.98333333333333,119.99166666666666,121.0],"y":[-494263.25,-268203.0,-940611.125,-579560.625,1029351.0,-812032.125,-1611372.75,-1159415.625,-475285.5,-1044992.625,-1096205.625,-1812264.625,-653272.625,-2199323.0,-1836659.125,-1416606.125,-4033614.5,-1308484.125,-3033754.5,-4853658.0,-1641913.625,-2823653.5,-2504555.5,-651476.0,-1861670.625,-2473223.5,-3984078.5,-1503500.125,-2957918.0,-1089009.5,13973934.0,46569088.0,113295688.0,198505808.0,247370944.0,256094880.0,258660736.0,262342640.0,262996944.0,262973120.0,263795168.0,263968240.0,263303264.0,262661888.0,262655648.0,262673344.0,262554160.0,264003472.0,262783072.0,261642096.0,264283328.0,262563440.0,263383568.0,262984384.0,261766208.0,263660048.0,261665632.0,261973376.0,262704272.0,262498032.0,263579040.0,264318416.0,263490256.0,263608176.0,262636944.0,264210064.0,264075472.0,263202240.0,263989120.0,262724864.0,262254448.0,262223376.0,264648064.0,262996192.0,264590496.0,262322080.0,263870560.0,263411280.0,261952896.0,264764416.0,264594576.0,263645040.0,262755520.0,264580896.0,263055200.0,266357216.0,267539056.0,269148160.0,268953120.0,269064384.0,268461984.0,268452512.0,269938656.0,268480960.0,268043424.0,268339344.0,267174224.0,267901456.0,268310400.0,269733472.0,270528064.0,270304512.0,269452640.0,269451520.0,269297184.0,265484832.0,223459168.0,133644896.0,64883016.0,51734464.0,55978640.0,57375464.0,52616632.0,53122824.0,55299820.0,52614464.0,40041676.0,31877760.0,33050454.0,31919100.0,30629030.0],"e":null,"x_unit":"index","y_unit":"Intensity (Arb. Units)","source":"/workspaces/xrpd-toolbox/src/xrpd_toolbox/i15_1/sample_alignment_data/GaIn-94521.csv"},"title":"GaIn-94521.csv","calc":[-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309169868,-1291071.329982982,-1291071.0959485255,-1291041.6536313645,-1289176.297010796,-1229441.7499366393,-258606.2802432815,7784223.684733959,41889709.0872774,116170225.65745123,199435077.5986202,247488403.74177125,261744734.06099328,263912461.99778956,264080724.62339622,264087363.1518552,264087495.71517074,264087497.04988468,264087497.05663848,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665562,264087497.05665565,264087497.05665576,264087497.0566565,264087497.05666038,264087497.05667973,264087497.05677214,264087497.05719337,264087497.05902392,264087497.06661046,264087497.0965951,264087497.20961365,264087497.61586535,264087499.00849643,264087503.56123504,264087517.75525507,264087559.95739138,264087679.62040845,264088003.20064262,264088837.65075386,264090889.82698402,264095702.91584995,264106468.22286338,264129430.74290252,264176139.56036678,264266745.65729582,264434349.60755825,264729988.96696064,265227227.52412137,266024580.23414123,267243441.15365338,269018967.6444223,271473963.4455526,274502655.69579417,275857738.5568488,263978220.75874195,216891288.6217975,137905158.4412439,73313968.09202473,48698046.361927435,47402374.135672525,52908061.349807106,54730655.04485181,54856107.174682565,53232488.20961796,50009523.67767816,45479848.60836238,40037449.64294859,34124547.893865675,28174791.635149144,22562483.525952525],"diff":[796808.0809188576,1022868.3309188576,350460.2059188576,711510.7059188576,2320422.330918858,479039.2059188576,-320301.4190811424,131655.7059188576,815785.8309188576,246078.7059188576,194865.7059188576,-521193.2940811424,637798.7059188576,-908251.6690811424,-545587.7940811424,-125534.7940811424,-2742543.169081142,-17412.794081142405,-1742683.1690811424,-3562586.669081142,-350842.2940811424,-1532582.1690811424,-1213484.1690811424,639595.3309169868,-570599.295017018,-1182152.4040514745,-2693036.8463686355,-214323.8279892041,-1728476.2500633607,-830403.2197567185,6189710.315266041,4679378.9127226025,-2874537.6574512273,-929269.5986202061,-117459.74177125096,-5649854.060993284,-5251725.997789562,-1738084.6233962178,-1090419.1518552005,-1114375.715170741,-292329.04988467693,-119257.05663847923,-784233.0566556156,-1425609.0566556156,-1431849.0566556156,-1414153.0566556156,-1533337.0566556156,-84025.05665561557,-1304425.0566556156,-2445401.0566556156,195830.94334438443,-1524057.0566556156,-703929.0566556156,-1103113.0566556156,-2321289.0566556156,-427449.05665561557,-2421865.0566556156,-2114121.0566556156,-1383225.0566556156,-1589465.0566556156,-508457.05665561557,230918.94334438443,-597241.0566556156,-479321.05665561557,-1450553.0566556156,122566.94334438443,-12025.056655615568,-885257.0566556156,-98377.05665561557,-1362633.0566556156,-1833049.0566556156,-1864121.0566556454,560566.9433442354,-1091305.0566565096,502998.94333961606,-1765417.0566797256,-216937.05677214265,-676217.0571933687,-2134601.0590239167,676918.9333895445,507078.9034048915,-442457.20961365104,-1331977.6158653498,493396.9915035665,-1032303.5612350404,2269698.2447449267,3451496.0426086187,5060480.379591554,4865116.799357384,4975546.349246144,4371094.173015982,4356809.084150046,5832187.777136624,4351529.257097483,3867284.4396332204,4072598.342704177,2739874.3924417496,3171467.0330393612,3083172.475878626,3708891.7658587694,3284622.8463466167,1285544.3555777073,-2021323.4455525875,-5051135.695794165,-6560554.556848824,1506611.241258055,6567879.378202498,-4260262.441243887,-8430952.092024729,3036417.638072565,8576265.864327475,4467402.650192894,-2114023.0448518097,-1733283.174682565,2067331.7903820425,2604940.3223218396,-5438172.608362377,-8159689.64294859,-1074093.8938656747,3744308.3648508564,8066546.474047475],"background":[-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576,-1291071.3309188576],"markers":[70.02501880006268]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions