Closed stephenmwilkins closed 11 months ago
I don't think you want methods on grid. Rather, you want a method that converts the spectra array on grid into an sed object. You can then treat it like any other sed object
Yes, this makes most sense. I wonder if SED objects with 2D arrays (or worse) will work?
Dropping in to point out that apply_filter
works on an arbitrary dimensional array as long as the final dimension is the wavelength dimension. See the doc string.
It would be helpful to have methods on Grid that calculate the broadband luminosity and ionising photon luminosity for the entire grid. For the luminosity it would take a
FilterCollection
as an argument and return a 2D array of luminosities. For the ionising photon luminosity it would take the min and (optionally) max photon wavelengths (or energies or frequencies) and, again, return a 2D array.Obviously this could be done in a loop, and maybe that's simplest, and I can implement it. However, @WillJRoper may have a more efficient approach if the
apply_filter
methods can take 2D arrays?