Re: [Ifeffit] Bug report: Athena, multiple data export

2021-10-10 Thread Matt Newville
Hi Soyoung,

On Fri, Oct 8, 2021 at 5:29 PM Soyoung Kim  wrote:

> I see. Thank you for the quick reply.
>
> But would it be difficult to program it so that it will export properly,
> e.g., with multiple energy axes?
>

Sorry for the slight delay, and I have two answers here:

In general, it depends on what "export properly" means. If you save the
project file, the original, differing energy arrays will be retained.  If
you export to a simple ASCII column file (which is pretty ubiquitous in
scientific data), then each numeric row will be (or perhaps "is likely to
be") interpreted as the same "x" axis (energy or perhaps time - the
independent variable).   So, if you have multiple sets of data with
differing x/energy values, either you have missing values for some data
sets or you have data in rows without a consistent x/energy, and possibly a
different number of rows per column.  Many programs will struggle with such
data files.

But

Because when the data is plotted as a graph, it is hard to tell whether or
> not the x-axes are the same... And if you are processing data from someone
> else, you may not know whether or not they were collected with the same
> energy step settings.
>

That's all true.

And also: it looks to me that the exported data from this project looks
like it is not interpolated as well as it could be. There is a definite
shift in energy in the EXAFS region.

If I read that project into Larch's XAS Viewer and export it as a CSV file
it also interpolates all arrays onto a single energy grid (by default, the
first data set) and it looks better to me (see attached file -- needs
development version of XAS Viewer for this level of details).

I'm not entirely sure where the problem is. It does look like one of the
data sets has two energy points that are very close together as the data
transitions from constant energy steps in the XANES region to wider steps
in the EXAFS region.  That should not cause a problem, but I think that I
do recall that there were some such problems in the past.

We've tried to make XAS Viewer a replacement for Athena and Artemis.   I am
aware of a few missing features, but there are also several features not in
Athena.  I can say that it would be easier for me to fix things with
Larch/XAS Viewer than it is for me to fix things in Athena.

I'm not sure that resolves the issue, but I hope it helps.

--Matt
# 2 files saved Sun Oct 10 23:05:24 2021
# saving x array='energy', y array='norm'
# data1: data1
# data2: data2
#--
# energy data1 data2
4815.00 0.001453 0.001690
4825.00 0.000822 0.000912
4835.00 0.000460 0.000493
4845.00 0.000130 0.96
4855.00 -0.000157 -0.000221
4865.00 -0.000333 -0.000342
4875.00 -0.000527 -0.000602
4885.00 -0.000622 -0.000622
4895.00 -0.000661 -0.000545
4905.00 -0.000571 -0.000717
4915.00 -0.000355 -0.000431
4925.00 -0.000194 -0.000183
4925.25 -0.99 -0.90
4925.50 -0.000137 -0.26
4925.75 -0.35 -0.000216
4926.00 -0.000138 -0.93
4926.25 -0.87 -0.57
4926.50 -0.22 -0.000131
4926.75 -0.73 -0.43
4927.00 -0.54 -0.15
4927.25 -0.77 0.22
4927.50 -0.22 -0.22
4927.75 -0.31 -0.60
4928.00 0.07 -0.000111
4928.25 -0.07 -0.12
4928.50 0.24 0.000120
4928.75 0.000129 0.000133
4929.00 -0.27 -0.31
4929.25 0.21 0.000126
4929.50 0.02 0.000102
4929.75 0.000175 0.000146
4930.00 0.000181 0.98
4930.25 0.000120 0.62
4930.50 0.99 0.000182
4930.75 0.000149 0.000302
4931.00 0.000140 0.000247
4931.25 0.000149 0.000169
4931.50 0.000265 0.52
4931.75 0.000187 0.000186
4932.00 0.000163 0.000254
4932.25 0.000161 0.000328
4932.50 0.000337 0.000265
4932.75 0.000267 0.000309
4933.00 0.000241 0.000317
4933.25 0.000353 0.000428
4933.50 0.000349 0.000468
4933.75 0.000313 0.000472
4934.00 0.000357 0.000432
4934.25 0.000413 0.000417
4934.50 0.000348 0.000373
4934.75 0.000435 0.000430
4935.00 0.000430 0.000403
4935.25 0.000445 0.000549
4935.50 0.000517 0.000485
4935.75 0.000496 0.000453
4936.00 0.000496 0.000410
4936.25 0.000550 0.000529
4936.50 0.000471 0.000627
4936.75 0.000556 0.000605
4937.00 0.000647 0.000682
4937.25 0.000623 0.000636
4937.50 0.000681 0.000806
4937.75 0.000688 0.000709
4938.00 0.000734 0.000610
4938.25 0.000726 0.000498
4938.50 0.000648 0.000657
4938.75 0.000665 0.000524
4939.00 0.000747 0.000738
4939.25 0.000834 0.000892
4939.50 0.000810 0.000900
4939.75 0.000880 0.000767
4940.00 0.000882 0.000733
4940.25 0.000857 0.000880
4940.50 0.000916 0.000922
4940.75 0.000795 0.000897
4941.00 0.000997 0.000900
4941.25 0.000984 0.001074
4941.50 0.000967 0.000955
4941.75 0.001034 0.001153
4942.00 0.00104

Re: [Ifeffit] Bug report: Athena, multiple data export

2021-10-08 Thread Anatoly Frenkel
" But would it be difficult to program it so that it will export properly,
e.g., with multiple energy axes?"
- that is what saving as unique files means.
---
Anatoly I. Frenkel
Professor
Department of Materials Science and Chemical Engineering
Stony Brook University
Stony Brook, NY 11794, Ph: 631-632-2751
Email:  anatoly.fren...@stonybrook.edu

http://you.stonybrook.edu/frenkel

Joint Appointment:
Chemistry Department, Brookhaven National Laboratory
Upton, NY 11973. Ph: 631-344-3013. Group: 631-344-3494
Email: fren...@bnl.gov
https://www.bnl.gov/staff/frenkel
Spokesperson, Synchrotron Catalysis Consortium (SCC) at BNL
http://you.stonybrook.edu/scc2
---


On Fri, Oct 8, 2021 at 6:29 PM Soyoung Kim  wrote:

> I see. Thank you for the quick reply.
>
> But would it be difficult to program it so that it will export properly,
> e.g., with multiple energy axes? Because when the data is plotted as a
> graph, it is hard to tell whether or not the x-axes are the same... And if
> you are processing data from someone else, you may not know whether or not
> they were collected with the same energy step settings.
>
> Best,
> Soyoung
>
> On Fri, Oct 8, 2021 at 3:24 PM Anatoly Frenkel <
> anatoly.fren...@stonybrook.edu> wrote:
>
>> It is not a bug. When groups have unique energy axes they should be saved
>> in different files.
>>
>> Anatoly
>>
>> > On Oct 8, 2021, at 6:19 PM, Soyoung Kim  wrote:
>> >
>> > 
>> > Dear Bruce and IFEFFIT community,
>> >
>> > Hope all is well. I found a bug with Athena's file export function. I
>> had two normalized mu(E) data with very similar spectra but different
>> x-axis values (collected with different energy step settings).
>> > 
>> >
>> > When I batch exported them to a .dat file using the purple E button
>> while "Save next plot to a file" was turned on, the resulting data only had
>> a single x-axis column, which was taken from the first data. Hence, when I
>> plot the two spectra from this .dat file, they now look different:
>> > 
>> >
>> > If I export each data individually to .dat files, then they are correct.
>> > 
>> >
>> >
>> > I'm attaching the Athena project file containing the two data and the
>> .dat files I exported, both together and individually.
>> >
>> > Please let me know if anything is unclear. Thank you in advance for
>> your help.
>> >
>> > Best,
>> > Soyoung Kim
>> >
>> > 
>> > 
>> > 
>> > 
>> > ___
>> > Ifeffit mailing list
>> > Ifeffit@millenia.cars.aps.anl.gov
>> > http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
>> > Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>>
>> ___
>> Ifeffit mailing list
>> Ifeffit@millenia.cars.aps.anl.gov
>> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
>> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>>
>
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] Bug report: Athena, multiple data export

2021-10-08 Thread Soyoung Kim
I see. Thank you for the quick reply.

But would it be difficult to program it so that it will export properly,
e.g., with multiple energy axes? Because when the data is plotted as a
graph, it is hard to tell whether or not the x-axes are the same... And if
you are processing data from someone else, you may not know whether or not
they were collected with the same energy step settings.

Best,
Soyoung

On Fri, Oct 8, 2021 at 3:24 PM Anatoly Frenkel <
anatoly.fren...@stonybrook.edu> wrote:

> It is not a bug. When groups have unique energy axes they should be saved
> in different files.
>
> Anatoly
>
> > On Oct 8, 2021, at 6:19 PM, Soyoung Kim  wrote:
> >
> > 
> > Dear Bruce and IFEFFIT community,
> >
> > Hope all is well. I found a bug with Athena's file export function. I
> had two normalized mu(E) data with very similar spectra but different
> x-axis values (collected with different energy step settings).
> > 
> >
> > When I batch exported them to a .dat file using the purple E button
> while "Save next plot to a file" was turned on, the resulting data only had
> a single x-axis column, which was taken from the first data. Hence, when I
> plot the two spectra from this .dat file, they now look different:
> > 
> >
> > If I export each data individually to .dat files, then they are correct.
> > 
> >
> >
> > I'm attaching the Athena project file containing the two data and the
> .dat files I exported, both together and individually.
> >
> > Please let me know if anything is unclear. Thank you in advance for your
> help.
> >
> > Best,
> > Soyoung Kim
> >
> > 
> > 
> > 
> > 
> > ___
> > Ifeffit mailing list
> > Ifeffit@millenia.cars.aps.anl.gov
> > http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> > Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>
> ___
> Ifeffit mailing list
> Ifeffit@millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit
>
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit


Re: [Ifeffit] Bug report: Athena, multiple data export

2021-10-08 Thread Anatoly Frenkel
It is not a bug. When groups have unique energy axes they should be saved in 
different files. 

Anatoly

> On Oct 8, 2021, at 6:19 PM, Soyoung Kim  wrote:
> 
> 
> Dear Bruce and IFEFFIT community,
> 
> Hope all is well. I found a bug with Athena's file export function. I had two 
> normalized mu(E) data with very similar spectra but different x-axis values 
> (collected with different energy step settings).
> 
> 
> When I batch exported them to a .dat file using the purple E button while 
> "Save next plot to a file" was turned on, the resulting data only had a 
> single x-axis column, which was taken from the first data. Hence, when I plot 
> the two spectra from this .dat file, they now look different:
> 
> 
> If I export each data individually to .dat files, then they are correct.
> 
> 
> 
> I'm attaching the Athena project file containing the two data and the .dat 
> files I exported, both together and individually.
> 
> Please let me know if anything is unclear. Thank you in advance for your help.
> 
> Best,
> Soyoung Kim
> 
> 
> 
> 
> 
> ___
> Ifeffit mailing list
> Ifeffit@millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
> Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit

___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit