[Ifeffit] Reading individual data columns with ifeffit
newville at cars.uchicago.edu
Fri Apr 4 16:53:10 CDT 2008
Like Bruce said, ifeffit always reads in the whole data file into data
arrays. We could change that....
If you're running out of data space, you can remove temporary arrays:
macro readbigfile file group
read_data($1, group=_tmp_, label='c1 c2 c3 c4')
set $2.energy = _tmp_.c1
set $2.i0 = _tmp_.c2
set $2.fe_01 = _tmp_.c3
erase @group _tmp_
readbigfile 'mydatafile.dat' 'mygroup'
(which will read everything and save what you want). This will
potentially use up a lot of space, which should then be freed. I
think that athena does this sort of trick (read to temporary
variables, then erase most of it) when reading in data for
multi-element detectors. (If you work hard at this and have large
enough data sets, you'll eventually bring ifeffit's crude data
management to its knees).
For what it's worth, the 'narrays' argument is for weirdly formatted
datafiles where 1 line / row does not correspond to 1 data point.
Oddly enough, it happens that data sometimes gets written to ASCII
files like this:
energy1 i01 it2 energy2 i02 it2 energy3 i03 it3
energy4 i04 it4 energy5 i05 it5 energy5 i05 it5
Apparently, that's from back in the days when newline characters were
More information about the Ifeffit