[Ifeffit] data table for larch data group

Bruce Ravel bravel at bnl.gov
Fri Dec 22 11:47:35 CST 2017


If I read an ascii file with read_ascii() like so:

   a = read_ascii(file)

The "a" group has a data attribute which contains the entire data table 
as a 2D array.  It also has 1D arrays for each column from the data 
table.  Those 1D arrays have attribute names taken from the column labels.

If I do something to change the data table, is there a function that I 
can call that repopulates the 1D arrays with the columns of the altered 
data table?

For example:

   a = read_ascii(file)

a.data is, say, array<shape=(5,500)>

   a.data = a.data[:, (0 .. 10)]

now a.data is, say, array<shape=(5,11)>

   a.repopulate_arrays()  # <---- the thing i am looking for....

Now a.energy, a.i0, etc should be array<shape=(11,)>

Hope that's clear.


  Bruce Ravel  ------------------------------------ bravel at bnl.gov

  National Institute of Standards and Technology
  Synchrotron Science Group at NSLS-II
  Building 743, Room 114
  Upton NY, 11973

  Homepage:    http://bruceravel.github.io/home/
  Beamline:    https://www.bnl.gov/ps/beamlines/beamline.php?r=6-BM
  Software:    https://github.com/bruceravel
  Demeter:     http://bruceravel.github.io/demeter/

More information about the Ifeffit mailing list