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

2MASS 0415 Ingest #565

Merged
merged 10 commits into from
Nov 19, 2024
21 changes: 21 additions & 0 deletions data/reference/Instruments.json
Original file line number Diff line number Diff line change
Expand Up @@ -453,5 +453,26 @@
"telescope": "JWST",
"description": "Fixed Slit",
"reference": null
},
{
"instrument": "IRC",
"mode": "Missing",
"telescope": "AKARI",
"description": null,
"reference": null
},
{
"instrument": "IRC",
"mode": "NIR",
canavarrete01 marked this conversation as resolved.
Show resolved Hide resolved
"telescope": "AKARI",
"description": null,
"reference": null
},
canavarrete01 marked this conversation as resolved.
Show resolved Hide resolved
{
"instrument": "LRIS",
"mode": "Missing",
"telescope": "KECK I",
"description": null,
"reference": null
}
canavarrete01 marked this conversation as resolved.
Show resolved Hide resolved
]
18 changes: 18 additions & 0 deletions data/reference/Publications.json
Original file line number Diff line number Diff line change
Expand Up @@ -7306,5 +7306,23 @@
"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/1/6",
"description": null
},
{
"reference": "Simc13",
"bibcode": "2013PASP..125..270S",
"doi": "10.1086/670241",
"description": null
},
{
"reference": "Burg03",
"bibcode": "2003ApJ...594..510B",
"doi": "10.1086/376756",
"description": null
}
canavarrete01 marked this conversation as resolved.
Show resolved Hide resolved
]
10 changes: 10 additions & 0 deletions data/reference/Telescopes.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,15 @@
"telescope": "LCO",
"description": null,
"reference": null
},
{
"telescope": "AKARI",
"description": null,
"reference": null
canavarrete01 marked this conversation as resolved.
Show resolved Hide resolved
},
{
"telescope": "KECK I",
"description": null,
"reference": null
}
canavarrete01 marked this conversation as resolved.
Show resolved Hide resolved
]
54 changes: 53 additions & 1 deletion data/source/2mass_j04151954-0935066.json
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,21 @@
"other_references": null
},
{
"access_url": "https://s3.amazonaws.com/bdnyc/spex-prism_2MASSIJ0415195-093506_20030917_BUR04B.txt",
"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": "nir",
"telescope": "KECK I",
"instrument": "LRIS",
"mode": "Missing",
"observation_date": "2001-02-20T00:00:00",
"comments": "The Spectra of T Dwarfs. II. Red Optical Data",
"reference": "Burg03",
"other_references": 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 +381,45 @@
"comments": null,
"reference": "Burg04.2856",
"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": "nir",
"telescope": "KECK I",
"instrument": "LRIS",
"mode": "Missing",
"observation_date": "2006-12-26T00:00:00",
"comments": "A Sample of Very Young Field L Dwarfs and Implications for the Brown Dwarf 'Lithium Test' at Early Ages",
"reference": "Kirk08",
"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": "NIR",
"observation_date": "2007-08-23T00:00:00",
"comments": "AKARI Observations of Brown Dwarfs. III. CO, CO2, and CH4 Fundamental Bands and Physical Parameters",
"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": "FIRE: A Facility Class Near-Infrared Echelle Spectrometer for the Magellan Telescopes",
"reference": "Simc13",
"other_references": null
}
],
"SpectralTypes": [
Expand Down
119 changes: 119 additions & 0 deletions scripts/ingests/Ingest_2MASS_J0415_09.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
"""

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 * # load_astrodb, ingest_instrument, ingest_publication, find_publication
from simple.utils.spectra import * # ingest_spectrum
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)

#Dictionary of new spectra
spectras = [

{
"file": "https://bdnyc.s3.us-east-1.amazonaws.com/AKARI_2MASS%2BJ04151954-0935066_2007-08-23.fits",
"source": "2MASS J04151954-0935066",
"regime": "nir",
"telescope": "AKARI",
"instrument": "IRC",
"mode": "NIR",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read through the paper and I found that this observation was taken in mode "IRC04".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mode should be IRC04, not NIR

"obs_date": "2007-08-23",
"reference": "Sora12",
"bibcode": "2012ApJ...760..151S",
"comments":"AKARI Observations of Brown Dwarfs. III. CO, CO2, and CH4 Fundamental Bands and Physical Parameters",
"doi": "10.1088/0004-637X/760/1/6",
canavarrete01 marked this conversation as resolved.
Show resolved Hide resolved

},
{
"file": "https://bdnyc.s3.us-east-1.amazonaws.com/FIRE/FIRE_0415-0935.fits",
"source": "2MASS J04151954-0935066",
"regime": "nir",
"telescope": "Magellan I Baade",
"instrument": "FIRE",
"mode": "Echelle",
"obs_date": "2010-09-20",
"reference": "Simc13",
"comments": "FIRE: A Facility Class Near-Infrared Echelle Spectrometer for the Magellan Telescopes",
"bibcode": "2013PASP..125..270S",
"doi": "10.1086/670241",
canavarrete01 marked this conversation as resolved.
Show resolved Hide resolved
},
{
"file": "https://bdnyc.s3.us-east-1.amazonaws.com/LRIS/KECK_LRIS_2MASSJ04151954-0935066_T8_LRIS_Burg03.fits",
"source": "2MASS J04151954-0935066",
"regime": "nir",
"telescope": "KECK I",
"instrument": "LRIS",
"mode": "Missing",
"obs_date": "2001-02-20",
"reference": "Burg03",
"comments": "The Spectra of T Dwarfs. II. Red Optical Data",
"bibcode": "2003ApJ...594..510B",
"doi": "10.1086/376756",

},
{
"file": "https://bdnyc.s3.us-east-1.amazonaws.com/LRIS/KECK_LRIS_2MASS_J04151954-0935066_2006-12-26.fits",
"source": "2MASS J04151954-0935066",
"regime": "nir",
"telescope": "KECK I",
"instrument": "LRIS",
"mode": "Missing",
"obs_date": "2006-12-26",
"reference": "Kirk08",
"comments": "A Sample of Very Young Field L Dwarfs and Implications for the Brown Dwarf 'Lithium Test' at Early Ages",
"bibcode": "2008ApJ...689.1295K",
"doi": "10.1086/592768",
}
]


#Ingest data
for spectrum in spectras:

ingest_instrument(
db,
telescope=spectrum["telescope"],
instrument=spectrum["instrument"],
mode=spectrum["mode"],
)

status, details = find_publication(db, reference=spectrum["reference"])
if status == False:
ingest_publication(
db,
reference=spectrum["reference"],
bibcode=spectrum['bibcode'],
doi=spectrum['doi'],
ignore_ads=True,
)


ingest_spectrum(
db,
source=spectrum["source"],
spectrum=spectrum["file"],
regime=spectrum["regime"],
telescope=spectrum["telescope"],
instrument=spectrum["instrument"],
mode=spectrum["mode"],
obs_date=spectrum["obs_date"],
reference=spectrum["reference"],
comments=spectrum['comments']

)
canavarrete01 marked this conversation as resolved.
Show resolved Hide resolved

# Save to Database
db.save_database(directory="data/")
Loading