From 49a64431456aa35df233c599e5f6583125c5edcf Mon Sep 17 00:00:00 2001 From: LishaRamon <149431682+LishaRamon@users.noreply.github.com> Date: Tue, 26 Dec 2023 22:17:42 -0500 Subject: [PATCH] Update zhang19 gaia36b info (#438) * Changed gaia36b json name * added parallax and proper motion * Added modeled parameters + separation * Added Photometry --- data/gaia_j0452-36b.json | 135 ++++++++++++++++++++++++++++++++++++++- tests/test_data.py | 22 +++---- 2 files changed, 145 insertions(+), 12 deletions(-) diff --git a/data/gaia_j0452-36b.json b/data/gaia_j0452-36b.json index 99a51a2d9..ea13fb51a 100644 --- a/data/gaia_j0452-36b.json +++ b/data/gaia_j0452-36b.json @@ -1,7 +1,7 @@ { "Sources": [ { - "source": "Gaia J0452-36B", + "source": "Gaia EDR3 4818823808553134592", "ra": 73.1904, "dec": -36.1448, "epoch": null, @@ -12,11 +12,144 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "Gaia EDR3 4818823636756117504", + "projected_separation_arcsec": 115.3, + "projected_separation_error": null, + "relationship": "Child", + "comments": "Spectral Type: esdM1", + "reference": "Zhan19.1423", + "other_companion_names": "Gaia J0452-36A" + } + ], + "ModeledParameters": [ + { + "parameter": "T eff", + "value": 2600.0, + "value_error": 100.0, + "unit": "K", + "comments": null, + "reference": "Zhan19.1423" + }, + { + "parameter": "log g", + "value": 5.5, + "value_error": 0.2, + "unit": "dex", + "comments": null, + "reference": "Zhan19.1423" + }, + { + "parameter": "mass", + "value": 0.0855, + "value_error": 0.0014, + "unit": "M_sun", + "comments": null, + "reference": "Zhan19.1423" + }, + { + "parameter": "metallicity", + "value": -1.4, + "value_error": 0.2, + "unit": "dex", + "comments": "[Fe/H]", + "reference": "Zhan19.1423" + } + ], "Names": [ { "other_name": "Gaia J0452-36B" + }, + { + "other_name": "Gaia EDR3 4818823808553134592" + } + ], + "Parallaxes": [ + { + "parallax": 7.134, + "parallax_error": 0.506, + "adopted": true, + "comments": null, + "reference": "Zhan19.1423" } ], + "Photometry": [ + { + "band": "GAIA2.G", + "magnitude": 20.120, + "magnitude_error": null, + "telescope": "Gaia", + "epoch": null, + "comments": null, + "reference": "Zhan19.1423" + }, + { + "band": "GAIA2.Gbp", + "magnitude": 21.080, + "magnitude_error": null, + "telescope": "Gaia", + "epoch": null, + "comments": null, + "reference": "Zhan19.1423" + }, + { + "band": "GAIA2.Grp", + "magnitude": 18.615, + "magnitude_error": null, + "telescope": "Gaia", + "epoch": null, + "comments": null, + "reference": "Zhan19.1423" + }, + { + "band": "VISTA.J", + "magnitude": 16.437, + "magnitude_error": 0.008, + "telescope": "VISTA", + "epoch": null, + "comments": null, + "reference": "Zhan19.1423" + }, + { + "band": "VISTA.Ks", + "magnitude": 15.954, + "magnitude_error": 0.038, + "telescope": "VISTA", + "epoch": null, + "comments": null, + "reference": "Zhan19.1423" + }, + { + "band": "WISE.W1", + "magnitude": 15.571, + "magnitude_error": 0.037, + "telescope": "WISE", + "epoch": null, + "comments": null, + "reference": "Zhan19.1423" + }, + { + "band": "WISE.W2", + "magnitude": 15.234, + "magnitude_error": 0.068, + "telescope": "WISE", + "epoch": null, + "comments": null, + "reference": "Zhan19.1423" + } + ], + "ProperMotions": [ + { + "mu_ra": 147.52, + "mu_ra_error": 0.79, + "mu_dec": -168.07, + "mu_dec_error": 1.00, + "adopted": true, + "comments": null, + "reference": "Zhan19.1423" + } + ], "SpectralTypes": [ { "spectral_type_string": "esdL0", diff --git a/tests/test_data.py b/tests/test_data.py index 22b48cda3..e594c074e 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -187,7 +187,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) == 1443, f'found {len(t)} adopted parallax measuruments.' + assert len(t) == 1444, f'found {len(t)} adopted parallax measuruments.' ref = 'GaiaDR3' t = db.query(db.Parallaxes).filter(db.Parallaxes.c.reference == ref).astropy() @@ -211,12 +211,12 @@ def test_parallax_refs(db): @pytest.mark.parametrize('band, value', [ - ('GAIA2.G', 1266), - ('GAIA2.Grp', 1106), + ('GAIA2.G', 1267), + ('GAIA2.Grp', 1107), ('GAIA3.G', 1256), ('GAIA3.Grp', 1261), - ('WISE.W1', 460), - ('WISE.W2', 460), + ('WISE.W1', 461), + ('WISE.W2', 461), ('WISE.W3', 457), ('WISE.W4', 450), ('2MASS.J', 1802), @@ -258,7 +258,7 @@ def test_missions(db): stm = except_(select(db.Names.c.source).where(db.Names.c.other_name.like("Gaia%")), select(db.Photometry.c.source).where(db.Photometry.c.band.like("GAIA%"))) s = db.session.scalars(stm).all() - assert len(s) == 1, f'found {len(s)} sources with Gaia designation that have no GAIA photometry' + assert len(s) == 0, f'found {len(s)} sources with Gaia designation that have no GAIA photometry' # If Gaia photometry, Gaia designation should be in Names stm = except_(select(db.Photometry.c.source).where(db.Photometry.c.band.like("GAIA%")), @@ -276,7 +276,7 @@ def test_missions(db): stm = except_(select(db.Photometry.c.source).where(db.Photometry.c.band.like("WISE%")), select(db.Names.c.source).where(db.Names.c.other_name.like("WISE%"))) s = db.session.scalars(stm).all() - assert len(s) == 388, f'found {len(s)} sources with WISE photometry and no Wise designation in Names' + assert len(s) == 389, f'found {len(s)} sources with WISE photometry and no Wise designation in Names' # If Gaia EDR3 pm, Gaia EDR3 designation should be in Names stm = except_(select(db.ProperMotions.c.source).where(db.ProperMotions.c.reference.like("GaiaEDR3%")), @@ -564,12 +564,12 @@ def test_modeledparameters(db): #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' + assert len(t) == 176, 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' + assert len(t) == 2, f'found {len(t)} modeled parameters with {param} parameter' #Test to verify radius counts param = 'radius' @@ -579,12 +579,12 @@ def test_modeledparameters(db): #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' + assert len(t) == 176, f'found {len(t)} modeled parameters with {param} parameter' #Test to verify T eff counts 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' + assert len(t) == 176, f'found {len(t)} modeled parameters with {param} parameter' #Test to verify Lodi22 reference counts ref = 'Lodi22'