sxs-collaboration / sxs

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

Slicing WaveformModes objects #19

Closed moble closed 4 months ago

moble commented 3 years ago

One problem a user ran into during the ICERM workshop was that given w.norm and w[:, 2], he expected w[:, 2].norm to work. I suggested that this failure was a bug, but now I'm not convinced it should work at all, because it changes the meaning of "norm". Instead, w[:, 2] should return a basic TimeSeries object — or maybe some Waveform object that isn't WaveformModes — because it really doesn't contain the information I expect. Specifically, whenever the modes are sliced, I need to make sure that ell_min and ell_max are reset correctly, and if the slice does not respect mode boundaries, it should return a different type of object. I can imagine that norm might still make some sense, but only in the general sense of abs**2.

In any case, I have work to do to ensure that slicing modes deals with the mode metadata sensibly.