Hi Bruce, At the moment, No. But that should be easy and a very good idea to separate reading headers plus the data table from naming of the 1d arrays... Like, I often run into cases where I want to rename arrays after reading the file. I'll work on that.
I'd also like to be able to sensibly handle columns of non numeric data. Maybe that's too separate a topic.... On Dec 22, 2017 11:48, "Bruce Ravel" <bra...@bnl.gov> wrote: > > Matt, > > 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. > > B > > > -- > Bruce Ravel ------------------------------------ bra...@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/ > _______________________________________________ > Ifeffit mailing list > Ifeffit@millenia.cars.aps.anl.gov > http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit > Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit >
_______________________________________________ Ifeffit mailing list Ifeffit@millenia.cars.aps.anl.gov http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit Unsubscribe: http://millenia.cars.aps.anl.gov/mailman/options/ifeffit