sxs-collaboration / sxs

Python code for manipulating data from the SXS collaboration
MIT License
25 stars 18 forks source link

Backwards compatibility with waveforms #20

Closed moble closed 3 years ago

moble commented 3 years ago

I forgot to add the basic code needed for backwards compatibility with NRAR-format waveform files, so that modes can be indexed as "Y_l2_m2.dat" or whatever, in analogy with how Horizons objects work. It would also be nice to return a subclassed dict when the user doesn't specify the extrapolation level, so that this indexing can even work from the top level, as in

with sxs.loadcontext("SXS:BBH:0123/Lev/rhOverM") as f:
    h22 = f["OutermostExtraction.dir/Y_l2_m2.dat"]