Open eteq opened 6 years ago
I really like having the capability of interacting with line lists, but it doesn't necessarily need to be a core (i.e., in specutils) tool. I use things like http://github.com/phn/lineid_plot to show line labels overlaid on data.
Populating the line lists should happen via astroquery & related tools. For radio work, there are several commonly used lists that can reasonably be adapted for this purpose. For optical, the NIST databases exist and may have a functional astroquery interface, but these lists are, in my experience, more comprehensive than astrophysically useful. Are there good databases of 'commonly seen lines in [stellar atmospheres/nebulae/galaxies]' that we can link to?
I think such functionality would be useful, but at a later stage, that in specutils 3.0 or so. Let's collect some experience how this will be used in the wild, before attempting to design an interface that's this complex. In cool stars, you might want a list that does not only have the line positions, but also the line strength so you can filter on the "important" lines. Lines also react different to Zeeman broadening, so you might want that in there, lines have different scattering profiles etc. I'm not saying that all that should be part of specutils, but that it would be useful to have an interface that allows additional data on each line (e.g. in the form of additional table columns) if the user has a need and a data source for these lines.
I think we might want to favor waiting for a user story that specifically requires/requests this functionality and deal with in then. For now, I think we should close this ticket and reference it in future conversations.
Just a random perspective here from an interested party. I am the author of the roentgen package which provides access to emission lines. This is provided through a get_lines function which returns an Astropy Table (see https://roentgen.readthedocs.io/en/latest/guide/lines.html and https://roentgen.readthedocs.io/en/latest/examples/tutorial3.html).
Just a random perspective here from an interested party. I am the author of the roentgen package which provides access to emission lines. This is provided through a get_lines function which returns an Astropy Table (see https://roentgen.readthedocs.io/en/latest/guide/lines.html and https://roentgen.readthedocs.io/en/latest/examples/tutorial3.html).
A lot of context for this in #195, but this is a new issue to be more specific.
While a lot of the analysis functionality is meant to operate on spectral lines, currently
specutils
has no concept of "line lists". The simplest implementation I can imagine would be a table with a line per row (note that, critically, the "line center" column needs to be aQuantity
so that it works with the analysis functions). Next level is a list ofSpectralLine
objects that are basically just informational (although they should probably "quack like"Quantity
so that they are compatible), and it's a list of them.Another important layer of complexity is populating them/organizing the collection of lists. This is necessary because very different lists of lines are important for, say, galaxies vs. stars (or even hot stars vs cool stars). There are some fairly standard ones out there, but that requires some science context. I imagine the simplest thing might be a dictionary mapping names to lists, but we would then need to implement accessors, have the list somewhere that's fairly readable, implement ways for users to add custom lists, etc.
The question is: Do we want to do this in
specutils
? Or do we consider this "higher level" code, meaning it should live in a spectral visualization code, or a job for the user, etc?