McCode icon indicating copy to clipboard operation
McCode copied to clipboard

McStas mcdisplay-mantid / Monitor_nD use of scientific notation in idstart= fields causes IDF files not to load

Open willend opened this issue 10 months ago • 2 comments

Example:

... cut ...

<component type="MonNDtype1" name="nD_Mantid_67" idstart="990000" idfillbyfirst="x" idstepbyrow="154">
    <location x="2.92545" y="-0.00121325" z="2.2226" rot="111.23383044043243" axis-x="-0.0022765005094425796" axis-y="-0.9999973311602552" axis-z="-0.00039397689958886806"/>
</component>


<component type="MonNDtype1" name="nD_Mantid_70" idstart="1.035e+06" idfillbyfirst="x" idstepbyrow="154">
    <location x="2.568" y="-0.002491" z="2.9288000000000025" rot="122.78843274233411" axis-x="0.0012837346149998279" axis-y="-0.999998105640423" axis-z="-0.0014631271317345899"/>
</component>


<component type="MonNDtype1" name="nD_Mantid_73" idstart="1.08e+06" idfillbyfirst="x" idstepbyrow="154">
    <location x="2.08063" y="-0.00079625" z="3.552900000000001" rot="133.4718808846723" axis-x="0.0012384451962159646" axis-y="-0.9999981104873784" axis-z="-0.0014984242285107122"/>
</component>


<component type="MonNDtype1" name="nD_Mantid_76" idstart="1.125e+06" idfillbyfirst="x" idstepbyrow="154">
    <location x="1.48753" y="-0.00307125" z="4.0685" rot="144.31512083380588" axis-x="0.00045149650906132355" axis-y="-0.9999995382654069" axis-z="0.0008483041170184219"/>
</component>


<component type="MonNDtype1" name="nD_Mantid_79" idstart="1.17e+06" idfillbyfirst="x" idstepbyrow="154">
    <location x="0.812355" y="-0.00264075" z="4.480699999999999" rot="153.87193836901963" axis-x="-1.794136408664486e-05" axis-y="-0.9999999968500916" axis-z="7.731703803485045e-05"/>
</component>

</instrument> 

PG3_polarised.instr.xml.txt

willend avatar Oct 11 '23 11:10 willend

Error message from Mantid. Screenshot 2023-10-11 at 13 33 30

Once manually corrected, the XML IDF loads OK.

willend avatar Oct 11 '23 11:10 willend

The attached monitor_nd-lib.c prints detector IDs as long long unsigned int %llu instead of scientific notation %g monitor_nd-lib.c.txt

willend avatar Oct 11 '23 12:10 willend