Skip to content
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

[WIP] Adding support for linetools line lists as default #174

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

chummels
Copy link
Collaborator

@chummels chummels commented Oct 12, 2021

This PR adds support for using the linetools package to populate our line lists used when generating spectral features. Up until now, trident has used a text file, lines.txt with information ~200 different lines including their rest wavelength, oscillator strength, and gamma values. lines.txt was created using data from the NIST database and follows lines that are largely in the COS low-z window. linetools is a package created and used by observers across all of UV and optical astronomy assembled from empirical data. While we will leave in the old interface for creating text files, like lines.txt, for users to populate their own line data, it's generally a better default to use linetools for line information since that is what observers are using to analyze these datasets.

Right now, this PR is a work in progress, so please do not merge it until I remove the [WIP] tag. I want to put out a new stable version of trident before merging the linetools stuff, and I need to vet it a bit better and add some documentation.

To change Trident's line list to use linetools, you simply have to create your SpectrumGenerator with a different kwarg:

sg_new = trident.SpectrumGenerator('COS', line_database=None)

as opposed to if you want the default lines.txt line list:

sg_old = trident.SpectrumGenerator('COS', line_database='lines.txt')

@chummels chummels marked this pull request as draft October 12, 2021 22:15
@jzuhone
Copy link
Contributor

jzuhone commented Mar 9, 2023

@chummels I'm going to play with this, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants