eprsave() with 2D dataset saves to wrong file extension

A place to report and discuss potential bugs
Post Reply
sam.schott
Newbie
Posts: 1
Joined: Thu Sep 15, 2016 9:35 am

eprsave() with 2D dataset saves to wrong file extension

Post by sam.schott »

The eprsave() function saves 2D datasets to three files ".DSC", ".DTA" and ".XFG". The latter should be ".YFG". Manually changing the file type after data export allows the file to be read again by Xepr or eprload() so this bug seems to be no more than a typo.

The bug applies to 2D datasets from CW experiments.
Stefan Stoll
EasySpin Creator
Posts: 1041
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: eprsave() with 2D dataset saves to wrong file extension

Post by Stefan Stoll »

This is indeed a bug in eprsave. It will be fixed in the next release. Thanks for reporting!
Emilien
Resident User
Posts: 58
Joined: Mon Apr 20, 2015 12:13 am

Re: eprsave() with 2D dataset saves to wrong file extension

Post by Emilien »

Hello,
in the latest release (5.2.29), no .YGF file is generated when eprsave is used with 2D data set...
Emilien

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

Re: eprsave() with 2D dataset saves to wrong file extension

Post by Stefan Stoll »

Currently, eprsave saves the gauge files (XGY, YGF) only if the data is two-dimensional and the associated axis is non-linear.

Emilien
Resident User
Posts: 58
Joined: Mon Apr 20, 2015 12:13 am

Re: eprsave() with 2D dataset saves to wrong file extension

Post by Emilien »

What do you mean by "the associated axis is non-linear"?
If I type:

Code: Select all

eprsave('toto',{323:332,[0 300 600 900 1200]},ones(10,5))
eprsave('toto',{323:332,[0 300 600 900 1200]'},ones(10,5))
eprsave('toto',{[323:332]',[0 300 600 900 1200]},ones(10,5))
eprsave('toto',{[323:332]',[0 300 600 900 1200]'},ones(10,5))

No toto.YGF is generated.
By the way, do you know what is the purpose of the gauge files? It's not clear for me...

I have a related second issue...
If you execute this code:

Code: Select all

[x,y]=eprload('Bruker2D.DSC'); % real file from Elexsys
eprsave('tata',x,y)
[x_,y_]=eprload('tata.DSC');

B1=x{1,1};
B2=x_{1,1};
check_B=[B1(1:10);B2(1:10)]'

t1=x{1,2}; %size=40x1
t2=x_{1,2};%size=1x40
check_t=[t1(1:10)';t2(1:10)]'

you can see that the second axis is modified by eprsave. The first one is also modified but errors are less than 1e-4.
Note also that no tata.YGF is generated.
Thanks for your help!

Bruker2D.zip
(140.66 KiB) Downloaded 346 times
Emilien
Resident User
Posts: 58
Joined: Mon Apr 20, 2015 12:13 am

Re: eprsave() with 2D dataset saves to wrong file extension

Post by Emilien »

I forgot:
Generating an empty .YGF is OK for my applications... The modification of the sesond axis by eprsave is more a problem...

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

Re: eprsave() with 2D dataset saves to wrong file extension

Post by Stefan Stoll »

This is a bug in eprsave. It failed to detect the non-linear axis. Thanks for reporting!

This is now fixed in 5.2.30 and in 6.0.0-dev.30.

The XGF/YGF/ZGF files are used to store the values along these axes if the values are non-linear (i.e. if they cannot be generated with a start value, an end value, and a number of points). In later versions of the DSC/DTA format, these files have GF1/GF2/GF3 extensions.

Post Reply