Skip to content

Commit

Permalink
2MASS 0415 Ingest (#565)
Browse files Browse the repository at this point in the history
* Ingest data related to 2MASS J0415

---------

Co-authored-by: Kelle Cruz <[email protected]>
  • Loading branch information
canavarrete01 and kelle authored Nov 19, 2024
1 parent 6d85268 commit 4306792
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 4 deletions.
7 changes: 7 additions & 0 deletions data/reference/Instruments.json
Original file line number Diff line number Diff line change
Expand Up @@ -453,5 +453,12 @@
"telescope": "JWST",
"description": "Fixed Slit",
"reference": null
},
{
"instrument": "IRC",
"mode": "IRC04",
"telescope": "AKARI",
"description": null,
"reference": "Onak07"
}
]
24 changes: 24 additions & 0 deletions data/reference/Publications.json
Original file line number Diff line number Diff line change
Expand Up @@ -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, CO<SUB>2</SUB>, and CH<SUB>4</SUB> 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"
}
]
5 changes: 5 additions & 0 deletions data/reference/Telescopes.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,10 @@
"telescope": "LCO",
"description": null,
"reference": null
},
{
"telescope": "AKARI",
"description": null,
"reference": "Mura07"
}
]
56 changes: 54 additions & 2 deletions data/source/2mass_j04151954-0935066.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": [
Expand Down
96 changes: 96 additions & 0 deletions scripts/ingests/Ingest_2MASS_J0415_09.py
Original file line number Diff line number Diff line change
@@ -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/")
4 changes: 2 additions & 2 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4306792

Please sign in to comment.