Re: [Ifeffit] Demeter-devel MacPorts Athena issues work-around

2014-07-07 Thread Margaret Hinkle
Bruce,
I understand that it is frustrating to try to help someone when you are
given only part of the information needed to fully solve a problem. I'm
sure it is an issue you deal with on a relatively regular basis. I do want
to particularly thank you, though, for quickly fixing both of my problems
-- especially over the 4th of July weekend. I did not expect such a quick
response -- it was a great help to have Athena working like she usually
does this weekend.

With regard to your discussion with Matt about the underlying issue
hindering the opening of these files into Athena, I would like to mention
that these data files load in just fine to Athena using Demeter on a
Windows operating system and with the iXAFS program version 2.2 for Intel
Macs. I'm not sure if that helps, or is even relevant, but I thought I
would let you know.

Again, thank you for all your help.

Best regards,
Margaret Anne


Margaret Anne G. Hinkle
Ph.D. Candidate
Earth and Planetary Sciences
Washington University in St. Louis
Rudolph Hall
Campus Box 1169
1 Brookings Drive
St. Louis, MO 63130
email: mhin...@eps.wustl.edu
website: aqgeochem.wustl.edu


On Sun, Jul 6, 2014 at 5:24 PM, Bruce Ravel bra...@bnl.gov wrote:


 Matt,

 You're right.  I was too grouchy.  Margaret Anne, I apologize if I was too
 mean-spirited in my emails over the weekend.



 On 07/06/2014 05:54 PM, Matt Newville wrote:

 Wait, what?   What text string is configured to be only 256 characters?
 Something must be very wrong with the Macports installation - this file
 opens just fine for me, though I haven't tested it with the Macports
 version.

 The read_data() command in ifeffit uses a line length of 2048
 characters, and should not crash on a longer line, but truncate lines to
 2048 characters (silently, which is irritating when encountered, but not
 as bad as crashing). I've written and used thousands of data files
 with comment and data lines longer than 256 characters.I believe
 there is (and should be) nothing in the code for reading data that sets
 a limit as low as 256 characters (File names are allowed to be 512
 characters!), and nothing that should cause a crash on larger lines.

 Of course it's fine to use a plugin for specific file types, and
 probably wise to not rely of ifeffit's read_data() for really big files
 (though, again, I regularly read files of 35 to 40 columns without a
 plugin).   But this seems to me like its a Macports-only problem to me
 that should be fixed.


 I guess I explained it poorly, but it is not a MacPorts-only problem.

 It /opens/ just fine.  That's not the problem.

 It's a problem with iff_show, which Athena uses to fetch the names of the
 column labels after ifeffit reads the data file.  Here's what happens if
 you exercise iff_show by hand:

 bruce@atropos [demeter]  ifeffit
  Ifeffit  1.2.11d Copyright (c) 2008 Matt Newville, Univ of Chicago
 command-line shell version 1.1 with GNU Readline
 Ifeffit read_data (file=/home/bruce/Mn0214_7dMnO2_Header_exafsscan1.dat,
 group=a)
 Ifeffit show @strings
  $plot_devices  = /png /tpng /null /ps /vps /cps /vcps /xwindow /xserve
  $plot_device   = /xserve
  $group = a
  $commentchar   = #
  $build= 1.2.11d Copyright (c) 2008 Matt Newville, Univ of Chicago
  $install_dir  = /usr/local/share/ifeffit
  $column_label  = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
 48 49 50 51 52 53 54 55 56 57
  $column_label1 = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
 48 49 50 51 52 53 54 55 56 57
  $a_title_01= S 1  exafsscan
  $a_title_02= C exafs_edge_energy 6.539
  $a_title_03= C exafs_region -150 -20 26 1 0 0 0
  $a_title_04= C exafs_region -20 34.1959 108 1 0 0 0
  $a_title_05= C exafs_region 34.1959 972.683 260 1 0 1 1.4
  $a_title_06= D Wed Feb 26 22:19:02 2014
  $a_title_07= T 4.58834  (Seconds)
  $a_title_08= G0 0
  $a_title_09= G1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0
  $a_title_10= G3 0 0 0 0 0 0 0 0 0
  $a_title_11= G4 0
  $a_title_12= Q
  $a_title_13= P0 17.707645 -0.3425 33.862069 -0.80317213 -18.37
 0.175013 -0.175013 8.99922
  $a_title_14= P1 8.49884 8.74903 -5.0037582 8.74903 1.7763568e-14 0
 3.5002457 9.4148
  $a_title_15= P2 -44.9992 -23.95 -30.75 97.52 19.252 -11.58 8.4175
 -2.25125
  $a_title_16= P3 -5.11125 1.4875 0.7325 1.5 85 0 -600
  $a_title_17= N 57

 At line 436 of file iff_show.f
 Fortran runtime error: End of record
 bruce@atropos [demeter] 


 Line 436 of iff_show is

write(messg,11)  s(1:k), ' = ', t(1:j)

 messg is defined just above that as character*256.  I interpreted this as
 attempting to put a 330 character string in a character*256 variable.  But,
 in truth, I did not examine the code all that 

Re: [Ifeffit] Demeter-devel MacPorts Athena issues work-around

2014-07-06 Thread Matt Newville
Hi,


On Sat, Jul 5, 2014 at 2:06 PM, Bruce Ravel bra...@bnl.gov wrote:

 On 07/04/2014 12:11 PM, Margaret Hinkle wrote:

 Thanks for your help  your quick reply. I did not expect my altering
 one character in the code to fix the problem -- I had just hoped it
 would tell me if the Tip of the Day was indeed the culprit. I did as you
 suggested, and the problem is completely fixed. Thanks!

 Per your comment regarding Issue 2 -- I have attached two files, one
 with the header removed (filename: '...NoHeader_exafsscan.dat'), and the
 other with the header left in with #s commenting it out (filename:
 '...Header_exafsscan.dat'). Note that these are transmission samples,
 with I0 in column 56, and I1 in column 57.


 Margaret Anne,

 By the end of this email, I am going to thoroughly solve your problem.
 But, first, I am going to step up on my soapbox and pontificate.  It's
 kinda what I do on this mailing list



 You started this by writing I can only load data files into Athena if
 there are no headers of any sort.  That is a demonstrably untrue
 statement, and easily so.  Were it true, this mailing list would be either
 (a) filled with nothing but posts about people complaining that they cannot
 import their data, or (b) silent because no one would use software so
 completely fucked up and useless.

 A true statement might have been that you had examples of data files that
 could not be imported into Athena.  But you did not include an example of
 the troublesome data file -- I had to ask for it.

 When you ask a question, you should try to put yourself in the shoes of
 the person answering.  I am not in the same room as you, I am not looking
 at your computer, and I do not have the example that triggers the problem
 here in front of me.  And I do not possess telepathy.  When you ask a
 question, you have to give the person who wants to help a fighting chance
 of being able to help.


Grouchy?   Didn't Margaret Anne post an example file when asked?  I believe
she also tried to solve the Splash screen issue herself, and explained what
she tried in pretty good detail...  It may not have worked as well as she'd
hoped but she definitely tried something plausible (admirable) and
explained what she did (even more so).   I would call that an exemplary
report, myself.


 All right.  Enough of that.  Let's solve your problem.

Find the installation location of Demeter on your computer.  If you do not
 know where that is, then open a command terminal and enter the following
 command:

perl -e 'use Demeter; print $INC{Demeter.pm}, $/'

 The thing that gets printed is the folder containing the main Demeter
 module file.  Everything else is beneath that folder.

 Download this file:

https://s3.amazonaws.com/demeter4xas/SpecFileLongLine.pm

 and save it as

Demeter/Plugins/SpecFileLongLine.pm

 where Demeter/ is a folder inside the folder we identified above.

 Make sure that the file is called SpecFileLongLines.pm -- exactly as
 written there -- and that your web browser does not help you out by
 changing the extension of the file to .txt or any other such shenanigans.

 Now fire up Athena and select Plugin Registry from the main menu. This
 will display the view shown here:


 http://bruceravel.github.io/demeter/aug/other/plugin.html#
 athena%27spluginregistry

 There should be an row that says SpecFileLongLine.  Click it on.

 You should now be able to import your files without needing to edit the
 header.

 Note that if you attempt to import one of your data files *without*
 enabling the SpecFileLongLine plugin, Athena will continue to crash. The
 mere presence of the SpecFileLongLine.pm file is not enough -- you *must*
 enable in the plugin registry.



 So, what was the problem?

 Well, Ifeffit -- which is the math and XAS engine underneath the hood of
 Athena -- is written in Fortran.  Fortran does not have dynamic memory
 allocation.  Thus there are some hardwired limits to things in Ifeffit, not
 all of which get handled gracefully when exceeded.

 The line in your data file causing the problem is the one that starts with
 #L.  It contains the column labels and is about 330 characters long.  As
 one point, Ifeffit attempts to stuff those 330 characters in a variable
 configured to be 256 characters long.  That is the cause and location of
 the error message you cited.


Wait, what?   What text string is configured to be only 256 characters?
Something must be very wrong with the Macports  installation - this file
opens just fine for me, though I haven't tested it with the Macports
version.

The read_data() command in ifeffit uses a line length of 2048 characters,
and should not crash on a longer line, but truncate lines to 2048
characters (silently, which is irritating when encountered, but not as bad
as crashing). I've written and used thousands of data files with
comment and data lines longer than 256 characters.I believe there is
(and should be) nothing in the code for reading data 

Re: [Ifeffit] Demeter-devel MacPorts Athena issues work-around

2014-07-06 Thread Kevin Jorissen
It's kinda what I do on this mailing list.

And I think I'm unsubscribing for that reason (although, like many others
undoubtedly, I am probably professionally condemned to return eventually).
 In ten years of helping countless users as an expert on WIEN2k resp. FEFF,
and encountering all the frustrations that come with mailing lists and
novice users, I have not seen people treated the way they sometimes are on
this mailing list.  It goes against my values around helping users; it
makes me uncomfortable; and I don't want to see it anymore.

Much to your credit, you proceeded to type also several long and detailed
paragraphs addressing the issue, which were helpful to the user.

I would be delighted if you were willing to protect your time and energy (a
valid need) in a friendlier way.

Best regards,


Kevin Jorissen



PS still reachable through www.feffproject.org or at by e-mail for
FEFF-related questions.





On Sat, Jul 5, 2014 at 9:06 PM, Bruce Ravel bra...@bnl.gov wrote:

 On 07/04/2014 12:11 PM, Margaret Hinkle wrote:

 Thanks for your help  your quick reply. I did not expect my altering
 one character in the code to fix the problem -- I had just hoped it
 would tell me if the Tip of the Day was indeed the culprit. I did as you
 suggested, and the problem is completely fixed. Thanks!

 Per your comment regarding Issue 2 -- I have attached two files, one
 with the header removed (filename: '...NoHeader_exafsscan.dat'), and the
 other with the header left in with #s commenting it out (filename:
 '...Header_exafsscan.dat'). Note that these are transmission samples,
 with I0 in column 56, and I1 in column 57.


 Margaret Anne,

 By the end of this email, I am going to thoroughly solve your problem.
 But, first, I am going to step up on my soapbox and pontificate.  It's
 kinda what I do on this mailing list



 You started this by writing I can only load data files into Athena if
 there are no headers of any sort.  That is a demonstrably untrue
 statement, and easily so.  Were it true, this mailing list would be either
 (a) filled with nothing but posts about people complaining that they cannot
 import their data, or (b) silent because no one would use software so
 completely fucked up and useless.

 A true statement might have been that you had examples of data files that
 could not be imported into Athena.  But you did not include an example of
 the troublesome data file -- I had to ask for it.

 When you ask a question, you should try to put yourself in the shoes of
 the person answering.  I am not in the same room as you, I am not looking
 at your computer, and I do not have the example that triggers the problem
 here in front of me.  And I do not possess telepathy.  When you ask a
 question, you have to give the person who wants to help a fighting chance
 of being able to help.



 All right.  Enough of that.  Let's solve your problem.

 Find the installation location of Demeter on your computer.  If you do not
 know where that is, then open a command terminal and enter the following
 command:

perl -e 'use Demeter; print $INC{Demeter.pm}, $/'

 The thing that gets printed is the folder containing the main Demeter
 module file.  Everything else is beneath that folder.

 Download this file:

https://s3.amazonaws.com/demeter4xas/SpecFileLongLine.pm

 and save it as

Demeter/Plugins/SpecFileLongLine.pm

 where Demeter/ is a folder inside the folder we identified above.

 Make sure that the file is called SpecFileLongLines.pm -- exactly as
 written there -- and that your web browser does not help you out by
 changing the extension of the file to .txt or any other such shenanigans.

 Now fire up Athena and select Plugin Registry from the main menu. This
 will display the view shown here:


 http://bruceravel.github.io/demeter/aug/other/plugin.html#
 athena%27spluginregistry

 There should be an row that says SpecFileLongLine.  Click it on.

 You should now be able to import your files without needing to edit the
 header.

 Note that if you attempt to import one of your data files *without*
 enabling the SpecFileLongLine plugin, Athena will continue to crash. The
 mere presence of the SpecFileLongLine.pm file is not enough -- you *must*
 enable in the plugin registry.



 So, what was the problem?

 Well, Ifeffit -- which is the math and XAS engine underneath the hood of
 Athena -- is written in Fortran.  Fortran does not have dynamic memory
 allocation.  Thus there are some hardwired limits to things in Ifeffit, not
 all of which get handled gracefully when exceeded.

 The line in your data file causing the problem is the one that starts with
 #L.  It contains the column labels and is about 330 characters long.  As
 one point, Ifeffit attempts to stuff those 330 characters in a variable
 configured to be 256 characters long.  That is the cause and location of
 the error message you cited.

 The plugin does the simplest possible thing.  It makes a copy of the data
 file, copying every 

Re: [Ifeffit] Demeter-devel MacPorts Athena issues work-around

2014-07-06 Thread Scott Calvin
Hi all,

This is probably as good a time as any to mention a miscommunication I've seen 
come up a couple of times on the list that may have caused unnecessary 
friction. It's a good time because it =isn't= what transpired in the current 
thread (which ended happily for all involved), so it hopefully won't get bogged 
down in particulars.

Sometimes I've seen someone post to the list that they've been having an 
intermittent, difficult to diagnose, or otherwise mysterious problem, asking if 
anyone else had seen something similar. That makes for a lousy bug report, but 
is, in my opinion, a reasonable and rational use of a list like this. 

As a hypothetical, something like is the latest distributed version of 
Hephaestus working for other people using MacPorts? is a useful diagnostic 
question, and a terrible bug report. It does not require a response of any kind 
from Bruce, Matt, etc., and they should not feel compelled to give one. Works 
for me or No, Hephaestus crashes would be useful responses from other 
members of the community. 

To put it another way, I think this list straddles the boundary between being 
part of the reporting system for software and a community board. It's important 
to recognize, I think, when each function is being utilized.

That's not to say that there aren't lousy bug reports that get posted 
here--there are. When someone says Athena crashes every time I open it--please 
fix this bug, they are not being useful to anyone. But I am saying that not 
every report of problems is actually a bug report.

That said, I think this is a good list. Everyone who contributes to it is a 
volunteer, and there are interesting and helpful discussions that take place at 
a wide range of levels.

--Scott Calvin
Sarah Lawrence College

P.S. If we're looking for ways to improve the list in the future, I'd suggest 
considering the possibility of a more modern forum format. I am sure there are 
open-source platforms for such a thing. It would be wonderful to have an upvote 
type feature (Facebook's like is the most familiar example), more 
user-friendly threading, and the ability to delete and edit posts. 



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


Re: [Ifeffit] Demeter-devel MacPorts Athena issues work-around

2014-07-06 Thread Matt Newville
On Sun, Jul 6, 2014 at 5:24 PM, Bruce Ravel bra...@bnl.gov wrote:


 Matt,

 You're right.  I was too grouchy.  Margaret Anne, I apologize if I was too
 mean-spirited in my emails over the weekend.



 On 07/06/2014 05:54 PM, Matt Newville wrote:

 Wait, what?   What text string is configured to be only 256 characters?
 Something must be very wrong with the Macports installation - this file
 opens just fine for me, though I haven't tested it with the Macports
 version.

 The read_data() command in ifeffit uses a line length of 2048
 characters, and should not crash on a longer line, but truncate lines to
 2048 characters (silently, which is irritating when encountered, but not
 as bad as crashing). I've written and used thousands of data files
 with comment and data lines longer than 256 characters.I believe
 there is (and should be) nothing in the code for reading data that sets
 a limit as low as 256 characters (File names are allowed to be 512
 characters!), and nothing that should cause a crash on larger lines.

 Of course it's fine to use a plugin for specific file types, and
 probably wise to not rely of ifeffit's read_data() for really big files
 (though, again, I regularly read files of 35 to 40 columns without a
 plugin).   But this seems to me like its a Macports-only problem to me
 that should be fixed.


 I guess I explained it poorly, but it is not a MacPorts-only problem.

 It /opens/ just fine.  That's not the problem.

 It's a problem with iff_show, which Athena uses to fetch the names of the
 column labels after ifeffit reads the data file.  Here's what happens if
 you exercise iff_show by hand:

 bruce@atropos [demeter]  ifeffit
  Ifeffit  1.2.11d Copyright (c) 2008 Matt Newville, Univ of Chicago
 command-line shell version 1.1 with GNU Readline
 Ifeffit read_data (file=/home/bruce/Mn0214_7dMnO2_Header_exafsscan1.dat,
 group=a)
 Ifeffit show @strings
  $plot_devices  = /png /tpng /null /ps /vps /cps /vcps /xwindow /xserve
  $plot_device   = /xserve
  $group = a
  $commentchar   = #
  $build= 1.2.11d Copyright (c) 2008 Matt Newville, Univ of Chicago
  $install_dir  = /usr/local/share/ifeffit
  $column_label  = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
 48 49 50 51 52 53 54 55 56 57
  $column_label1 = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
 48 49 50 51 52 53 54 55 56 57
  $a_title_01= S 1  exafsscan
  $a_title_02= C exafs_edge_energy 6.539
  $a_title_03= C exafs_region -150 -20 26 1 0 0 0
  $a_title_04= C exafs_region -20 34.1959 108 1 0 0 0
  $a_title_05= C exafs_region 34.1959 972.683 260 1 0 1 1.4
  $a_title_06= D Wed Feb 26 22:19:02 2014
  $a_title_07= T 4.58834  (Seconds)
  $a_title_08= G0 0
  $a_title_09= G1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0
  $a_title_10= G3 0 0 0 0 0 0 0 0 0
  $a_title_11= G4 0
  $a_title_12= Q
  $a_title_13= P0 17.707645 -0.3425 33.862069 -0.80317213 -18.37
 0.175013 -0.175013 8.99922
  $a_title_14= P1 8.49884 8.74903 -5.0037582 8.74903 1.7763568e-14 0
 3.5002457 9.4148
  $a_title_15= P2 -44.9992 -23.95 -30.75 97.52 19.252 -11.58 8.4175
 -2.25125
  $a_title_16= P3 -5.11125 1.4875 0.7325 1.5 85 0 -600
  $a_title_17= N 57

 At line 436 of file iff_show.f
 Fortran runtime error: End of record
 bruce@atropos [demeter] 


 Line 436 of iff_show is

write(messg,11)  s(1:k), ' = ', t(1:j)

 messg is defined just above that as character*256.  I interpreted this as
 attempting to put a 330 character string in a character*256 variable.  But,
 in truth, I did not examine the code all that closely.

 I suppose I could have worked on fixing Ifeffit, but the plugin took way
 less time.  And my time would be better spent making Demeter use Larch
 properly.


Or perhaps upgraded (see
https://github.com/newville/ifeffit/commit/0b3512552dd08a85d4d69cbd32b4e525e30f8a63
)?  One of the problems of using a deprecated and poorly supported library,
I suppose  -- the Fortran code does have many shortcomings, but such
crashes should definitely be addressed.

The MacPorts (and other versions) may want to build with the 1.2.12 source
code from github -- this isn't the only problem fixed in the past 6 years.

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


Re: [Ifeffit] Demeter-devel MacPorts Athena issues work-around

2014-07-05 Thread Bruce Ravel

On 07/04/2014 12:11 PM, Margaret Hinkle wrote:

Thanks for your help  your quick reply. I did not expect my altering
one character in the code to fix the problem -- I had just hoped it
would tell me if the Tip of the Day was indeed the culprit. I did as you
suggested, and the problem is completely fixed. Thanks!

Per your comment regarding Issue 2 -- I have attached two files, one
with the header removed (filename: '...NoHeader_exafsscan.dat'), and the
other with the header left in with #s commenting it out (filename:
'...Header_exafsscan.dat'). Note that these are transmission samples,
with I0 in column 56, and I1 in column 57.



Margaret Anne,

By the end of this email, I am going to thoroughly solve your problem. 
But, first, I am going to step up on my soapbox and pontificate.  It's 
kinda what I do on this mailing list




You started this by writing I can only load data files into Athena if 
there are no headers of any sort.  That is a demonstrably untrue 
statement, and easily so.  Were it true, this mailing list would be 
either (a) filled with nothing but posts about people complaining that 
they cannot import their data, or (b) silent because no one would use 
software so completely fucked up and useless.


A true statement might have been that you had examples of data files 
that could not be imported into Athena.  But you did not include an 
example of the troublesome data file -- I had to ask for it.


When you ask a question, you should try to put yourself in the shoes of 
the person answering.  I am not in the same room as you, I am not 
looking at your computer, and I do not have the example that triggers 
the problem here in front of me.  And I do not possess telepathy.  When 
you ask a question, you have to give the person who wants to help a 
fighting chance of being able to help.




All right.  Enough of that.  Let's solve your problem.

Find the installation location of Demeter on your computer.  If you do 
not know where that is, then open a command terminal and enter the 
following command:


   perl -e 'use Demeter; print $INC{Demeter.pm}, $/'

The thing that gets printed is the folder containing the main Demeter 
module file.  Everything else is beneath that folder.


Download this file:

   https://s3.amazonaws.com/demeter4xas/SpecFileLongLine.pm

and save it as

   Demeter/Plugins/SpecFileLongLine.pm

where Demeter/ is a folder inside the folder we identified above.

Make sure that the file is called SpecFileLongLines.pm -- exactly as 
written there -- and that your web browser does not help you out by 
changing the extension of the file to .txt or any other such shenanigans.


Now fire up Athena and select Plugin Registry from the main menu. 
This will display the view shown here:



http://bruceravel.github.io/demeter/aug/other/plugin.html#athena%27spluginregistry

There should be an row that says SpecFileLongLine.  Click it on.

You should now be able to import your files without needing to edit the 
header.


Note that if you attempt to import one of your data files *without* 
enabling the SpecFileLongLine plugin, Athena will continue to crash. 
The mere presence of the SpecFileLongLine.pm file is not enough -- you 
*must* enable in the plugin registry.




So, what was the problem?

Well, Ifeffit -- which is the math and XAS engine underneath the hood of 
Athena -- is written in Fortran.  Fortran does not have dynamic memory 
allocation.  Thus there are some hardwired limits to things in Ifeffit, 
not all of which get handled gracefully when exceeded.


The line in your data file causing the problem is the one that starts 
with #L.  It contains the column labels and is about 330 characters 
long.  As one point, Ifeffit attempts to stuff those 330 characters in a 
variable configured to be 256 characters long.  That is the cause and 
location of the error message you cited.


The plugin does the simplest possible thing.  It makes a copy of the 
data file, copying every line except the one beginning with #L.  Athena 
then reads the copy.  The original data is untouched, the copy is 
deleted once Athena reads it in.  Athena is happy and so, I hope, are you!




Let me know if you have any problems with the plugin.  It worked for me 
on my linux computer.  I suspect it'll work for you as well, but one 
never knows


B




--
 Bruce Ravel   bra...@bnl.gov

 National Institute of Standards and Technology
 Synchrotron Science Group at NSLS --- Beamlines U7A, X24A, X23A2
 Building 535A
 Upton NY, 11973

 Homepage:http://xafs.org/BruceRavel
 Software:https://github.com/bruceravel
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


Re: [Ifeffit] Demeter-devel MacPorts Athena issues work-around

2014-07-05 Thread Margaret Hinkle
Dear Bruce,
Your fix worked beautifully -- thank you for your clear instructions!
Athena  I are both very happy. The data loads in perfectly.

And I do apologize for my poor wording with my initial e-mail --  my
statement about the MacPort version of Athena not being able to load in
data files with 'headers of any sort' was really a reflection on the fact
that I had attempted to load in data files from 4 different beamlines at
the APS, so I did not think at the time that my problem was
header-type-specific. However, I did not specifically say that in my email
(going for brevity). If I run across a problem in the future, I will be
sure to include example files and all the pertinent information upfront.

Thank you again for all your help!

Best,
Margaret Anne


Margaret Anne G. Hinkle
Ph.D. Candidate
Earth and Planetary Sciences
Washington University in St. Louis
Rudolph Hall
Campus Box 1169
1 Brookings Drive
St. Louis, MO 63130
email: mhin...@eps.wustl.edu
website: aqgeochem.wustl.edu


On Sat, Jul 5, 2014 at 2:06 PM, Bruce Ravel bra...@bnl.gov wrote:

 On 07/04/2014 12:11 PM, Margaret Hinkle wrote:

 Thanks for your help  your quick reply. I did not expect my altering
 one character in the code to fix the problem -- I had just hoped it
 would tell me if the Tip of the Day was indeed the culprit. I did as you
 suggested, and the problem is completely fixed. Thanks!

 Per your comment regarding Issue 2 -- I have attached two files, one
 with the header removed (filename: '...NoHeader_exafsscan.dat'), and the
 other with the header left in with #s commenting it out (filename:
 '...Header_exafsscan.dat'). Note that these are transmission samples,
 with I0 in column 56, and I1 in column 57.


 Margaret Anne,

 By the end of this email, I am going to thoroughly solve your problem.
 But, first, I am going to step up on my soapbox and pontificate.  It's
 kinda what I do on this mailing list



 You started this by writing I can only load data files into Athena if
 there are no headers of any sort.  That is a demonstrably untrue
 statement, and easily so.  Were it true, this mailing list would be either
 (a) filled with nothing but posts about people complaining that they cannot
 import their data, or (b) silent because no one would use software so
 completely fucked up and useless.

 A true statement might have been that you had examples of data files that
 could not be imported into Athena.  But you did not include an example of
 the troublesome data file -- I had to ask for it.

 When you ask a question, you should try to put yourself in the shoes of
 the person answering.  I am not in the same room as you, I am not looking
 at your computer, and I do not have the example that triggers the problem
 here in front of me.  And I do not possess telepathy.  When you ask a
 question, you have to give the person who wants to help a fighting chance
 of being able to help.



 All right.  Enough of that.  Let's solve your problem.

 Find the installation location of Demeter on your computer.  If you do not
 know where that is, then open a command terminal and enter the following
 command:

perl -e 'use Demeter; print $INC{Demeter.pm}, $/'

 The thing that gets printed is the folder containing the main Demeter
 module file.  Everything else is beneath that folder.

 Download this file:

https://s3.amazonaws.com/demeter4xas/SpecFileLongLine.pm

 and save it as

Demeter/Plugins/SpecFileLongLine.pm

 where Demeter/ is a folder inside the folder we identified above.

 Make sure that the file is called SpecFileLongLines.pm -- exactly as
 written there -- and that your web browser does not help you out by
 changing the extension of the file to .txt or any other such shenanigans.

 Now fire up Athena and select Plugin Registry from the main menu. This
 will display the view shown here:


 http://bruceravel.github.io/demeter/aug/other/plugin.html#
 athena%27spluginregistry

 There should be an row that says SpecFileLongLine.  Click it on.

 You should now be able to import your files without needing to edit the
 header.

 Note that if you attempt to import one of your data files *without*
 enabling the SpecFileLongLine plugin, Athena will continue to crash. The
 mere presence of the SpecFileLongLine.pm file is not enough -- you *must*
 enable in the plugin registry.



 So, what was the problem?

 Well, Ifeffit -- which is the math and XAS engine underneath the hood of
 Athena -- is written in Fortran.  Fortran does not have dynamic memory
 allocation.  Thus there are some hardwired limits to things in Ifeffit, not
 all of which get handled gracefully when exceeded.

 The line in your data file causing the problem is the one that starts with
 #L.  It contains the column labels and is about 330 characters long.  As
 one point, Ifeffit attempts to stuff those 330 characters in a variable
 configured to be 256 characters long.  That is the cause and location of
 the error message 

Re: [Ifeffit] Demeter-devel MacPorts Athena issues work-around

2014-07-04 Thread Bruce Ravel

On 07/03/2014 06:54 PM, Margaret Hinkle wrote:

Issue 1. With the new demeter-devel Macports download, Athena freezes
upon opening. Opening up Athena via Terminal brought up perl5.16 -- I
could see the GUI, the Tip of the Day, and the Athena startup box, but
the system just froze. I had to force quit every time, getting the
following notice in my Terminal: 'Terminated: 15'. I had a feeling it
was an issue with the Tip of the Day popping up, so I edited the
Athena.pm file (in the UI folder), and edited line 197 from
‘$app-show_tip ifDemeter-co-default('athena', 'tips');’ TO
  ‘$app-show_tip ifDemeter-co-default('athena', 'tip');’
(honestly, I don't know enough about this code to be able to give it a
real option that would turn off the Tip of the Day as the default, so I
just hoped this would make the program give me general error in the GUI
but that Athena could still load). Luckily, my not-fix fix worked. I get
an error every time I open it, but after clicking 'OK', Athena behaves
just like normal. I hope you can use this information to provide a real
fix to the problem!


It *is* surprising that removing random characters from the source code 
didn't fix the problem!


There is another way that you might have asked this question, something 
like, I am having this problem with Athena and I am suspicious that the 
tips-of-the-day dialog is to blame.  Is there a way to disable it before 
starting Athena?


Look for the '[athena]' section of demeter.ini, which should be in 
'$HOME/.horae'.  Set the tips parameter to false.  That will 
suppress the tips dialog.




Issue 2. I can only load data files into Athena if there are no headers
of any sort -- commenting out each header line with a # or % does not
work. When I try to load in a .dat file with a commented-out header, I
get the following error message in Terminal:
'At line 436 of file iff_show.f
Fortran runtime error: End of record'
followed by Athena quitting itself.
This is an issue with both the regular Macports demeter download and the
demeter-devel download. These data files loaded in just fine to the old
iXAFS version of Athena, and on a PC. Is there a plugin I should be
using in the Demeter versions? If I delete the header, or load it in
from a .prj file, everything works just fine. So it is not huge issue,
as I do have a work around.


It is not reasonable to expect anyone on the list to understand your 
problem if you do not provide an example.  Without being able to 
reproduce a problem on my own computer, I can only speculate.


Perhaps it has something to do with very long lines in the data file... 
perhaps something having to do with non-ASCII characters...


B

--
 Bruce Ravel   bra...@bnl.gov

 National Institute of Standards and Technology
 Synchrotron Science Group at NSLS --- Beamlines U7A, X24A, X23A2
 Building 535A
 Upton NY, 11973

 Homepage:http://xafs.org/BruceRavel
 Software:https://github.com/bruceravel
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit


[Ifeffit] Demeter-devel MacPorts Athena issues work-around

2014-07-03 Thread Margaret Hinkle
Dear OS X Users,
First let me thank Frank Schima for fixing the issues with Artemis and
ATOMS with his new demeter-devel Macports download -- I (and all Mac users)
greatly appreciate it!

I thought I would bring two issues with Macports Athena to your attention...

FYI, I am using Mac OS X Mavericks v. 10.9.4, with an Intel processor. I
followed the directions found here today to delete the old version of
demeter and download the new one:
http://www.mail-archive.com/ifeffit%40millenia.cars.aps.anl.gov/msg04404.html

Issue 1. With the new demeter-devel Macports download, Athena freezes upon
opening. Opening up Athena via Terminal brought up perl5.16 -- I could see
the GUI, the Tip of the Day, and the Athena startup box, but the system
just froze. I had to force quit every time, getting the following notice in
my Terminal: 'Terminated: 15'. I had a feeling it was an issue with the Tip
of the Day popping up, so I edited the Athena.pm file (in the UI folder),
and edited line 197 from
‘$app-show_tip if Demeter-co-default('athena', 'tips');’ TO
 ‘$app-show_tip if Demeter-co-default('athena', 'tip');’
(honestly, I don't know enough about this code to be able to give it a real
option that would turn off the Tip of the Day as the default, so I just
hoped this would make the program give me general error in the GUI but that
Athena could still load). Luckily, my not-fix fix worked. I get an error
every time I open it, but after clicking 'OK', Athena behaves just like
normal. I hope you can use this information to provide a real fix to the
problem!

Issue 2. I can only load data files into Athena if there are no headers of
any sort -- commenting out each header line with a # or % does not work.
When I try to load in a .dat file with a commented-out header, I get the
following error message in Terminal:
'At line 436 of file iff_show.f
Fortran runtime error: End of record'
followed by Athena quitting itself.
This is an issue with both the regular Macports demeter download and the
demeter-devel download. These data files loaded in just fine to the old
iXAFS version of Athena, and on a PC. Is there a plugin I should be using
in the Demeter versions? If I delete the header, or load it in from a .prj
file, everything works just fine. So it is not huge issue, as I do have a
work around.

Thank you, Frank, for the new version of Demeter, and thank you all for any
thoughts you have on Issue 2.

Best regards,
Margaret Anne


Margaret Anne G. Hinkle
Ph.D. Candidate
Earth and Planetary Sciences
Washington University in St. Louis
Rudolph Hall
Campus Box 1169
1 Brookings Drive
St. Louis, MO 63130
email: mhin...@eps.wustl.edu
website: aqgeochem.wustl.edu
___
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit