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%27spluginre... 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 ------------------------------------ bravel@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