Dear Bruce,
This is Yohei Uemura.
We are using the Athena plugin to read the data format used in synchrotrons in Japan.
It is very helpful to read XAFS data directly into Athena. We appreciate the plugin.
Recently, we realised that the plugin does not work properly for some data sets.
When the data is like below (I0 and I are integers), the plugin works fine.
Step scan (or QXAFS) using a counter device
However, if the data is like below (I0 and I are decimal fractions), the outputs of I0 and I are 4digit such as 0.345.
QXAFS: I0 and I are decimal fractions
I found the problem was at l. 63.
my $pattern = " %9.3f %9.3f %10.6f" . " %12.3f" x $ndet . $/;
The output data is terminated by 3 digits after a decimal point.
If the plugin is modified as the attached file, both the files were read correctly.
The modification is:
my $pattern = " %9.3f %9.3f %10.6f" . " %12.3f" x $ndet . $/;
$pattern = " %9.3f %9.3f %10.6f" . " %12.6f" x $ndet . $/ if $list[2+$ndet] =~ m/\d*\.\d+/;
I added the bolded line in order not to truncate the I0 and I by 3 digits.
Could you modify the plugin which is provided with the demeter package?
Best regards,
Yohei
--
================================================
Yohei Uemura (Ph.D)
Affiliation : Paul Scherrer Institut (PSI),
Laboratory for Environmental Chemistry (LUC)
Address : OFLB 106 (PSI Ost), PSI, Forschungsstrasse 111,
5232 Villigen, Switzerland
Phone: +41 (0)5-6310-4571
上村洋平
所属 : Paul Scherrer Institut (PSI),
Laboratory for Environmental Chemistry (LUC)
住所 : OFLB 106 (PSI Ost), PSI, Forschungsstrasse 111,
5232 Villigen, Switzerland
電話 : +41 (0)5-6310-4571
================================================