This would be a follow-on to #243 . Since one of the core work-flows of synphot is to be able to do synthetic photometry on spectra, it seems to me like it would make sense to tie Observation closer together with the bridge in #243. More specifically, The following is what I'm suggesting be made to work:
The idea would be that this be implemented pretty transparently by just having the Observation recognize Spectrum1D and call the method from the #243. But we don't want to have this force a specutils dependency where one isn't necessary. So we could use duck-typing - E.g., something like this could go in Observation:
def __init__(self, spec, ...):
if hasattr(spec, 'flux') and hasattr(spec, 'spectral_axis'):
spec = SourceSpectrum.from_spectrum1D(spec)
...
that would allow the work flow I said above without requiring an explicit specutils dependency.
This would be a follow-on to #243 . Since one of the core work-flows of synphot is to be able to do synthetic photometry on spectra, it seems to me like it would make sense to tie
Observation
closer together with the bridge in #243. More specifically, The following is what I'm suggesting be made to work:The idea would be that this be implemented pretty transparently by just having the
Observation
recognizeSpectrum1D
and call the method from the #243. But we don't want to have this force aspecutils
dependency where one isn't necessary. So we could use duck-typing - E.g., something like this could go inObservation
:that would allow the work flow I said above without requiring an explicit
specutils
dependency.