-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"high-level" function for extinguishing spectra? #52
Comments
You are pushing that |
|
I have not looked at Spectrum1D yet. I will. One concern I have is it would be nice to have functions that work with data other than Spectrum1D objects. Is there advice for how to do this or would it require two functions, one that accepts x and y and one that accepts a Spectrum1D object? The current extinction functions that are members of each extinction model are more generic that what is being proposed here. Could just make a wrapper function around those called extinguish_spectrum1D. Should there be a corresponding unextinguish function? The IDL versions of the code were all about this (called unredding there). |
You mean something like http://docs.astropy.org/en/stable/api/astropy.utils.misc.InheritDocstrings.html ? |
@pllim : something like that. But I thought we were no longer supposed to use six? |
@pllim : I checked if the inheritdocstrings added in the extinguish function to the docs for the different dust model classes. It did not. In fact, it made the building of documentation unhappy in the generation of the plots.
|
That
Ah, probably not that use case. How about using |
That does work. But now there are lots of member functions - all of those associated with these classes inheriting the astropy model functions. Need to think about this and maybe just put such documentation manually in the docstring from each extinction model. |
In my own projects, I usually go the "lazy" route of just stating "see base class doc for more info". Granted that is not very convenient but it is easy! |
If I look at http://dust-extinction.readthedocs.io/en/latest/dust_extinction/extinguish.html it is extremely useful for understanding how to use the various models (and hence should not be removed even if the "high-level" functions are added)... But it also seems like it has a certain amount of repetitive work required to handle wavelengths.
So what I would like to see is the following:
and have
extspec
be aSpectrum1D
. It's debatable whether this should be the actualextinguish
method - maybe anextinguish_spectrum
would make more sense... but I think it's one of the most straightforward use cases I can see with real data.Caveat: the specutils APE was just merged last month. I believe
Spectrum1D
is compatible enough already that you could do this now, but it might be one morespecutils
release is required before it's worth putting in the effort to make this method.It may be there are some other areas where this sort of "high-level" function/method might be useful, too (particularly given the package-scope discussion f #47), but this is the immediately obvious case that I saw.
The text was updated successfully, but these errors were encountered: