From 8b81c663af74b08a50d5592a4da106b5e4e4548e Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Tue, 5 Dec 2023 16:52:38 -0500 Subject: [PATCH 01/26] First ingest wise_1810-1010 --- data/2mass_j12560183-1257276.json | 8 ++--- data/Publications.json | 12 +++++++ data/Versions.json | 2 +- data/cwisep_j181006.00-101001.1.json | 32 +++++++++++++++++ scripts/ingests/ingest_wise_1810-1010.py | 45 ++++++++++++++++++++++++ 5 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 data/cwisep_j181006.00-101001.1.json create mode 100644 scripts/ingests/ingest_wise_1810-1010.py diff --git a/data/2mass_j12560183-1257276.json b/data/2mass_j12560183-1257276.json index eed3a0b12..6f15633b6 100644 --- a/data/2mass_j12560183-1257276.json +++ b/data/2mass_j12560183-1257276.json @@ -30,6 +30,9 @@ { "other_name": "VHS 1256-1257b" }, + { + "other_name": "VHS 1256b" + }, { "other_name": "VHS J125601.92-125723.9 b" }, @@ -38,9 +41,6 @@ }, { "other_name": "WISEA J125601.66-125728.7" - }, - { - "other_name": "VHS 1256b" } ], "Parallaxes": [ @@ -267,4 +267,4 @@ "reference": "Gauz15" } ] -} +} \ No newline at end of file diff --git a/data/Publications.json b/data/Publications.json index a673cefb0..6a6c12d3d 100644 --- a/data/Publications.json +++ b/data/Publications.json @@ -6928,5 +6928,17 @@ "bibcode": "2020ApJ...903L..33V", "doi": "10.3847/2041-8213/abc256", "description": "Direct Radio Discovery of a Cold Brown Dwarf" + }, + { + "reference": "Schn20", + "bibcode": "2020ApJ...898...77S", + "doi": "10.3847/1538-4357/ab9a40", + "description": "WISEA J041451.67-585456.7 and WISEA J181006.18-101000.5: The First Extreme T-type Subdwarfs?" + }, + { + "reference": "Lodi22", + "bibcode": "2022A&A...663A..84L", + "doi": "10.1051/0004-6361/202243516", + "description": "Physical properties and trigonometric distance of the peculiar dwarf WISE J181005.5\u2212101002.3" } ] \ No newline at end of file diff --git a/data/Versions.json b/data/Versions.json index 186743d38..52a11cc17 100644 --- a/data/Versions.json +++ b/data/Versions.json @@ -53,4 +53,4 @@ "end_date": null, "description": "Version in development" } -] +] \ No newline at end of file diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json new file mode 100644 index 000000000..d16e6fc28 --- /dev/null +++ b/data/cwisep_j181006.00-101001.1.json @@ -0,0 +1,32 @@ +{ + "Sources": [ + { + "source": "CWISEP J181006.00-101001.1", + "ra": 272.52574999999996, + "dec": -10.166805555555555, + "epoch": null, + "equinox": null, + "shortname": null, + "reference": "Schn20", + "other_references": null, + "comments": null + } + ], + "Names": [ + { + "other_name": "CWISEP J181006.00-101001.1" + }, + { + "other_name": "Wise 1810-1010" + } + ], + "Parallaxes": [ + { + "parallax": 112.5, + "parallax_error": 8.1, + "adopted": true, + "comments": null, + "reference": "Lodi22" + } + ] +} \ No newline at end of file diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py new file mode 100644 index 000000000..9b6f60410 --- /dev/null +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -0,0 +1,45 @@ +# script ingest first data into companion tables + +from scripts.ingests.ingest_utils import * +from scripts.ingests.utils import * +from astropy.table import Table +import astropy.units as u +from astropy.coordinates import Angle + + +SAVE_DB = True # save the data files in addition to modifying the .db file +RECREATE_DB = True # recreates the .db file from the data files +# LOAD THE DATABASE +db = load_simpledb('SIMPLE.db', recreatedb=RECREATE_DB) + + +# Ingest wise_1810-1010 and its reference +#doi- 10.3847/1538-4357/ab9a40 and 10.1051/0004-6361/202243516 +#bibcode of coordinates reference- 2020ApJ...898...77S and 2022A&A...663A..84L +ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") + +ingest_publication(db, doi = "10.1051/0004-6361/202243516") + +ra_1810= Angle("18 10 06.18", u.hour).degree +dec_1010=Angle("-10 10 00.5", u.degree).degree + +ingest_sources(db, ["CWISEP J181006.00-101001.1"], references=["Schn20"], + ras= [ra_1810], + decs=[dec_1010], + search_db=False) + +# Ingest other name for Wise 1810-1010 (one used in SIMBAD) +# code from deprecated utils does not work +ingest_names(db, 'CWISEP J181006.00-101001.1', 'Wise 1810-1010') + +# PARALLAXES +ingest_parallaxes(db, + sources = ["CWISEP J181006.00-101001.1"], + plxs = [112.5], + plx_errs = [8.1], + plx_refs = "Lodi22", + comments=None) + +# WRITE THE JSON FILES +if SAVE_DB: + db.save_database(directory='data/') \ No newline at end of file From de5a8daa18f02179185c747488cf1c1b27197df2 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Tue, 5 Dec 2023 17:21:48 -0500 Subject: [PATCH 02/26] Changed tests --- tests/test_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_data.py b/tests/test_data.py index fc2b46a0e..d94ad1144 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -183,7 +183,7 @@ def test_proper_motion_refs(db): def test_parallax_refs(db): # Test total odopted measuruments t = db.query(db.Parallaxes).filter(db.Parallaxes.c.adopted == 1).astropy() - assert len(t) == 1442, f'found {len(t)} adopted parallax measuruments.' + assert len(t) == 1443, f'found {len(t)} adopted parallax measuruments.' ref = 'GaiaDR3' t = db.query(db.Parallaxes).filter(db.Parallaxes.c.reference == ref).astropy() @@ -266,7 +266,7 @@ def test_missions(db): stm = except_(select(db.Names.c.source).where(db.Names.c.other_name.like("WISE%")), select(db.Photometry.c.source).where(db.Photometry.c.band.like("WISE%"))) s = db.session.scalars(stm).all() - assert len(s) == 479, f'found {len(s)} sources with WISE designation that have no WISE photometry' + assert len(s) == 480, f'found {len(s)} sources with WISE designation that have no WISE photometry' # If Wise photometry, Wise designation should be in Names stm = except_(select(db.Photometry.c.source).where(db.Photometry.c.band.like("WISE%")), From d126a819ad49f6ab2f9e544a4301e8b9a07a281d Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Wed, 6 Dec 2023 14:08:26 -0500 Subject: [PATCH 03/26] Ingest of proper motions --- data/cwisep_j181006.00-101001.1.json | 11 +++++++++++ scripts/ingests/ingest_wise_1810-1010.py | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index d16e6fc28..383923b44 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -28,5 +28,16 @@ "comments": null, "reference": "Lodi22" } + ], + "ProperMotions": [ + { + "mu_ra": -1027.0, + "mu_ra_error": 3.5, + "mu_dec": -246.4, + "mu_dec_error": 3.6, + "adopted": true, + "comments": null, + "reference": "Schn20" + } ] } \ No newline at end of file diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 9b6f60410..80e99978f 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -40,6 +40,14 @@ plx_refs = "Lodi22", comments=None) +# PROPER MOTIONS +ingest_proper_motions(db, sources = ["CWISEP J181006.00-101001.1"], + pm_ras = [-1027], + pm_ra_errs = [3.5], + pm_decs = [-246.4], + pm_dec_errs = [3.6], + pm_references = "Schn20") + # WRITE THE JSON FILES if SAVE_DB: db.save_database(directory='data/') \ No newline at end of file From fbaf3e3bfb39a377983c96847f189cb1b8194393 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Thu, 7 Dec 2023 06:46:50 -0500 Subject: [PATCH 04/26] Attempted ingest modeled parameters dictionary --- scripts/ingests/ingest_wise_1810-1010.py | 48 ++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 80e99978f..3258cdc7f 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -48,6 +48,54 @@ pm_dec_errs = [3.6], pm_references = "Schn20") + +#Ingest Functions for Modeled Parameters (Gravity, Metallicity, Radius, Mass) +#Creating list of dictionaries for each value in table 6 formatted for modeled parameters + +#Lines 54 to 73 can be rewritten by hand + +ingest_modeled_parameters_dict = [{ + 'Gravity': + {'value': [5.0], + 'value_error': [0.25], + 'parameter': "Radius", 'unit': 'dex', + 'reference': "Lodi22"}, + + 'Metallicity': + {'value': [-1.5], + 'value_error': [0.5], + 'parameter': "Metallicity", 'unit': 'dex', + 'reference': "Lodi22"}, + 'Radius': + {'value': [0.067], + 'value_error': [0.032], #Highest value error was picked between +0.032 & -0.020 listed + 'parameter': "Radius", 'unit': 'R_jup', + 'reference': "Lodi22"}, + 'Mass': + {'value': [17], + 'value_error': [56], #Highest value error was picked between +56 & -12 listed + 'parameter': "mass", 'unit': 'M_jup', + 'reference': "Lodi22"} + }] + + + + +#Lines 98 - 106 needed after created own dict parameters +source = "CWISEP J181006.00-101001.1" +value_types = ['Gravity', 'Metallicity', 'Radius', 'Mass'] +with db.engine.connect() as conn: + for row in ingest_modeled_parameters_dict: + row_dict = [] + for value_type in value_types: + if row[value_type]['value'] is not None: # Checking that there's a value + conn.execute(db.ModeledParameters.insert().values({'source': row['source'], 'reference': 'Lodi22', **row[value_type]})) + + conn.commit() + +#KeyError with 'source' + + # WRITE THE JSON FILES if SAVE_DB: db.save_database(directory='data/') \ No newline at end of file From 4989015e6fcd221bb32c185891bfd3512f8a3da9 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Fri, 8 Dec 2023 15:58:57 -0500 Subject: [PATCH 05/26] ingest_publications not defined error --- scripts/ingests/ingest_wise_1810-1010.py | 105 ++++++++++++----------- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 3258cdc7f..5d7a3c2fa 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -7,7 +7,7 @@ from astropy.coordinates import Angle -SAVE_DB = True # save the data files in addition to modifying the .db file +SAVE_DB = False # True: save the data files(json) in addition to modifying the .db file RECREATE_DB = True # recreates the .db file from the data files # LOAD THE DATABASE db = load_simpledb('SIMPLE.db', recreatedb=RECREATE_DB) @@ -16,32 +16,37 @@ # Ingest wise_1810-1010 and its reference #doi- 10.3847/1538-4357/ab9a40 and 10.1051/0004-6361/202243516 #bibcode of coordinates reference- 2020ApJ...898...77S and 2022A&A...663A..84L -ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") +def add_publications(db): -ingest_publication(db, doi = "10.1051/0004-6361/202243516") + ingest_publications(db, doi = "10.3847/1538-4357/ab9a40") -ra_1810= Angle("18 10 06.18", u.hour).degree -dec_1010=Angle("-10 10 00.5", u.degree).degree + ingest_publications(db, doi = "10.1051/0004-6361/202243516") -ingest_sources(db, ["CWISEP J181006.00-101001.1"], references=["Schn20"], +def add_sources(db): + + ra_1810= Angle("18 10 06.18", u.hour).degree + dec_1010=Angle("-10 10 00.5", u.degree).degree + + ingest_sources(db, ["CWISEP J181006.00-101001.1"], references=["Schn20"], ras= [ra_1810], decs=[dec_1010], search_db=False) -# Ingest other name for Wise 1810-1010 (one used in SIMBAD) -# code from deprecated utils does not work -ingest_names(db, 'CWISEP J181006.00-101001.1', 'Wise 1810-1010') -# PARALLAXES -ingest_parallaxes(db, + # Ingest other name for Wise 1810-1010 (one used in SIMBAD) + # code from deprecated utils does not work + ingest_names(db, 'CWISEP J181006.00-101001.1', 'Wise 1810-1010') + +def add_parallaxes(db): + ingest_parallaxes(db, sources = ["CWISEP J181006.00-101001.1"], plxs = [112.5], plx_errs = [8.1], plx_refs = "Lodi22", comments=None) -# PROPER MOTIONS -ingest_proper_motions(db, sources = ["CWISEP J181006.00-101001.1"], +def add_proper_motions(db): + ingest_proper_motions(db, sources = ["CWISEP J181006.00-101001.1"], pm_ras = [-1027], pm_ra_errs = [3.5], pm_decs = [-246.4], @@ -50,51 +55,53 @@ #Ingest Functions for Modeled Parameters (Gravity, Metallicity, Radius, Mass) -#Creating list of dictionaries for each value in table 6 formatted for modeled parameters - -#Lines 54 to 73 can be rewritten by hand - -ingest_modeled_parameters_dict = [{ +#Creating list of dictionaries for each value formatted for modeled parameters +def add_modeled_parameters_dict(db): + ingest_modeled_parameters_dict = [{ 'Gravity': - {'value': [5.0], - 'value_error': [0.25], - 'parameter': "Radius", 'unit': 'dex', + {'value': 5.0, + 'value_error': 0.25, + 'parameter': "Radius", + 'unit': 'dex', 'reference': "Lodi22"}, 'Metallicity': - {'value': [-1.5], - 'value_error': [0.5], - 'parameter': "Metallicity", 'unit': 'dex', + {'value': -1.5, + 'value_error': 0.5, + 'parameter': "Metallicity", + 'unit': 'dex', 'reference': "Lodi22"}, 'Radius': - {'value': [0.067], - 'value_error': [0.032], #Highest value error was picked between +0.032 & -0.020 listed - 'parameter': "Radius", 'unit': 'R_jup', + {'value': 0.067, + 'value_error': 0.032, #Highest value error was picked between +0.032 & -0.020 listed + 'parameter': "Radius", + 'unit': 'R_jup', 'reference': "Lodi22"}, 'Mass': - {'value': [17], - 'value_error': [56], #Highest value error was picked between +56 & -12 listed - 'parameter': "mass", 'unit': 'M_jup', + {'value': 17, + 'value_error': 56, #Highest value error was picked between +56 & -12 listed + 'parameter': "mass", + 'unit': 'M_jup', 'reference': "Lodi22"} - }] - - - - -#Lines 98 - 106 needed after created own dict parameters -source = "CWISEP J181006.00-101001.1" -value_types = ['Gravity', 'Metallicity', 'Radius', 'Mass'] -with db.engine.connect() as conn: - for row in ingest_modeled_parameters_dict: - row_dict = [] - for value_type in value_types: - if row[value_type]['value'] is not None: # Checking that there's a value - conn.execute(db.ModeledParameters.insert().values({'source': row['source'], 'reference': 'Lodi22', **row[value_type]})) - - conn.commit() - -#KeyError with 'source' - + }] + + source = "CWISEP J181006.00-101001.1" + value_types = ['Gravity', 'Metallicity', 'Radius', 'Mass'] + with db.engine.connect() as conn: + for row in ingest_modeled_parameters_dict: + row_dict = [] + for value_type in value_types: + if row[value_type]['value'] is not None: # Checking that there's a value + conn.execute(db.ModeledParameters.insert().values({'source': source, 'reference': 'Lodi22', **row[value_type]})) + + conn.commit() + +#Call functions/ Comment out when not needed +add_publications(db) +add_sources(db) +add_parallaxes(db) +add_proper_motions(db) +add_modeled_parameters_dict(db) # WRITE THE JSON FILES if SAVE_DB: From 2f2c2bec26a04ef32381e3a9f14de091fb6ded21 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Fri, 8 Dec 2023 16:07:27 -0500 Subject: [PATCH 06/26] Similar publication may exist --- scripts/ingests/ingest_wise_1810-1010.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 5d7a3c2fa..ed984e55e 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -18,9 +18,9 @@ #bibcode of coordinates reference- 2020ApJ...898...77S and 2022A&A...663A..84L def add_publications(db): - ingest_publications(db, doi = "10.3847/1538-4357/ab9a40") + ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") - ingest_publications(db, doi = "10.1051/0004-6361/202243516") + ingest_publication(db, doi = "10.1051/0004-6361/202243516") def add_sources(db): From 7da8101b738be5c8a2fc708d2d1ce6a42fba3eaa Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Fri, 8 Dec 2023 16:20:03 -0500 Subject: [PATCH 07/26] Publications errors --- scripts/ingests/ingest_wise_1810-1010.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index ed984e55e..20135c87d 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -1,4 +1,4 @@ -# script ingest first data into companion tables +# Script ingest first data into companion tables from scripts.ingests.ingest_utils import * from scripts.ingests.utils import * @@ -16,9 +16,9 @@ # Ingest wise_1810-1010 and its reference #doi- 10.3847/1538-4357/ab9a40 and 10.1051/0004-6361/202243516 #bibcode of coordinates reference- 2020ApJ...898...77S and 2022A&A...663A..84L -def add_publications(db): +def add_publication(db): - ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") + ingest_publications(db, doi = "10.3847/1538-4357/ab9a40") ingest_publication(db, doi = "10.1051/0004-6361/202243516") From 4bae0952c40dd936db697426f99cd7031aee8777 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Fri, 8 Dec 2023 16:30:23 -0500 Subject: [PATCH 08/26] Attempting new push --- scripts/ingests/ingest_wise_1810-1010.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 20135c87d..8b03641cf 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -5,7 +5,7 @@ from astropy.table import Table import astropy.units as u from astropy.coordinates import Angle - + SAVE_DB = False # True: save the data files(json) in addition to modifying the .db file RECREATE_DB = True # recreates the .db file from the data files From e6af0101ce03d6fed4309a6a990311229976db87 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Fri, 8 Dec 2023 16:38:26 -0500 Subject: [PATCH 09/26] push attempt --- scripts/ingests/ingest_wise_1810-1010.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 8b03641cf..186f134ab 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -5,7 +5,7 @@ from astropy.table import Table import astropy.units as u from astropy.coordinates import Angle - + SAVE_DB = False # True: save the data files(json) in addition to modifying the .db file RECREATE_DB = True # recreates the .db file from the data files From 0dbe02869da69eb85b608abb62471287c99da9c1 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Fri, 8 Dec 2023 16:39:27 -0500 Subject: [PATCH 10/26] push attempt --- scripts/ingests/ingest_wise_1810-1010.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 186f134ab..7eb766dd5 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -5,7 +5,7 @@ from astropy.table import Table import astropy.units as u from astropy.coordinates import Angle - + SAVE_DB = False # True: save the data files(json) in addition to modifying the .db file RECREATE_DB = True # recreates the .db file from the data files From 044d6fa771232d7c4db91e76c457d8cb16c2c055 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Mon, 11 Dec 2023 12:30:22 -0500 Subject: [PATCH 11/26] updated publications wise1810-1010 --- data/cwisep_j181006.00-101001.1.json | 2 +- scripts/ingests/ingest_wise_1810-1010.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index 383923b44..34434fad3 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -37,7 +37,7 @@ "mu_dec_error": 3.6, "adopted": true, "comments": null, - "reference": "Schn20" + "reference": "Schn20" } ] } \ No newline at end of file diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 7eb766dd5..0f2e7aad2 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -7,7 +7,7 @@ from astropy.coordinates import Angle -SAVE_DB = False # True: save the data files(json) in addition to modifying the .db file +SAVE_DB = True # True: save the data files(json) in addition to modifying the .db file RECREATE_DB = True # recreates the .db file from the data files # LOAD THE DATABASE db = load_simpledb('SIMPLE.db', recreatedb=RECREATE_DB) @@ -18,7 +18,7 @@ #bibcode of coordinates reference- 2020ApJ...898...77S and 2022A&A...663A..84L def add_publication(db): - ingest_publications(db, doi = "10.3847/1538-4357/ab9a40") + ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") ingest_publication(db, doi = "10.1051/0004-6361/202243516") @@ -57,7 +57,7 @@ def add_proper_motions(db): #Ingest Functions for Modeled Parameters (Gravity, Metallicity, Radius, Mass) #Creating list of dictionaries for each value formatted for modeled parameters def add_modeled_parameters_dict(db): - ingest_modeled_parameters_dict = [{ + ingest_modeled_parameters = [{ 'Gravity': {'value': 5.0, 'value_error': 0.25, @@ -88,7 +88,7 @@ def add_modeled_parameters_dict(db): source = "CWISEP J181006.00-101001.1" value_types = ['Gravity', 'Metallicity', 'Radius', 'Mass'] with db.engine.connect() as conn: - for row in ingest_modeled_parameters_dict: + for row in ingest_modeled_parameters: row_dict = [] for value_type in value_types: if row[value_type]['value'] is not None: # Checking that there's a value @@ -97,11 +97,11 @@ def add_modeled_parameters_dict(db): conn.commit() #Call functions/ Comment out when not needed -add_publications(db) -add_sources(db) +#add_publication(db) +#add_sources(db) add_parallaxes(db) add_proper_motions(db) -add_modeled_parameters_dict(db) +#add_modeled_parameters_dict(db) # WRITE THE JSON FILES if SAVE_DB: From fbfef2f74d8a8ddcedb6e204091ce24a6a18c80f Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Mon, 11 Dec 2023 12:31:46 -0500 Subject: [PATCH 12/26] update --- data/cwisep_j181006.00-101001.1.json | 2 +- scripts/ingests/ingest_wise_1810-1010.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index 34434fad3..c799d98bc 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -40,4 +40,4 @@ "reference": "Schn20" } ] -} \ No newline at end of file +} \ No newline at end of file diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 0f2e7aad2..4f63fe695 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -17,7 +17,7 @@ #doi- 10.3847/1538-4357/ab9a40 and 10.1051/0004-6361/202243516 #bibcode of coordinates reference- 2020ApJ...898...77S and 2022A&A...663A..84L def add_publication(db): - + ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") ingest_publication(db, doi = "10.1051/0004-6361/202243516") From 9aa8527e07b92d700473706d51121004a15e5262 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Mon, 11 Dec 2023 13:43:25 -0500 Subject: [PATCH 13/26] modeled parameters ingested --- data/cwisep_j181006.00-101001.1.json | 38 ++++++++++++++++++++++-- scripts/ingests/ingest_wise_1810-1010.py | 14 ++++----- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index c799d98bc..e6928f6c2 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -12,6 +12,40 @@ "comments": null } ], + "ModeledParameters": [ + { + "parameter": "log g", + "value": 5.0, + "value_error": 0.25, + "unit": "dex", + "comments": null, + "reference": "Lodi22" + }, + { + "parameter": "mass", + "value": 17.0, + "value_error": 56.0, + "unit": "M_jup", + "comments": null, + "reference": "Lodi22" + }, + { + "parameter": "metallicity", + "value": -1.5, + "value_error": 0.5, + "unit": "dex", + "comments": null, + "reference": "Lodi22" + }, + { + "parameter": "radius", + "value": 0.067, + "value_error": 0.032, + "unit": "R_jup", + "comments": null, + "reference": "Lodi22" + } + ], "Names": [ { "other_name": "CWISEP J181006.00-101001.1" @@ -37,7 +71,7 @@ "mu_dec_error": 3.6, "adopted": true, "comments": null, - "reference": "Schn20" + "reference": "Schn20" } ] -} \ No newline at end of file +} \ No newline at end of file diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 4f63fe695..f6d4486f8 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -17,8 +17,8 @@ #doi- 10.3847/1538-4357/ab9a40 and 10.1051/0004-6361/202243516 #bibcode of coordinates reference- 2020ApJ...898...77S and 2022A&A...663A..84L def add_publication(db): - - ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") + + #ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") ingest_publication(db, doi = "10.1051/0004-6361/202243516") @@ -61,20 +61,20 @@ def add_modeled_parameters_dict(db): 'Gravity': {'value': 5.0, 'value_error': 0.25, - 'parameter': "Radius", + 'parameter': "log g", 'unit': 'dex', 'reference': "Lodi22"}, 'Metallicity': {'value': -1.5, 'value_error': 0.5, - 'parameter': "Metallicity", + 'parameter': "metallicity", 'unit': 'dex', 'reference': "Lodi22"}, 'Radius': {'value': 0.067, 'value_error': 0.032, #Highest value error was picked between +0.032 & -0.020 listed - 'parameter': "Radius", + 'parameter': "radius", 'unit': 'R_jup', 'reference': "Lodi22"}, 'Mass': @@ -89,7 +89,7 @@ def add_modeled_parameters_dict(db): value_types = ['Gravity', 'Metallicity', 'Radius', 'Mass'] with db.engine.connect() as conn: for row in ingest_modeled_parameters: - row_dict = [] + for value_type in value_types: if row[value_type]['value'] is not None: # Checking that there's a value conn.execute(db.ModeledParameters.insert().values({'source': source, 'reference': 'Lodi22', **row[value_type]})) @@ -101,7 +101,7 @@ def add_modeled_parameters_dict(db): #add_sources(db) add_parallaxes(db) add_proper_motions(db) -#add_modeled_parameters_dict(db) +add_modeled_parameters_dict(db) # WRITE THE JSON FILES if SAVE_DB: From 8fb930487e137cb57ca1304cd2b3d57f71173bf2 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Mon, 11 Dec 2023 13:45:11 -0500 Subject: [PATCH 14/26] modeled parameters ingested --- data/cwisep_j181006.00-101001.1.json | 2 +- scripts/ingests/ingest_wise_1810-1010.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index e6928f6c2..2343127bc 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -11,7 +11,7 @@ "other_references": null, "comments": null } - ], + ], "ModeledParameters": [ { "parameter": "log g", diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index f6d4486f8..b013aac27 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -105,4 +105,4 @@ def add_modeled_parameters_dict(db): # WRITE THE JSON FILES if SAVE_DB: - db.save_database(directory='data/') \ No newline at end of file + db.save_database(directory='data/') \ No newline at end of file From 776c6ad4ca01738fd4c9063d82e960b827503016 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Mon, 11 Dec 2023 14:38:59 -0500 Subject: [PATCH 15/26] Effective Temperature --- data/2mass_j12560183-1257276.json | 6 +++--- scripts/ingests/ingest_wise_1810-1010.py | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/data/2mass_j12560183-1257276.json b/data/2mass_j12560183-1257276.json index 6f15633b6..ba0674be3 100644 --- a/data/2mass_j12560183-1257276.json +++ b/data/2mass_j12560183-1257276.json @@ -30,9 +30,6 @@ { "other_name": "VHS 1256-1257b" }, - { - "other_name": "VHS 1256b" - }, { "other_name": "VHS J125601.92-125723.9 b" }, @@ -41,6 +38,9 @@ }, { "other_name": "WISEA J125601.66-125728.7" + }, + { + "other_name": "VHS 1256b" } ], "Parallaxes": [ diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index b013aac27..0f2f345d6 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -64,29 +64,36 @@ def add_modeled_parameters_dict(db): 'parameter': "log g", 'unit': 'dex', 'reference': "Lodi22"}, - + 'Metallicity': {'value': -1.5, 'value_error': 0.5, 'parameter': "metallicity", 'unit': 'dex', 'reference': "Lodi22"}, + 'Radius': {'value': 0.067, 'value_error': 0.032, #Highest value error was picked between +0.032 & -0.020 listed 'parameter': "radius", 'unit': 'R_jup', 'reference': "Lodi22"}, + 'Mass': {'value': 17, 'value_error': 56, #Highest value error was picked between +56 & -12 listed 'parameter': "mass", 'unit': 'M_jup', - 'reference': "Lodi22"} - }] - + 'reference': "Lodi22"}, + + 'Effective Temperature': + {'value': 1000, + 'parameter': "temperature", + 'unit': 'K'} + }] + source = "CWISEP J181006.00-101001.1" - value_types = ['Gravity', 'Metallicity', 'Radius', 'Mass'] + value_types = ['Gravity', 'Metallicity', 'Radius', 'Mass', 'Effective Temperature'] with db.engine.connect() as conn: for row in ingest_modeled_parameters: From c1cc6e39da40757262ba8188fc29509316609eda Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Mon, 11 Dec 2023 15:07:21 -0500 Subject: [PATCH 16/26] updated temp, 1256, asymmetric uncertainty --- data/2mass_j12560183-1257276.json | 2 +- data/cwisep_j181006.00-101001.1.json | 2 +- scripts/ingests/ingest_wise_1810-1010.py | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/data/2mass_j12560183-1257276.json b/data/2mass_j12560183-1257276.json index ba0674be3..dd31f8f25 100644 --- a/data/2mass_j12560183-1257276.json +++ b/data/2mass_j12560183-1257276.json @@ -1,4 +1,4 @@ -{ +{ "Sources": [ { "source": "2MASS J12560183-1257276", diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index 2343127bc..b243ea530 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -26,7 +26,7 @@ "value": 17.0, "value_error": 56.0, "unit": "M_jup", - "comments": null, + "comments": "12[+56, -12]", "reference": "Lodi22" }, { diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 0f2f345d6..10b28d256 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -87,9 +87,11 @@ def add_modeled_parameters_dict(db): 'reference': "Lodi22"}, 'Effective Temperature': - {'value': 1000, - 'parameter': "temperature", - 'unit': 'K'} + {'value': 800, + 'value_error': 100, + 'parameter': "T eff", + 'unit': 'K', + 'reference': "Lodi22"} }] source = "CWISEP J181006.00-101001.1" From 50ae7f45e753d58754824e36acbc8416dae36a9f Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Mon, 11 Dec 2023 15:19:47 -0500 Subject: [PATCH 17/26] json unit change --- data/cwisep_j181006.00-101001.1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index b243ea530..dc2decb30 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -41,7 +41,7 @@ "parameter": "radius", "value": 0.067, "value_error": 0.032, - "unit": "R_jup", + "unit": "R_sun", "comments": null, "reference": "Lodi22" } From 25d443364e9f644893c40c89ba3a4d04a926d85e Mon Sep 17 00:00:00 2001 From: Kelle Cruz Date: Tue, 12 Dec 2023 11:29:35 -0500 Subject: [PATCH 18/26] Update data/2mass_j12560183-1257276.json --- data/2mass_j12560183-1257276.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/2mass_j12560183-1257276.json b/data/2mass_j12560183-1257276.json index dd31f8f25..ba0674be3 100644 --- a/data/2mass_j12560183-1257276.json +++ b/data/2mass_j12560183-1257276.json @@ -1,4 +1,4 @@ -{ +{ "Sources": [ { "source": "2MASS J12560183-1257276", From b6e5a0866c5286d438263ef384e9ed22ab099a27 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Tue, 12 Dec 2023 13:35:51 -0500 Subject: [PATCH 19/26] Jsons updated / t eff edit needed --- data/2mass_j12560183-1257276.json | 6 +++--- data/Versions.json | 8 +++++++- data/cwisep_j181006.00-101001.1.json | 6 +++--- scripts/ingests/ingest_wise_1810-1010.py | 9 +++++---- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/data/2mass_j12560183-1257276.json b/data/2mass_j12560183-1257276.json index ba0674be3..6f15633b6 100644 --- a/data/2mass_j12560183-1257276.json +++ b/data/2mass_j12560183-1257276.json @@ -30,6 +30,9 @@ { "other_name": "VHS 1256-1257b" }, + { + "other_name": "VHS 1256b" + }, { "other_name": "VHS J125601.92-125723.9 b" }, @@ -38,9 +41,6 @@ }, { "other_name": "WISEA J125601.66-125728.7" - }, - { - "other_name": "VHS 1256b" } ], "Parallaxes": [ diff --git a/data/Versions.json b/data/Versions.json index 52a11cc17..9df07db7e 100644 --- a/data/Versions.json +++ b/data/Versions.json @@ -48,8 +48,14 @@ "description": "Companions table, fixed IRS spectra" }, { - "version": "latest", + "version": "2023.4", "start_date": "2023-10-18", + "end_date": "2023-12-12", + "description": "Added two sources" + }, + { + "version": "latest", + "start_date": "2023-12-12", "end_date": null, "description": "Version in development" } diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index dc2decb30..2544f7fab 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -11,7 +11,7 @@ "other_references": null, "comments": null } - ], + ], "ModeledParameters": [ { "parameter": "log g", @@ -24,9 +24,9 @@ { "parameter": "mass", "value": 17.0, - "value_error": 56.0, + "value_error": null, "unit": "M_jup", - "comments": "12[+56, -12]", + "comments": "17[+56, -12]", "reference": "Lodi22" }, { diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 10b28d256..03b20ca66 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -18,7 +18,7 @@ #bibcode of coordinates reference- 2020ApJ...898...77S and 2022A&A...663A..84L def add_publication(db): - #ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") + ingest_publication(db, doi = "10.3847/1538-4357/ab9a40") ingest_publication(db, doi = "10.1051/0004-6361/202243516") @@ -81,12 +81,13 @@ def add_modeled_parameters_dict(db): 'Mass': {'value': 17, - 'value_error': 56, #Highest value error was picked between +56 & -12 listed + 'value_error': null, #Highest value error was picked between +56 & -12 listed 'parameter': "mass", 'unit': 'M_jup', + 'comments': "17[+56, -12]", 'reference': "Lodi22"}, - 'Effective Temperature': + 'Effective temperature': {'value': 800, 'value_error': 100, 'parameter': "T eff", @@ -110,7 +111,7 @@ def add_modeled_parameters_dict(db): #add_sources(db) add_parallaxes(db) add_proper_motions(db) -add_modeled_parameters_dict(db) +#add_modeled_parameters_dict(db) # WRITE THE JSON FILES if SAVE_DB: From 6220cd26ce0dda5e0634f3736d5d1bfa9e913f01 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Tue, 12 Dec 2023 13:40:39 -0500 Subject: [PATCH 20/26] jsons updated/ t eff needs ingest --- data/2mass_j12560183-1257276.json | 2 +- data/Versions.json | 2 +- data/cwisep_j181006.00-101001.1.json | 2 +- scripts/ingests/ingest_wise_1810-1010.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/2mass_j12560183-1257276.json b/data/2mass_j12560183-1257276.json index 6f15633b6..9349a79f2 100644 --- a/data/2mass_j12560183-1257276.json +++ b/data/2mass_j12560183-1257276.json @@ -267,4 +267,4 @@ "reference": "Gauz15" } ] -} \ No newline at end of file +} diff --git a/data/Versions.json b/data/Versions.json index 9df07db7e..659137c06 100644 --- a/data/Versions.json +++ b/data/Versions.json @@ -57,6 +57,6 @@ "version": "latest", "start_date": "2023-12-12", "end_date": null, - "description": "Version in development" + "description": "Version in development" } ] \ No newline at end of file diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index 2544f7fab..8aaa52851 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -43,7 +43,7 @@ "value_error": 0.032, "unit": "R_sun", "comments": null, - "reference": "Lodi22" + "reference": "Lodi22" } ], "Names": [ diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 03b20ca66..32107cb9e 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -92,7 +92,7 @@ def add_modeled_parameters_dict(db): 'value_error': 100, 'parameter': "T eff", 'unit': 'K', - 'reference': "Lodi22"} + 'reference': "Lodi22"} }] source = "CWISEP J181006.00-101001.1" From 84f53f4aec8bca47ace91826b41b1994b0a1b0a1 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Tue, 12 Dec 2023 14:27:03 -0500 Subject: [PATCH 21/26] jsons updated/t eff needs ingest --- data/2mass_j12560183-1257276.json | 1 + data/Versions.json | 2 +- data/cwisep_j181006.00-101001.1.json | 2 +- scripts/ingests/ingest_wise_1810-1010.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/2mass_j12560183-1257276.json b/data/2mass_j12560183-1257276.json index 9349a79f2..d144a660a 100644 --- a/data/2mass_j12560183-1257276.json +++ b/data/2mass_j12560183-1257276.json @@ -268,3 +268,4 @@ } ] } + \ No newline at end of file diff --git a/data/Versions.json b/data/Versions.json index 659137c06..c89ecdee6 100644 --- a/data/Versions.json +++ b/data/Versions.json @@ -57,6 +57,6 @@ "version": "latest", "start_date": "2023-12-12", "end_date": null, - "description": "Version in development" + "description": "Version in development" } ] \ No newline at end of file diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index 8aaa52851..e3931d169 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -43,7 +43,7 @@ "value_error": 0.032, "unit": "R_sun", "comments": null, - "reference": "Lodi22" + "reference": "Lodi22" } ], "Names": [ diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 32107cb9e..5d426b151 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -92,7 +92,7 @@ def add_modeled_parameters_dict(db): 'value_error': 100, 'parameter': "T eff", 'unit': 'K', - 'reference': "Lodi22"} + 'reference': "Lodi22"} }] source = "CWISEP J181006.00-101001.1" From 8ea002eb1e030b6f0e893dec310022c16c8ea17a Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Tue, 12 Dec 2023 14:58:45 -0500 Subject: [PATCH 22/26] jsons updated/ t eff need ingest --- data/2mass_j12560183-1257276.json | 2 +- data/Versions.json | 2 +- data/cwisep_j181006.00-101001.1.json | 2 +- scripts/ingests/ingest_wise_1810-1010.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/2mass_j12560183-1257276.json b/data/2mass_j12560183-1257276.json index d144a660a..7d705204f 100644 --- a/data/2mass_j12560183-1257276.json +++ b/data/2mass_j12560183-1257276.json @@ -268,4 +268,4 @@ } ] } - \ No newline at end of file + \ No newline at end of file diff --git a/data/Versions.json b/data/Versions.json index c89ecdee6..9ad0796a2 100644 --- a/data/Versions.json +++ b/data/Versions.json @@ -57,6 +57,6 @@ "version": "latest", "start_date": "2023-12-12", "end_date": null, - "description": "Version in development" + "description": "Version in development" } ] \ No newline at end of file diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index e3931d169..00fd015e7 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -43,7 +43,7 @@ "value_error": 0.032, "unit": "R_sun", "comments": null, - "reference": "Lodi22" + "reference": "Lodi22" } ], "Names": [ diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 5d426b151..6c0d5be46 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -92,7 +92,7 @@ def add_modeled_parameters_dict(db): 'value_error': 100, 'parameter': "T eff", 'unit': 'K', - 'reference': "Lodi22"} + 'reference': "Lodi22"} }] source = "CWISEP J181006.00-101001.1" From 97c263250e216a3b43f1c430fd2c693cd70040bd Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Tue, 12 Dec 2023 15:43:59 -0500 Subject: [PATCH 23/26] Before t eff ingest pytest --- tests/test_data.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_data.py b/tests/test_data.py index d94ad1144..bde56f315 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -557,6 +557,16 @@ def test_modeledparameters(db): t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.reference == ref).astropy() assert len(t) == 696, f'found {len(t)} modeled parameters with {ref} reference' + #Test to verify T eff counts + ref = 'T eff' + t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.parameter == ref).astropy() + assert len(t) == 174, f'found {len(t)} modeled parameters with {ref} parameter' + + #Test to verify Lodi reference counts + ref = 'Lodi22' + t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.reference == ref).astropy() + assert len(t) == 4, f'found {len(t)} modeled parameters with {ref} reference' + def test_photometrymko_y(db): # Test for Y photometry entries added for references From 41f562bac35946027672d8ff8d58882a062640c4 Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 12 Dec 2023 17:53:19 -0500 Subject: [PATCH 24/26] reverted 1256 json file to upstream/main version --- data/2mass_j12560183-1257276.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/data/2mass_j12560183-1257276.json b/data/2mass_j12560183-1257276.json index 7d705204f..eed3a0b12 100644 --- a/data/2mass_j12560183-1257276.json +++ b/data/2mass_j12560183-1257276.json @@ -30,9 +30,6 @@ { "other_name": "VHS 1256-1257b" }, - { - "other_name": "VHS 1256b" - }, { "other_name": "VHS J125601.92-125723.9 b" }, @@ -41,6 +38,9 @@ }, { "other_name": "WISEA J125601.66-125728.7" + }, + { + "other_name": "VHS 1256b" } ], "Parallaxes": [ @@ -268,4 +268,3 @@ } ] } - \ No newline at end of file From fb89728407ef6d573d84820d0d9d51486c203337 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Wed, 13 Dec 2023 11:17:02 -0500 Subject: [PATCH 25/26] Added t eff to json --- data/cwisep_j181006.00-101001.1.json | 10 +++++++++- scripts/ingests/ingest_wise_1810-1010.py | 12 +++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/data/cwisep_j181006.00-101001.1.json b/data/cwisep_j181006.00-101001.1.json index 00fd015e7..386631124 100644 --- a/data/cwisep_j181006.00-101001.1.json +++ b/data/cwisep_j181006.00-101001.1.json @@ -13,6 +13,14 @@ } ], "ModeledParameters": [ + { + "parameter": "T eff", + "value": 800.0, + "value_error": 100.0, + "unit": "K", + "comments": null, + "reference": "Lodi22" + }, { "parameter": "log g", "value": 5.0, @@ -43,7 +51,7 @@ "value_error": 0.032, "unit": "R_sun", "comments": null, - "reference": "Lodi22" + "reference": "Lodi22" } ], "Names": [ diff --git a/scripts/ingests/ingest_wise_1810-1010.py b/scripts/ingests/ingest_wise_1810-1010.py index 6c0d5be46..b91002dfa 100644 --- a/scripts/ingests/ingest_wise_1810-1010.py +++ b/scripts/ingests/ingest_wise_1810-1010.py @@ -7,7 +7,7 @@ from astropy.coordinates import Angle -SAVE_DB = True # True: save the data files(json) in addition to modifying the .db file +SAVE_DB = False # True: save the data files(json) in addition to modifying the .db file RECREATE_DB = True # recreates the .db file from the data files # LOAD THE DATABASE db = load_simpledb('SIMPLE.db', recreatedb=RECREATE_DB) @@ -96,7 +96,8 @@ def add_modeled_parameters_dict(db): }] source = "CWISEP J181006.00-101001.1" - value_types = ['Gravity', 'Metallicity', 'Radius', 'Mass', 'Effective Temperature'] + #value_types = ['Gravity', 'Metallicity', 'Radius', 'Mass', 'Effective temperature'] + value_types = ['Effective temperature'] with db.engine.connect() as conn: for row in ingest_modeled_parameters: @@ -109,9 +110,10 @@ def add_modeled_parameters_dict(db): #Call functions/ Comment out when not needed #add_publication(db) #add_sources(db) -add_parallaxes(db) -add_proper_motions(db) -#add_modeled_parameters_dict(db) +#add_parallaxes(db) +#add_proper_motions(db) +add_modeled_parameters_dict(db) +db.inventory('CWISEP J181006.00-101001.1', pretty_print=True) # WRITE THE JSON FILES if SAVE_DB: From 2c9760589aeeddf00eaa2c9354bc052a3b18dce1 Mon Sep 17 00:00:00 2001 From: Lisha Ramon Date: Wed, 13 Dec 2023 11:32:04 -0500 Subject: [PATCH 26/26] Added new tests to modeled parameters --- tests/test_data.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/test_data.py b/tests/test_data.py index bde56f315..f4976813e 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -557,15 +557,35 @@ def test_modeledparameters(db): t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.reference == ref).astropy() assert len(t) == 696, f'found {len(t)} modeled parameters with {ref} reference' + #Test to verify log g counts + param = 'log g' + t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.parameter == param).astropy() + assert len(t) == 175, f'found {len(t)} modeled parameters with {param} parameter' + + #Test to verify metallicity counts + param = 'metallicity' + t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.parameter == param).astropy() + assert len(t) == 1, f'found {len(t)} modeled parameters with {param} parameter' + + #Test to verify radius counts + param = 'radius' + t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.parameter == param).astropy() + assert len(t) == 175, f'found {len(t)} modeled parameters with {param} parameter' + + #Test to verify mass counts + param = 'mass' + t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.parameter == param).astropy() + assert len(t) == 175, f'found {len(t)} modeled parameters with {param} parameter' + #Test to verify T eff counts - ref = 'T eff' - t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.parameter == ref).astropy() - assert len(t) == 174, f'found {len(t)} modeled parameters with {ref} parameter' + param = 'T eff' + t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.parameter == param).astropy() + assert len(t) == 175, f'found {len(t)} modeled parameters with {param} parameter' - #Test to verify Lodi reference counts + #Test to verify Lodi22 reference counts ref = 'Lodi22' t = db.query(db.ModeledParameters).filter(db.ModeledParameters.c.reference == ref).astropy() - assert len(t) == 4, f'found {len(t)} modeled parameters with {ref} reference' + assert len(t) == 5, f'found {len(t)} modeled parameters with {ref} reference' def test_photometrymko_y(db):