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

updating the data model #188

Open
moustakas opened this issue Nov 10, 2024 · 1 comment
Open

updating the data model #188

moustakas opened this issue Nov 10, 2024 · 1 comment

Comments

@moustakas
Copy link
Member

The current data model consists of two FITS extensions: METADATA and FASTSPEC, which can be reviewed here:
https://fastspecfit.readthedocs.io/en/latest/fastspec.html.

The number of columns in the FASTSPEC HDU is approaching ~1000 columns, however, which has become too unwieldy, and also doesn't allow for expansion of the data model.

Consequently, I propose expansion to three extensions, METADATA, FASTSPEC, and SPECPHOT, as summarized in the following document:
https://docs.google.com/spreadsheets/d/1DnCPhu-62b8JgC7ZjY422sh9I006lJ4a1gt8Inwij_M/edit?gid=0#gid=0

Feedback is more than welcome.

@moustakas
Copy link
Member Author

Note that a nice snippet of code to convert from TSNR2 to EFFTIME was provided by @araichoor on-list

def get_snr2time(tracer):
    ensemble_dir = os.path.join(os.getenv("DESIMODEL"), "data", "tsnr")
    fn = os.path.join(ensemble_dir, "tsnr-ensemble-{}.fits".format(tracer.lower()))
    return fits.getheader(fn, 0)["SNR2TIME"]

for tracer in ["BGS", "LRG", "ELG", "QSO", "LYA"]:
    print("{}\t{}".format(tracer, get_snr2time(tracer)))

=>

BGS    0.1400000003119347
LRG    12.15060572324326
ELG    8.60000036161418
QSO    33.6094737399845
LYA    11.80090901380597

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

No branches or pull requests

1 participant