From ccb945c7c733bfa5c884b0c090786c61ad281f5b Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 15 Apr 2025 08:15:01 -0400 Subject: [PATCH 01/11] start template schema docs --- docs/conf.py | 1 + docs/doc_requirements.txt | 3 ++- docs/index.rst | 1 + .../template_schema/companion_relationships.rst | 13 +++++++++++++ docs/pages/template_schema/template_schema.rst | 8 ++++++++ 5 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 docs/pages/template_schema/companion_relationships.rst create mode 100644 docs/pages/template_schema/template_schema.rst diff --git a/docs/conf.py b/docs/conf.py index 557fd28..94530fa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -56,6 +56,7 @@ "sphinx.ext.mathjax", "nbsphinx", "pydata_sphinx_theme", + 'sphinx_mdinclude', ] diff --git a/docs/doc_requirements.txt b/docs/doc_requirements.txt index db38acf..17c9b5c 100644 --- a/docs/doc_requirements.txt +++ b/docs/doc_requirements.txt @@ -4,4 +4,5 @@ markupsafe==2.0.1 nbsphinx pydata-sphinx-theme mock -sphinx-pyproject \ No newline at end of file +sphinx-pyproject +sphinx_mdinclude \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 923f87d..3fb3440 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,6 +18,7 @@ User Guide pages/querying_existing_db/index pages/ingesting/getting_started_ingesting pages/make_new_db/getting_started_new_database + pages/template_schema/template_schema pages/making_private_version pages/converting_spectra/converting_spectra pages/getting_help/index diff --git a/docs/pages/template_schema/companion_relationships.rst b/docs/pages/template_schema/companion_relationships.rst new file mode 100644 index 0000000..d51d9d0 --- /dev/null +++ b/docs/pages/template_schema/companion_relationships.rst @@ -0,0 +1,13 @@ +Companion Relationships +========================= + +.. mdinclude:: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/CompanionParameters.md + + +Notes +----- +Relationships are constrained but should be one of the following: +- *Child*: The source is lower mass/fainter than the companion +- *Sibling*: The source is similar to the companion +- *Parent*: The source is higher mass/brighter than the companion +- *Unresolved Parent*: The source is the unresolved, combined light source of an unresolved multiple system which includes the companion \ No newline at end of file diff --git a/docs/pages/template_schema/template_schema.rst b/docs/pages/template_schema/template_schema.rst new file mode 100644 index 0000000..e9c49de --- /dev/null +++ b/docs/pages/template_schema/template_schema.rst @@ -0,0 +1,8 @@ +Template schema +======================== + +.. toctree:: + :glob: + :maxdepth: 1 + + companion_relationships \ No newline at end of file From b47d2f0e927c588b48caba3e7259580ff7511f29 Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 15 Apr 2025 13:12:02 -0400 Subject: [PATCH 02/11] formatting --- .../pages/template_schema/companion_relationships.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/pages/template_schema/companion_relationships.rst b/docs/pages/template_schema/companion_relationships.rst index d51d9d0..b0052fa 100644 --- a/docs/pages/template_schema/companion_relationships.rst +++ b/docs/pages/template_schema/companion_relationships.rst @@ -6,8 +6,9 @@ Companion Relationships Notes ----- -Relationships are constrained but should be one of the following: -- *Child*: The source is lower mass/fainter than the companion -- *Sibling*: The source is similar to the companion -- *Parent*: The source is higher mass/brighter than the companion -- *Unresolved Parent*: The source is the unresolved, combined light source of an unresolved multiple system which includes the companion \ No newline at end of file +Relationship types are not currently constrained but should be one of the following: + +* *parent*: The source is higher mass/brighter than the companion +* *sibling*: The source is similar to the companion in the system heirarchy +* *child*: The source is lower mass/fainter than the companion +* *unresolved parent*: The source is the unresolved, combined light source of an unresolved multiple system which includes the companion \ No newline at end of file From 4dd430e08434a6c326f27bbebe5591cb50d08cab Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 15 Apr 2025 14:27:39 -0400 Subject: [PATCH 03/11] sources and TOC for template --- docs/pages/template_schema/sources.rst | 15 ++++++++++++ .../pages/template_schema/template_schema.rst | 24 ++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 docs/pages/template_schema/sources.rst diff --git a/docs/pages/template_schema/sources.rst b/docs/pages/template_schema/sources.rst new file mode 100644 index 0000000..28ce772 --- /dev/null +++ b/docs/pages/template_schema/sources.rst @@ -0,0 +1,15 @@ +Sources +======= +Sources are the objects that are the focus of the database. They can be stars, galaxies, or other celestial objects. +The Sources table contains information about the sources, including their coordinates and discovery reference. +The Sources table is the main table in the database and is used to link all other tables together. +Each source has a unique identifier, which is used to link it to other tables in the database. + +.. mdinclude:: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/Sources.md + +Notes +----- +* Epoch is the date the source is expected to be at the given coordinate. + This date is most relevant for high proper option objects. +* In the case of multiple discovery references, for example independent discovery, choose one +reference for the `reference` column and put the rest in the `other_references` column. \ No newline at end of file diff --git a/docs/pages/template_schema/template_schema.rst b/docs/pages/template_schema/template_schema.rst index e9c49de..467bb0e 100644 --- a/docs/pages/template_schema/template_schema.rst +++ b/docs/pages/template_schema/template_schema.rst @@ -1,8 +1,30 @@ Template schema ======================== +Main tables +----------- .. toctree:: :glob: :maxdepth: 1 - companion_relationships \ No newline at end of file + sources + +Data tables +----------- +These tables are examples and can be removed as needed. +Helper functions in the `astrodb_utils` package are +designed to help with adding data to these tables. +Additional tables can be added using these as templates. + +.. toctree:: + :glob: + :maxdepth: 1 + + companion_relationships + +Lookup tables +----------- +These tables are expected and used by other tables +.. toctree:: + :glob: + :maxdepth: 1 From 4bce317f900a08fce3dbf7b7a5463f572c2d271d Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 15 Apr 2025 21:32:33 -0400 Subject: [PATCH 04/11] Publications --- .../ingesting/ingesting_publications.rst | 12 ++++++--- docs/pages/template_schema/publications.rst | 25 +++++++++++++++++++ .../pages/template_schema/template_schema.rst | 3 +++ 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 docs/pages/template_schema/publications.rst diff --git a/docs/pages/ingesting/ingesting_publications.rst b/docs/pages/ingesting/ingesting_publications.rst index 9eec150..83e8c2c 100644 --- a/docs/pages/ingesting/ingesting_publications.rst +++ b/docs/pages/ingesting/ingesting_publications.rst @@ -28,7 +28,11 @@ Ingesting publications Fill this in... -API documentation ------------------ -:py:mod:`astrodb_utils.find_publication` -:py:mod:`astrodb_utils.ingest_publication` \ No newline at end of file +.. seealso:: + + :doc:`../template_schema/publications` + Documentation on the Publications table + + :py:mod:`find publication ` function + + :py:mod:`ingest_publication ` function diff --git a/docs/pages/template_schema/publications.rst b/docs/pages/template_schema/publications.rst new file mode 100644 index 0000000..1c213f1 --- /dev/null +++ b/docs/pages/template_schema/publications.rst @@ -0,0 +1,25 @@ +Publications +================= + +.. mdinclude:: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/Publications.md + + +Notes +----- +* `Reference` is typically a six letter string consisting of first four letters of first author name and two digit year. + + * Smith et al. 2020 would be `Smit20`. + + * In the case of short last names, either first letters of first name or underscores can be used to construct the four letter string. For example, `WuXi21` or `Wu__21` + + * In the case of multiple publications in the same year, a short string is appended which corresponds to the + last digits of the DOI or Bibcode. For example, `Smit20.123`. Avoid using `abc` suffixes. + +.. seealso:: + + :doc:`../ingesting/ingesting_publications` + Documenation on ingesting publications + + :py:mod:`find publication ` function + + :py:mod:`ingest_publication ` function diff --git a/docs/pages/template_schema/template_schema.rst b/docs/pages/template_schema/template_schema.rst index 467bb0e..7363c80 100644 --- a/docs/pages/template_schema/template_schema.rst +++ b/docs/pages/template_schema/template_schema.rst @@ -25,6 +25,9 @@ Additional tables can be added using these as templates. Lookup tables ----------- These tables are expected and used by other tables + .. toctree:: :glob: :maxdepth: 1 + + publications \ No newline at end of file From 811dc6bee731149faa7f540375b1ad0028c18f47 Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 15 Apr 2025 22:30:05 -0400 Subject: [PATCH 05/11] Photometry and PhotometryFilters --- docs/pages/template_schema/photometry.rst | 8 +++++ .../template_schema/photometryfilters.rst | 33 +++++++++++++++++++ .../pages/template_schema/template_schema.rst | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 docs/pages/template_schema/photometry.rst create mode 100644 docs/pages/template_schema/photometryfilters.rst diff --git a/docs/pages/template_schema/photometry.rst b/docs/pages/template_schema/photometry.rst new file mode 100644 index 0000000..60ba4e8 --- /dev/null +++ b/docs/pages/template_schema/photometry.rst @@ -0,0 +1,8 @@ +Photometry +======================== + + +Notes +----- +* Band names refer to entries in the :doc:`photometryfilters` table and are + listed at the `SVO filter profile service `_ diff --git a/docs/pages/template_schema/photometryfilters.rst b/docs/pages/template_schema/photometryfilters.rst new file mode 100644 index 0000000..24d3e8c --- /dev/null +++ b/docs/pages/template_schema/photometryfilters.rst @@ -0,0 +1,33 @@ +PhotometryFilters +========================= + + +Notes +----- +* Band names are listed at the `SVO filter profile service `_. + +* UCDs are listed in the `IVOA controlled vocabulary `_. + Common ones for cool stars are: + + ============= ===================================== + UCD Description + ============= ===================================== + `em.opt.R` Optical band between 600 and 750 nm + `em.opt.I` Optical band between 750 and 1000 nm + `em.IR.J` Infrared between 1.0 and 1.5 micron + `em.IR.H` Infrared between 1.5 and 2 micron + `em.IR.K` Infrared between 2 and 3 micron + `em.IR.3-4um` Infrared between 3 and 4 micron + `em.IR.4-8um` Infrared between 4 and 8 micron + ============= ===================================== + +.. seealso:: + + :py:mod:`ingest_photometry_filter ` function + Function to ingest photometry filters + + :py:mod:`fetch_svo ` function + Function to fetch SVO filter profiles + + :py:mod:`assign_ucd ` function + Function to assign UCDs to photometry filters \ No newline at end of file diff --git a/docs/pages/template_schema/template_schema.rst b/docs/pages/template_schema/template_schema.rst index 7363c80..81e96c2 100644 --- a/docs/pages/template_schema/template_schema.rst +++ b/docs/pages/template_schema/template_schema.rst @@ -20,6 +20,7 @@ Additional tables can be added using these as templates. :glob: :maxdepth: 1 + photometry companion_relationships Lookup tables @@ -30,4 +31,5 @@ These tables are expected and used by other tables :glob: :maxdepth: 1 + photometryfilters publications \ No newline at end of file From 1505e6d2eb16025a8c286cc070d941898cee270c Mon Sep 17 00:00:00 2001 From: kelle Date: Tue, 15 Apr 2025 22:35:57 -0400 Subject: [PATCH 06/11] spectra --- docs/pages/template_schema/spectra.rst | 21 +++++++++++++++++++ .../pages/template_schema/template_schema.rst | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 docs/pages/template_schema/spectra.rst diff --git a/docs/pages/template_schema/spectra.rst b/docs/pages/template_schema/spectra.rst new file mode 100644 index 0000000..66487d6 --- /dev/null +++ b/docs/pages/template_schema/spectra.rst @@ -0,0 +1,21 @@ +Spectra +======= + + +Relevant functions: `spectra.ingest_spectrum`, `spectra.spectrum_plottable`, `spectra.find_spectra` + +If the spectrum provided has been modified from the author-provided one, +a link to the original spectrum can be provided in the `original_spectrum` column. + +The local_spectrum is meant to store the path to a local copy of the spectrum with an +environment variable to define part of the path (so it can be shared among other users). +For example: `$ASTRODB_SPECTRA/infrared/filename.fits` + +Notes +----- +* An accurate observation date is required for a spectrum to be ingested. + +* Data based on data from multiple observation dates has 'Multiple observation dates' + indicated in the *comments* field. One of the dates should be used for the *observation_date*. + +* Spectra for companions should be associated with individual sources and not grouped with the primary source. \ No newline at end of file diff --git a/docs/pages/template_schema/template_schema.rst b/docs/pages/template_schema/template_schema.rst index 81e96c2..f612a88 100644 --- a/docs/pages/template_schema/template_schema.rst +++ b/docs/pages/template_schema/template_schema.rst @@ -21,8 +21,10 @@ Additional tables can be added using these as templates. :maxdepth: 1 photometry + spectra companion_relationships + Lookup tables ----------- These tables are expected and used by other tables From d89d2fba28e2b736f60731553029f1e3dd7ad722 Mon Sep 17 00:00:00 2001 From: kelle Date: Wed, 16 Apr 2025 21:04:03 -0400 Subject: [PATCH 07/11] one page per table --- .gitmodules | 3 +++ astrodb-template-db | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 astrodb-template-db diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1583a2a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "astrodb-template-db"] + path = astrodb-template-db + url = https://github.com/astrodbtoolkit/astrodb-template-db.git diff --git a/astrodb-template-db b/astrodb-template-db new file mode 160000 index 0000000..9934638 --- /dev/null +++ b/astrodb-template-db @@ -0,0 +1 @@ +Subproject commit 9934638566d5889f5d09aa5f24755e6a6e1c0e22 From da570cc1e46bd7990780c793516452901c102135 Mon Sep 17 00:00:00 2001 From: kelle Date: Wed, 16 Apr 2025 21:07:43 -0400 Subject: [PATCH 08/11] another commit --- astrodb-template-db | 2 +- .../ingesting/ingesting_publications.rst | 4 +- .../companion_relationships.rst | 14 ------- .../data_tables/associations.rst | 13 +++++++ .../data_tables/companion_relationships.rst | 26 +++++++++++++ .../data_tables/companionparameters.rst | 20 ++++++++++ .../template_schema/data_tables/index.rst | 14 +++++++ .../data_tables/modeledparameters.rst | 16 ++++++++ .../data_tables/parallaxes.rst | 11 ++++++ .../data_tables/photometry.rst | 29 ++++++++++++++ .../data_tables/propermotions.rst | 11 ++++++ .../data_tables/radialvelocities.rst | 11 ++++++ .../data_tables/rotationalparameters.rst | 12 ++++++ .../data_tables/sourcetypes.rst | 17 +++++++++ .../{ => data_tables}/spectra.rst | 8 ++++ .../lookup_tables/associationlist.rst | 17 +++++++++ .../lookup_tables/companionlist.rst | 16 ++++++++ .../template_schema/lookup_tables/index.rst | 11 ++++++ .../lookup_tables/instruments.rst | 17 +++++++++ .../lookup_tables/parameterlist.rst | 19 ++++++++++ .../{ => lookup_tables}/photometryfilters.rst | 20 ++++++++-- .../{ => lookup_tables}/publications.rst | 15 +++++--- .../lookup_tables/regimelist.rst | 11 ++++++ .../lookup_tables/sourcetypelist.rst | 15 ++++++++ .../lookup_tables/telescopes.rst | 11 ++++++ .../template_schema/main_tables/index.rst | 9 +++++ .../template_schema/main_tables/names.rst | 2 + .../{ => main_tables}/sources.rst | 13 +++++-- .../template_schema/main_tables/versions.rst | 12 ++++++ docs/pages/template_schema/photometry.rst | 8 ---- .../pages/template_schema/template_schema.rst | 38 +++---------------- 31 files changed, 374 insertions(+), 68 deletions(-) delete mode 100644 docs/pages/template_schema/companion_relationships.rst create mode 100644 docs/pages/template_schema/data_tables/associations.rst create mode 100644 docs/pages/template_schema/data_tables/companion_relationships.rst create mode 100644 docs/pages/template_schema/data_tables/companionparameters.rst create mode 100644 docs/pages/template_schema/data_tables/index.rst create mode 100644 docs/pages/template_schema/data_tables/modeledparameters.rst create mode 100644 docs/pages/template_schema/data_tables/parallaxes.rst create mode 100644 docs/pages/template_schema/data_tables/photometry.rst create mode 100644 docs/pages/template_schema/data_tables/propermotions.rst create mode 100644 docs/pages/template_schema/data_tables/radialvelocities.rst create mode 100644 docs/pages/template_schema/data_tables/rotationalparameters.rst create mode 100644 docs/pages/template_schema/data_tables/sourcetypes.rst rename docs/pages/template_schema/{ => data_tables}/spectra.rst (82%) create mode 100644 docs/pages/template_schema/lookup_tables/associationlist.rst create mode 100644 docs/pages/template_schema/lookup_tables/companionlist.rst create mode 100644 docs/pages/template_schema/lookup_tables/index.rst create mode 100644 docs/pages/template_schema/lookup_tables/instruments.rst create mode 100644 docs/pages/template_schema/lookup_tables/parameterlist.rst rename docs/pages/template_schema/{ => lookup_tables}/photometryfilters.rst (70%) rename docs/pages/template_schema/{ => lookup_tables}/publications.rst (82%) create mode 100644 docs/pages/template_schema/lookup_tables/regimelist.rst create mode 100644 docs/pages/template_schema/lookup_tables/sourcetypelist.rst create mode 100644 docs/pages/template_schema/lookup_tables/telescopes.rst create mode 100644 docs/pages/template_schema/main_tables/index.rst create mode 100644 docs/pages/template_schema/main_tables/names.rst rename docs/pages/template_schema/{ => main_tables}/sources.rst (76%) create mode 100644 docs/pages/template_schema/main_tables/versions.rst delete mode 100644 docs/pages/template_schema/photometry.rst diff --git a/astrodb-template-db b/astrodb-template-db index 9934638..f37dfa8 160000 --- a/astrodb-template-db +++ b/astrodb-template-db @@ -1 +1 @@ -Subproject commit 9934638566d5889f5d09aa5f24755e6a6e1c0e22 +Subproject commit f37dfa8342775f5a6199b1092ec735b76b331222 diff --git a/docs/pages/ingesting/ingesting_publications.rst b/docs/pages/ingesting/ingesting_publications.rst index 83e8c2c..e799dd8 100644 --- a/docs/pages/ingesting/ingesting_publications.rst +++ b/docs/pages/ingesting/ingesting_publications.rst @@ -1,3 +1,5 @@ +.. _ingesting_publications: + Ingesting publications ======================= Ingesting a publication is a process of creating a new publication in the database. @@ -30,7 +32,7 @@ Fill this in... .. seealso:: - :doc:`../template_schema/publications` + :doc:`../template_schema/lookup_tables/publications` Documentation on the Publications table :py:mod:`find publication ` function diff --git a/docs/pages/template_schema/companion_relationships.rst b/docs/pages/template_schema/companion_relationships.rst deleted file mode 100644 index b0052fa..0000000 --- a/docs/pages/template_schema/companion_relationships.rst +++ /dev/null @@ -1,14 +0,0 @@ -Companion Relationships -========================= - -.. mdinclude:: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/CompanionParameters.md - - -Notes ------ -Relationship types are not currently constrained but should be one of the following: - -* *parent*: The source is higher mass/brighter than the companion -* *sibling*: The source is similar to the companion in the system heirarchy -* *child*: The source is lower mass/fainter than the companion -* *unresolved parent*: The source is the unresolved, combined light source of an unresolved multiple system which includes the companion \ No newline at end of file diff --git a/docs/pages/template_schema/data_tables/associations.rst b/docs/pages/template_schema/data_tables/associations.rst new file mode 100644 index 0000000..d1f5192 --- /dev/null +++ b/docs/pages/template_schema/data_tables/associations.rst @@ -0,0 +1,13 @@ +Association +########### + +.. seealso:: + :doc:`../lookup_tables/associationlist` + Documentation on the Association List table + +Table Documentation +=================== + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/Associations.md + + diff --git a/docs/pages/template_schema/data_tables/companion_relationships.rst b/docs/pages/template_schema/data_tables/companion_relationships.rst new file mode 100644 index 0000000..848b9c0 --- /dev/null +++ b/docs/pages/template_schema/data_tables/companion_relationships.rst @@ -0,0 +1,26 @@ +CompanionRelationships +####################### + + +Notes +===== +Relationship types are not currently constrained but should be one of the following: + +* *parent*: The source is higher mass/brighter than the companion +* *sibling*: The source is similar to the companion in the system heirarchy +* *child*: The source is lower mass/fainter than the companion +* *unresolved parent*: The source is the unresolved, combined light source of an unresolved multiple system which includes the companion + +.. seealso:: + :doc:`../lookup_tables/companionlist` + Documentation on the Companion List table + + +Table documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/CompanionRelationships.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/CompanionRelationships.md diff --git a/docs/pages/template_schema/data_tables/companionparameters.rst b/docs/pages/template_schema/data_tables/companionparameters.rst new file mode 100644 index 0000000..56e54a2 --- /dev/null +++ b/docs/pages/template_schema/data_tables/companionparameters.rst @@ -0,0 +1,20 @@ +CompanionParameters +################### + +.. seealso:: + + :doc:`../lookup_tables/paramaterlist` + Documentation for the ParamaterList table + + :doc:`companion_relationships` + Documentation for the CompanionRelationships table + + +Table Documentation +==================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/CompanionParameters.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/CompanionParameters.md \ No newline at end of file diff --git a/docs/pages/template_schema/data_tables/index.rst b/docs/pages/template_schema/data_tables/index.rst new file mode 100644 index 0000000..218fa92 --- /dev/null +++ b/docs/pages/template_schema/data_tables/index.rst @@ -0,0 +1,14 @@ +************* +Data tables +************* +These tables are examples and can be removed as needed. +Helper functions in the `astrodb_utils` package are +designed to help with adding data to these tables. +Additional tables can be added using these as templates. + +.. toctree:: + :glob: + :titlesonly: + :maxdepth: 1 + + * \ No newline at end of file diff --git a/docs/pages/template_schema/data_tables/modeledparameters.rst b/docs/pages/template_schema/data_tables/modeledparameters.rst new file mode 100644 index 0000000..5f931ac --- /dev/null +++ b/docs/pages/template_schema/data_tables/modeledparameters.rst @@ -0,0 +1,16 @@ +ModeledParameters +####################### + +.. seealso:: + + :doc:`../lookup_tables/parameterlist` + Documentation for the ParameterList table + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/ModeledParameters.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/ModeledParameters.md \ No newline at end of file diff --git a/docs/pages/template_schema/data_tables/parallaxes.rst b/docs/pages/template_schema/data_tables/parallaxes.rst new file mode 100644 index 0000000..1995c02 --- /dev/null +++ b/docs/pages/template_schema/data_tables/parallaxes.rst @@ -0,0 +1,11 @@ +Parallaxes +########## + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/Parallaxes.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/Parallaxes.md diff --git a/docs/pages/template_schema/data_tables/photometry.rst b/docs/pages/template_schema/data_tables/photometry.rst new file mode 100644 index 0000000..6c9f79d --- /dev/null +++ b/docs/pages/template_schema/data_tables/photometry.rst @@ -0,0 +1,29 @@ +Photometry +########## + + +Notes +===== +* Band names refer to entries in the :doc:`../lookup_tables/photometryfilters` table and are + listed at the `SVO filter profile service `_ + +.. seealso:: + + :doc:`../lookup_tables/photometryfilters` + Documentation for the PhotometryFilters table + + :doc:`../lookup_tables/regimelist` + Documentation for the RegimeList table` + + :doc:`../lookup_tables/telescopes` + Documentation for the Telescopes table + + +Table documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/Photometry.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/Photometry.md diff --git a/docs/pages/template_schema/data_tables/propermotions.rst b/docs/pages/template_schema/data_tables/propermotions.rst new file mode 100644 index 0000000..1ed43a1 --- /dev/null +++ b/docs/pages/template_schema/data_tables/propermotions.rst @@ -0,0 +1,11 @@ +ProperMotions +############# + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/ProperMotions.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/ProperMotions.md diff --git a/docs/pages/template_schema/data_tables/radialvelocities.rst b/docs/pages/template_schema/data_tables/radialvelocities.rst new file mode 100644 index 0000000..38a27a1 --- /dev/null +++ b/docs/pages/template_schema/data_tables/radialvelocities.rst @@ -0,0 +1,11 @@ +RadialVelocities +################ + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/RadialVelocities.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/RadialVelocities.md \ No newline at end of file diff --git a/docs/pages/template_schema/data_tables/rotationalparameters.rst b/docs/pages/template_schema/data_tables/rotationalparameters.rst new file mode 100644 index 0000000..6b1aad2 --- /dev/null +++ b/docs/pages/template_schema/data_tables/rotationalparameters.rst @@ -0,0 +1,12 @@ +RotationalParameters +####################### + + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/RotationalParameters.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/RotationalParameters.md \ No newline at end of file diff --git a/docs/pages/template_schema/data_tables/sourcetypes.rst b/docs/pages/template_schema/data_tables/sourcetypes.rst new file mode 100644 index 0000000..db2607f --- /dev/null +++ b/docs/pages/template_schema/data_tables/sourcetypes.rst @@ -0,0 +1,17 @@ +SourceTypes +########### + +.. seealso:: + + :doc:`../lookup_tables/sourcetypelist` + Documentation for the SourceTypeList table + + +Table documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/SourceTypes.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/SourceTypes.md \ No newline at end of file diff --git a/docs/pages/template_schema/spectra.rst b/docs/pages/template_schema/data_tables/spectra.rst similarity index 82% rename from docs/pages/template_schema/spectra.rst rename to docs/pages/template_schema/data_tables/spectra.rst index 66487d6..e27e1a7 100644 --- a/docs/pages/template_schema/spectra.rst +++ b/docs/pages/template_schema/data_tables/spectra.rst @@ -1,6 +1,14 @@ Spectra ======= +.. seealso:: + + :doc:`../lookup_tables/telescopes` + Documentation for the Telescopes table + + :doc:`../lookup_tables/regimelist` + Documentation for the RegimeList table` + Relevant functions: `spectra.ingest_spectrum`, `spectra.spectrum_plottable`, `spectra.find_spectra` diff --git a/docs/pages/template_schema/lookup_tables/associationlist.rst b/docs/pages/template_schema/lookup_tables/associationlist.rst new file mode 100644 index 0000000..27dbc2f --- /dev/null +++ b/docs/pages/template_schema/lookup_tables/associationlist.rst @@ -0,0 +1,17 @@ +AssociationList +############### + +.. seealso:: + :doc:`../data_tables/associations` + Documentation on the Association table + + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/AssociationList.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/AssociationList.md + diff --git a/docs/pages/template_schema/lookup_tables/companionlist.rst b/docs/pages/template_schema/lookup_tables/companionlist.rst new file mode 100644 index 0000000..1c149e5 --- /dev/null +++ b/docs/pages/template_schema/lookup_tables/companionlist.rst @@ -0,0 +1,16 @@ +CompanionList +############### + +.. seealso:: + :doc:`../data_tables/companion_relationships` + Documentation on the Companion Relationships table + + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/CompanionList.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/CompanionList.md diff --git a/docs/pages/template_schema/lookup_tables/index.rst b/docs/pages/template_schema/lookup_tables/index.rst new file mode 100644 index 0000000..a0c6274 --- /dev/null +++ b/docs/pages/template_schema/lookup_tables/index.rst @@ -0,0 +1,11 @@ +************* +Lookup tables +************* + +These tables are expected and used by other tables + +.. toctree:: + :glob: + :maxdepth: 1 + + * \ No newline at end of file diff --git a/docs/pages/template_schema/lookup_tables/instruments.rst b/docs/pages/template_schema/lookup_tables/instruments.rst new file mode 100644 index 0000000..aaa65b4 --- /dev/null +++ b/docs/pages/template_schema/lookup_tables/instruments.rst @@ -0,0 +1,17 @@ +Instruments +########### + +.. seealso:: + + :doc:`../lookup_tables/telescopes` + Documentation for the Telescopes table + + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/Instruments.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/Instruments.md \ No newline at end of file diff --git a/docs/pages/template_schema/lookup_tables/parameterlist.rst b/docs/pages/template_schema/lookup_tables/parameterlist.rst new file mode 100644 index 0000000..62f2e16 --- /dev/null +++ b/docs/pages/template_schema/lookup_tables/parameterlist.rst @@ -0,0 +1,19 @@ +ParameterList +############### + +.. seealso:: + :doc:`../data_tables/companionparameters` + Documentation for the CompanionParameters table + + :doc:`../data_tables/modeledparameters` + Documentation for the ModeledParameters table + + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/ParameterList.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/ParameterList.md \ No newline at end of file diff --git a/docs/pages/template_schema/photometryfilters.rst b/docs/pages/template_schema/lookup_tables/photometryfilters.rst similarity index 70% rename from docs/pages/template_schema/photometryfilters.rst rename to docs/pages/template_schema/lookup_tables/photometryfilters.rst index 24d3e8c..28bdb5f 100644 --- a/docs/pages/template_schema/photometryfilters.rst +++ b/docs/pages/template_schema/lookup_tables/photometryfilters.rst @@ -1,9 +1,8 @@ PhotometryFilters -========================= - +################## Notes ------ +====== * Band names are listed at the `SVO filter profile service `_. * UCDs are listed in the `IVOA controlled vocabulary `_. @@ -23,6 +22,9 @@ Notes .. seealso:: + :doc:`../data_tables/photometry` + Documentation for the Photometry table + :py:mod:`ingest_photometry_filter ` function Function to ingest photometry filters @@ -30,4 +32,14 @@ Notes Function to fetch SVO filter profiles :py:mod:`assign_ucd ` function - Function to assign UCDs to photometry filters \ No newline at end of file + Function to assign UCDs to photometry filters + +Table documentation +==================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/PhotometryFilters.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/PhotometryFilters.md diff --git a/docs/pages/template_schema/publications.rst b/docs/pages/template_schema/lookup_tables/publications.rst similarity index 82% rename from docs/pages/template_schema/publications.rst rename to docs/pages/template_schema/lookup_tables/publications.rst index 1c213f1..1a0ae6c 100644 --- a/docs/pages/template_schema/publications.rst +++ b/docs/pages/template_schema/lookup_tables/publications.rst @@ -1,8 +1,5 @@ Publications -================= - -.. mdinclude:: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/Publications.md - +############ Notes ----- @@ -17,9 +14,17 @@ Notes .. seealso:: - :doc:`../ingesting/ingesting_publications` + :ref:`ingesting_publications` Documenation on ingesting publications :py:mod:`find publication ` function :py:mod:`ingest_publication ` function + + +Table documentation +------------------- + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/Publications.md + + diff --git a/docs/pages/template_schema/lookup_tables/regimelist.rst b/docs/pages/template_schema/lookup_tables/regimelist.rst new file mode 100644 index 0000000..85b23e8 --- /dev/null +++ b/docs/pages/template_schema/lookup_tables/regimelist.rst @@ -0,0 +1,11 @@ +RegimeList +########## + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/RegimeList.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/RegimeList.md \ No newline at end of file diff --git a/docs/pages/template_schema/lookup_tables/sourcetypelist.rst b/docs/pages/template_schema/lookup_tables/sourcetypelist.rst new file mode 100644 index 0000000..dced206 --- /dev/null +++ b/docs/pages/template_schema/lookup_tables/sourcetypelist.rst @@ -0,0 +1,15 @@ +SourceTypeList +############## +.. seealso:: + + :doc:`../data_tables/sourcetypes` + Documentation for the SourceTypes table + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/SourceTypeList.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/SourceTypeList.md \ No newline at end of file diff --git a/docs/pages/template_schema/lookup_tables/telescopes.rst b/docs/pages/template_schema/lookup_tables/telescopes.rst new file mode 100644 index 0000000..9045465 --- /dev/null +++ b/docs/pages/template_schema/lookup_tables/telescopes.rst @@ -0,0 +1,11 @@ +Telescopes +########## + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/Telescopes.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/Telescopes.md \ No newline at end of file diff --git a/docs/pages/template_schema/main_tables/index.rst b/docs/pages/template_schema/main_tables/index.rst new file mode 100644 index 0000000..9eab20e --- /dev/null +++ b/docs/pages/template_schema/main_tables/index.rst @@ -0,0 +1,9 @@ +*********** +Main tables +*********** +.. toctree:: + :glob: + :maxdepth: 1 + + sources + names diff --git a/docs/pages/template_schema/main_tables/names.rst b/docs/pages/template_schema/main_tables/names.rst new file mode 100644 index 0000000..6c5a3b2 --- /dev/null +++ b/docs/pages/template_schema/main_tables/names.rst @@ -0,0 +1,2 @@ +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/Names.md + diff --git a/docs/pages/template_schema/sources.rst b/docs/pages/template_schema/main_tables/sources.rst similarity index 76% rename from docs/pages/template_schema/sources.rst rename to docs/pages/template_schema/main_tables/sources.rst index 28ce772..307ee35 100644 --- a/docs/pages/template_schema/sources.rst +++ b/docs/pages/template_schema/main_tables/sources.rst @@ -1,15 +1,22 @@ Sources -======= +####### + Sources are the objects that are the focus of the database. They can be stars, galaxies, or other celestial objects. The Sources table contains information about the sources, including their coordinates and discovery reference. The Sources table is the main table in the database and is used to link all other tables together. Each source has a unique identifier, which is used to link it to other tables in the database. -.. mdinclude:: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/Sources.md Notes ----- * Epoch is the date the source is expected to be at the given coordinate. This date is most relevant for high proper option objects. * In the case of multiple discovery references, for example independent discovery, choose one -reference for the `reference` column and put the rest in the `other_references` column. \ No newline at end of file + reference for the `reference` column and put the rest in the `other_references` column. + + +Table documentation +------------------- + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/Sources.md + diff --git a/docs/pages/template_schema/main_tables/versions.rst b/docs/pages/template_schema/main_tables/versions.rst new file mode 100644 index 0000000..851ad51 --- /dev/null +++ b/docs/pages/template_schema/main_tables/versions.rst @@ -0,0 +1,12 @@ +Versions +######## + + +Table Documentation +=================== +.. _source: https://github.com/astrodbtoolkit/astrodb-template-db/blob/main/docs/schema/Versions.md + +The below table is built directly from the schema and is +included here from the `astrodb-template-db` documentation: `source`_. + +.. mdinclude:: ../../../../astrodb-template-db/docs/schema/Versions.md diff --git a/docs/pages/template_schema/photometry.rst b/docs/pages/template_schema/photometry.rst deleted file mode 100644 index 60ba4e8..0000000 --- a/docs/pages/template_schema/photometry.rst +++ /dev/null @@ -1,8 +0,0 @@ -Photometry -======================== - - -Notes ------ -* Band names refer to entries in the :doc:`photometryfilters` table and are - listed at the `SVO filter profile service `_ diff --git a/docs/pages/template_schema/template_schema.rst b/docs/pages/template_schema/template_schema.rst index f612a88..65f5ec7 100644 --- a/docs/pages/template_schema/template_schema.rst +++ b/docs/pages/template_schema/template_schema.rst @@ -1,37 +1,11 @@ +################ Template schema -======================== +################ -Main tables ------------ .. toctree:: :glob: - :maxdepth: 1 + :maxdepth: 2 - sources - -Data tables ------------ -These tables are examples and can be removed as needed. -Helper functions in the `astrodb_utils` package are -designed to help with adding data to these tables. -Additional tables can be added using these as templates. - -.. toctree:: - :glob: - :maxdepth: 1 - - photometry - spectra - companion_relationships - - -Lookup tables ------------ -These tables are expected and used by other tables - -.. toctree:: - :glob: - :maxdepth: 1 - - photometryfilters - publications \ No newline at end of file + main_tables/index.rst + data_tables/index.rst + lookup_tables/index.rst \ No newline at end of file From 0fa2d79be1f63c24c5dcc7db5ee710a74799e5fc Mon Sep 17 00:00:00 2001 From: kelle Date: Wed, 16 Apr 2025 21:11:24 -0400 Subject: [PATCH 09/11] fix headings --- docs/pages/template_schema/data_tables/spectra.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/template_schema/data_tables/spectra.rst b/docs/pages/template_schema/data_tables/spectra.rst index e27e1a7..73da4fb 100644 --- a/docs/pages/template_schema/data_tables/spectra.rst +++ b/docs/pages/template_schema/data_tables/spectra.rst @@ -1,5 +1,5 @@ Spectra -======= +####### .. seealso:: @@ -20,7 +20,7 @@ environment variable to define part of the path (so it can be shared among other For example: `$ASTRODB_SPECTRA/infrared/filename.fits` Notes ------ +===== * An accurate observation date is required for a spectrum to be ingested. * Data based on data from multiple observation dates has 'Multiple observation dates' From 90631be4248104b79cf5848891a7688a52466daf Mon Sep 17 00:00:00 2001 From: kelle Date: Wed, 16 Apr 2025 21:36:58 -0400 Subject: [PATCH 10/11] dev dec update --- docs/pages/dev_docs/developer_installation.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/pages/dev_docs/developer_installation.rst b/docs/pages/dev_docs/developer_installation.rst index 3d6a487..e583805 100644 --- a/docs/pages/dev_docs/developer_installation.rst +++ b/docs/pages/dev_docs/developer_installation.rst @@ -30,13 +30,18 @@ All contributions should include tests. To run the tests, use the command Linting and Formatting --------------------- -Use `ruff `_ for linting and `black `_ for formatting. -(At some point, we will add a pre-commit hook to enforce this.) +Use `ruff `_ for linting and formatting. (TODO: add something about pre-commit hook.) VSCode setup instructions: `Formatting Python in VSCode `_ Build the Docs --------------------- +The documentation is build using files in the `astrodb-template-db` submodule. +Be sure to update the submodule before building the docs. +.. code-block:: bash + + git submodule update --init --recursive + To build the docs, use `sphinx-autobuild `_. From 449a1372e3584a525551ac6e8e7b05aba614ac77 Mon Sep 17 00:00:00 2001 From: Kelle Cruz Date: Thu, 17 Apr 2025 10:03:54 -0400 Subject: [PATCH 11/11] Update docs/pages/dev_docs/developer_installation.rst Co-authored-by: David Rodriguez --- docs/pages/dev_docs/developer_installation.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/pages/dev_docs/developer_installation.rst b/docs/pages/dev_docs/developer_installation.rst index e583805..9d5b5df 100644 --- a/docs/pages/dev_docs/developer_installation.rst +++ b/docs/pages/dev_docs/developer_installation.rst @@ -30,7 +30,8 @@ All contributions should include tests. To run the tests, use the command Linting and Formatting --------------------- -Use `ruff `_ for linting and formatting. (TODO: add something about pre-commit hook.) +Use `ruff `_ for linting and formatting. +A pre-commit hook is provided for automatic linting and formatting with ruff. To use it, run `pip install pre-commit` and then `pre-commit install --allow-missing-config`. VSCode setup instructions: `Formatting Python in VSCode `_