From 4306792c21ab3fe3adb6813efa49072453020869 Mon Sep 17 00:00:00 2001 From: Carolina Navarrete <100876091+canavarrete01@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:35:52 -0500 Subject: [PATCH] 2MASS 0415 Ingest (#565) * Ingest data related to 2MASS J0415 --------- Co-authored-by: Kelle Cruz --- data/reference/Instruments.json | 7 ++ data/reference/Publications.json | 24 ++++++ data/reference/Telescopes.json | 5 ++ data/source/2mass_j04151954-0935066.json | 56 +++++++++++++- scripts/ingests/Ingest_2MASS_J0415_09.py | 96 ++++++++++++++++++++++++ tests/test_data.py | 4 +- 6 files changed, 188 insertions(+), 4 deletions(-) create mode 100644 scripts/ingests/Ingest_2MASS_J0415_09.py diff --git a/data/reference/Instruments.json b/data/reference/Instruments.json index 140731c55..a5934a06f 100644 --- a/data/reference/Instruments.json +++ b/data/reference/Instruments.json @@ -453,5 +453,12 @@ "telescope": "JWST", "description": "Fixed Slit", "reference": null + }, + { + "instrument": "IRC", + "mode": "IRC04", + "telescope": "AKARI", + "description": null, + "reference": "Onak07" } ] \ No newline at end of file diff --git a/data/reference/Publications.json b/data/reference/Publications.json index af9de4a69..13d19b869 100644 --- a/data/reference/Publications.json +++ b/data/reference/Publications.json @@ -7306,5 +7306,29 @@ "bibcode": "2024AJ....167..253R", "doi": "10.3847/1538-3881/ad324e", "description": "89 New Ultracool Dwarf Comoving Companions Identified with the Backyard Worlds: Planet 9 Citizen Science Project" + }, + { + "reference": "Sora12", + "bibcode": "2012ApJ...760..151S", + "doi": "10.1088/0004-637X/760/2/151", + "description": "AKARI Observations of Brown Dwarfs. III. CO, CO2, and CH4 Fundamental Bands and Physical Parameters" + }, + { + "reference": "Simc13", + "bibcode": "2013PASP..125..270S", + "doi": "10.1086/670241", + "description": "FIRE: A Facility Class Near-Infrared Echelle Spectrometer for the Magellan Telescopes" + }, + { + "reference": "Mura07", + "bibcode": "2007PASJ...59S.369M", + "doi": "10.1093/pasj/59.sp2.S369", + "description": "The Infrared Astronomical Mission AKARI*" + }, + { + "reference": "Onak07", + "bibcode": "2007PASJ...59S.401O", + "doi": "10.1093/pasj/59.sp2.S401", + "description": "The Infrared Camera (IRC) for AKARI -- Design and Imaging Performance" } ] \ No newline at end of file diff --git a/data/reference/Telescopes.json b/data/reference/Telescopes.json index 816af4dba..45c1ddf11 100644 --- a/data/reference/Telescopes.json +++ b/data/reference/Telescopes.json @@ -188,5 +188,10 @@ "telescope": "LCO", "description": null, "reference": null + }, + { + "telescope": "AKARI", + "description": null, + "reference": "Mura07" } ] \ No newline at end of file diff --git a/data/source/2mass_j04151954-0935066.json b/data/source/2mass_j04151954-0935066.json index e5ca39a47..6e04ff378 100644 --- a/data/source/2mass_j04151954-0935066.json +++ b/data/source/2mass_j04151954-0935066.json @@ -357,8 +357,8 @@ "other_references": null }, { - "access_url": "https://s3.amazonaws.com/bdnyc/spex-prism_2MASSIJ0415195-093506_20030917_BUR04B.txt", - "original_spectrum": null, + "access_url": "https://bdnyc.s3.us-east-1.amazonaws.com/SpeX/Prism/IRTF_SpeX_2MASS%2BJ04151954-0935066_2003-09-17.fits", + "original_spectrum": "https://s3.amazonaws.com/bdnyc/spex-prism_2MASSIJ0415195-093506_20030917_BUR04B.txt", "local_spectrum": "$BDNYC_spectra/SpeX/Prism/spex-prism_2MASSIJ0415195-093506_20030917_BUR04B.txt", "regime": "nir", "telescope": "IRTF", @@ -368,6 +368,58 @@ "comments": null, "reference": "Burg04.2856", "other_references": null + }, + { + "access_url": "https://bdnyc.s3.us-east-1.amazonaws.com/AKARI_2MASS%2BJ04151954-0935066_2007-08-23.fits", + "original_spectrum": null, + "local_spectrum": null, + "regime": "nir", + "telescope": "AKARI", + "instrument": "IRC", + "mode": "IRC04", + "observation_date": "2007-08-23T00:00:00", + "comments": null, + "reference": "Sora12", + "other_references": null + }, + { + "access_url": "https://bdnyc.s3.us-east-1.amazonaws.com/FIRE/FIRE_0415-0935.fits", + "original_spectrum": null, + "local_spectrum": null, + "regime": "nir", + "telescope": "Magellan I Baade", + "instrument": "FIRE", + "mode": "Echelle", + "observation_date": "2010-09-20T00:00:00", + "comments": null, + "reference": "Simc13", + "other_references": null + }, + { + "access_url": "https://bdnyc.s3.us-east-1.amazonaws.com/LRIS/KECK_LRIS_2MASSJ04151954-0935066_T8_LRIS_Burg03.fits", + "original_spectrum": null, + "local_spectrum": null, + "regime": "optical", + "telescope": "Keck I", + "instrument": "LRIS", + "mode": "Missing", + "observation_date": "2001-02-20T00:00:00", + "comments": null, + "reference": "Burg03.510", + "other_references": null + }, + { + "access_url": "https://bdnyc.s3.us-east-1.amazonaws.com/LRIS/KECK_LRIS_2MASS_J04151954-0935066_2006-12-26.fits", + "original_spectrum": null, + "local_spectrum": null, + "regime": "optical", + "telescope": "Keck I", + "instrument": "LRIS", + "mode": "Missing", + "observation_date": "2006-12-26T00:00:00", + "comments": null, + "reference": "Kirk08", + "other_references": null } ], "SpectralTypes": [ diff --git a/scripts/ingests/Ingest_2MASS_J0415_09.py b/scripts/ingests/Ingest_2MASS_J0415_09.py new file mode 100644 index 000000000..6a37b816a --- /dev/null +++ b/scripts/ingests/Ingest_2MASS_J0415_09.py @@ -0,0 +1,96 @@ +""" + +Data to be Ingested: +- Akari Spectrum +- FIRE Magellan Spectrum +- KECK LRIS Spectrum Burg '03 +- Keck LRIS Spectrum Kirk '08 + +Key Functions: +- Ingest_Spectra, Ingest Publication, Ingest Instrument + +""" + +from astrodb_utils import * +from simple.utils.spectra import * +from simple.schema import Spectra +from simple.schema import * +from simple.schema import REFERENCE_TABLES + +#Load in Database +db = load_astrodb("SIMPLE.sqlite", recreatedb=True, reference_tables=REFERENCE_TABLES) + +# Ingest data +ingest_publication( + db, + bibcode = "2012ApJ...760..151S" +) + +ingest_publication( + db, + bibcode = "2013PASP..125..270S" +) + +ingest_publication( + db, + bibcode="2007PASJ...59S.369M" +) + +ingest_publication( + db, + bibcode = "2007PASJ...59S.401O" +) + +ingest_spectrum( + db, + source="2MASS J04151954-0935066", + spectrum="https://bdnyc.s3.us-east-1.amazonaws.com/AKARI_2MASS%2BJ04151954-0935066_2007-08-23.fits", + regime="nir", + telescope="AKARI", + instrument="IRC", + mode="IRC04", + obs_date="2007-08-23", + reference="Sora12" + +) + +ingest_spectrum( + db, + source="2MASS J04151954-0935066", + spectrum="https://bdnyc.s3.us-east-1.amazonaws.com/FIRE/FIRE_0415-0935.fits", + regime="nir", + telescope="Magellan I Baade", + instrument="FIRE", + mode="Echelle", + obs_date="2010-09-20", + reference="Simc13" + +) + +ingest_spectrum( + db, + source="2MASS J04151954-0935066", + spectrum="https://bdnyc.s3.us-east-1.amazonaws.com/LRIS/KECK_LRIS_2MASS_J04151954-0935066_2006-12-26.fits", + regime="optical", + instrument="LRIS", + telescope="Keck I", + mode="Missing", + obs_date="2006-12-26", + reference="Kirk08" +) + +ingest_spectrum( + db, + source="2MASS J04151954-0935066", + spectrum="https://bdnyc.s3.us-east-1.amazonaws.com/LRIS/KECK_LRIS_2MASSJ04151954-0935066_T8_LRIS_Burg03.fits", + regime="optical", + instrument="LRIS", + telescope="Keck I", + mode="Missing", + obs_date="2001-02-20", + reference="Burg03.510" +) + + +# Save to Database +db.save_database(directory="data/") diff --git a/tests/test_data.py b/tests/test_data.py index f3deffbd0..b9a47645b 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -242,11 +242,11 @@ def test_missions(db): def test_spectra(db): regime = "optical" t = db.query(db.Spectra).filter(db.Spectra.c.regime == regime).astropy() - assert len(t) == 740, f"found {len(t)} spectra in the {regime} regime" + assert len(t) == 742, f"found {len(t)} spectra in the {regime} regime" regime = "nir" t = db.query(db.Spectra).filter(db.Spectra.c.regime == regime).astropy() - assert len(t) == 578, f"found {len(t)} spectra in the {regime} regime" + assert len(t) == 580, f"found {len(t)} spectra in the {regime} regime" regime = "mir" t = db.query(db.Spectra).filter(db.Spectra.c.regime == regime).astropy()