From dab5afc41a761df8e23475dc822c5c79c6e45796 Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Fri, 8 Mar 2024 11:17:21 -0500 Subject: [PATCH 01/22] first commit --- .gitignore | 2 + scripts/ingests/Roth24/Spectral_types.ipynb | 55 +++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 scripts/ingests/Roth24/Spectral_types.ipynb diff --git a/.gitignore b/.gitignore index bd62c4b79..eb9083205 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,6 @@ .pytest_cache .ds_store *.code-workspace +.ipynb_checkpoints + diff --git a/scripts/ingests/Roth24/Spectral_types.ipynb b/scripts/ingests/Roth24/Spectral_types.ipynb new file mode 100644 index 000000000..eabf22150 --- /dev/null +++ b/scripts/ingests/Roth24/Spectral_types.ipynb @@ -0,0 +1,55 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "0c8363db", + "metadata": {}, + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'simple'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0msimple\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mutils\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mspectral_types\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mingest_spectral_types\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_spt_string_to_code\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'simple'" + ] + } + ], + "source": [ + "from simple.utils.spectral_types import ingest_spectral_types, convert_spt_string_to_code" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a2c0fa5b", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 4eab56c83e95348e859354c03b2c082f79c1fbf1 Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Fri, 10 May 2024 11:12:18 -0400 Subject: [PATCH 02/22] start of ingest script --- scripts/ingests/BYW_SpT2024.py | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 scripts/ingests/BYW_SpT2024.py diff --git a/scripts/ingests/BYW_SpT2024.py b/scripts/ingests/BYW_SpT2024.py new file mode 100644 index 000000000..edf05834a --- /dev/null +++ b/scripts/ingests/BYW_SpT2024.py @@ -0,0 +1,53 @@ +from astrodb_utils import load_astrodb +from simple.schema import * + +SAVE_DB = False # 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_astrodb("SIMPLE.db", recreatedb=RECREATE_DB) + +# Load Google sheet +sheet_id = "1JFa8F4Ngzp3qAW8NOBurkz4bMKo9zXYeF6N1vMtqDZs" +link = f"https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=csv" + +# read the csv data into an astropy table +# ascii.read attempts to read data from local files rather from URLs so using a library like requests helps get data and create object that can be passed to ascii.read +byw_table = ascii.read( + link, + format="csv", + data_start=1, + header_start=0, + guess=False, + fast_reader=False, + delimiter=",", +) + +# print result astropy table +print(byw_table.info) + +# Loop through each row in byw table and print data: source name ra, dec. +def ingest_all_source_spt(db): + for row in byw_table[1:90]: # skip the header row - [1:10]runs only first 10 rows + # Print byw source information + print("BYW Source SpT Information:") + + + for col_name in row.colnames: + print(f"{col_name}: {row[col_name]}") + + ingest_spectral_types( + db, + source=row["Source"], + spectral_type_string=row["spectral_type_string"], + spectral_type_code=row["spectral_type_code"], + spectral_type_error=row["spectral_type_error"], + regime=row["regime"], + adopted=row["adopted"], + comments=row["comments"], + reference=row["Reference"] + raise_error=True, + search_db=True, + ) + + # Add a separator between rows for better readability + print("-" * 20) \ No newline at end of file From d6adf75302fbf51457cd419c0147a577c5d5870c Mon Sep 17 00:00:00 2001 From: Evan <93949832+Exu-112@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:12:44 -0400 Subject: [PATCH 03/22] refactor ingest_spectral_types function --- simple/utils/spectral_types.py | 327 ++++++++++++++------------------- 1 file changed, 139 insertions(+), 188 deletions(-) diff --git a/simple/utils/spectral_types.py b/simple/utils/spectral_types.py index 2dfb8944b..123649ff3 100644 --- a/simple/utils/spectral_types.py +++ b/simple/utils/spectral_types.py @@ -3,6 +3,7 @@ import logging from sqlalchemy import and_ import sqlalchemy.exc +from simple.schema import SpectralTypes from astrodb_utils import ( AstroDBError, find_source_in_db, @@ -18,14 +19,14 @@ logger = logging.getLogger("SIMPLE") -def ingest_spectral_types( +def ingest_spectral_type( db, - sources, - spectral_types, - references, - regimes, - spectral_type_error=None, - comments=None, + source: str = None, + spectral_type: str = None, + reference: str = None, + regime: str = None, + spectral_type_error: float = None, + comments: str = None, ): """ Script to ingest spectral types @@ -33,202 +34,152 @@ def ingest_spectral_types( ---------- db: astrodbkit2.astrodb.Database Database object created by astrodbkit2 - sources: str or list[str] - Names of sources - spectral_types: str or list[strings] - Spectral Types of sources - spectral_type_error: str or list[strings], optional - Spectral Type Errors of sources - regimes: str or list[str] - List or string - comments: list[strings], optional + sources: str + Name of source + spectral_types: str + Spectral Type of source + spectral_type_error: str, optional + Spectral Type Error of source + regimes: str + String + comments: str, optional Comments - references: str or list[strings] + references: str Reference of the Spectral Type Returns ------- None - """ + None - n_sources = len(sources) - - # Convert single element input value to list - input_values = [ - sources, - spectral_types, - spectral_type_error, - regimes, - comments, - references, - ] - for i, input_value in enumerate(input_values): - if input_value is None: - input_values[i] = [None] * n_sources - elif isinstance(input_value, str): - input_values[i] = [input_value] * n_sources - # Convert single element input value to list - ( - sources, - spectral_types, - spectral_type_error, - regimes, - comments, - references, - ) = input_values - - n_added = 0 - n_skipped = 0 - - logger.info(f"Trying to add {n_sources} spectral types") - - for i, source in enumerate(sources): - db_name = find_source_in_db(db, source) - # Spectral Type data is in the database - - if len(db_name) != 1: - msg = ( - f"No unique source match for {source} in the database " - f"(with SpT: {spectral_types[i]} from {references[i]})" - ) - raise AstroDBError(msg) - else: - db_name = db_name[0] + db_name = find_source_in_db(db, source) - adopted = None - source_spt_data = ( - db.query(db.SpectralTypes) - .filter(db.SpectralTypes.c.source == db_name) - .table() + if len(db_name) != 1: + msg = ( + f"No unique source match for {source} in the database " + f"(with SpT: {spectral_type} from {reference})" ) - - if source_spt_data is None or len(source_spt_data) == 0: - adopted: True - logger.debug("No Spectral Type data for this source in the database") - elif len(source_spt_data) > 0: - # Spectral Type Data already exists - dupe_ind = source_spt_data["reference"] == references[i] - if sum(dupe_ind): - logger.debug(f"Duplicate measurement\n, {source_spt_data[dupe_ind]}") - else: - logger.debug("Another Spectral Type exists,") - if logger.level == 10: - source_spt_data.pprint_all() - - adopted_ind = source_spt_data["adopted"] == 1 - if sum(adopted_ind): - old_adopted = source_spt_data[adopted_ind] - if spectral_type_error[i] < min(source_spt_data["spectral_type_error"]): - adopted = True - - if old_adopted: - with db.engine.connect() as conn: - conn.execute( - db.SpectralTypes.update() - .where( - and_( - db.SpectralTypes.c.source - == old_adopted["source"][0], - db.SpectralTypes.c.reference - == old_adopted["reference"][0], - ) - ) - .values(adopted=False) - ) - conn.commit() - # check that adopted flag is successfully changed - old_adopted_data = ( - db.query(db.SpectralTypes) - .filter( - and_( - db.SpectralTypes.c.source - == old_adopted["source"][0], - db.SpectralTypes.c.reference - == old_adopted["reference"][0], - ) - ) - .table() - ) - logger.debug("Old adopted measurement unset") - if logger.level == 10: - old_adopted_data.pprint_all() - - logger.debug(f"The new spectral type's adopted flag is:, {adopted}") + raise AstroDBError(msg) + + adopted = False + old_adopted = None + source_spt_data = ( + db.query(db.SpectralTypes).filter(db.SpectralTypes.c.source == db_name).table() + ) + + # set adopted flag + if source_spt_data is None or len(source_spt_data) == 0: + adopted = True + logger.debug("No Spectral Type data for this source in the database") + elif len(source_spt_data) > 0: + # Spectral Type Data already exists + dupe_ind = source_spt_data["reference"] == reference + if sum(dupe_ind): + logger.debug(f"Duplicate measurement\n, {source_spt_data[dupe_ind]}") else: - msg = "Unexpected state" - logger.error(msg) - raise RuntimeError - - # Convert the spectral type string to code - spectral_type_code = convert_spt_string_to_code(spectral_types[i])[0] - msg = f"Converted {spectral_types[i]} to {spectral_type_code}" - logger.debug(msg) - - # Construct the data to be added - spt_data = [ - { - "source": db_name, - "spectral_type_string": spectral_types[i], - "spectral_type_code": spectral_type_code, - "spectral_type_error": spectral_type_error[i], - "regime": regimes[i], - "adopted": adopted, - "comments": comments[i], - "reference": references[i], - } - ] - - # Check if the entry already exists; if so: skip adding it - check = ( - db.query(db.SpectralTypes.c.source) - .filter( - and_( - db.SpectralTypes.c.source == db_name, - db.SpectralTypes.c.regime == regimes[i], - db.SpectralTypes.c.reference == references[i], - ) + logger.debug("Another Spectral Type exists,") + if logger.level == 10: + source_spt_data.pprint_all() + + adopted_ind = source_spt_data["adopted"] == 1 + if sum(adopted_ind): + old_adopted = source_spt_data[adopted_ind] + if spectral_type_error < min(source_spt_data["spectral_type_error"]): + adopted = True + logger.debug(f"The new spectral type's adopted flag is:, {adopted}") + else: + msg = "Unexpected state" + logger.error(msg) + raise RuntimeError + + spectral_type_code = convert_spt_string_to_code(spectral_type)[0] + msg = f"Converted {spectral_type} to {spectral_type_code}" + logger.debug(msg) + + # Construct the data to be added + spt_data = { + "source": db_name, + "spectral_type_string": spectral_type, + "spectral_type_code": spectral_type_code, + "spectral_type_error": spectral_type_error, + "regime": regime, + "adopted": adopted, + "comments": comments, + "reference": reference, + } + + check = ( + db.query(db.SpectralTypes.c.source) + .filter( + and_( + db.SpectralTypes.c.source == db_name, + db.SpectralTypes.c.regime == regime, + db.SpectralTypes.c.reference == reference, ) - .count() ) - if check == 1: - n_skipped += 1 - logger.info( - f"Spectral type for {db_name} already in the database: skipping insert " - f"{spt_data}" - ) - continue - - logger.debug(f"Trying to insert {spt_data} into Spectral Types table ") - try: + .count() + ) + if check == 1: + msg = f"Spectral type for {db_name} already in the database" + raise AstroDBError(msg) + + logger.debug(f"Trying to insert {spt_data} into Spectral Types table ") + + try: + spt_obj = SpectralTypes(**spt_data) + with db.session as session: + session.add(spt_obj) + session.commit() + logger.info(f"Spectral type added to database: {spt_data}\n") + + # unset old adopted only after ingest is successful! + if adopted and old_adopted is not None: with db.engine.connect() as conn: - conn.execute(db.SpectralTypes.insert().values(spt_data)) + conn.execute( + db.SpectralTypes.update() + .where( + and_( + db.SpectralTypes.c.source == old_adopted["source"][0], + db.SpectralTypes.c.reference == old_adopted["reference"][0], + ) + ) + .values(adopted=False) + ) conn.commit() - n_added += 1 - msg = f"Added {str(spt_data)}" - logger.debug(msg) - except sqlalchemy.exc.IntegrityError as e: - if ( - db.query(db.Publications) - .filter(db.Publications.c.reference == references[i]) - .count() - == 0 - ): - msg = f"The publication does not exist in the database: {references[i]}" - msg1 = "Add it with ingest_publication function." - logger.debug(msg + msg1) - raise AstroDBError(msg) - elif "NOT NULL constraint failed: SpectralTypes.regime" in str(e): - msg = f"The regime was not provided for {source}" - logger.error(msg) - raise AstroDBError(msg) - else: - msg = "Other error\n" - logger.error(msg) - raise AstroDBError(msg) - - msg = f"Spectral types added: {n_added} \n" f"Spectral Types skipped: {n_skipped}" - logger.info(msg) + # check that adopted flag is successfully changed + old_adopted_data = ( + db.query(db.SpectralTypes) + .filter( + and_( + db.SpectralTypes.c.source == old_adopted["source"][0], + db.SpectralTypes.c.reference == old_adopted["reference"][0], + ) + ) + .table() + ) + logger.debug("Old adopted measurement unset") + if logger.level == 10: + old_adopted_data.pprint_all() + except sqlalchemy.exc.IntegrityError as e: + if ( + db.query(db.Publications) + .filter(db.Publications.c.reference == reference) + .count() + == 0 + ): + msg = f"The publication does not exist in the database: {reference}" + msg1 = "Add it with ingest_publication function." + logger.debug(msg + msg1) + raise AstroDBError(msg) + elif "NOT NULL constraint failed: SpectralTypes.regime" in str(e): + msg = f"The regime was not provided for {source}" + logger.error(msg) + raise AstroDBError(msg) + else: + msg = f"Spectral type ingest failed with error {e}\n" + logger.error(msg) + raise AstroDBError(msg) def convert_spt_string_to_code(spectral_types): From ff07a4e5a821bf17c582feef9efaaf680e613919 Mon Sep 17 00:00:00 2001 From: kelle Date: Mon, 22 Jul 2024 23:37:08 -0400 Subject: [PATCH 04/22] trying to get tests to pass --- simple/utils/spectral_types.py | 13 +++-- tests/test_utils.py | 95 +++++++++++++++++----------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/simple/utils/spectral_types.py b/simple/utils/spectral_types.py index 123649ff3..157b68f87 100644 --- a/simple/utils/spectral_types.py +++ b/simple/utils/spectral_types.py @@ -11,7 +11,7 @@ __all__ = [ - "ingest_spectral_types", + "ingest_spectral_type", "convert_spt_string_to_code", "convert_spt_code_to_string_to_code", ] @@ -34,24 +34,23 @@ def ingest_spectral_type( ---------- db: astrodbkit2.astrodb.Database Database object created by astrodbkit2 - sources: str + source: str Name of source - spectral_types: str + spectral_type: str Spectral Type of source spectral_type_error: str, optional Spectral Type Error of source - regimes: str + regime: str String - comments: str, optional + comment: str, optional Comments - references: str + reference: str Reference of the Spectral Type Returns ------- None """ - None db_name = find_source_in_db(db, source) diff --git a/tests/test_utils.py b/tests/test_utils.py index 87c8d8cd7..f213a1593 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -5,7 +5,7 @@ ) from simple.utils.spectral_types import ( convert_spt_string_to_code, - ingest_spectral_types, + ingest_spectral_type, ) from simple.utils.companions import ingest_companion_relationships @@ -64,30 +64,53 @@ def test_convert_spt_string_to_code(): assert convert_spt_string_to_code(["Y2pec"]) == [92] -def test_ingest_spectral_types(temp_db): - data1 = Table( - [ - { - "source": "Fake 1", - "spectral_type": "M5.6", - "regime": "nir", - "reference": "Ref 1", - }, - { - "source": "Fake 2", - "spectral_type": "T0.1", - "regime": "nir", - "reference": "Ref 1", - }, - { - "source": "Fake 3", - "spectral_type": "Y2pec", - "regime": "nir", - "reference": "Ref 2", - }, - ] +def test_ingest_spectral_type(temp_db): + spt_data1 = { + "source": "Fake 1", + "spectral_type": "M5.6", + "regime": "nir", + "reference": "Ref 1", + } + spt_data2 = { + "source": "Fake 2", + "spectral_type": "T0.1", + "regime": "nir", + "reference": "Ref 1", + } + spt_data3 = { + "source": "Fake 3", + "spectral_type": "Y2pec", + "regime": "nir", + "reference": "Ref 2", + } + for spt_data in [spt_data1, spt_data2, spt_data3]: + ingest_spectral_type( + temp_db, + source=spt_data["source"], + spectral_type=spt_data["spectral_type"], + reference=spt_data["reference"], + regime=spt_data["regime"], + ) + + assert ( + temp_db.query(temp_db.SpectralTypes) + .filter(temp_db.SpectralTypes.c.reference == "Ref 1") + .count() + == 2 ) + results = ( + temp_db.query(temp_db.SpectralTypes) + .filter(temp_db.SpectralTypes.c.reference == "Ref 2") + .table() + ) + assert len(results) == 1 + assert results["source"][0] == "Fake 3" + assert results["spectral_type_string"][0] == "Y2pec" + assert results["spectral_type_code"][0] == [92] + +def test_ingest_spectral_type_errors(temp_db): + # testing for publication error data3 = Table( [ { @@ -110,31 +133,9 @@ def test_ingest_spectral_types(temp_db): }, ] ) - ingest_spectral_types( - temp_db, - data1["source"], - data1["spectral_type"], - data1["reference"], - data1["regime"], - ) - assert ( - temp_db.query(temp_db.SpectralTypes) - .filter(temp_db.SpectralTypes.c.reference == "Ref 1") - .count() - == 2 - ) - results = ( - temp_db.query(temp_db.SpectralTypes) - .filter(temp_db.SpectralTypes.c.reference == "Ref 2") - .table() - ) - assert len(results) == 1 - assert results["source"][0] == "Fake 3" - assert results["spectral_type_string"][0] == "Y2pec" - assert results["spectral_type_code"][0] == [92] - # testing for publication error + with pytest.raises(AstroDBError) as error_message: - ingest_spectral_types( + ingest_spectral_type( temp_db, data3["source"], data3["spectral_type"], From bf379cc138d7f886d06617f764e26c29f53bf253 Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 23 Jul 2024 09:59:52 -0400 Subject: [PATCH 05/22] getting tests to pass --- simple/utils/spectral_types.py | 9 ++++-- tests/test_utils.py | 53 +++++++++++++++++----------------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/simple/utils/spectral_types.py b/simple/utils/spectral_types.py index 157b68f87..27b553047 100644 --- a/simple/utils/spectral_types.py +++ b/simple/utils/spectral_types.py @@ -60,6 +60,8 @@ def ingest_spectral_type( f"(with SpT: {spectral_type} from {reference})" ) raise AstroDBError(msg) + else: + db_name = db_name[0] adopted = False old_adopted = None @@ -84,9 +86,10 @@ def ingest_spectral_type( adopted_ind = source_spt_data["adopted"] == 1 if sum(adopted_ind): old_adopted = source_spt_data[adopted_ind] - if spectral_type_error < min(source_spt_data["spectral_type_error"]): - adopted = True - logger.debug(f"The new spectral type's adopted flag is:, {adopted}") + if spectral_type_error is not None: + if spectral_type_error < min(source_spt_data["spectral_type_error"]): + adopted = True + logger.debug(f"The new spectral type's adopted flag is:, {adopted}") else: msg = "Unexpected state" logger.error(msg) diff --git a/tests/test_utils.py b/tests/test_utils.py index f213a1593..287765638 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -111,38 +111,37 @@ def test_ingest_spectral_type(temp_db): def test_ingest_spectral_type_errors(temp_db): # testing for publication error - data3 = Table( - [ - { - "source": "Fake 1", - "spectral_type": "M5.6", - "regime": "nir", - "reference": "Ref 1", - }, - { - "source": "Fake 2", - "spectral_type": "T0.1", - "regime": "nir", - "reference": "Ref 1", - }, - { - "source": "Fake 3", - "spectral_type": "Y2pec", - "regime": "nir", - "reference": "Ref 4", - }, - ] - ) + spt_data4 = { + "source": "Fake 1", + "spectral_type": "M5.6", + "regime": "nir", + "reference": "Ref 1", + } + # spt_data5 = { + # "source": "Fake 2", + # "spectral_type": "T0.1", + # "regime": "nir", + # "reference": "Ref 1", + # } + # spt_data6 = { + # "source": "Fake 3", + # "spectral_type": "Y2pec", + # "regime": "nir", + # "reference": "Ref 4", + # } with pytest.raises(AstroDBError) as error_message: ingest_spectral_type( temp_db, - data3["source"], - data3["spectral_type"], - data3["reference"], - data3["regime"], + spt_data4["source"], + spt_data4["spectral_type"], + spt_data4["reference"], + spt_data4["regime"], ) - assert "The publication does not exist in the database" in str(error_message.value) + assert "Spectral type for Fake 1 already in the database" in str( + error_message.value + ) + # assert "The publication does not exist in the database" in str(error_message.value) def test_companion_relationships(temp_db): From 64dbb2ec8faf6939c5dfe1f3c7db2cf00aa67613 Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 23 Jul 2024 14:34:38 -0400 Subject: [PATCH 06/22] add photometric column, updating docs --- documentation/SpectralTypes.md | 3 ++- simple/schema.py | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/documentation/SpectralTypes.md b/documentation/SpectralTypes.md index 19d392d71..cedd6edec 100644 --- a/documentation/SpectralTypes.md +++ b/documentation/SpectralTypes.md @@ -7,11 +7,12 @@ Columns marked with an asterisk (*) may not be empty. | Column Name | Description | Unit | Data Type | Key Type | |---|---|---|---|---| | *source | Unique identifier for the source | | String(100) | primary and foreign: Sources.source | -| spectral_type_string | Spectral type string | | String(10) | | +| spectral_type_string | Spectral type string | | String(20) | | | *spectral_type_code | Numeric code corresponding to spectral type | | Float | primary | | spectral_type_error | Uncertainty of spectral type | | Float | | | regime | Regime for spectral type value | | | primary and foreign:Regimes.regime | | adopted | Flag indicating if this is the adopted measurement | | Boolean | | +| photometric | Flag indicating if this is a photometric spectral type | | Boolean | | | comments | Free form comments | | String(1000) | | | *reference | Reference | | String(30) | primary and foreign: Publications.name | diff --git a/simple/schema.py b/simple/schema.py index 48fb29a1a..634d73ad3 100644 --- a/simple/schema.py +++ b/simple/schema.py @@ -300,7 +300,7 @@ class SpectralTypes(Base): nullable=False, primary_key=True, ) - spectral_type_string = Column(String(10), nullable=False, primary_key=True) + spectral_type_string = Column(String(20), nullable=False, primary_key=True) spectral_type_code = Column(Float, nullable=False, primary_key=True) spectral_type_error = Column(Float) regime = Column( @@ -310,6 +310,7 @@ class SpectralTypes(Base): primary_key=True, ) adopted = Column(Boolean) + photometric = Column(Boolean) comments = Column(String(1000)) reference = Column( String(30), @@ -317,6 +318,12 @@ class SpectralTypes(Base): primary_key=True, ) + @validates("source", "spectral_type_code", "reference") + def validate_required(self, key, value): + if value is None: + raise ValueError(f"Value required for {key}") + return value + class Gravities(Base): # Table to store gravity measurements From a0898a6741afcaf3cf13dba372cb6a804b2c1a4d Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 23 Jul 2024 14:34:55 -0400 Subject: [PATCH 07/22] refactor ingest_spectral_type function --- simple/utils/spectral_types.py | 151 ++++++++++++++++----------------- tests/test_utils.py | 22 +++-- 2 files changed, 88 insertions(+), 85 deletions(-) diff --git a/simple/utils/spectral_types.py b/simple/utils/spectral_types.py index 27b553047..8adaa36d3 100644 --- a/simple/utils/spectral_types.py +++ b/simple/utils/spectral_types.py @@ -22,11 +22,14 @@ def ingest_spectral_type( db, source: str = None, - spectral_type: str = None, - reference: str = None, - regime: str = None, + *, + spectral_type_string: str = None, + spectral_type_code: float = None, spectral_type_error: float = None, + regime: str = None, + photometric: bool = False, comments: str = None, + reference: str = None, ): """ Script to ingest spectral types @@ -46,6 +49,7 @@ def ingest_spectral_type( Comments reference: str Reference of the Spectral Type + Returns ------- @@ -55,10 +59,7 @@ def ingest_spectral_type( db_name = find_source_in_db(db, source) if len(db_name) != 1: - msg = ( - f"No unique source match for {source} in the database " - f"(with SpT: {spectral_type} from {reference})" - ) + msg = f"No unique source match for {source} in the database " raise AstroDBError(msg) else: db_name = db_name[0] @@ -86,7 +87,12 @@ def ingest_spectral_type( adopted_ind = source_spt_data["adopted"] == 1 if sum(adopted_ind): old_adopted = source_spt_data[adopted_ind] - if spectral_type_error is not None: + print("spt_error:", spectral_type_error) + print("source spt data:", source_spt_data["spectral_type_error"]) + if ( + spectral_type_error is not None + and source_spt_data["spectral_type_error"] is not None + ): if spectral_type_error < min(source_spt_data["spectral_type_error"]): adopted = True logger.debug(f"The new spectral type's adopted flag is:, {adopted}") @@ -95,18 +101,20 @@ def ingest_spectral_type( logger.error(msg) raise RuntimeError - spectral_type_code = convert_spt_string_to_code(spectral_type)[0] - msg = f"Converted {spectral_type} to {spectral_type_code}" - logger.debug(msg) + if spectral_type_code is None: + spectral_type_code = convert_spt_string_to_code(spectral_type_string) + msg = f"Converted {spectral_type_string} to {spectral_type_code}" + logger.debug(msg) # Construct the data to be added spt_data = { "source": db_name, - "spectral_type_string": spectral_type, + "spectral_type_string": spectral_type_string, "spectral_type_code": spectral_type_code, "spectral_type_error": spectral_type_error, "regime": regime, "adopted": adopted, + "photometric": photometric, "comments": comments, "reference": reference, } @@ -184,7 +192,7 @@ def ingest_spectral_type( raise AstroDBError(msg) -def convert_spt_string_to_code(spectral_types): +def convert_spt_string_to_code(spectral_type_string): """ normal tests: M0, M5.5, L0, L3.5, T0, T3, T4.5, Y0, Y5, Y9. weird TESTS: sdM4, ≥Y4, T5pec, L2:, L0blue, Lpec, >L9, >M10, >L, T, Y @@ -192,84 +200,71 @@ def convert_spt_string_to_code(spectral_types): :param spectral_types: :return: """ - if isinstance(spectral_types, str): - spectral_types = [spectral_types] - spectral_type_codes = [] - for spt in spectral_types: - logger.debug(f"Trying to convert: `{spt}`") - spt_code = np.nan - if spt == "": - spectral_type_codes.append(spt_code) - logger.debug("Appended NAN") - continue - if spt == "null": - spt_code = 0 - spectral_type_codes.append(spt_code) - logger.debug("Appended Null") - continue - # identify main spectral class, loop over any prefix text to identify MLTY - for i, item in enumerate(spt): - if item == "M": - spt_code = 60 - break - elif item == "L": - spt_code = 70 - break - elif item == "T": - spt_code = 80 - break - elif item == "Y": - spt_code = 90 - break - else: # only trigger if not MLTY - i = 0 - # find integer or decimal subclass and add to spt_code - if re.search(r"\d*\.?\d+", spt[i + 1 :]) is None: - spt_code = spt_code - else: - spt_code += float(re.findall(r"\d*\.?\d+", spt[i + 1 :])[0]) + logger.debug(f"Trying to convert: `{spectral_type_string}`") + spt_code = np.nan + if spectral_type_string == "": + logger.debug("Empty spectral_type_string") + return None + if spectral_type_string == "null": + return None + # identify main spectral class, loop over any prefix text to identify MLTY + for i, item in enumerate(spectral_type_string): + if item == "M": + spt_code = 60 + break + elif item == "L": + spt_code = 70 + break + elif item == "T": + spt_code = 80 + break + elif item == "Y": + spt_code = 90 + break + else: # only trigger if not MLTY + i = 0 + # find integer or decimal subclass and add to spt_code + if re.search(r"\d*\.?\d+", spectral_type_string[i + 1 :]) is None: + spt_code = spt_code + else: + spt_code += float(re.findall(r"\d*\.?\d+", spectral_type_string[i + 1 :])[0]) - spectral_type_codes.append(spt_code) - return spectral_type_codes + return spt_code -def convert_spt_code_to_string_to_code(spectral_codes, decimals=1): +def convert_spt_code_to_string(spectral_code, decimals=1): """ Convert spectral type codes to string values Parameters ---------- - spectral_codes : list[float] - List of spectral type codes + spectral_code : float + A spectral type code + + decimals : int + Number of decimal places to include in the spectral type string Returns ------- - spectral_types : list[str] - List of spectral types + spectral_type_string : str + spectral type string """ - if isinstance(spectral_codes, float): - spectral_codes = [spectral_codes] - - spectral_types = [] - for spt in spectral_codes: - spt_type = "" - - # Identify major type - if 60 <= spt < 70: - spt_type = "M" - elif 70 <= spt < 80: - spt_type = "L" - elif 80 <= spt < 90: - spt_type = "T" - elif 90 <= spt < 100: - spt_type = "Y" + spt_type = "" - # Numeric part of type - format = f".{decimals}f" - spt_type = f"{spt_type}{spt % 10:{format}}" - logger.debug(f"Converting: {spt} -> {spt_type}") + # Identify major type + if 60 <= spectral_code < 70: + spt_type = "M" + elif 70 <= spectral_code < 80: + spt_type = "L" + elif 80 <= spectral_code < 90: + spt_type = "T" + elif 90 <= spectral_code < 100: + spt_type = "Y" - spectral_types.append(spt_type) + # Numeric part of type + format = f".{decimals}f" + spt_type = f"{spt_type}{spectral_code% 10:{format}}" + logger.debug(f"Converting: {spectral_code} -> {spt_type}") - return spectral_types + return spt_type diff --git a/tests/test_utils.py b/tests/test_utils.py index 287765638..4bf6a8da4 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -5,6 +5,7 @@ ) from simple.utils.spectral_types import ( convert_spt_string_to_code, + convert_spt_code_to_string, ingest_spectral_type, ) from simple.utils.companions import ingest_companion_relationships @@ -59,9 +60,16 @@ def t_pm(): def test_convert_spt_string_to_code(): # Test conversion of spectral types into numeric values - assert convert_spt_string_to_code(["M5.6"]) == [65.6] - assert convert_spt_string_to_code(["T0.1"]) == [80.1] - assert convert_spt_string_to_code(["Y2pec"]) == [92] + assert convert_spt_string_to_code("M5.6") == 65.6 + assert convert_spt_string_to_code("T0.1") == 80.1 + assert convert_spt_string_to_code("Y2pec") == 92 + + +def test_convert_spt_code_to_string(): + # Test conversion of spectral types into numeric values + assert convert_spt_code_to_string(65.6) == "M5.6" + assert convert_spt_code_to_string(80.1) == "T0.1" + assert convert_spt_code_to_string(92, decimals=0) == "Y2" def test_ingest_spectral_type(temp_db): @@ -87,7 +95,7 @@ def test_ingest_spectral_type(temp_db): ingest_spectral_type( temp_db, source=spt_data["source"], - spectral_type=spt_data["spectral_type"], + spectral_type_string=spt_data["spectral_type"], reference=spt_data["reference"], regime=spt_data["regime"], ) @@ -134,9 +142,9 @@ def test_ingest_spectral_type_errors(temp_db): ingest_spectral_type( temp_db, spt_data4["source"], - spt_data4["spectral_type"], - spt_data4["reference"], - spt_data4["regime"], + spectral_type_string=spt_data4["spectral_type"], + reference=spt_data4["reference"], + regime=spt_data4["regime"], ) assert "Spectral type for Fake 1 already in the database" in str( error_message.value From ccd91400cbc662297e3866aa996e43ff5ace12bd Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 23 Jul 2024 15:45:39 -0400 Subject: [PATCH 08/22] add raise_error keyword --- simple/utils/spectral_types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simple/utils/spectral_types.py b/simple/utils/spectral_types.py index 8adaa36d3..db962f793 100644 --- a/simple/utils/spectral_types.py +++ b/simple/utils/spectral_types.py @@ -30,6 +30,7 @@ def ingest_spectral_type( photometric: bool = False, comments: str = None, reference: str = None, + raise_error: bool = True, ): """ Script to ingest spectral types @@ -49,6 +50,7 @@ def ingest_spectral_type( Comments reference: str Reference of the Spectral Type + raise_error: bool, optional Returns ------- From 2f1d7ed8a18cb472bba82e4e2ea87bf0e2ba50fd Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 23 Jul 2024 16:19:30 -0400 Subject: [PATCH 09/22] improve error handling --- documentation/SpectralTypes.md | 6 ++++-- simple/utils/spectral_types.py | 25 ++++++++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/documentation/SpectralTypes.md b/documentation/SpectralTypes.md index cedd6edec..34b2c6e4b 100644 --- a/documentation/SpectralTypes.md +++ b/documentation/SpectralTypes.md @@ -10,7 +10,7 @@ Columns marked with an asterisk (*) may not be empty. | spectral_type_string | Spectral type string | | String(20) | | | *spectral_type_code | Numeric code corresponding to spectral type | | Float | primary | | spectral_type_error | Uncertainty of spectral type | | Float | | -| regime | Regime for spectral type value | | | primary and foreign:Regimes.regime | +| *regime | Regime for spectral type value | | | primary and foreign:Regimes.regime | | adopted | Flag indicating if this is the adopted measurement | | Boolean | | | photometric | Flag indicating if this is a photometric spectral type | | Boolean | | | comments | Free form comments | | String(1000) | | @@ -21,4 +21,6 @@ Spectral Type Codes: - 69 = M9 - 70 = L0 - 80 = T0 - - 90 = Y0 \ No newline at end of file + - 90 = Y0 + + Regime is required however, regime = "unkwown" can be used when the regime is unknown. \ No newline at end of file diff --git a/simple/utils/spectral_types.py b/simple/utils/spectral_types.py index db962f793..5ba443c18 100644 --- a/simple/utils/spectral_types.py +++ b/simple/utils/spectral_types.py @@ -134,7 +134,11 @@ def ingest_spectral_type( ) if check == 1: msg = f"Spectral type for {db_name} already in the database" - raise AstroDBError(msg) + if raise_error: + logger.error(msg) + raise AstroDBError(msg) + else: + logger.warning(msg) logger.debug(f"Trying to insert {spt_data} into Spectral Types table ") @@ -181,17 +185,20 @@ def ingest_spectral_type( == 0 ): msg = f"The publication does not exist in the database: {reference}" - msg1 = "Add it with ingest_publication function." + msg1 = "Add it with astrodb_utils.ingest_publication function." logger.debug(msg + msg1) - raise AstroDBError(msg) - elif "NOT NULL constraint failed: SpectralTypes.regime" in str(e): - msg = f"The regime was not provided for {source}" - logger.error(msg) - raise AstroDBError(msg) + if raise_error: + logger.error(msg) + raise AstroDBError(msg + msg1) + else: + logger.warning(msg) else: msg = f"Spectral type ingest failed with error {e}\n" - logger.error(msg) - raise AstroDBError(msg) + if raise_error: + logger.error(msg) + raise AstroDBError(msg) + else: + logger.warning(msg) def convert_spt_string_to_code(spectral_type_string): From 570f0e3701b67f328a918c636bbcc6d8f5c1951a Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 23 Jul 2024 16:49:43 -0400 Subject: [PATCH 10/22] error handling --- simple/schema.py | 3 +-- simple/utils/spectral_types.py | 49 +++++++++++++++++++--------------- tests/test_utils.py | 4 +-- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/simple/schema.py b/simple/schema.py index 634d73ad3..6461f0d08 100644 --- a/simple/schema.py +++ b/simple/schema.py @@ -306,7 +306,6 @@ class SpectralTypes(Base): regime = Column( String(30), ForeignKey("Regimes.regime", ondelete="cascade", onupdate="cascade"), - nullable=True, primary_key=True, ) adopted = Column(Boolean) @@ -318,7 +317,7 @@ class SpectralTypes(Base): primary_key=True, ) - @validates("source", "spectral_type_code", "reference") + @validates("source", "spectral_type_code", "regime", "reference") def validate_required(self, key, value): if value is None: raise ValueError(f"Value required for {key}") diff --git a/simple/utils/spectral_types.py b/simple/utils/spectral_types.py index 5ba443c18..4dc69e2a3 100644 --- a/simple/utils/spectral_types.py +++ b/simple/utils/spectral_types.py @@ -17,6 +17,7 @@ ] logger = logging.getLogger("SIMPLE") +logger.setLevel(logging.INFO) # set default log level to INFO def ingest_spectral_type( @@ -72,6 +73,26 @@ def ingest_spectral_type( db.query(db.SpectralTypes).filter(db.SpectralTypes.c.source == db_name).table() ) + # Check for duplicates + duplicate_check = ( + db.query(db.SpectralTypes.c.source) + .filter( + and_( + db.SpectralTypes.c.source == db_name, + db.SpectralTypes.c.regime == regime, + db.SpectralTypes.c.reference == reference, + ) + ) + .count() + ) + if duplicate_check > 0: + msg = f"Spectral type already in the database: {db_name}, {regime}, {reference}" + if raise_error: + logger.error(msg) + raise AstroDBError(msg) + else: + logger.warning(msg) + # set adopted flag if source_spt_data is None or len(source_spt_data) == 0: adopted = True @@ -99,9 +120,12 @@ def ingest_spectral_type( adopted = True logger.debug(f"The new spectral type's adopted flag is:, {adopted}") else: - msg = "Unexpected state" - logger.error(msg) - raise RuntimeError + msg = f"Unexpected state while ingesting {source}" + if raise_error: + logger.error(msg) + raise RuntimeError + else: + logger.warning(msg) if spectral_type_code is None: spectral_type_code = convert_spt_string_to_code(spectral_type_string) @@ -121,25 +145,6 @@ def ingest_spectral_type( "reference": reference, } - check = ( - db.query(db.SpectralTypes.c.source) - .filter( - and_( - db.SpectralTypes.c.source == db_name, - db.SpectralTypes.c.regime == regime, - db.SpectralTypes.c.reference == reference, - ) - ) - .count() - ) - if check == 1: - msg = f"Spectral type for {db_name} already in the database" - if raise_error: - logger.error(msg) - raise AstroDBError(msg) - else: - logger.warning(msg) - logger.debug(f"Trying to insert {spt_data} into Spectral Types table ") try: diff --git a/tests/test_utils.py b/tests/test_utils.py index 4bf6a8da4..bb57a6dba 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -146,9 +146,7 @@ def test_ingest_spectral_type_errors(temp_db): reference=spt_data4["reference"], regime=spt_data4["regime"], ) - assert "Spectral type for Fake 1 already in the database" in str( - error_message.value - ) + assert "Spectral type already in the database" in str(error_message.value) # assert "The publication does not exist in the database" in str(error_message.value) From 680ac25b64b07db8ac8548b62d77a477cfabddfb Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Tue, 23 Jul 2024 17:24:00 -0400 Subject: [PATCH 11/22] Updated working script and tests --- scripts/ingests/BYW_SpT2024.py | 56 ++++++++++++++++++---------------- tests/test_data.py | 8 ++--- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/scripts/ingests/BYW_SpT2024.py b/scripts/ingests/BYW_SpT2024.py index edf05834a..13f8f5796 100644 --- a/scripts/ingests/BYW_SpT2024.py +++ b/scripts/ingests/BYW_SpT2024.py @@ -1,19 +1,26 @@ from astrodb_utils import load_astrodb +from astrodb_utils import ingest_publication from simple.schema import * +from simple.schema import REFERENCE_TABLES +from astropy.io import ascii +from simple.utils.spectral_types import ingest_spectral_type +import logging +logger = logging.getLogger("SIMPLE") +logger.setLevel(logging.INFO) SAVE_DB = False # 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_astrodb("SIMPLE.db", recreatedb=RECREATE_DB) - +db = load_astrodb("SIMPLE.sqlite", recreatedb=RECREATE_DB, reference_tables=REFERENCE_TABLES) +ingest_publication(db, doi='10.3847/1538-3881/ad324e' ) # Load Google sheet -sheet_id = "1JFa8F4Ngzp3qAW8NOBurkz4bMKo9zXYeF6N1vMtqDZs" -link = f"https://docs.google.com/spreadsheets/d/{sheet_id}/export?format=csv" + +link = 'scripts/ingests/Austin-BYW-Benchmark-SpT.csv' # read the csv data into an astropy table # ascii.read attempts to read data from local files rather from URLs so using a library like requests helps get data and create object that can be passed to ascii.read byw_table = ascii.read( - link, + link, #change this to the path for the csv file format="csv", data_start=1, header_start=0, @@ -22,32 +29,29 @@ delimiter=",", ) -# print result astropy table -print(byw_table.info) - -# Loop through each row in byw table and print data: source name ra, dec. -def ingest_all_source_spt(db): - for row in byw_table[1:90]: # skip the header row - [1:10]runs only first 10 rows - # Print byw source information - print("BYW Source SpT Information:") +for row in byw_table: # skip the header row - [1:10]runs only first 10 rows + if row["photometric"] == 'True': + photometric = True + else: + photometric = False + preexisting = ['CWISE J183207.94-540943.3', + 'SDSS J134403.83+083950.9'] + if row["Source"] in preexisting: + continue - for col_name in row.colnames: - print(f"{col_name}: {row[col_name]}") - - ingest_spectral_types( + ingest_spectral_type( db, source=row["Source"], spectral_type_string=row["spectral_type_string"], - spectral_type_code=row["spectral_type_code"], spectral_type_error=row["spectral_type_error"], regime=row["regime"], - adopted=row["adopted"], comments=row["comments"], - reference=row["Reference"] - raise_error=True, - search_db=True, - ) - - # Add a separator between rows for better readability - print("-" * 20) \ No newline at end of file + photometric=photometric, + reference=row["Reference"], + raise_error=False, + ) + + # WRITE THE JSON FILES +if SAVE_DB: + db.save_database(directory="data/") \ No newline at end of file diff --git a/tests/test_data.py b/tests/test_data.py index 96a807a7e..fb299bb57 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -324,7 +324,7 @@ def test_spectral_types(db): regime = "nir" t = db.query(db.SpectralTypes).filter(db.SpectralTypes.c.regime == regime).astropy() - assert len(t) == 2359, f"found {len(t)} spectral types in the {regime} regime" + assert len(t) == 2446, f"found {len(t)} spectral types in the {regime} regime" regime = "nir_UCD" t = db.query(db.SpectralTypes).filter(db.SpectralTypes.c.regime == regime).astropy() @@ -353,7 +353,7 @@ def test_spectral_types(db): ) .astropy() ) - assert len(m_dwarfs) == 843, f"found {len(t)} M spectral types" + assert len(m_dwarfs) == 861, f"found {len(t)} M spectral types" l_dwarfs = ( db.query(db.SpectralTypes) @@ -365,7 +365,7 @@ def test_spectral_types(db): ) .astropy() ) - assert len(l_dwarfs) == 1963, f"found {len(l_dwarfs)} L spectral types" + assert len(l_dwarfs) == 2011, f"found {len(l_dwarfs)} L spectral types" t_dwarfs = ( db.query(db.SpectralTypes) @@ -377,7 +377,7 @@ def test_spectral_types(db): ) .astropy() ) - assert len(t_dwarfs) == 998, f"found {len(t_dwarfs)} T spectral types" + assert len(t_dwarfs) == 1019, f"found {len(t_dwarfs)} T spectral types" y_dwarfs = ( db.query(db.SpectralTypes) From 406cb1ccb65399d78d873e27ddd4317962457b5f Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Fri, 26 Jul 2024 15:07:03 -0400 Subject: [PATCH 12/22] Extra prints commented out --- simple/utils/spectral_types.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/simple/utils/spectral_types.py b/simple/utils/spectral_types.py index 8207534eb..63b04992c 100644 --- a/simple/utils/spectral_types.py +++ b/simple/utils/spectral_types.py @@ -244,8 +244,8 @@ def adopt_spectral_type(db, source, spectral_type_error): elif len(source_spt_data) > 0: # Spectral Type Data already exists logger.debug("Pre-existing Spectral Type data:") - if logger.level <= 10: - source_spt_data.pprint_all() + #if logger.level <= 10: + # source_spt_data.pprint_all() adopted_ind = source_spt_data["adopted"] == 1 if sum(adopted_ind): old_adopted = source_spt_data[adopted_ind] @@ -314,8 +314,8 @@ def check_one_adopted_sptype(db, source, raise_error=True): .table() ) logger.debug(f"Adopted measurements for {source}:{results}") - if logger.level <= 10: - results.pprint_all() + #if logger.level <= 10: + # results.pprint_all() logger.debug(f"adopted column: {results['adopted']}") if len(results) == 1: logger.debug(f"One adopted measurement for {source}") From 5aad6ff4b8a3abe300923c482864a2b248752109 Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Fri, 26 Jul 2024 15:07:32 -0400 Subject: [PATCH 13/22] completed ingest script --- scripts/ingests/BYW_SpT2024.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/ingests/BYW_SpT2024.py b/scripts/ingests/BYW_SpT2024.py index 13f8f5796..31dc1ed83 100644 --- a/scripts/ingests/BYW_SpT2024.py +++ b/scripts/ingests/BYW_SpT2024.py @@ -1,14 +1,16 @@ from astrodb_utils import load_astrodb from astrodb_utils import ingest_publication +import sys +sys.path.append(".") from simple.schema import * from simple.schema import REFERENCE_TABLES from astropy.io import ascii from simple.utils.spectral_types import ingest_spectral_type import logging -logger = logging.getLogger("SIMPLE") +logger = logging.getLogger("AstroDB") logger.setLevel(logging.INFO) -SAVE_DB = False # save the data files in addition to modifying the .db file +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_astrodb("SIMPLE.sqlite", recreatedb=RECREATE_DB, reference_tables=REFERENCE_TABLES) @@ -46,7 +48,6 @@ spectral_type_string=row["spectral_type_string"], spectral_type_error=row["spectral_type_error"], regime=row["regime"], - comments=row["comments"], photometric=photometric, reference=row["Reference"], raise_error=False, From 43080a08601047c8e3479f07ba4f210a1393a21b Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Fri, 26 Jul 2024 15:08:11 -0400 Subject: [PATCH 14/22] JSON files and test --- data/Publications.json | 6 ++++++ data/cwise_j000021.45-481314.9.json | 12 ++++++++++++ data/cwise_j002029.72-153527.5.json | 12 ++++++++++++ data/cwise_j002101.45-334631.5.json | 12 ++++++++++++ data/cwise_j002159.02-451434.4.json | 12 ++++++++++++ data/cwise_j002414.30-403053.7.json | 12 ++++++++++++ data/cwise_j002658.73-260859.6.json | 12 ++++++++++++ data/cwise_j004218.67+291730.6.json | 12 ++++++++++++ data/cwise_j004945.38+423619.3.json | 12 ++++++++++++ data/cwise_j005635.48-240401.9.json | 12 ++++++++++++ data/cwise_j010424.50+133949.8.json | 12 ++++++++++++ data/cwise_j011003.61-592650.8.json | 12 ++++++++++++ data/cwise_j012715.52-300246.9.json | 12 ++++++++++++ data/cwise_j013719.04+342837.6.json | 12 ++++++++++++ data/cwise_j015905.58+105551.5.json | 12 ++++++++++++ data/cwise_j020538.20+594452.2.json | 12 ++++++++++++ data/cwise_j022454.80+152629.5.json | 12 ++++++++++++ data/cwise_j022737.75+083008.8.json | 12 ++++++++++++ data/cwise_j025645.16-335008.9.json | 12 ++++++++++++ data/cwise_j030005.73-062218.6.json | 12 ++++++++++++ data/cwise_j032853.32-112332.6.json | 12 ++++++++++++ data/cwise_j055515.83+510514.0.json | 12 ++++++++++++ data/cwise_j055909.00-384219.8.json | 12 ++++++++++++ data/cwise_j060202.17-462447.8.json | 12 ++++++++++++ data/cwise_j062000.01+344641.3.json | 12 ++++++++++++ data/cwise_j062648.96+594129.2.json | 12 ++++++++++++ data/cwise_j062727.34-002826.8.json | 12 ++++++++++++ data/cwise_j062909.21+395701.6.json | 12 ++++++++++++ data/cwise_j065752.45+163350.2.json | 12 ++++++++++++ data/cwise_j073831.31+525453.7.json | 12 ++++++++++++ data/cwise_j080912.95+741704.3.json | 12 ++++++++++++ data/cwise_j085131.24-603056.2.json | 12 ++++++++++++ data/cwise_j091558.53+254713.0.json | 12 ++++++++++++ data/cwise_j091902.55-574837.3.json | 12 ++++++++++++ data/cwise_j094352.22+335639.1.json | 12 ++++++++++++ data/cwise_j095259.54-505418.9.json | 12 ++++++++++++ data/cwise_j101017.43-242300.4.json | 12 ++++++++++++ data/cwise_j101317.51-010313.6.json | 12 ++++++++++++ data/cwise_j101523.92-111539.6.json | 12 ++++++++++++ data/cwise_j103734.29-050749.8.json | 12 ++++++++++++ data/cwise_j104053.42-355029.7.json | 12 ++++++++++++ data/cwise_j115229.05-351105.9.json | 12 ++++++++++++ data/cwise_j124033.48+460544.7.json | 12 ++++++++++++ data/cwise_j125858.20+001133.2.json | 12 ++++++++++++ data/cwise_j130329.90+512754.0.json | 12 ++++++++++++ data/cwise_j130446.64-120023.6.json | 12 ++++++++++++ data/cwise_j131355.15+223005.6.json | 12 ++++++++++++ data/cwise_j132539.70+022309.4.json | 12 ++++++++++++ data/cwise_j132857.58-063747.4.json | 12 ++++++++++++ data/cwise_j133211.93-374837.9.json | 12 ++++++++++++ data/cwise_j133427.70-273053.1.json | 12 ++++++++++++ data/cwise_j141737.21+041847.2.json | 12 ++++++++++++ data/cwise_j143935.94-804851.5.json | 12 ++++++++++++ data/cwise_j143951.51+260000.3.json | 12 ++++++++++++ data/cwise_j144057.87+380432.8.json | 12 ++++++++++++ data/cwise_j151939.68-485820.4.json | 12 ++++++++++++ data/cwise_j152742.44-121528.2.json | 12 ++++++++++++ data/cwise_j153910.07+722757.2.json | 12 ++++++++++++ data/cwise_j160654.19-103214.7.json | 12 ++++++++++++ data/cwise_j162511.27+774946.8.json | 12 ++++++++++++ data/cwise_j165143.63+695259.4.json | 12 ++++++++++++ data/cwise_j165325.10+490439.7.json | 12 ++++++++++++ data/cwise_j171308.00+644220.8.json | 12 ++++++++++++ data/cwise_j171700.57+724437.3.json | 12 ++++++++++++ data/cwise_j173859.73+200501.2.json | 12 ++++++++++++ data/cwise_j174426.85+230355.1.json | 12 ++++++++++++ data/cwise_j174509.03+380733.2.json | 12 ++++++++++++ data/cwise_j190909.62+553027.1.json | 12 ++++++++++++ data/cwise_j192425.03-532837.1.json | 12 ++++++++++++ data/cwise_j195956.16-644318.1.json | 12 ++++++++++++ data/cwise_j200304.70-142228.9.json | 12 ++++++++++++ data/cwise_j200813.66-124502.4.json | 12 ++++++++++++ data/cwise_j202934.80-791013.1.json | 12 ++++++++++++ data/cwise_j205247.07+053855.7.json | 12 ++++++++++++ data/cwise_j210640.16+250729.0.json | 12 ++++++++++++ data/cwise_j212342.88+655615.6.json | 12 ++++++++++++ data/cwise_j214129.80-024623.6.json | 12 ++++++++++++ data/cwise_j214213.99-204659.8.json | 12 ++++++++++++ data/cwise_j221418.15+253432.2.json | 12 ++++++++++++ data/cwise_j224452.18-362946.0.json | 12 ++++++++++++ data/cwise_j225525.22-302320.8.json | 12 ++++++++++++ data/cwise_j231824.58+052142.3.json | 12 ++++++++++++ data/cwise_j233531.55+014219.6.json | 12 ++++++++++++ data/cwise_j235827.96-521813.4.json | 12 ++++++++++++ data/cwisep_j040351.00-491605.6.json | 10 ++++++++++ data/cwisep_j085938.95+534908.7.json | 10 ++++++++++ data/ulas_j103131.49+123736.4.json | 12 ++++++++++++ data/wisea_j040702.42+190945.8.json | 10 ++++++++++ tests/test_data.py | 6 +++--- 89 files changed, 1047 insertions(+), 3 deletions(-) diff --git a/data/Publications.json b/data/Publications.json index bfcb4cde7..af9de4a69 100644 --- a/data/Publications.json +++ b/data/Publications.json @@ -7300,5 +7300,11 @@ "bibcode": "", "doi": "", "description": "UKIDSS DR11+ Release: http://wsa.roe.ac.uk/dr11plus_release.html" + }, + { + "reference": "Roth24", + "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" } ] \ No newline at end of file diff --git a/data/cwise_j000021.45-481314.9.json b/data/cwise_j000021.45-481314.9.json index d79e1a87a..b4bad3388 100644 --- a/data/cwise_j000021.45-481314.9.json +++ b/data/cwise_j000021.45-481314.9.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J000021.45-481314.9" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L4)", + "spectral_type_code": 74.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j002029.72-153527.5.json b/data/cwise_j002029.72-153527.5.json index 676b23f61..53f929f21 100644 --- a/data/cwise_j002029.72-153527.5.json +++ b/data/cwise_j002029.72-153527.5.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J002029.72-153527.5" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M9)", + "spectral_type_code": 69.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j002101.45-334631.5.json b/data/cwise_j002101.45-334631.5.json index 130530cda..530a8e18f 100644 --- a/data/cwise_j002101.45-334631.5.json +++ b/data/cwise_j002101.45-334631.5.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J002101.45-334631.5" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T1)", + "spectral_type_code": 81.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j002159.02-451434.4.json b/data/cwise_j002159.02-451434.4.json index f2daec136..90f1e96a0 100644 --- a/data/cwise_j002159.02-451434.4.json +++ b/data/cwise_j002159.02-451434.4.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J002159.02-451434.4" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T3)", + "spectral_type_code": 83.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j002414.30-403053.7.json b/data/cwise_j002414.30-403053.7.json index 2c80b2394..ebad95fd5 100644 --- a/data/cwise_j002414.30-403053.7.json +++ b/data/cwise_j002414.30-403053.7.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J002414.30-403053.7" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L5)", + "spectral_type_code": 75.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j002658.73-260859.6.json b/data/cwise_j002658.73-260859.6.json index e955e40c9..4884c1c14 100644 --- a/data/cwise_j002658.73-260859.6.json +++ b/data/cwise_j002658.73-260859.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J002658.73-260859.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L5)", + "spectral_type_code": 75.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j004218.67+291730.6.json b/data/cwise_j004218.67+291730.6.json index 3de7e3c0b..f5a68a4a9 100644 --- a/data/cwise_j004218.67+291730.6.json +++ b/data/cwise_j004218.67+291730.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J004218.67+291730.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L5)", + "spectral_type_code": 75.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j004945.38+423619.3.json b/data/cwise_j004945.38+423619.3.json index 857156570..9381ba92b 100644 --- a/data/cwise_j004945.38+423619.3.json +++ b/data/cwise_j004945.38+423619.3.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J004945.38+423619.3" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L6)", + "spectral_type_code": 76.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j005635.48-240401.9.json b/data/cwise_j005635.48-240401.9.json index c48c8e4f9..efa57b692 100644 --- a/data/cwise_j005635.48-240401.9.json +++ b/data/cwise_j005635.48-240401.9.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J005635.48-240401.9" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L8)", + "spectral_type_code": 78.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j010424.50+133949.8.json b/data/cwise_j010424.50+133949.8.json index 801ee5170..8bce498df 100644 --- a/data/cwise_j010424.50+133949.8.json +++ b/data/cwise_j010424.50+133949.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J010424.50+133949.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L8)", + "spectral_type_code": 78.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j011003.61-592650.8.json b/data/cwise_j011003.61-592650.8.json index e9b9ef794..d4906ecca 100644 --- a/data/cwise_j011003.61-592650.8.json +++ b/data/cwise_j011003.61-592650.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J011003.61-592650.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L2)", + "spectral_type_code": 72.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j012715.52-300246.9.json b/data/cwise_j012715.52-300246.9.json index 12cfbad71..02c0bb771 100644 --- a/data/cwise_j012715.52-300246.9.json +++ b/data/cwise_j012715.52-300246.9.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J012715.52-300246.9" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T0)", + "spectral_type_code": 80.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j013719.04+342837.6.json b/data/cwise_j013719.04+342837.6.json index a09eb9b9c..379078990 100644 --- a/data/cwise_j013719.04+342837.6.json +++ b/data/cwise_j013719.04+342837.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J013719.04+342837.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L6)", + "spectral_type_code": 76.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j015905.58+105551.5.json b/data/cwise_j015905.58+105551.5.json index 30b052924..8b8bb5b41 100644 --- a/data/cwise_j015905.58+105551.5.json +++ b/data/cwise_j015905.58+105551.5.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J015905.58+105551.5" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M9)", + "spectral_type_code": 69.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j020538.20+594452.2.json b/data/cwise_j020538.20+594452.2.json index c653a2423..85fd26e76 100644 --- a/data/cwise_j020538.20+594452.2.json +++ b/data/cwise_j020538.20+594452.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J020538.20+594452.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "M8 beta", + "spectral_type_code": 68.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j022454.80+152629.5.json b/data/cwise_j022454.80+152629.5.json index 1a9fca912..e16f0dbd7 100644 --- a/data/cwise_j022454.80+152629.5.json +++ b/data/cwise_j022454.80+152629.5.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J022454.80+152629.5" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L6 beta", + "spectral_type_code": 76.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j022737.75+083008.8.json b/data/cwise_j022737.75+083008.8.json index 863c09f6d..c114c58c4 100644 --- a/data/cwise_j022737.75+083008.8.json +++ b/data/cwise_j022737.75+083008.8.json @@ -60,5 +60,17 @@ "comments": null, "reference": "Lawr12" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L5 blue", + "spectral_type_code": 75.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j025645.16-335008.9.json b/data/cwise_j025645.16-335008.9.json index f0261db06..843979c08 100644 --- a/data/cwise_j025645.16-335008.9.json +++ b/data/cwise_j025645.16-335008.9.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J025645.16-335008.9" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L2)", + "spectral_type_code": 72.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j030005.73-062218.6.json b/data/cwise_j030005.73-062218.6.json index 685a2ca83..7028c5af3 100644 --- a/data/cwise_j030005.73-062218.6.json +++ b/data/cwise_j030005.73-062218.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J030005.73-062218.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L9)", + "spectral_type_code": 79.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j032853.32-112332.6.json b/data/cwise_j032853.32-112332.6.json index 41db3dc03..9de03c7d4 100644 --- a/data/cwise_j032853.32-112332.6.json +++ b/data/cwise_j032853.32-112332.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J032853.32-112332.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L2)", + "spectral_type_code": 72.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j055515.83+510514.0.json b/data/cwise_j055515.83+510514.0.json index df388498e..cecec661f 100644 --- a/data/cwise_j055515.83+510514.0.json +++ b/data/cwise_j055515.83+510514.0.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J055515.83+510514.0" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "M7", + "spectral_type_code": 67.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j055909.00-384219.8.json b/data/cwise_j055909.00-384219.8.json index 27037ec53..26dab5e4b 100644 --- a/data/cwise_j055909.00-384219.8.json +++ b/data/cwise_j055909.00-384219.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J055909.00-384219.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L4)", + "spectral_type_code": 74.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j060202.17-462447.8.json b/data/cwise_j060202.17-462447.8.json index d8108901c..9f5a89519 100644 --- a/data/cwise_j060202.17-462447.8.json +++ b/data/cwise_j060202.17-462447.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J060202.17-462447.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L8)", + "spectral_type_code": 78.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j062000.01+344641.3.json b/data/cwise_j062000.01+344641.3.json index ec485010d..587b2bb27 100644 --- a/data/cwise_j062000.01+344641.3.json +++ b/data/cwise_j062000.01+344641.3.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J062000.01+344641.3" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L4", + "spectral_type_code": 74.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j062648.96+594129.2.json b/data/cwise_j062648.96+594129.2.json index d6d971a68..b6aedd3ab 100644 --- a/data/cwise_j062648.96+594129.2.json +++ b/data/cwise_j062648.96+594129.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J062648.96+594129.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L3 blue", + "spectral_type_code": 73.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j062727.34-002826.8.json b/data/cwise_j062727.34-002826.8.json index 3588662b2..d085228b4 100644 --- a/data/cwise_j062727.34-002826.8.json +++ b/data/cwise_j062727.34-002826.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J062727.34-002826.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "T0 blue", + "spectral_type_code": 80.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j062909.21+395701.6.json b/data/cwise_j062909.21+395701.6.json index 498af5976..ee73d63ad 100644 --- a/data/cwise_j062909.21+395701.6.json +++ b/data/cwise_j062909.21+395701.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J062909.21+395701.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L5)", + "spectral_type_code": 75.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j065752.45+163350.2.json b/data/cwise_j065752.45+163350.2.json index e71656093..c2f62621a 100644 --- a/data/cwise_j065752.45+163350.2.json +++ b/data/cwise_j065752.45+163350.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J065752.45+163350.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L6 beta", + "spectral_type_code": 76.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j073831.31+525453.7.json b/data/cwise_j073831.31+525453.7.json index f27e65755..b9e1272a5 100644 --- a/data/cwise_j073831.31+525453.7.json +++ b/data/cwise_j073831.31+525453.7.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J073831.31+525453.7" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L4 red", + "spectral_type_code": 74.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j080912.95+741704.3.json b/data/cwise_j080912.95+741704.3.json index 50c789409..b4266908e 100644 --- a/data/cwise_j080912.95+741704.3.json +++ b/data/cwise_j080912.95+741704.3.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J080912.95+741704.3" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L6)", + "spectral_type_code": 76.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j085131.24-603056.2.json b/data/cwise_j085131.24-603056.2.json index 60025a2da..90223b758 100644 --- a/data/cwise_j085131.24-603056.2.json +++ b/data/cwise_j085131.24-603056.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J085131.24-603056.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L3)", + "spectral_type_code": 73.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j091558.53+254713.0.json b/data/cwise_j091558.53+254713.0.json index 4109a8c7a..38a0a9c4c 100644 --- a/data/cwise_j091558.53+254713.0.json +++ b/data/cwise_j091558.53+254713.0.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J091558.53+254713.0" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T5)", + "spectral_type_code": 85.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j091902.55-574837.3.json b/data/cwise_j091902.55-574837.3.json index 6b2912691..0b3a874a3 100644 --- a/data/cwise_j091902.55-574837.3.json +++ b/data/cwise_j091902.55-574837.3.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J091902.55-574837.3" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T2)", + "spectral_type_code": 82.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j094352.22+335639.1.json b/data/cwise_j094352.22+335639.1.json index 4616b7ca6..7c171814e 100644 --- a/data/cwise_j094352.22+335639.1.json +++ b/data/cwise_j094352.22+335639.1.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J094352.22+335639.1" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L2 red", + "spectral_type_code": 72.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j095259.54-505418.9.json b/data/cwise_j095259.54-505418.9.json index b9bb92901..d5b098616 100644 --- a/data/cwise_j095259.54-505418.9.json +++ b/data/cwise_j095259.54-505418.9.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J095259.54-505418.9" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T2)", + "spectral_type_code": 82.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j101017.43-242300.4.json b/data/cwise_j101017.43-242300.4.json index d59e2597d..9f1153dde 100644 --- a/data/cwise_j101017.43-242300.4.json +++ b/data/cwise_j101017.43-242300.4.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J101017.43-242300.4" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T6)", + "spectral_type_code": 86.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j101317.51-010313.6.json b/data/cwise_j101317.51-010313.6.json index 9cbed6b15..52056702c 100644 --- a/data/cwise_j101317.51-010313.6.json +++ b/data/cwise_j101317.51-010313.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J101317.51-010313.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M7)", + "spectral_type_code": 67.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j101523.92-111539.6.json b/data/cwise_j101523.92-111539.6.json index ca1fb8ae1..9c2927597 100644 --- a/data/cwise_j101523.92-111539.6.json +++ b/data/cwise_j101523.92-111539.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J101523.92-111539.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L5 beta", + "spectral_type_code": 75.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j103734.29-050749.8.json b/data/cwise_j103734.29-050749.8.json index cdb162fbe..b03d8b932 100644 --- a/data/cwise_j103734.29-050749.8.json +++ b/data/cwise_j103734.29-050749.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J103734.29-050749.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L3)", + "spectral_type_code": 73.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j104053.42-355029.7.json b/data/cwise_j104053.42-355029.7.json index 8891640db..63c325a7c 100644 --- a/data/cwise_j104053.42-355029.7.json +++ b/data/cwise_j104053.42-355029.7.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J104053.42-355029.7" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "T7", + "spectral_type_code": 87.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j115229.05-351105.9.json b/data/cwise_j115229.05-351105.9.json index 9b2ec85b5..20fec2760 100644 --- a/data/cwise_j115229.05-351105.9.json +++ b/data/cwise_j115229.05-351105.9.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J115229.05-351105.9" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T0)", + "spectral_type_code": 80.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j124033.48+460544.7.json b/data/cwise_j124033.48+460544.7.json index 3838f23b4..65d999c5d 100644 --- a/data/cwise_j124033.48+460544.7.json +++ b/data/cwise_j124033.48+460544.7.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J124033.48+460544.7" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M9)", + "spectral_type_code": 69.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j125858.20+001133.2.json b/data/cwise_j125858.20+001133.2.json index 2aa99ad16..c6f928ad2 100644 --- a/data/cwise_j125858.20+001133.2.json +++ b/data/cwise_j125858.20+001133.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J125858.20+001133.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M7)", + "spectral_type_code": 67.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j130329.90+512754.0.json b/data/cwise_j130329.90+512754.0.json index 21027628d..6590b37ef 100644 --- a/data/cwise_j130329.90+512754.0.json +++ b/data/cwise_j130329.90+512754.0.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J130329.90+512754.0" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L2 red", + "spectral_type_code": 72.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j130446.64-120023.6.json b/data/cwise_j130446.64-120023.6.json index f133da069..eaa21dca5 100644 --- a/data/cwise_j130446.64-120023.6.json +++ b/data/cwise_j130446.64-120023.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J130446.64-120023.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "M7", + "spectral_type_code": 67.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j131355.15+223005.6.json b/data/cwise_j131355.15+223005.6.json index a86894775..3d224a163 100644 --- a/data/cwise_j131355.15+223005.6.json +++ b/data/cwise_j131355.15+223005.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J131355.15+223005.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L3", + "spectral_type_code": 73.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j132539.70+022309.4.json b/data/cwise_j132539.70+022309.4.json index 713b05053..68f736610 100644 --- a/data/cwise_j132539.70+022309.4.json +++ b/data/cwise_j132539.70+022309.4.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J132539.70+022309.4" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M9)", + "spectral_type_code": 69.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j132857.58-063747.4.json b/data/cwise_j132857.58-063747.4.json index 8838331c5..34cd8488f 100644 --- a/data/cwise_j132857.58-063747.4.json +++ b/data/cwise_j132857.58-063747.4.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J132857.58-063747.4" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L3 blue", + "spectral_type_code": 73.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j133211.93-374837.9.json b/data/cwise_j133211.93-374837.9.json index 605287722..ffb3c98b6 100644 --- a/data/cwise_j133211.93-374837.9.json +++ b/data/cwise_j133211.93-374837.9.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J133211.93-374837.9" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L5)", + "spectral_type_code": 75.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j133427.70-273053.1.json b/data/cwise_j133427.70-273053.1.json index 6377fd1a2..23ec4fe8f 100644 --- a/data/cwise_j133427.70-273053.1.json +++ b/data/cwise_j133427.70-273053.1.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J133427.70-273053.1" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L0", + "spectral_type_code": 70.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j141737.21+041847.2.json b/data/cwise_j141737.21+041847.2.json index bdc58c9e3..f38d8b4dc 100644 --- a/data/cwise_j141737.21+041847.2.json +++ b/data/cwise_j141737.21+041847.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J141737.21+041847.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "M8 beta", + "spectral_type_code": 68.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j143935.94-804851.5.json b/data/cwise_j143935.94-804851.5.json index 93cf82d05..8ac299d96 100644 --- a/data/cwise_j143935.94-804851.5.json +++ b/data/cwise_j143935.94-804851.5.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J143935.94-804851.5" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L2)", + "spectral_type_code": 72.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j143951.51+260000.3.json b/data/cwise_j143951.51+260000.3.json index 44bb7d7be..89303c183 100644 --- a/data/cwise_j143951.51+260000.3.json +++ b/data/cwise_j143951.51+260000.3.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J143951.51+260000.3" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "T3", + "spectral_type_code": 83.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j144057.87+380432.8.json b/data/cwise_j144057.87+380432.8.json index b8128b4dd..a3fa689ba 100644 --- a/data/cwise_j144057.87+380432.8.json +++ b/data/cwise_j144057.87+380432.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J144057.87+380432.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L4)", + "spectral_type_code": 74.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j151939.68-485820.4.json b/data/cwise_j151939.68-485820.4.json index 1536af124..4bd7d28c2 100644 --- a/data/cwise_j151939.68-485820.4.json +++ b/data/cwise_j151939.68-485820.4.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J151939.68-485820.4" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L6)", + "spectral_type_code": 76.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j152742.44-121528.2.json b/data/cwise_j152742.44-121528.2.json index 1c5e5e016..76bd68fae 100644 --- a/data/cwise_j152742.44-121528.2.json +++ b/data/cwise_j152742.44-121528.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J152742.44-121528.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "M9", + "spectral_type_code": 69.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j153910.07+722757.2.json b/data/cwise_j153910.07+722757.2.json index 93ff3055a..db8c935af 100644 --- a/data/cwise_j153910.07+722757.2.json +++ b/data/cwise_j153910.07+722757.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J153910.07+722757.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M8)", + "spectral_type_code": 68.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j160654.19-103214.7.json b/data/cwise_j160654.19-103214.7.json index cd8036bb7..daed22c42 100644 --- a/data/cwise_j160654.19-103214.7.json +++ b/data/cwise_j160654.19-103214.7.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J160654.19-103214.7" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L7 blue", + "spectral_type_code": 77.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j162511.27+774946.8.json b/data/cwise_j162511.27+774946.8.json index 1764e2e7a..dea50e2c3 100644 --- a/data/cwise_j162511.27+774946.8.json +++ b/data/cwise_j162511.27+774946.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J162511.27+774946.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L2", + "spectral_type_code": 72.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j165143.63+695259.4.json b/data/cwise_j165143.63+695259.4.json index 591c3064d..91b453359 100644 --- a/data/cwise_j165143.63+695259.4.json +++ b/data/cwise_j165143.63+695259.4.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J165143.63+695259.4" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T1)", + "spectral_type_code": 81.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j165325.10+490439.7.json b/data/cwise_j165325.10+490439.7.json index 383d0810e..069c6e00b 100644 --- a/data/cwise_j165325.10+490439.7.json +++ b/data/cwise_j165325.10+490439.7.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J165325.10+490439.7" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L5)", + "spectral_type_code": 75.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j171308.00+644220.8.json b/data/cwise_j171308.00+644220.8.json index 9817b4580..a79a2b23c 100644 --- a/data/cwise_j171308.00+644220.8.json +++ b/data/cwise_j171308.00+644220.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J171308.00+644220.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L0)", + "spectral_type_code": 70.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j171700.57+724437.3.json b/data/cwise_j171700.57+724437.3.json index fe46adb1a..516532c41 100644 --- a/data/cwise_j171700.57+724437.3.json +++ b/data/cwise_j171700.57+724437.3.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J171700.57+724437.3" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "M9", + "spectral_type_code": 69.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j173859.73+200501.2.json b/data/cwise_j173859.73+200501.2.json index 3a96409a6..d54989300 100644 --- a/data/cwise_j173859.73+200501.2.json +++ b/data/cwise_j173859.73+200501.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J173859.73+200501.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "M6", + "spectral_type_code": 66.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j174426.85+230355.1.json b/data/cwise_j174426.85+230355.1.json index 55c1ab0f4..59ffbdb68 100644 --- a/data/cwise_j174426.85+230355.1.json +++ b/data/cwise_j174426.85+230355.1.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J174426.85+230355.1" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "M8", + "spectral_type_code": 68.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j174509.03+380733.2.json b/data/cwise_j174509.03+380733.2.json index 518468bf6..50d10123c 100644 --- a/data/cwise_j174509.03+380733.2.json +++ b/data/cwise_j174509.03+380733.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J174509.03+380733.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L4 beta", + "spectral_type_code": 74.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j190909.62+553027.1.json b/data/cwise_j190909.62+553027.1.json index 50d0ac073..8b71fb455 100644 --- a/data/cwise_j190909.62+553027.1.json +++ b/data/cwise_j190909.62+553027.1.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J190909.62+553027.1" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L6)", + "spectral_type_code": 76.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j192425.03-532837.1.json b/data/cwise_j192425.03-532837.1.json index 2759e1541..b14fd58b5 100644 --- a/data/cwise_j192425.03-532837.1.json +++ b/data/cwise_j192425.03-532837.1.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J192425.03-532837.1" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M8)", + "spectral_type_code": 68.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j195956.16-644318.1.json b/data/cwise_j195956.16-644318.1.json index 3f88d6a83..b543ab282 100644 --- a/data/cwise_j195956.16-644318.1.json +++ b/data/cwise_j195956.16-644318.1.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J195956.16-644318.1" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "T5", + "spectral_type_code": 85.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j200304.70-142228.9.json b/data/cwise_j200304.70-142228.9.json index ba9355604..be04176f4 100644 --- a/data/cwise_j200304.70-142228.9.json +++ b/data/cwise_j200304.70-142228.9.json @@ -48,5 +48,17 @@ "comments": "WFCAM filter is a guess. Check reference for actual filter and telescope used. ", "reference": "Alle16.PhDT" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L0 beta", + "spectral_type_code": 70.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j200813.66-124502.4.json b/data/cwise_j200813.66-124502.4.json index 36adb088e..b019f9af0 100644 --- a/data/cwise_j200813.66-124502.4.json +++ b/data/cwise_j200813.66-124502.4.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J200813.66-124502.4" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L7)", + "spectral_type_code": 77.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j202934.80-791013.1.json b/data/cwise_j202934.80-791013.1.json index 0ac35b85c..1add12cb3 100644 --- a/data/cwise_j202934.80-791013.1.json +++ b/data/cwise_j202934.80-791013.1.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J202934.80-791013.1" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L1 blue", + "spectral_type_code": 71.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j205247.07+053855.7.json b/data/cwise_j205247.07+053855.7.json index d7e983671..ce5390a79 100644 --- a/data/cwise_j205247.07+053855.7.json +++ b/data/cwise_j205247.07+053855.7.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J205247.07+053855.7" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L7)", + "spectral_type_code": 77.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j210640.16+250729.0.json b/data/cwise_j210640.16+250729.0.json index e31f6592e..d5dfe64ec 100644 --- a/data/cwise_j210640.16+250729.0.json +++ b/data/cwise_j210640.16+250729.0.json @@ -30,5 +30,17 @@ { "other_name": "CWISE J210640.16+250729.0" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T2)", + "spectral_type_code": 82.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j212342.88+655615.6.json b/data/cwise_j212342.88+655615.6.json index 992bafd38..e48d12c7a 100644 --- a/data/cwise_j212342.88+655615.6.json +++ b/data/cwise_j212342.88+655615.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J212342.88+655615.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T5)", + "spectral_type_code": 85.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j214129.80-024623.6.json b/data/cwise_j214129.80-024623.6.json index a4f1937d4..056ddce41 100644 --- a/data/cwise_j214129.80-024623.6.json +++ b/data/cwise_j214129.80-024623.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J214129.80-024623.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L4 sl. red", + "spectral_type_code": 74.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j214213.99-204659.8.json b/data/cwise_j214213.99-204659.8.json index f4d3c4a67..f10988798 100644 --- a/data/cwise_j214213.99-204659.8.json +++ b/data/cwise_j214213.99-204659.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J214213.99-204659.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M8)", + "spectral_type_code": 68.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j221418.15+253432.2.json b/data/cwise_j221418.15+253432.2.json index 9af6909ed..ff96fd29b 100644 --- a/data/cwise_j221418.15+253432.2.json +++ b/data/cwise_j221418.15+253432.2.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J221418.15+253432.2" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L9", + "spectral_type_code": 79.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j224452.18-362946.0.json b/data/cwise_j224452.18-362946.0.json index 00e6cd9eb..77c97fb3c 100644 --- a/data/cwise_j224452.18-362946.0.json +++ b/data/cwise_j224452.18-362946.0.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J224452.18-362946.0" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T1)", + "spectral_type_code": 81.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j225525.22-302320.8.json b/data/cwise_j225525.22-302320.8.json index a6060c28f..be5165209 100644 --- a/data/cwise_j225525.22-302320.8.json +++ b/data/cwise_j225525.22-302320.8.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J225525.22-302320.8" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(T8)", + "spectral_type_code": 88.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j231824.58+052142.3.json b/data/cwise_j231824.58+052142.3.json index 03805bc7e..95659556d 100644 --- a/data/cwise_j231824.58+052142.3.json +++ b/data/cwise_j231824.58+052142.3.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J231824.58+052142.3" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "L4", + "spectral_type_code": 74.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j233531.55+014219.6.json b/data/cwise_j233531.55+014219.6.json index 942d92ab2..ea05ab4ea 100644 --- a/data/cwise_j233531.55+014219.6.json +++ b/data/cwise_j233531.55+014219.6.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J233531.55+014219.6" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "T9", + "spectral_type_code": 89.0, + "spectral_type_error": 0.5, + "regime": "nir", + "adopted": true, + "photometric": false, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwise_j235827.96-521813.4.json b/data/cwise_j235827.96-521813.4.json index 8b973bf6b..e6b2dd6d6 100644 --- a/data/cwise_j235827.96-521813.4.json +++ b/data/cwise_j235827.96-521813.4.json @@ -19,5 +19,17 @@ { "other_name": "CWISE J235827.96-521813.4" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(M9)", + "spectral_type_code": 69.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + } ] } \ No newline at end of file diff --git a/data/cwisep_j040351.00-491605.6.json b/data/cwisep_j040351.00-491605.6.json index 45ba1e157..4cce690f7 100644 --- a/data/cwisep_j040351.00-491605.6.json +++ b/data/cwisep_j040351.00-491605.6.json @@ -41,6 +41,16 @@ } ], "SpectralTypes": [ + { + "spectral_type_string": "(T7)", + "spectral_type_code": 87.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + }, { "spectral_type_string": "T8.5", "spectral_type_code": 88.5, diff --git a/data/cwisep_j085938.95+534908.7.json b/data/cwisep_j085938.95+534908.7.json index 7445c8957..5eb3bb3a8 100644 --- a/data/cwisep_j085938.95+534908.7.json +++ b/data/cwisep_j085938.95+534908.7.json @@ -59,6 +59,16 @@ } ], "SpectralTypes": [ + { + "spectral_type_string": "(T9)", + "spectral_type_code": 89.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + }, { "spectral_type_string": "Y0", "spectral_type_code": 90.0, diff --git a/data/ulas_j103131.49+123736.4.json b/data/ulas_j103131.49+123736.4.json index 02bc4d897..ff7a1baf2 100644 --- a/data/ulas_j103131.49+123736.4.json +++ b/data/ulas_j103131.49+123736.4.json @@ -19,5 +19,17 @@ { "other_name": "ULAS J103131.49+123736.4" } + ], + "SpectralTypes": [ + { + "spectral_type_string": "(L3)", + "spectral_type_code": 73.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Skrz16" + } ] } \ No newline at end of file diff --git a/data/wisea_j040702.42+190945.8.json b/data/wisea_j040702.42+190945.8.json index cbfce5a27..1dbd3ead8 100644 --- a/data/wisea_j040702.42+190945.8.json +++ b/data/wisea_j040702.42+190945.8.json @@ -62,6 +62,16 @@ } ], "SpectralTypes": [ + { + "spectral_type_string": "(T1)", + "spectral_type_code": 81.0, + "spectral_type_error": 2.0, + "regime": "nir", + "adopted": true, + "photometric": true, + "comments": null, + "reference": "Roth24" + }, { "spectral_type_string": "T6.5", "spectral_type_code": 86.5, diff --git a/tests/test_data.py b/tests/test_data.py index 809c672ab..f3deffbd0 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -344,7 +344,7 @@ def test_spectral_types_classes(db, string, code_min, code_max, n_spectra): def test_spectral_types(db): n_spectral_types = db.query(db.SpectralTypes).count() - assert n_spectral_types == 3863, f"found {n_spectral_types} spectral types" + assert n_spectral_types == 3950, f"found {n_spectral_types} spectral types" print(f"found {n_spectral_types} total spectral types") n_photometric_spectral_types = ( @@ -352,7 +352,7 @@ def test_spectral_types(db): ) assert ( - n_photometric_spectral_types == 0 + n_photometric_spectral_types == 54 ), f"found {n_photometric_spectral_types} photometric spectral types" print(f"found {n_photometric_spectral_types} photometric spectral types") @@ -360,7 +360,7 @@ def test_spectral_types(db): db.query(db.SpectralTypes).filter(db.SpectralTypes.c.adopted == 1).count() ) assert ( - n_adopted_spectral_types == 1 + n_adopted_spectral_types == 88 ), f"found {n_adopted_spectral_types} adopted spectral types" print(f"found {n_adopted_spectral_types} adopted spectral types") From 27099d1dab78101d3ac7acafc611248b6cefa49e Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Fri, 26 Jul 2024 15:16:26 -0400 Subject: [PATCH 15/22] Deleted notebook --- scripts/ingests/Roth24/Spectral_types.ipynb | 55 --------------------- 1 file changed, 55 deletions(-) delete mode 100644 scripts/ingests/Roth24/Spectral_types.ipynb diff --git a/scripts/ingests/Roth24/Spectral_types.ipynb b/scripts/ingests/Roth24/Spectral_types.ipynb deleted file mode 100644 index eabf22150..000000000 --- a/scripts/ingests/Roth24/Spectral_types.ipynb +++ /dev/null @@ -1,55 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "0c8363db", - "metadata": {}, - "outputs": [ - { - "ename": "ModuleNotFoundError", - "evalue": "No module named 'simple'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0msimple\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mutils\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mspectral_types\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mingest_spectral_types\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_spt_string_to_code\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'simple'" - ] - } - ], - "source": [ - "from simple.utils.spectral_types import ingest_spectral_types, convert_spt_string_to_code" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a2c0fa5b", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} From 9a2839f19771839031dce717e0b96cf6ea4dd6e6 Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Fri, 26 Jul 2024 15:18:48 -0400 Subject: [PATCH 16/22] Updated Versions.json --- data/Versions.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/data/Versions.json b/data/Versions.json index 8b121d713..ef80e9afe 100644 --- a/data/Versions.json +++ b/data/Versions.json @@ -96,9 +96,14 @@ "description": "Ingest of YJHK MKO photometries from ultracool sheet" }, { - "version": "latest", + "version": "2024.7", "start_date": "2024-07-15", + "end_date": "2024-07-26", + "description": "Version in development" + }, +] { + "version": "latest", + "start_date": "2024-07-26", "end_date": null, "description": "Version in development" - } -] \ No newline at end of file + } \ No newline at end of file From 50507b8d24cbd98ec879ee04d378edcd14e04b6e Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Fri, 26 Jul 2024 15:25:02 -0400 Subject: [PATCH 17/22] Fixed error in Versions.json --- data/Versions.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/Versions.json b/data/Versions.json index ef80e9afe..d5a678d06 100644 --- a/data/Versions.json +++ b/data/Versions.json @@ -101,9 +101,10 @@ "end_date": "2024-07-26", "description": "Version in development" }, -] { + { "version": "latest", "start_date": "2024-07-26", "end_date": null, "description": "Version in development" - } \ No newline at end of file + } +] \ No newline at end of file From e57b7739bbe14c4605ff25c759a4cfd64fc4517d Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Tue, 1 Oct 2024 14:57:15 -0400 Subject: [PATCH 18/22] adding script to ingest Roth24 companion relations --- scripts/ingests/BYW2024_companions.py | 49 +++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 scripts/ingests/BYW2024_companions.py diff --git a/scripts/ingests/BYW2024_companions.py b/scripts/ingests/BYW2024_companions.py new file mode 100644 index 000000000..8a89c551a --- /dev/null +++ b/scripts/ingests/BYW2024_companions.py @@ -0,0 +1,49 @@ +from astrodb_utils import load_astrodb +from astrodb_utils import ingest_publication +import sys +sys.path.append(".") +from simple.schema import * +from simple.schema import REFERENCE_TABLES +from astropy.io import ascii +from simple.utils.companions import ingest_companion_relationships +import logging + +logger = logging.getLogger("AstroDB") +logger.setLevel(logging.INFO) +SAVE_DB = False # 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_astrodb("SIMPLE.sqlite", recreatedb=RECREATE_DB, reference_tables=REFERENCE_TABLES) +#ingest_publication(db, doi='10.3847/1538-3881/ad324e' ) +# Load Google sheet + +link = 'scripts/ingests/Companion_relations.csv' + +# read the csv data into an astropy table +# ascii.read attempts to read data from local files rather from URLs so using a library like requests helps get data and create object that can be passed to ascii.read +byw_table = ascii.read( + link, #change this to the path for the csv file + format="csv", + data_start=1, + header_start=0, + guess=False, + fast_reader=False, + delimiter=",", +) + +for row in byw_table: # skip the header row - [1:10]runs only first 10 rows + + + ingest_companion_relationships( + db, + source=row["Source"], + companion_name=row["Host"], + relationship=row["Relationship"], + projected_separation_arcsec=row["Separation"], + ref=row["ref"] + ) + + + # WRITE THE JSON FILES +if SAVE_DB: + db.save_database(directory="data/") \ No newline at end of file From a4356077b265c3a8227dd931149f024c60beb937 Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Tue, 29 Oct 2024 14:33:09 -0400 Subject: [PATCH 19/22] Adding new companion relations for Roth24 sources. Kelle will update the version. --- data/source/cwise_j000021.45-481314.9.json | 11 +++ data/source/cwise_j002029.72-153527.5.json | 11 +++ data/source/cwise_j002101.45-334631.5.json | 11 +++ data/source/cwise_j002159.02-451434.4.json | 11 +++ data/source/cwise_j002414.30-403053.7.json | 11 +++ data/source/cwise_j002658.73-260859.6.json | 11 +++ data/source/cwise_j004218.67+291730.6.json | 11 +++ data/source/cwise_j004945.38+423619.3.json | 11 +++ data/source/cwise_j005635.48-240401.9.json | 11 +++ data/source/cwise_j010424.50+133949.8.json | 11 +++ data/source/cwise_j011003.61-592650.8.json | 11 +++ data/source/cwise_j012715.52-300246.9.json | 11 +++ data/source/cwise_j013719.04+342837.6.json | 11 +++ data/source/cwise_j015905.58+105551.5.json | 11 +++ data/source/cwise_j020538.20+594452.2.json | 11 +++ data/source/cwise_j022454.80+152629.5.json | 11 +++ data/source/cwise_j022737.75+083008.8.json | 11 +++ data/source/cwise_j025645.16-335008.9.json | 11 +++ data/source/cwise_j030005.73-062218.6.json | 11 +++ data/source/cwise_j032853.32-112332.6.json | 11 +++ data/source/cwise_j055515.83+510514.0.json | 11 +++ data/source/cwise_j055909.00-384219.8.json | 11 +++ data/source/cwise_j060202.17-462447.8.json | 11 +++ data/source/cwise_j062000.01+344641.3.json | 11 +++ data/source/cwise_j062648.96+594129.2.json | 11 +++ data/source/cwise_j062727.34-002826.8.json | 11 +++ data/source/cwise_j062909.21+395701.6.json | 11 +++ data/source/cwise_j065752.45+163350.2.json | 11 +++ data/source/cwise_j073831.31+525453.7.json | 11 +++ data/source/cwise_j080912.95+741704.3.json | 11 +++ data/source/cwise_j085131.24-603056.2.json | 11 +++ data/source/cwise_j091558.53+254713.0.json | 11 +++ data/source/cwise_j091902.55-574837.3.json | 11 +++ data/source/cwise_j094352.22+335639.1.json | 11 +++ data/source/cwise_j095259.54-505418.9.json | 11 +++ data/source/cwise_j101017.43-242300.4.json | 11 +++ data/source/cwise_j101317.51-010313.6.json | 11 +++ data/source/cwise_j101523.92-111539.6.json | 11 +++ data/source/cwise_j103734.29-050749.8.json | 11 +++ data/source/cwise_j104053.42-355029.7.json | 11 +++ data/source/cwise_j115229.05-351105.9.json | 11 +++ data/source/cwise_j124033.48+460544.7.json | 11 +++ data/source/cwise_j125858.20+001133.2.json | 11 +++ data/source/cwise_j130329.90+512754.0.json | 11 +++ data/source/cwise_j130446.64-120023.6.json | 11 +++ data/source/cwise_j131355.15+223005.6.json | 11 +++ data/source/cwise_j132539.70+022309.4.json | 11 +++ data/source/cwise_j132857.58-063747.4.json | 11 +++ data/source/cwise_j133211.93-374837.9.json | 11 +++ data/source/cwise_j133427.70-273053.1.json | 11 +++ data/source/cwise_j141737.21+041847.2.json | 11 +++ data/source/cwise_j143935.94-804851.5.json | 11 +++ data/source/cwise_j143951.51+260000.3.json | 11 +++ data/source/cwise_j144057.87+380432.8.json | 11 +++ data/source/cwise_j151939.68-485820.4.json | 11 +++ data/source/cwise_j152742.44-121528.2.json | 11 +++ data/source/cwise_j153910.07+722757.2.json | 11 +++ data/source/cwise_j160654.19-103214.7.json | 11 +++ data/source/cwise_j162511.27+774946.8.json | 11 +++ data/source/cwise_j165143.63+695259.4.json | 11 +++ data/source/cwise_j165325.10+490439.7.json | 11 +++ data/source/cwise_j171308.00+644220.8.json | 11 +++ data/source/cwise_j171700.57+724437.3.json | 11 +++ data/source/cwise_j173859.73+200501.2.json | 11 +++ data/source/cwise_j174426.85+230355.1.json | 11 +++ data/source/cwise_j174509.03+380733.2.json | 11 +++ data/source/cwise_j183207.94-540943.3.json | 11 +++ data/source/cwise_j190909.62+553027.1.json | 11 +++ data/source/cwise_j192425.03-532837.1.json | 11 +++ data/source/cwise_j195956.16-644318.1.json | 11 +++ data/source/cwise_j200304.70-142228.9.json | 11 +++ data/source/cwise_j200813.66-124502.4.json | 11 +++ data/source/cwise_j202934.80-791013.1.json | 11 +++ data/source/cwise_j205247.07+053855.7.json | 11 +++ data/source/cwise_j210640.16+250729.0.json | 2 +- data/source/cwise_j212342.88+655615.6.json | 11 +++ data/source/cwise_j214129.80-024623.6.json | 11 +++ data/source/cwise_j214213.99-204659.8.json | 11 +++ data/source/cwise_j221418.15+253432.2.json | 11 +++ data/source/cwise_j224452.18-362946.0.json | 11 +++ data/source/cwise_j225525.22-302320.8.json | 11 +++ data/source/cwise_j231824.58+052142.3.json | 11 +++ data/source/cwise_j233531.55+014219.6.json | 11 +++ data/source/cwise_j235827.96-521813.4.json | 11 +++ data/source/cwisep_j040351.00-491605.6.json | 11 +++ data/source/cwisep_j085938.95+534908.7.json | 11 +++ data/source/ulas_j103131.49+123736.4.json | 11 +++ data/source/ulas_j134403.78+083951.0.json | 11 +++ data/source/wisea_j040702.42+190945.8.json | 11 +++ scripts/ingests/Companion_relations.csv | 90 +++++++++++++++++++++ 90 files changed, 1059 insertions(+), 1 deletion(-) create mode 100644 scripts/ingests/Companion_relations.csv diff --git a/data/source/cwise_j000021.45-481314.9.json b/data/source/cwise_j000021.45-481314.9.json index b4bad3388..92163cae4 100644 --- a/data/source/cwise_j000021.45-481314.9.json +++ b/data/source/cwise_j000021.45-481314.9.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "TYC 8025-428-1", + "projected_separation_arcsec": 57.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "TYC 8025-428-1" + } + ], "Names": [ { "other_name": "CWISE 0000-4813" diff --git a/data/source/cwise_j002029.72-153527.5.json b/data/source/cwise_j002029.72-153527.5.json index 53f929f21..7da7232bf 100644 --- a/data/source/cwise_j002029.72-153527.5.json +++ b/data/source/cwise_j002029.72-153527.5.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "WDJ002027.83-153546.50", + "projected_separation_arcsec": 31.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "WDJ002027.83-153546.50" + } + ], "Names": [ { "other_name": "CWISE 0020-1535" diff --git a/data/source/cwise_j002101.45-334631.5.json b/data/source/cwise_j002101.45-334631.5.json index 530a8e18f..03f43a2aa 100644 --- a/data/source/cwise_j002101.45-334631.5.json +++ b/data/source/cwise_j002101.45-334631.5.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "UCAC3 113-933", + "projected_separation_arcsec": 116.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "UCAC3 113-933" + } + ], "Names": [ { "other_name": "CWISE 0021-3346" diff --git a/data/source/cwise_j002159.02-451434.4.json b/data/source/cwise_j002159.02-451434.4.json index 90f1e96a0..d0ce99f48 100644 --- a/data/source/cwise_j002159.02-451434.4.json +++ b/data/source/cwise_j002159.02-451434.4.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "2MASS J00215427-4514590", + "projected_separation_arcsec": 54.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "2MASS J00215427-4514590" + } + ], "Names": [ { "other_name": "CWISE 0021-4514" diff --git a/data/source/cwise_j002414.30-403053.7.json b/data/source/cwise_j002414.30-403053.7.json index ebad95fd5..39a13427e 100644 --- a/data/source/cwise_j002414.30-403053.7.json +++ b/data/source/cwise_j002414.30-403053.7.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "WT 5AB", + "projected_separation_arcsec": 78.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "WT 5AB" + } + ], "Names": [ { "other_name": "CWISE 0024-4030" diff --git a/data/source/cwise_j002658.73-260859.6.json b/data/source/cwise_j002658.73-260859.6.json index 4884c1c14..4da39ea15 100644 --- a/data/source/cwise_j002658.73-260859.6.json +++ b/data/source/cwise_j002658.73-260859.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CD-26 134", + "projected_separation_arcsec": 29.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CD-26 134" + } + ], "Names": [ { "other_name": "CWISE 0026-2608" diff --git a/data/source/cwise_j004218.67+291730.6.json b/data/source/cwise_j004218.67+291730.6.json index f5a68a4a9..f7dfd1fc0 100644 --- a/data/source/cwise_j004218.67+291730.6.json +++ b/data/source/cwise_j004218.67+291730.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "TYC 1744-123-1", + "projected_separation_arcsec": 103.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "TYC 1744-123-1" + } + ], "Names": [ { "other_name": "CWISE 0042+2917" diff --git a/data/source/cwise_j004945.38+423619.3.json b/data/source/cwise_j004945.38+423619.3.json index 9381ba92b..7f7fafecf 100644 --- a/data/source/cwise_j004945.38+423619.3.json +++ b/data/source/cwise_j004945.38+423619.3.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LAMOST J004950.95+423653.6", + "projected_separation_arcsec": 70.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LAMOST J004950.95+423653.6" + } + ], "Names": [ { "other_name": "CWISE 0049+4236" diff --git a/data/source/cwise_j005635.48-240401.9.json b/data/source/cwise_j005635.48-240401.9.json index efa57b692..ef3570040 100644 --- a/data/source/cwise_j005635.48-240401.9.json +++ b/data/source/cwise_j005635.48-240401.9.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CD-24 407", + "projected_separation_arcsec": 102.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CD-24 407" + } + ], "Names": [ { "other_name": "CWISE 0056-2404" diff --git a/data/source/cwise_j010424.50+133949.8.json b/data/source/cwise_j010424.50+133949.8.json index 8bce498df..3b3345491 100644 --- a/data/source/cwise_j010424.50+133949.8.json +++ b/data/source/cwise_j010424.50+133949.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 466-214", + "projected_separation_arcsec": 164.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 466-214" + } + ], "Names": [ { "other_name": "CWISE 0104+1339" diff --git a/data/source/cwise_j011003.61-592650.8.json b/data/source/cwise_j011003.61-592650.8.json index d4906ecca..0309fc30e 100644 --- a/data/source/cwise_j011003.61-592650.8.json +++ b/data/source/cwise_j011003.61-592650.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "WDJ011001.84-592642.22", + "projected_separation_arcsec": 15.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "WDJ011001.84-592642.22" + } + ], "Names": [ { "other_name": "CWISE 0110-5926" diff --git a/data/source/cwise_j012715.52-300246.9.json b/data/source/cwise_j012715.52-300246.9.json index 02c0bb771..596f2e61c 100644 --- a/data/source/cwise_j012715.52-300246.9.json +++ b/data/source/cwise_j012715.52-300246.9.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 883-372", + "projected_separation_arcsec": 51.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 883-372" + } + ], "Names": [ { "other_name": "CWISE 0127-3002" diff --git a/data/source/cwise_j013719.04+342837.6.json b/data/source/cwise_j013719.04+342837.6.json index 379078990..97a93df8e 100644 --- a/data/source/cwise_j013719.04+342837.6.json +++ b/data/source/cwise_j013719.04+342837.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J013716.34+342352.7", + "projected_separation_arcsec": 287.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J013716.34+342352.7" + } + ], "Names": [ { "other_name": "CWISE 0137+3428" diff --git a/data/source/cwise_j015905.58+105551.5.json b/data/source/cwise_j015905.58+105551.5.json index 8b8bb5b41..c46f2fa01 100644 --- a/data/source/cwise_j015905.58+105551.5.json +++ b/data/source/cwise_j015905.58+105551.5.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J015905.30+105543.2", + "projected_separation_arcsec": 9.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J015905.30+105543.2" + } + ], "Names": [ { "other_name": "CWISE 0159+1055" diff --git a/data/source/cwise_j020538.20+594452.2.json b/data/source/cwise_j020538.20+594452.2.json index 85fd26e76..fd85d8dde 100644 --- a/data/source/cwise_j020538.20+594452.2.json +++ b/data/source/cwise_j020538.20+594452.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "NLTT 6937", + "projected_separation_arcsec": 4.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "NLTT 6937" + } + ], "Names": [ { "other_name": "CWISE 0205+5944" diff --git a/data/source/cwise_j022454.80+152629.5.json b/data/source/cwise_j022454.80+152629.5.json index e16f0dbd7..45cb3e7b4 100644 --- a/data/source/cwise_j022454.80+152629.5.json +++ b/data/source/cwise_j022454.80+152629.5.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J022454.10+152633.8", + "projected_separation_arcsec": 11.0, + "projected_separation_error": null, + "relationship": "Parent", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J022454.10+152633.8" + } + ], "Names": [ { "other_name": "CWISE 0224+1526*" diff --git a/data/source/cwise_j022737.75+083008.8.json b/data/source/cwise_j022737.75+083008.8.json index c114c58c4..144c5bafc 100644 --- a/data/source/cwise_j022737.75+083008.8.json +++ b/data/source/cwise_j022737.75+083008.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "G 73-59", + "projected_separation_arcsec": 16.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "G 73-59" + } + ], "Names": [ { "other_name": "CWISE 0227+0830" diff --git a/data/source/cwise_j025645.16-335008.9.json b/data/source/cwise_j025645.16-335008.9.json index 843979c08..d449f6744 100644 --- a/data/source/cwise_j025645.16-335008.9.json +++ b/data/source/cwise_j025645.16-335008.9.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J025638.42-335454.9", + "projected_separation_arcsec": 298.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J025638.42-335454.9" + } + ], "Names": [ { "other_name": "CWISE 0256-3350" diff --git a/data/source/cwise_j030005.73-062218.6.json b/data/source/cwise_j030005.73-062218.6.json index 7028c5af3..d501d0a97 100644 --- a/data/source/cwise_j030005.73-062218.6.json +++ b/data/source/cwise_j030005.73-062218.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "BPS CS 22963-0014", + "projected_separation_arcsec": 63.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "BPS CS 22963-0014" + } + ], "Names": [ { "other_name": "CWISE 0300-0622" diff --git a/data/source/cwise_j032853.32-112332.6.json b/data/source/cwise_j032853.32-112332.6.json index 9de03c7d4..386eaa507 100644 --- a/data/source/cwise_j032853.32-112332.6.json +++ b/data/source/cwise_j032853.32-112332.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J032852.72-112345.6", + "projected_separation_arcsec": 16.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J032852.72-112345.6" + } + ], "Names": [ { "other_name": "CWISE 0328-1123" diff --git a/data/source/cwise_j055515.83+510514.0.json b/data/source/cwise_j055515.83+510514.0.json index cecec661f..2573ce70a 100644 --- a/data/source/cwise_j055515.83+510514.0.json +++ b/data/source/cwise_j055515.83+510514.0.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "G 192-8", + "projected_separation_arcsec": 23.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "G 192-8" + } + ], "Names": [ { "other_name": "CWISE 0555+5105" diff --git a/data/source/cwise_j055909.00-384219.8.json b/data/source/cwise_j055909.00-384219.8.json index 26dab5e4b..2b0bb73c3 100644 --- a/data/source/cwise_j055909.00-384219.8.json +++ b/data/source/cwise_j055909.00-384219.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "HD 40781", + "projected_separation_arcsec": 54.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "HD 40781" + } + ], "Names": [ { "other_name": "CWISE 0559-3842" diff --git a/data/source/cwise_j060202.17-462447.8.json b/data/source/cwise_j060202.17-462447.8.json index 9f5a89519..59a65f4a9 100644 --- a/data/source/cwise_j060202.17-462447.8.json +++ b/data/source/cwise_j060202.17-462447.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "WDJ060159.98-462534.40", + "projected_separation_arcsec": 52.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "WDJ060159.98-462534.40" + } + ], "Names": [ { "other_name": "CWISE 0602-4624" diff --git a/data/source/cwise_j062000.01+344641.3.json b/data/source/cwise_j062000.01+344641.3.json index 587b2bb27..674b78440 100644 --- a/data/source/cwise_j062000.01+344641.3.json +++ b/data/source/cwise_j062000.01+344641.3.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J061959.56+344631.3", + "projected_separation_arcsec": 12.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J061959.56+344631.3" + } + ], "Names": [ { "other_name": "CWISE 0620+3446" diff --git a/data/source/cwise_j062648.96+594129.2.json b/data/source/cwise_j062648.96+594129.2.json index b6aedd3ab..f45f9a8aa 100644 --- a/data/source/cwise_j062648.96+594129.2.json +++ b/data/source/cwise_j062648.96+594129.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LAMOST J062631.15+593341.3", + "projected_separation_arcsec": 488.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LAMOST J062631.15+593341.3" + } + ], "Names": [ { "other_name": "CWISE 0626+5941" diff --git a/data/source/cwise_j062727.34-002826.8.json b/data/source/cwise_j062727.34-002826.8.json index d085228b4..0c211a33e 100644 --- a/data/source/cwise_j062727.34-002826.8.json +++ b/data/source/cwise_j062727.34-002826.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J062725.95-002843.8", + "projected_separation_arcsec": 27.0, + "projected_separation_error": null, + "relationship": "Parent", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J062725.95-002843.8" + } + ], "Names": [ { "other_name": "CWISE 0627-0028A" diff --git a/data/source/cwise_j062909.21+395701.6.json b/data/source/cwise_j062909.21+395701.6.json index ee73d63ad..6ed8fb39f 100644 --- a/data/source/cwise_j062909.21+395701.6.json +++ b/data/source/cwise_j062909.21+395701.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J062911.12+395632.8", + "projected_separation_arcsec": 36.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J062911.12+395632.8" + } + ], "Names": [ { "other_name": "CWISE 0629+3957" diff --git a/data/source/cwise_j065752.45+163350.2.json b/data/source/cwise_j065752.45+163350.2.json index c2f62621a..d69ea36c5 100644 --- a/data/source/cwise_j065752.45+163350.2.json +++ b/data/source/cwise_j065752.45+163350.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "HD 51400", + "projected_separation_arcsec": 61.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "HD 51400" + } + ], "Names": [ { "other_name": "CWISE 0657+1633" diff --git a/data/source/cwise_j073831.31+525453.7.json b/data/source/cwise_j073831.31+525453.7.json index b9e1272a5..662b920e3 100644 --- a/data/source/cwise_j073831.31+525453.7.json +++ b/data/source/cwise_j073831.31+525453.7.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LSPM J0738+5254", + "projected_separation_arcsec": 11.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LSPM J0738+5254" + } + ], "Names": [ { "other_name": "CWISE 0738+5254" diff --git a/data/source/cwise_j080912.95+741704.3.json b/data/source/cwise_j080912.95+741704.3.json index b4266908e..c05d0e62f 100644 --- a/data/source/cwise_j080912.95+741704.3.json +++ b/data/source/cwise_j080912.95+741704.3.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 17-276", + "projected_separation_arcsec": 402.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 17-276" + } + ], "Names": [ { "other_name": "CWISE 0809+7417" diff --git a/data/source/cwise_j085131.24-603056.2.json b/data/source/cwise_j085131.24-603056.2.json index 90223b758..e7d701928 100644 --- a/data/source/cwise_j085131.24-603056.2.json +++ b/data/source/cwise_j085131.24-603056.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "TYC 8927-2833-1", + "projected_separation_arcsec": 95.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "TYC 8927-2833-1" + } + ], "Names": [ { "other_name": "CWISE 0851-6030" diff --git a/data/source/cwise_j091558.53+254713.0.json b/data/source/cwise_j091558.53+254713.0.json index 38a0a9c4c..132376515 100644 --- a/data/source/cwise_j091558.53+254713.0.json +++ b/data/source/cwise_j091558.53+254713.0.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "StKM 1-760", + "projected_separation_arcsec": 555.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "StKM 1-760" + } + ], "Names": [ { "other_name": "CWISE 0915+2547" diff --git a/data/source/cwise_j091902.55-574837.3.json b/data/source/cwise_j091902.55-574837.3.json index 0b3a874a3..303f9427b 100644 --- a/data/source/cwise_j091902.55-574837.3.json +++ b/data/source/cwise_j091902.55-574837.3.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "WISEA J091900.48-574847.1", + "projected_separation_arcsec": 19.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "WISEA J091900.48-574847.1" + } + ], "Names": [ { "other_name": "CWISE 0919-5748" diff --git a/data/source/cwise_j094352.22+335639.1.json b/data/source/cwise_j094352.22+335639.1.json index 7c171814e..d74edc557 100644 --- a/data/source/cwise_j094352.22+335639.1.json +++ b/data/source/cwise_j094352.22+335639.1.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "2MASS J09435055+3356550", + "projected_separation_arcsec": 28.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "2MASS J09435055+3356550" + } + ], "Names": [ { "other_name": "CWISE 0943+3356" diff --git a/data/source/cwise_j095259.54-505418.9.json b/data/source/cwise_j095259.54-505418.9.json index d5b098616..d40327f23 100644 --- a/data/source/cwise_j095259.54-505418.9.json +++ b/data/source/cwise_j095259.54-505418.9.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "2MASS J09530410-5055203", + "projected_separation_arcsec": 73.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "2MASS J09530410-5055203" + } + ], "Names": [ { "other_name": "CWISE 0952-5054" diff --git a/data/source/cwise_j101017.43-242300.4.json b/data/source/cwise_j101017.43-242300.4.json index 9f1153dde..7f227b2cb 100644 --- a/data/source/cwise_j101017.43-242300.4.json +++ b/data/source/cwise_j101017.43-242300.4.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "UCAC4 328-061594", + "projected_separation_arcsec": 486.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "UCAC4 328-061594" + } + ], "Names": [ { "other_name": "CWISE 1010-2423" diff --git a/data/source/cwise_j101317.51-010313.6.json b/data/source/cwise_j101317.51-010313.6.json index 52056702c..9fcbd6219 100644 --- a/data/source/cwise_j101317.51-010313.6.json +++ b/data/source/cwise_j101317.51-010313.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 609-46", + "projected_separation_arcsec": 13.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 609-46" + } + ], "Names": [ { "other_name": "CWISE 1013-0103" diff --git a/data/source/cwise_j101523.92-111539.6.json b/data/source/cwise_j101523.92-111539.6.json index 9c2927597..4b5e29796 100644 --- a/data/source/cwise_j101523.92-111539.6.json +++ b/data/source/cwise_j101523.92-111539.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J101533.05-111501.0AB", + "projected_separation_arcsec": 140.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J101533.05-111501.0AB" + } + ], "Names": [ { "other_name": "CWISE 1015-1115" diff --git a/data/source/cwise_j103734.29-050749.8.json b/data/source/cwise_j103734.29-050749.8.json index b03d8b932..8b313edaa 100644 --- a/data/source/cwise_j103734.29-050749.8.json +++ b/data/source/cwise_j103734.29-050749.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 670-45", + "projected_separation_arcsec": 30.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 670-45" + } + ], "Names": [ { "other_name": "CWISE 1037-0507" diff --git a/data/source/cwise_j104053.42-355029.7.json b/data/source/cwise_j104053.42-355029.7.json index 63c325a7c..16b2c3e66 100644 --- a/data/source/cwise_j104053.42-355029.7.json +++ b/data/source/cwise_j104053.42-355029.7.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "UPM J1040-3551", + "projected_separation_arcsec": 66.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "UPM J1040-3551" + } + ], "Names": [ { "other_name": "CWISE 1040-3550" diff --git a/data/source/cwise_j115229.05-351105.9.json b/data/source/cwise_j115229.05-351105.9.json index 20fec2760..f58660deb 100644 --- a/data/source/cwise_j115229.05-351105.9.json +++ b/data/source/cwise_j115229.05-351105.9.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 961-51", + "projected_separation_arcsec": 113.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 961-51" + } + ], "Names": [ { "other_name": "CWISE 1152-3511" diff --git a/data/source/cwise_j124033.48+460544.7.json b/data/source/cwise_j124033.48+460544.7.json index 65d999c5d..c2b4d4dc2 100644 --- a/data/source/cwise_j124033.48+460544.7.json +++ b/data/source/cwise_j124033.48+460544.7.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J124032.46+460559.9", + "projected_separation_arcsec": 19.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J124032.46+460559.9" + } + ], "Names": [ { "other_name": "CWISE 1240+4605" diff --git a/data/source/cwise_j125858.20+001133.2.json b/data/source/cwise_j125858.20+001133.2.json index c6f928ad2..bd081da04 100644 --- a/data/source/cwise_j125858.20+001133.2.json +++ b/data/source/cwise_j125858.20+001133.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 616-93", + "projected_separation_arcsec": 25.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 616-93" + } + ], "Names": [ { "other_name": "CWISE 1258+0011" diff --git a/data/source/cwise_j130329.90+512754.0.json b/data/source/cwise_j130329.90+512754.0.json index 6590b37ef..6b1a7f7df 100644 --- a/data/source/cwise_j130329.90+512754.0.json +++ b/data/source/cwise_j130329.90+512754.0.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "2MASS J13032992+5127582", + "projected_separation_arcsec": 5.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "2MASS J13032992+5127582" + } + ], "Names": [ { "other_name": "CWISE 1303+5127" diff --git a/data/source/cwise_j130446.64-120023.6.json b/data/source/cwise_j130446.64-120023.6.json index eaa21dca5..00791a1a9 100644 --- a/data/source/cwise_j130446.64-120023.6.json +++ b/data/source/cwise_j130446.64-120023.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J130446.94-120024.4", + "projected_separation_arcsec": 4.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J130446.94-120024.4" + } + ], "Names": [ { "other_name": "CWISE 1304-1200" diff --git a/data/source/cwise_j131355.15+223005.6.json b/data/source/cwise_j131355.15+223005.6.json index 3d224a163..f8690ce51 100644 --- a/data/source/cwise_j131355.15+223005.6.json +++ b/data/source/cwise_j131355.15+223005.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 378-789", + "projected_separation_arcsec": 29.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 378-789" + } + ], "Names": [ { "other_name": "CWISE 1313+2230" diff --git a/data/source/cwise_j132539.70+022309.4.json b/data/source/cwise_j132539.70+022309.4.json index 68f736610..569678ff8 100644 --- a/data/source/cwise_j132539.70+022309.4.json +++ b/data/source/cwise_j132539.70+022309.4.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 617-58", + "projected_separation_arcsec": 31.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 617-58" + } + ], "Names": [ { "other_name": "CWISE 1325+0223" diff --git a/data/source/cwise_j132857.58-063747.4.json b/data/source/cwise_j132857.58-063747.4.json index 34cd8488f..e89b7b0d4 100644 --- a/data/source/cwise_j132857.58-063747.4.json +++ b/data/source/cwise_j132857.58-063747.4.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 677-81", + "projected_separation_arcsec": 19.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 677-81" + } + ], "Names": [ { "other_name": "CWISE 1328-0637" diff --git a/data/source/cwise_j133211.93-374837.9.json b/data/source/cwise_j133211.93-374837.9.json index ffb3c98b6..b62a14e4c 100644 --- a/data/source/cwise_j133211.93-374837.9.json +++ b/data/source/cwise_j133211.93-374837.9.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J133211.59-374953.3", + "projected_separation_arcsec": 76.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J133211.59-374953.3" + } + ], "Names": [ { "other_name": "CWISE 1332-3748" diff --git a/data/source/cwise_j133427.70-273053.1.json b/data/source/cwise_j133427.70-273053.1.json index 23ec4fe8f..f833464d9 100644 --- a/data/source/cwise_j133427.70-273053.1.json +++ b/data/source/cwise_j133427.70-273053.1.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "HD 117987", + "projected_separation_arcsec": 48.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "HD 117987" + } + ], "Names": [ { "other_name": "CWISE 1334-2730" diff --git a/data/source/cwise_j141737.21+041847.2.json b/data/source/cwise_j141737.21+041847.2.json index f38d8b4dc..941a11355 100644 --- a/data/source/cwise_j141737.21+041847.2.json +++ b/data/source/cwise_j141737.21+041847.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LSPM J1417+0418", + "projected_separation_arcsec": 24.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LSPM J1417+0418" + } + ], "Names": [ { "other_name": "CWISE 1417+0418" diff --git a/data/source/cwise_j143935.94-804851.5.json b/data/source/cwise_j143935.94-804851.5.json index 8ac299d96..9d21d8467 100644 --- a/data/source/cwise_j143935.94-804851.5.json +++ b/data/source/cwise_j143935.94-804851.5.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "WISEA J143934.77-804838.8", + "projected_separation_arcsec": 13.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "WISEA J143934.77-804838.8" + } + ], "Names": [ { "other_name": "CWISE 1439-8048" diff --git a/data/source/cwise_j143951.51+260000.3.json b/data/source/cwise_j143951.51+260000.3.json index 89303c183..ff6c99c60 100644 --- a/data/source/cwise_j143951.51+260000.3.json +++ b/data/source/cwise_j143951.51+260000.3.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J143951.66+255944.8", + "projected_separation_arcsec": 16.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J143951.66+255944.8" + } + ], "Names": [ { "other_name": "CWISE 1439+2600" diff --git a/data/source/cwise_j144057.87+380432.8.json b/data/source/cwise_j144057.87+380432.8.json index a3fa689ba..b8427ce89 100644 --- a/data/source/cwise_j144057.87+380432.8.json +++ b/data/source/cwise_j144057.87+380432.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J144058.48+380422.1", + "projected_separation_arcsec": 13.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J144058.48+380422.1" + } + ], "Names": [ { "other_name": "CWISE 1440+3804" diff --git a/data/source/cwise_j151939.68-485820.4.json b/data/source/cwise_j151939.68-485820.4.json index 4bd7d28c2..8872ed2c0 100644 --- a/data/source/cwise_j151939.68-485820.4.json +++ b/data/source/cwise_j151939.68-485820.4.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J151940.47-485810.2", + "projected_separation_arcsec": 13.0, + "projected_separation_error": null, + "relationship": "Sibling", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J151940.47-485810.2" + } + ], "Names": [ { "other_name": "CWISE 1519-4858" diff --git a/data/source/cwise_j152742.44-121528.2.json b/data/source/cwise_j152742.44-121528.2.json index 76bd68fae..8c22ac578 100644 --- a/data/source/cwise_j152742.44-121528.2.json +++ b/data/source/cwise_j152742.44-121528.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J152740.12-121551.7", + "projected_separation_arcsec": 42.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J152740.12-121551.7" + } + ], "Names": [ { "other_name": "CWISE 1527-1215" diff --git a/data/source/cwise_j153910.07+722757.2.json b/data/source/cwise_j153910.07+722757.2.json index db8c935af..f79933048 100644 --- a/data/source/cwise_j153910.07+722757.2.json +++ b/data/source/cwise_j153910.07+722757.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LSPM J1539+7227", + "projected_separation_arcsec": 42.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LSPM J1539+7227" + } + ], "Names": [ { "other_name": "CWISE 1539+7227" diff --git a/data/source/cwise_j160654.19-103214.7.json b/data/source/cwise_j160654.19-103214.7.json index daed22c42..e6ca8e1d4 100644 --- a/data/source/cwise_j160654.19-103214.7.json +++ b/data/source/cwise_j160654.19-103214.7.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J160653.16-103210.6", + "projected_separation_arcsec": 16.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J160653.16-103210.6" + } + ], "Names": [ { "other_name": "CWISE 1606-1032" diff --git a/data/source/cwise_j162511.27+774946.8.json b/data/source/cwise_j162511.27+774946.8.json index dea50e2c3..e460d5bc7 100644 --- a/data/source/cwise_j162511.27+774946.8.json +++ b/data/source/cwise_j162511.27+774946.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "UCAC4 840-013771", + "projected_separation_arcsec": 313.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "UCAC4 840-013771" + } + ], "Names": [ { "other_name": "CWISE 1625+7749" diff --git a/data/source/cwise_j165143.63+695259.4.json b/data/source/cwise_j165143.63+695259.4.json index 91b453359..8c0f3ac45 100644 --- a/data/source/cwise_j165143.63+695259.4.json +++ b/data/source/cwise_j165143.63+695259.4.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J165141.67+695306.6", + "projected_separation_arcsec": 13.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J165141.67+695306.6" + } + ], "Names": [ { "other_name": "CWISE 1651+6952" diff --git a/data/source/cwise_j165325.10+490439.7.json b/data/source/cwise_j165325.10+490439.7.json index 069c6e00b..d5499ea08 100644 --- a/data/source/cwise_j165325.10+490439.7.json +++ b/data/source/cwise_j165325.10+490439.7.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "BD+49 2561AB", + "projected_separation_arcsec": 53.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "BD+49 2561AB" + } + ], "Names": [ { "other_name": "CWISE 1653+4904" diff --git a/data/source/cwise_j171308.00+644220.8.json b/data/source/cwise_j171308.00+644220.8.json index a79a2b23c..97d7c7fd2 100644 --- a/data/source/cwise_j171308.00+644220.8.json +++ b/data/source/cwise_j171308.00+644220.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 70-189", + "projected_separation_arcsec": 23.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 70-189" + } + ], "Names": [ { "other_name": "CWISE 1713+6442" diff --git a/data/source/cwise_j171700.57+724437.3.json b/data/source/cwise_j171700.57+724437.3.json index 516532c41..3d72de332 100644 --- a/data/source/cwise_j171700.57+724437.3.json +++ b/data/source/cwise_j171700.57+724437.3.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J171701.09+724449.2", + "projected_separation_arcsec": 12.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J171701.09+724449.2" + } + ], "Names": [ { "other_name": "CWISE 1717+7244" diff --git a/data/source/cwise_j173859.73+200501.2.json b/data/source/cwise_j173859.73+200501.2.json index d54989300..025ded9b0 100644 --- a/data/source/cwise_j173859.73+200501.2.json +++ b/data/source/cwise_j173859.73+200501.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J173859.73+200501.2B", + "projected_separation_arcsec": 1.0, + "projected_separation_error": null, + "relationship": "Sibling", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J173859.73+200501.2B" + } + ], "Names": [ { "other_name": "CWISE 1738+2005" diff --git a/data/source/cwise_j174426.85+230355.1.json b/data/source/cwise_j174426.85+230355.1.json index 59ffbdb68..57e3fe1d7 100644 --- a/data/source/cwise_j174426.85+230355.1.json +++ b/data/source/cwise_j174426.85+230355.1.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 389-13", + "projected_separation_arcsec": 8.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 389-13" + } + ], "Names": [ { "other_name": "CWISE 1744+2303" diff --git a/data/source/cwise_j174509.03+380733.2.json b/data/source/cwise_j174509.03+380733.2.json index 50d10123c..7bad8336b 100644 --- a/data/source/cwise_j174509.03+380733.2.json +++ b/data/source/cwise_j174509.03+380733.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "StKM 1-1526", + "projected_separation_arcsec": 68.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "StKM 1-1526" + } + ], "Names": [ { "other_name": "CWISE 1745+3807" diff --git a/data/source/cwise_j183207.94-540943.3.json b/data/source/cwise_j183207.94-540943.3.json index 1b1608642..18c3c16e2 100644 --- a/data/source/cwise_j183207.94-540943.3.json +++ b/data/source/cwise_j183207.94-540943.3.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "HD 170573", + "projected_separation_arcsec": 619.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "HD 170573" + } + ], "Names": [ { "other_name": "CWISE 1832-5409" diff --git a/data/source/cwise_j190909.62+553027.1.json b/data/source/cwise_j190909.62+553027.1.json index 8b71fb455..9770bb760 100644 --- a/data/source/cwise_j190909.62+553027.1.json +++ b/data/source/cwise_j190909.62+553027.1.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J190907.63+553037.3", + "projected_separation_arcsec": 20.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J190907.63+553037.3" + } + ], "Names": [ { "other_name": "CWISE 1909+5530" diff --git a/data/source/cwise_j192425.03-532837.1.json b/data/source/cwise_j192425.03-532837.1.json index b14fd58b5..be9b39a82 100644 --- a/data/source/cwise_j192425.03-532837.1.json +++ b/data/source/cwise_j192425.03-532837.1.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "UPM J1924-5328", + "projected_separation_arcsec": 21.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "UPM J1924-5328" + } + ], "Names": [ { "other_name": "CWISE 1924-5328" diff --git a/data/source/cwise_j195956.16-644318.1.json b/data/source/cwise_j195956.16-644318.1.json index b543ab282..8445a84ed 100644 --- a/data/source/cwise_j195956.16-644318.1.json +++ b/data/source/cwise_j195956.16-644318.1.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "HD188769", + "projected_separation_arcsec": 521.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "HD188769" + } + ], "Names": [ { "other_name": "CWISE 1959-6443" diff --git a/data/source/cwise_j200304.70-142228.9.json b/data/source/cwise_j200304.70-142228.9.json index be04176f4..a8d3fac94 100644 --- a/data/source/cwise_j200304.70-142228.9.json +++ b/data/source/cwise_j200304.70-142228.9.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J200301.62-142230.0", + "projected_separation_arcsec": 45.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J200301.62-142230.0" + } + ], "Names": [ { "other_name": "CWISE 2003-1422" diff --git a/data/source/cwise_j200813.66-124502.4.json b/data/source/cwise_j200813.66-124502.4.json index b019f9af0..e9b3893b7 100644 --- a/data/source/cwise_j200813.66-124502.4.json +++ b/data/source/cwise_j200813.66-124502.4.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 754-21", + "projected_separation_arcsec": 83.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 754-21" + } + ], "Names": [ { "other_name": "CWISE 2008-1245" diff --git a/data/source/cwise_j202934.80-791013.1.json b/data/source/cwise_j202934.80-791013.1.json index 1add12cb3..b38bb75b0 100644 --- a/data/source/cwise_j202934.80-791013.1.json +++ b/data/source/cwise_j202934.80-791013.1.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "SCR J2029-7910", + "projected_separation_arcsec": 34.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "SCR J2029-7910" + } + ], "Names": [ { "other_name": "CWISE 2029-7910" diff --git a/data/source/cwise_j205247.07+053855.7.json b/data/source/cwise_j205247.07+053855.7.json index ce5390a79..b3acea11c 100644 --- a/data/source/cwise_j205247.07+053855.7.json +++ b/data/source/cwise_j205247.07+053855.7.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LSPM J2052+0539", + "projected_separation_arcsec": 13.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LSPM J2052+0539" + } + ], "Names": [ { "other_name": "CWISE 2052+0538" diff --git a/data/source/cwise_j210640.16+250729.0.json b/data/source/cwise_j210640.16+250729.0.json index d5dfe64ec..ec9945356 100644 --- a/data/source/cwise_j210640.16+250729.0.json +++ b/data/source/cwise_j210640.16+250729.0.json @@ -19,7 +19,7 @@ "projected_separation_error": null, "relationship": "Child", "comments": null, - "reference": "Roth", + "reference": "Roth24", "other_companion_names": "2MASS J21080190+2510346, BD+24 4329" } ], diff --git a/data/source/cwise_j212342.88+655615.6.json b/data/source/cwise_j212342.88+655615.6.json index e48d12c7a..cb90fc06d 100644 --- a/data/source/cwise_j212342.88+655615.6.json +++ b/data/source/cwise_j212342.88+655615.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "WDJ212231.86+660043.69", + "projected_separation_arcsec": 510.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "WDJ212231.86+660043.69" + } + ], "Names": [ { "other_name": "CWISE 2123+6556" diff --git a/data/source/cwise_j214129.80-024623.6.json b/data/source/cwise_j214129.80-024623.6.json index 056ddce41..4af502ac7 100644 --- a/data/source/cwise_j214129.80-024623.6.json +++ b/data/source/cwise_j214129.80-024623.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "TYC 5213-545-1", + "projected_separation_arcsec": 114.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "TYC 5213-545-1" + } + ], "Names": [ { "other_name": "CWISE 2141-0246" diff --git a/data/source/cwise_j214213.99-204659.8.json b/data/source/cwise_j214213.99-204659.8.json index f10988798..d1a48408e 100644 --- a/data/source/cwise_j214213.99-204659.8.json +++ b/data/source/cwise_j214213.99-204659.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "CWISE J214209.46-204646.1", + "projected_separation_arcsec": 65.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "CWISE J214209.46-204646.1" + } + ], "Names": [ { "other_name": "CWISE 2142-2046" diff --git a/data/source/cwise_j221418.15+253432.2.json b/data/source/cwise_j221418.15+253432.2.json index ff96fd29b..a8705f24b 100644 --- a/data/source/cwise_j221418.15+253432.2.json +++ b/data/source/cwise_j221418.15+253432.2.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LSPM J2214+2534", + "projected_separation_arcsec": 28.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LSPM J2214+2534" + } + ], "Names": [ { "other_name": "CWISE 2214+2535" diff --git a/data/source/cwise_j224452.18-362946.0.json b/data/source/cwise_j224452.18-362946.0.json index 77c97fb3c..e2ca7bd96 100644 --- a/data/source/cwise_j224452.18-362946.0.json +++ b/data/source/cwise_j224452.18-362946.0.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LEHPM 5083", + "projected_separation_arcsec": 74.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LEHPM 5083" + } + ], "Names": [ { "other_name": "CWISE 2244-3629" diff --git a/data/source/cwise_j225525.22-302320.8.json b/data/source/cwise_j225525.22-302320.8.json index be5165209..202cf1f3e 100644 --- a/data/source/cwise_j225525.22-302320.8.json +++ b/data/source/cwise_j225525.22-302320.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LP 933-24AB", + "projected_separation_arcsec": 251.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LP 933-24AB" + } + ], "Names": [ { "other_name": "CWISE 2255-3023" diff --git a/data/source/cwise_j231824.58+052142.3.json b/data/source/cwise_j231824.58+052142.3.json index 95659556d..e6b16081e 100644 --- a/data/source/cwise_j231824.58+052142.3.json +++ b/data/source/cwise_j231824.58+052142.3.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "WISEA J231825.63+052141.6", + "projected_separation_arcsec": 15.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "WISEA J231825.63+052141.6" + } + ], "Names": [ { "other_name": "CWISE 2318+0521" diff --git a/data/source/cwise_j233531.55+014219.6.json b/data/source/cwise_j233531.55+014219.6.json index ea05ab4ea..f25989a53 100644 --- a/data/source/cwise_j233531.55+014219.6.json +++ b/data/source/cwise_j233531.55+014219.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "GJ 900", + "projected_separation_arcsec": 587.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "GJ 900" + } + ], "Names": [ { "other_name": "CWISE 2335+0142" diff --git a/data/source/cwise_j235827.96-521813.4.json b/data/source/cwise_j235827.96-521813.4.json index e6b2dd6d6..99fddf35b 100644 --- a/data/source/cwise_j235827.96-521813.4.json +++ b/data/source/cwise_j235827.96-521813.4.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "UCAC4 189-203856", + "projected_separation_arcsec": 30.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "UCAC4 189-203856" + } + ], "Names": [ { "other_name": "CWISE 2358-5218" diff --git a/data/source/cwisep_j040351.00-491605.6.json b/data/source/cwisep_j040351.00-491605.6.json index 4cce690f7..5a720160f 100644 --- a/data/source/cwisep_j040351.00-491605.6.json +++ b/data/source/cwisep_j040351.00-491605.6.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "UCAC4 204-003910", + "projected_separation_arcsec": 33.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "UCAC4 204-003910" + } + ], "Names": [ { "other_name": "CWISE J040351.12-491605.4" diff --git a/data/source/cwisep_j085938.95+534908.7.json b/data/source/cwisep_j085938.95+534908.7.json index 5eb3bb3a8..43b0cbdb2 100644 --- a/data/source/cwisep_j085938.95+534908.7.json +++ b/data/source/cwisep_j085938.95+534908.7.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "G 194-47AB", + "projected_separation_arcsec": 319.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "G 194-47AB" + } + ], "Names": [ { "other_name": "CWISE J085938.91+534908.4" diff --git a/data/source/ulas_j103131.49+123736.4.json b/data/source/ulas_j103131.49+123736.4.json index ff7a1baf2..47ebef10e 100644 --- a/data/source/ulas_j103131.49+123736.4.json +++ b/data/source/ulas_j103131.49+123736.4.json @@ -12,6 +12,17 @@ "comments": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" } ], + "CompanionRelationships": [ + { + "companion_name": "BD+13 2269", + "projected_separation_arcsec": 42.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "BD+13 2269" + } + ], "Names": [ { "other_name": "ULAS 1031+1237" diff --git a/data/source/ulas_j134403.78+083951.0.json b/data/source/ulas_j134403.78+083951.0.json index bfd0b2e43..670a471cc 100644 --- a/data/source/ulas_j134403.78+083951.0.json +++ b/data/source/ulas_j134403.78+083951.0.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "NLTT 35024", + "projected_separation_arcsec": 925.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "NLTT 35024" + } + ], "Names": [ { "other_name": "SDSS J134403.83+083950.9" diff --git a/data/source/wisea_j040702.42+190945.8.json b/data/source/wisea_j040702.42+190945.8.json index 1dbd3ead8..e3c70bc3a 100644 --- a/data/source/wisea_j040702.42+190945.8.json +++ b/data/source/wisea_j040702.42+190945.8.json @@ -12,6 +12,17 @@ "comments": null } ], + "CompanionRelationships": [ + { + "companion_name": "LSPM J0407+1911AB", + "projected_separation_arcsec": 298.0, + "projected_separation_error": null, + "relationship": "Child", + "comments": null, + "reference": "Roth24", + "other_companion_names": "LSPM J0407+1911AB" + } + ], "Names": [ { "other_name": "CWISE J040702.50+190944.6" diff --git a/scripts/ingests/Companion_relations.csv b/scripts/ingests/Companion_relations.csv new file mode 100644 index 000000000..a20786218 --- /dev/null +++ b/scripts/ingests/Companion_relations.csv @@ -0,0 +1,90 @@ +Source,Host,Separation,Relationship,ref +CWISE J000021.45-481314.9,TYC 8025-428-1,57,Child,Roth24 +CWISE J002029.72-153527.5,WDJ002027.83-153546.50,31,Child,Roth24 +CWISE J002101.45-334631.5,UCAC3 113-933 ,116,Child,Roth24 +CWISE J002159.02-451434.4,2MASS J00215427-4514590,54,Child,Roth24 +CWISE J002414.30-403053.7,WT 5AB,78,Child,Roth24 +CWISE J002658.73-260859.6,CD-26 134 ,29,Child,Roth24 +CWISE J004218.67+291730.6,TYC 1744-123-1 ,103,Child,Roth24 +CWISE J004945.38+423619.3,LAMOST J004950.95+423653.6,70,Child,Roth24 +CWISE J005635.48-240401.9,CD-24 407 ,102,Child,Roth24 +CWISE J010424.50+133949.8,LP 466-214 ,164,Child,Roth24 +CWISE J011003.61-592650.8,WDJ011001.84-592642.22,15,Child,Roth24 +CWISE J012715.52-300246.9,LP 883-372 ,51,Child,Roth24 +CWISE J013719.04+342837.6,CWISE J013716.34+342352.7,287,Child,Roth24 +CWISE J015905.58+105551.5,CWISE J015905.30+105543.2,9,Child,Roth24 +CWISE J020538.20+594452.2,NLTT 6937 ,4,Child,Roth24 +CWISE J022454.80+152629.5,CWISE J022454.10+152633.8,11,Parent,Roth24 +CWISE J022737.75+083008.8,G 73-59 ,16,Child,Roth24 +CWISE J025645.16-335008.9,CWISE J025638.42-335454.9,298,Child,Roth24 +CWISE J030005.73-062218.6,BPS CS 22963-0014 ,63,Child,Roth24 +CWISE J032853.32-112332.6,CWISE J032852.72-112345.6,16,Child,Roth24 +CWISE J040351.12-491605.4,UCAC4 204-003910,33,Child,Roth24 +CWISE J040702.50+190944.6,LSPM J0407+1911AB,298,Child,Roth24 +CWISE J055515.83+510514.0,G 192-8 ,23,Child,Roth24 +CWISE J055909.00-384219.8,HD 40781 ,54,Child,Roth24 +CWISE J060202.17-462447.8,WDJ060159.98-462534.40,52,Child,Roth24 +CWISE J062000.01+344641.3,CWISE J061959.56+344631.3,12,Child,Roth24 +CWISE J062648.96+594129.2,LAMOST J062631.15+593341.3 ,488,Child,Roth24 +CWISE J062727.34-002826.8,CWISE J062725.95-002843.8,27,Parent,Roth24 +CWISE J062909.21+395701.6,CWISE J062911.12+395632.8,36,Child,Roth24 +CWISE J065752.45+163350.2,HD 51400 ,61,Child,Roth24 +CWISE J073831.31+525453.7,LSPM J0738+5254,11,Child,Roth24 +CWISE J080912.95+741704.3,LP 17-276 ,402,Child,Roth24 +CWISE J085131.24-603056.2,TYC 8927-2833-1 ,95,Child,Roth24 +CWISE J085938.91+534908.4,G 194-47AB,319,Child,Roth24 +CWISE J091558.53+254713.0,StKM 1-760,555,Child,Roth24 +CWISE J091902.55-574837.3,WISEA J091900.48-574847.1,19,Child,Roth24 +CWISE J094352.22+335639.1,2MASS J09435055+3356550,28,Child,Roth24 +CWISE J095259.54-505418.9,2MASS J09530410-5055203,73,Child,Roth24 +CWISE J101017.43-242300.4,UCAC4 328-061594 ,486,Child,Roth24 +CWISE J101317.51-010313.6,LP 609-46 ,13,Child,Roth24 +CWISE J101523.92-111539.6,CWISE J101533.05-111501.0AB,140,Child,Roth24 +ULAS J103131.49+123736.4,BD+13 2269 ,42,Child,Roth24 +CWISE J103734.29-050749.8,LP 670-45 ,30,Child,Roth24 +CWISE J104053.42-355029.7,UPM J1040-3551,66,Child,Roth24 +CWISE J115229.05-351105.9,LP 961-51 ,113,Child,Roth24 +CWISE J124033.48+460544.7,CWISE J124032.46+460559.9,19,Child,Roth24 +CWISE J125858.20+001133.2,LP 616-93 ,25,Child,Roth24 +CWISE J130329.90+512754.0,2MASS J13032992+5127582 ,5,Child,Roth24 +CWISE J130446.64-120023.6,CWISE J130446.94-120024.4,4,Child,Roth24 +CWISE J131355.15+223005.6,LP 378-789 ,29,Child,Roth24 +CWISE J132539.70+022309.4,LP 617-58 ,31,Child,Roth24 +CWISE J132857.58-063747.4,LP 677-81 ,19,Child,Roth24 +CWISE J133211.93-374837.9,CWISE J133211.59-374953.3,76,Child,Roth24 +CWISE J133427.70-273053.1,HD 117987 ,48,Child,Roth24 +SDSS J134403.83+083950.9,NLTT 35024 ,925,Child,Roth24 +CWISE J141737.21+041847.2,LSPM J1417+0418,24,Child,Roth24 +CWISE J143935.94-804851.5,WISEA J143934.77-804838.8,13,Child,Roth24 +CWISE J143951.51+260000.3,CWISE J143951.66+255944.8,16,Child,Roth24 +CWISE J144057.87+380432.8,CWISE J144058.48+380422.1,13,Child,Roth24 +CWISE J151939.68-485820.4,CWISE J151940.47-485810.2,13,Sibling,Roth24 +CWISE J152742.44-121528.2,CWISE J152740.12-121551.7,42,Child,Roth24 +CWISE J153910.07+722757.2,LSPM J1539+7227,42,Child,Roth24 +CWISE J160654.19-103214.7,CWISE J160653.16-103210.6,16,Child,Roth24 +CWISE J162511.27+774946.8,UCAC4 840-013771 ,313,Child,Roth24 +CWISE J165143.63+695259.4,CWISE J165141.67+695306.6,13,Child,Roth24 +CWISE J165325.10+490439.7,BD+49 2561AB,53,Child,Roth24 +CWISE J171308.00+644220.8,LP 70-189 ,23,Child,Roth24 +CWISE J171700.57+724437.3,CWISE J171701.09+724449.2,12,Child,Roth24 +CWISE J173859.73+200501.2,CWISE J173859.73+200501.2B,1,Sibling,Roth24 +CWISE J174426.85+230355.1,LP 389-13 ,8,Child,Roth24 +CWISE J174509.03+380733.2,StKM 1-1526,68,Child,Roth24 +CWISE J183207.94-540943.3,HD 170573 ,619,Child,Roth24 +CWISE J190909.62+553027.1,CWISE J190907.63+553037.3,20,Child,Roth24 +CWISE J192425.03-532837.1,UPM J1924-5328,21,Child,Roth24 +CWISE J195956.16-644318.1,HD188769 ,521,Child,Roth24 +CWISE J200304.70-142228.9,CWISE J200301.62-142230.0,45,Child,Roth24 +CWISE J200813.66-124502.4,LP 754-21 ,83,Child,Roth24 +CWISE J202934.80-791013.1,SCR J2029-7910,34,Child,Roth24 +CWISE J205247.07+053855.7,LSPM J2052+0539,13,Child,Roth24 +CWISE J210640.16+250729.0,BD+24 4329 ,1124,Child,Roth24 +CWISE J212342.88+655615.6,WDJ212231.86+660043.69,510,Child,Roth24 +CWISE J214129.80-024623.6,TYC 5213-545-1 ,114,Child,Roth24 +CWISE J214213.99-204659.8,CWISE J214209.46-204646.1,65,Child,Roth24 +CWISE J221418.15+253432.2,LSPM J2214+2534,28,Child,Roth24 +CWISE J224452.18-362946.0,LEHPM 5083,74,Child,Roth24 +CWISE J225525.22-302320.8,LP 933-24AB,251,Child,Roth24 +CWISE J231824.58+052142.3,WISEA J231825.63+052141.6,15,Child,Roth24 +CWISE J233531.55+014219.6,GJ 900,587,Child,Roth24 +CWISE J235827.96-521813.4,UCAC4 189-203856 ,30,Child,Roth24 \ No newline at end of file From fd1e05398f1a5af9919b1f3f70f703a67eaecd3c Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Wed, 30 Oct 2024 11:46:33 -0400 Subject: [PATCH 20/22] Adding the changed ingest_companion_relations function and tests for companion relations. --- simple/utils/companions.py | 14 +++++++++++--- tests/test_data.py | 12 ++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/simple/utils/companions.py b/simple/utils/companions.py index a8ec76c0c..9f93312ba 100644 --- a/simple/utils/companions.py +++ b/simple/utils/companions.py @@ -1,7 +1,7 @@ import logging import sqlalchemy.exc from astrodb_utils import ( - AstroDBError, + AstroDBError, find_source_in_db ) @@ -90,6 +90,14 @@ def ingest_companion_relationships( msg = f"{source}: Source cannot be the same as companion name" logger.error(msg) raise AstroDBError(msg) + + source_name = find_source_in_db(db, source) + if len(source_name) != 1: + msg = f"{source}: No source or multiple sources found: {source_name}" + logger.error(msg) + raise AstroDBError(msg) + else: + source_name = source_name[0] if projected_separation_arcsec is not None and projected_separation_arcsec < 0: msg = f"Projected separation: {projected_separation_arcsec}, cannot be negative" @@ -118,7 +126,7 @@ def ingest_companion_relationships( conn.execute( db.CompanionRelationships.insert().values( { - "source": source, + "source": source_name, "companion_name": companion_name, "projected_separation_arcsec": projected_separation_arcsec, "projected_separation_error": projected_separation_error, @@ -133,7 +141,7 @@ def ingest_companion_relationships( logger.info( "ComapnionRelationship added: ", [ - source, + source_name, companion_name, relationship, projected_separation_arcsec, diff --git a/tests/test_data.py b/tests/test_data.py index f3deffbd0..56610e067 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -627,3 +627,15 @@ def test_radial_velocities(db): .astropy() ) assert len(t) == 89, f"found {len(t)} radial velociies with no uncertainty" + +def test_companion_relations(db): + t = db.query(db.CompanionRelationships).astropy() + assert len(t) == 102, f"found {len(t)} companion relationships" + + ref = "Roth24" + t = ( + db.query(db.CompanionRelationships) + .filter(db.CompanionRelationships.c.reference == ref) + .astropy() + ) + assert len(t) == 89, f"found {len(t)} companion relationships with {ref} reference" \ No newline at end of file From 9ef63e16639242dd7c1903a1513e1bdd3c773253 Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Tue, 7 Jan 2025 13:21:24 -0500 Subject: [PATCH 21/22] Updated script with link to google sheet, and deleted CSV file --- scripts/ingests/BYW2024_companions.py | 6 +- scripts/ingests/Companion_relations.csv | 90 ------------------------- 2 files changed, 4 insertions(+), 92 deletions(-) delete mode 100644 scripts/ingests/Companion_relations.csv diff --git a/scripts/ingests/BYW2024_companions.py b/scripts/ingests/BYW2024_companions.py index 8a89c551a..5af49a091 100644 --- a/scripts/ingests/BYW2024_companions.py +++ b/scripts/ingests/BYW2024_companions.py @@ -10,7 +10,7 @@ logger = logging.getLogger("AstroDB") logger.setLevel(logging.INFO) -SAVE_DB = False # save the data files in addition to modifying the .db file +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_astrodb("SIMPLE.sqlite", recreatedb=RECREATE_DB, reference_tables=REFERENCE_TABLES) @@ -18,6 +18,7 @@ # Load Google sheet link = 'scripts/ingests/Companion_relations.csv' +#Link to google sheet used for CSV: https://docs.google.com/spreadsheets/d/1JFa8F4Ngzp3qAW8NOBurkz4bMKo9zXYeF6N1vMtqDZs/edit?usp=sharing # read the csv data into an astropy table # ascii.read attempts to read data from local files rather from URLs so using a library like requests helps get data and create object that can be passed to ascii.read @@ -32,7 +33,8 @@ ) for row in byw_table: # skip the header row - [1:10]runs only first 10 rows - + if row['Source'] == 'CWISE J210640.16+250729.0': + continue ingest_companion_relationships( db, diff --git a/scripts/ingests/Companion_relations.csv b/scripts/ingests/Companion_relations.csv deleted file mode 100644 index a20786218..000000000 --- a/scripts/ingests/Companion_relations.csv +++ /dev/null @@ -1,90 +0,0 @@ -Source,Host,Separation,Relationship,ref -CWISE J000021.45-481314.9,TYC 8025-428-1,57,Child,Roth24 -CWISE J002029.72-153527.5,WDJ002027.83-153546.50,31,Child,Roth24 -CWISE J002101.45-334631.5,UCAC3 113-933 ,116,Child,Roth24 -CWISE J002159.02-451434.4,2MASS J00215427-4514590,54,Child,Roth24 -CWISE J002414.30-403053.7,WT 5AB,78,Child,Roth24 -CWISE J002658.73-260859.6,CD-26 134 ,29,Child,Roth24 -CWISE J004218.67+291730.6,TYC 1744-123-1 ,103,Child,Roth24 -CWISE J004945.38+423619.3,LAMOST J004950.95+423653.6,70,Child,Roth24 -CWISE J005635.48-240401.9,CD-24 407 ,102,Child,Roth24 -CWISE J010424.50+133949.8,LP 466-214 ,164,Child,Roth24 -CWISE J011003.61-592650.8,WDJ011001.84-592642.22,15,Child,Roth24 -CWISE J012715.52-300246.9,LP 883-372 ,51,Child,Roth24 -CWISE J013719.04+342837.6,CWISE J013716.34+342352.7,287,Child,Roth24 -CWISE J015905.58+105551.5,CWISE J015905.30+105543.2,9,Child,Roth24 -CWISE J020538.20+594452.2,NLTT 6937 ,4,Child,Roth24 -CWISE J022454.80+152629.5,CWISE J022454.10+152633.8,11,Parent,Roth24 -CWISE J022737.75+083008.8,G 73-59 ,16,Child,Roth24 -CWISE J025645.16-335008.9,CWISE J025638.42-335454.9,298,Child,Roth24 -CWISE J030005.73-062218.6,BPS CS 22963-0014 ,63,Child,Roth24 -CWISE J032853.32-112332.6,CWISE J032852.72-112345.6,16,Child,Roth24 -CWISE J040351.12-491605.4,UCAC4 204-003910,33,Child,Roth24 -CWISE J040702.50+190944.6,LSPM J0407+1911AB,298,Child,Roth24 -CWISE J055515.83+510514.0,G 192-8 ,23,Child,Roth24 -CWISE J055909.00-384219.8,HD 40781 ,54,Child,Roth24 -CWISE J060202.17-462447.8,WDJ060159.98-462534.40,52,Child,Roth24 -CWISE J062000.01+344641.3,CWISE J061959.56+344631.3,12,Child,Roth24 -CWISE J062648.96+594129.2,LAMOST J062631.15+593341.3 ,488,Child,Roth24 -CWISE J062727.34-002826.8,CWISE J062725.95-002843.8,27,Parent,Roth24 -CWISE J062909.21+395701.6,CWISE J062911.12+395632.8,36,Child,Roth24 -CWISE J065752.45+163350.2,HD 51400 ,61,Child,Roth24 -CWISE J073831.31+525453.7,LSPM J0738+5254,11,Child,Roth24 -CWISE J080912.95+741704.3,LP 17-276 ,402,Child,Roth24 -CWISE J085131.24-603056.2,TYC 8927-2833-1 ,95,Child,Roth24 -CWISE J085938.91+534908.4,G 194-47AB,319,Child,Roth24 -CWISE J091558.53+254713.0,StKM 1-760,555,Child,Roth24 -CWISE J091902.55-574837.3,WISEA J091900.48-574847.1,19,Child,Roth24 -CWISE J094352.22+335639.1,2MASS J09435055+3356550,28,Child,Roth24 -CWISE J095259.54-505418.9,2MASS J09530410-5055203,73,Child,Roth24 -CWISE J101017.43-242300.4,UCAC4 328-061594 ,486,Child,Roth24 -CWISE J101317.51-010313.6,LP 609-46 ,13,Child,Roth24 -CWISE J101523.92-111539.6,CWISE J101533.05-111501.0AB,140,Child,Roth24 -ULAS J103131.49+123736.4,BD+13 2269 ,42,Child,Roth24 -CWISE J103734.29-050749.8,LP 670-45 ,30,Child,Roth24 -CWISE J104053.42-355029.7,UPM J1040-3551,66,Child,Roth24 -CWISE J115229.05-351105.9,LP 961-51 ,113,Child,Roth24 -CWISE J124033.48+460544.7,CWISE J124032.46+460559.9,19,Child,Roth24 -CWISE J125858.20+001133.2,LP 616-93 ,25,Child,Roth24 -CWISE J130329.90+512754.0,2MASS J13032992+5127582 ,5,Child,Roth24 -CWISE J130446.64-120023.6,CWISE J130446.94-120024.4,4,Child,Roth24 -CWISE J131355.15+223005.6,LP 378-789 ,29,Child,Roth24 -CWISE J132539.70+022309.4,LP 617-58 ,31,Child,Roth24 -CWISE J132857.58-063747.4,LP 677-81 ,19,Child,Roth24 -CWISE J133211.93-374837.9,CWISE J133211.59-374953.3,76,Child,Roth24 -CWISE J133427.70-273053.1,HD 117987 ,48,Child,Roth24 -SDSS J134403.83+083950.9,NLTT 35024 ,925,Child,Roth24 -CWISE J141737.21+041847.2,LSPM J1417+0418,24,Child,Roth24 -CWISE J143935.94-804851.5,WISEA J143934.77-804838.8,13,Child,Roth24 -CWISE J143951.51+260000.3,CWISE J143951.66+255944.8,16,Child,Roth24 -CWISE J144057.87+380432.8,CWISE J144058.48+380422.1,13,Child,Roth24 -CWISE J151939.68-485820.4,CWISE J151940.47-485810.2,13,Sibling,Roth24 -CWISE J152742.44-121528.2,CWISE J152740.12-121551.7,42,Child,Roth24 -CWISE J153910.07+722757.2,LSPM J1539+7227,42,Child,Roth24 -CWISE J160654.19-103214.7,CWISE J160653.16-103210.6,16,Child,Roth24 -CWISE J162511.27+774946.8,UCAC4 840-013771 ,313,Child,Roth24 -CWISE J165143.63+695259.4,CWISE J165141.67+695306.6,13,Child,Roth24 -CWISE J165325.10+490439.7,BD+49 2561AB,53,Child,Roth24 -CWISE J171308.00+644220.8,LP 70-189 ,23,Child,Roth24 -CWISE J171700.57+724437.3,CWISE J171701.09+724449.2,12,Child,Roth24 -CWISE J173859.73+200501.2,CWISE J173859.73+200501.2B,1,Sibling,Roth24 -CWISE J174426.85+230355.1,LP 389-13 ,8,Child,Roth24 -CWISE J174509.03+380733.2,StKM 1-1526,68,Child,Roth24 -CWISE J183207.94-540943.3,HD 170573 ,619,Child,Roth24 -CWISE J190909.62+553027.1,CWISE J190907.63+553037.3,20,Child,Roth24 -CWISE J192425.03-532837.1,UPM J1924-5328,21,Child,Roth24 -CWISE J195956.16-644318.1,HD188769 ,521,Child,Roth24 -CWISE J200304.70-142228.9,CWISE J200301.62-142230.0,45,Child,Roth24 -CWISE J200813.66-124502.4,LP 754-21 ,83,Child,Roth24 -CWISE J202934.80-791013.1,SCR J2029-7910,34,Child,Roth24 -CWISE J205247.07+053855.7,LSPM J2052+0539,13,Child,Roth24 -CWISE J210640.16+250729.0,BD+24 4329 ,1124,Child,Roth24 -CWISE J212342.88+655615.6,WDJ212231.86+660043.69,510,Child,Roth24 -CWISE J214129.80-024623.6,TYC 5213-545-1 ,114,Child,Roth24 -CWISE J214213.99-204659.8,CWISE J214209.46-204646.1,65,Child,Roth24 -CWISE J221418.15+253432.2,LSPM J2214+2534,28,Child,Roth24 -CWISE J224452.18-362946.0,LEHPM 5083,74,Child,Roth24 -CWISE J225525.22-302320.8,LP 933-24AB,251,Child,Roth24 -CWISE J231824.58+052142.3,WISEA J231825.63+052141.6,15,Child,Roth24 -CWISE J233531.55+014219.6,GJ 900,587,Child,Roth24 -CWISE J235827.96-521813.4,UCAC4 189-203856 ,30,Child,Roth24 \ No newline at end of file From b2b9004b7170df56e18471233f294dceff7f9b3c Mon Sep 17 00:00:00 2001 From: Austin Rothermich Date: Tue, 7 Jan 2025 13:31:44 -0500 Subject: [PATCH 22/22] Updated Versions Table --- data/reference/Versions.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/reference/Versions.json b/data/reference/Versions.json index b2a05da34..573727518 100644 --- a/data/reference/Versions.json +++ b/data/reference/Versions.json @@ -108,8 +108,14 @@ "description": "2M0415 spectra" }, { - "version": "latest", + "version": "1.1.2025.1", "start_date": "2024-11-19", + "end_date": "2025-01-07", + "description": "Roth24 Companion Relationships" + }, + { + "version": "latest", + "start_date": "2025-01-07", "end_date": null, "description": "Version in development" }