read/write the Athena project files
from mauro.rovezzi:
one feature that would be very beneficial in est is to >read/write the Athena project files. In fact, a large number of users in the XAS community have their data stored as list of groups in the Athena files.
A simple function to read energy and mu of groups in a .prj file would be as simple as:
#test file: wget https://github.com/xraypy/xraylarch/blob/master/examples/pca/cyanobacteria.prj
from larch.io import read_athena
project = read_athena('cyanobacteria.prj')
groups = []
for name, g in project._athena_groups.items():
groups.append((g.energy, g.mu))
return groups
Edited by payno