Inconvenient work of eprload with MS5000 xml files

A place to report and discuss potential bugs
Post Reply
katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Inconvenient work of eprload with MS5000 xml files

Post by katarkon »

I have found that standard xml readed by eprloadoutput file contains relatively roughly rounded values (4 signs after decimal points). Initial xml file contains more precision values in the field like <Measurement Name="Cudppeth_05_tmp_-43C" Device="MS-5000 [11-0273]" FWV="FW master: 10.0.6&#xD;&#xA;FW slavemw: 10.1.2&#xD;&#xA;FW slavebf: 10.0.4&#xD;&#xA;FW slaveiq: 10.0.0" SWV="ESRStudio 1.74.4" Timestamp="2021-04-29T12:19:40.5555133+03:00" MwFreq="9.47201614223679" GonAngle="0" Temperature="-43.2197937011719" Concentration="0" ConcentrationUnit="" XDatasource="BField" XUnit="mT" YDatasource="MW_Absorption" YUnit="" Mode="Vis" Mass="0" SampleDiameter="0" SampleHeight="0" SpinConcentration="0" SpinCount="0" SpinsPerMole="0" TotalElectronSpin="0" MarkerAmplitude="NaN" MarkerPosition="NaN" NonMarkerAmplitude="1244.48715902379" AmbientTemperature1="0" AmbientTemperature2="0" AmbientHumidity="0" QFactor="-1" Phase="0" FilterPrm0="0.03" FilterType="DIG">
Can I hope the function eprload will extract more precision data or I have to write my own parcer for MS5000 xml files?

Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Inconvenient work of eprload with MS5000 xml files

Post by Stefan Stoll »

Please post the xml file you are trying to load. Which quantities are you referring to, magnetic-field values or microwave frequency?

katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Re: Inconvenient work of eprload with MS5000 xml files

Post by katarkon »

There is the example of the xml file.
I've additionally found that the private function xml2struct.p give expected results.

Attachments
Cudppeth_05_tmp_-3C.rar
example of the xml file
(1.09 MiB) Downloaded 798 times
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Inconvenient work of eprload with MS5000 xml files

Post by Stefan Stoll »

If you a referring to the field and spectral values in that file, then I don't see anything wrong:

Code: Select all

>> [B,spc,par] = eprload('Cudppeth_05_tmp_-3C.xml');
>> format long  % turn on full-length display of numbers
>> B(1:5)
ans =
   1.0e+02 *
   3.320003099942436
   3.320011239453875
   3.320019378965315
   3.320027518476755
   3.320035657988194
>> spc(1:5)
ans =
  -0.991538610927996
  -1.232134389237260
  -1.581659094930004
  -2.026221140079262
  -2.554633473447652
katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Re: Inconvenient work of eprload with MS5000 xml files

Post by katarkon »

>> [x,y,p]=eprload('Cudppeth_05_tmp_-3C.xml');
disp(p.MwFreq)
gives an answer 9.4719.
>> par=xml2struct('Cudppeth_05_tmp_-3C.xml');
disp(par.ESRXmlFile.Data.Measurement.Attributes.MwFreq)
gives correct answer 9.47186304271149.

Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Inconvenient work of eprload with MS5000 xml files

Post by Stefan Stoll »

Ah, I see the issue now. par.MwFreq is a number, so you need the proper setting of format to get all the digits displayed. In contrast, par.ESRXmlFile.Data.Measurement.Attributes.MwFreqis a string.

Here is an example of how the format setting affect display of numbers:

Code: Select all

>> a = sqrt(2);
>> format short
>> a
a =
    1.4142
>> format long
>> a
a =
   1.414213562373095
katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Re: Inconvenient work of eprload with MS5000 xml files

Post by katarkon »

Thanks for explanation. It's indeed true.

Post Reply