From 99abe08cdc42aca3001aab856cb1c9766d745b9f Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Thu, 17 Oct 2024 16:55:17 -0700 Subject: [PATCH 01/18] update doc in accord with current code --- doc/Makefile | 20 +++ doc/conf.py | 90 +++++++++++ doc/contact.rst | 12 ++ doc/galaxy_schema.txt | 36 ----- doc/index.rst | 53 ++++++ doc/installation.rst | 107 +++++++++++++ doc/roman-rubin-1.1.2/UW_stars.rst | 52 ++++++ doc/roman-rubin-1.1.2/diffsky_galaxy.rst | 78 +++++++++ doc/roman-rubin-1.1.2/snana.rst | 77 +++++++++ doc/schema.md | 64 -------- doc/usage_create.rst | 145 +++++++++++++++++ doc/usage_read.rst | 196 +++++++++++++++++++++++ 12 files changed, 830 insertions(+), 100 deletions(-) create mode 100644 doc/Makefile create mode 100644 doc/conf.py create mode 100644 doc/contact.rst delete mode 100644 doc/galaxy_schema.txt create mode 100644 doc/index.rst create mode 100644 doc/installation.rst create mode 100644 doc/roman-rubin-1.1.2/UW_stars.rst create mode 100644 doc/roman-rubin-1.1.2/diffsky_galaxy.rst create mode 100644 doc/roman-rubin-1.1.2/snana.rst delete mode 100644 doc/schema.md create mode 100644 doc/usage_create.rst create mode 100644 doc/usage_read.rst diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 00000000..d4bb2cbb --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/conf.py b/doc/conf.py new file mode 100644 index 00000000..31f1398e --- /dev/null +++ b/doc/conf.py @@ -0,0 +1,90 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + + +# Add top-level directory to path so python modules can be referred to +# using the normal relative path +import os +import sys +import importlib.util +sys.path.insert(0, os.path.abspath('..')) + + +# -- Project information ----------------------------------------------------- + +project = 'skyCatalogs' +copyright = '2020-2024, LSSTDESC' +author = 'LSSTDESC' + +# The full version, including alpha/beta/rc tags +# release = '1.7.0rc2' +# Use load_skycatalogs_version() to determine release dynamically + +def load_skycatalogs_version(): + """Extract version of skyCatalogs without importing the whole module""" + + spec = importlib.util.spec_from_file_location( + "skycatalogs_version", + os.path.join(os.path.dirname(__file__), "..", "skycatalogs", + "_version.py"), + ) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +# -- General configuration --------------------------------------------------- + +pygments_style = 'sphinx' +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "sphinx_rtd_theme", + "sphinx.ext.autodoc", + "sphinx.ext.napoleon" + ] + # "sphinxcontrib.autoprogram" # for CLI; probably don't need + # ] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +skycatalogs_version = load_skycatalogs_version() +release = skycatalogs_version.__version__ + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +# Normally want this theme, but may need to comment out if module not available +html_theme = 'sphinx_rtd_theme' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# The sphinx_rtd_theme does not properly handle wrapping long lines in +# table cells when rendering to HTML due to a CSS issue (see +# https://github.com/readthedocs/sphinx_rtd_theme/issues/1505). Until +# the issue is fixed upstream in sphinx_rtd_theme, we can simply +# override the CSS here. +rst_prolog = """ +.. raw:: html + + +""" diff --git a/doc/contact.rst b/doc/contact.rst new file mode 100644 index 00000000..6848bc04 --- /dev/null +++ b/doc/contact.rst @@ -0,0 +1,12 @@ +Contact +======= + +If you need to contact someone directly for assistance we are happy to help! + +- Admin, developer: **Joanne Bogart** (`@JoanneBogart `__) +- Developer: **Jim Chiang** (`@jchiang87 `__) + +For any bugs, or suggestions for additional features within the DESC data +management software, please raise an issue via the GitHub repository +(`https://github.com/LSSTDESC/skyCatalogs/issues +`__). diff --git a/doc/galaxy_schema.txt b/doc/galaxy_schema.txt deleted file mode 100644 index 3a3ea763..00000000 --- a/doc/galaxy_schema.txt +++ /dev/null @@ -1,36 +0,0 @@ -# Proposed columns for the galaxy files - -galaxy_id Same value will be used for disk, bulge, knots belonging to - the same galaxy -subcomponent Name of a bulge, disk or knots subtype -ra Right ascension -dec Declination -redshift Redshift -sed_values Array of floating point values. Precise meaning depends on model. - Should they be float or double? -sed_path string or array of strings; rel paths to external SEDs -gamma1 Shear parameter -gamma2 Shear parameter -kappa Magnification parameter -spatial_pars Array of floating point values. Precise meaning depends on model, - which is specified in config by object type -internalAv -internalRv -galacticAv -galacticRv - ---- and maybe also -flux_noMW_lsst_u -flux_noMW_lsst_g -flux_noMW_lsst_r -flux_noMW_lsst_i -flux_noMW_lsst_z -flux_noMW_lsst_y -(or store with-extinction values instead? or both?) - -Both "inline" and external SED will be supported. An inline SED, if present, -will be represented by an array of floating point numbers. Their meaning -will be part of the config. An external SED will also entail some information -in the config, at a minimum a root directory for SED files. The path relative -to the root for the galaxy will be stored in the SkyCatalog. To support more -than one non-inline SED model, give each model a name and make the SkyCatalog -entry an array. diff --git a/doc/index.rst b/doc/index.rst new file mode 100644 index 00000000..e8184385 --- /dev/null +++ b/doc/index.rst @@ -0,0 +1,53 @@ +.. skyCatalogs documentation master file, created by + sphinx-quickstart on Fri Apr 12 13:47:18 2024. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +======================================================= +skyCatalogs: provides API for simulated object catalogs +======================================================= +skyCatalogs both creates simulated object catalogs (from precursor catalogs) +and provides a uniform API to the catalogs it makes and to certain other +catalogs. These catalogs may be used as inputs to image simulation (originally +only for the Rubin Observatory; since also used in simulations for the +Roman Observatory) and as truth catalogs. + +This documentation covers installation and usage instructions for the package. + +The source code of *skyCatalogs* is hosted at +https://github.com/LSSTDESC/skyCatalogs. + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + installation + usage_read + usage_create + ops-rehearsals-3-4/galaxies + ops-rehearsals-3-4/UW_stars + ops-rehearsals-3-4/SSO + roman-rubin-1.1.2/diffsky_galaxy + roman-rubin-1.1.2/UW_stars + roman-rubin-1.1.2/snana + +.. toctree:: + :maxdepth: 2 + :caption: Reference: + :hidden: + +.. toctree:: + :maxdepth: 2 + :caption: Contact: + :hidden: + + contact + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/doc/installation.rst b/doc/installation.rst new file mode 100644 index 00000000..25f74f4c --- /dev/null +++ b/doc/installation.rst @@ -0,0 +1,107 @@ +Installation Instructions +========================= + +.. note:: + + **Prerequisites**: + + To use **skyCatalogs 1.7.x** + + all that is required is a reasonably current version of the `LSST science pipelines `_ . See installation instructions below. + +.. note:: + + **Use with imSim**: + + If you intend to use skyCatalogs with imSim, you should follow the `imSim installation instructions `_ . In that case, you need proceed no further with the instructions here; you're all set. The remainder of these notes is largely extracted from the imSim instructions, omitting anything not required for skyCatalogs. + +Installing LSST science pipelines +--------------------------------- + +There are several methods of installation. Only the simplest (using a prebuilt cvmfs version) is described here. For other methods, see the imSim installation instructions. + +If you are working at the USDF (Rubin Project computing) or at NERSC (DESC computing), perhaps the easiest way to setup and use *skyCatalogs* is to rely on the prebuilt versions of the pipelines contained in the cvmfs distribution which is installed there. This solution is also appropriate for personal laptops and university/lab based computing systems if you are able to install the *cvmfs* system. + +The `CernVM file system `_ (cvmfs) is a distributed read-only file system developed at CERN for reliable low-maintenance world-wide software distribution. LSST-France distributes weekly builds of the Rubin science pipelines for both Linux and MacOS. Details and installation instructions can be found at `sw.lsst.eu `_ . The distribution includes conda and skyCatalogs dependencies from conda-forge along with the science pipelines. + +Load and setup the science pipelines +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +First you need to setup the science pipelines. This involves sourcing a setup file and then using the Rubin *eups* commands to set them up. + +.. note:: + + Version ``w_2024_20`` or later of the science pipelines is recommended. This will guarantee other dependencies of skyCatalogs, such as GalSim, are new enough. + + Also note: the cvmfs distribution is a read-only distribution. This means you cannot add packages to the included conda environment and packages you install via *pip* will be installed in the user area. If you need a *conda* environment you will need to use a different installation method. + +Source the appropriate setup script (note the -ext in the name) and then setup the distribution (if you are on MacOS use darwin-x86_64 instead of linux-x86_64). + +.. code-block:: sh + + source /cvmfs/sw.lsst.eu/linux-x86_64/lsst_distrib/w_2024_20/loadLSST-ext.bash + setup lsst_distrib + + +Install needed data files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Now go to where you would like to install *skyCatalogs* and download some needed data files (you will only need to do this once). + +.. code-block:: sh + + mkdir -p rubin_sim_data/sims_sed_library + curl https://s3df.slac.stanford.edu/groups/rubin/static/sim-data/rubin_sim_data/throughputs_2023_09_07.tgz | tar -C rubin_sim_data -xz + curl https://s3df.slac.stanford.edu/groups/rubin/static/sim-data/sed_library/seds_170124.tar.gz | tar -C rubin_sim_data/sims_sed_library -xz + +Set up skyCatalogs itself +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Clone the skyCatalogs package from GitHub: + +.. code-block:: sh + + git clone https://github.com/LSSTDESC/skyCatalogs + +at this point if you would only like to use *skyCatalogs* you can ``pip install skyCatalog/`` however we instead suggest using the *eups* tool to simply setup the package for use without installing it. This will allow you to edit the package in place, use multiple versions, change branches etc. You should definitely do this if you plan to do any *skyCatalogs* development. + +If you do not intend to do any development you may choose instead to clone the most recent release tag. As of Oct., 2024 this is 1.7.0rc4 + +.. code-block:: sh + + git clone https://github.com/LSSTDESC/skyCatalogs.git --branch 1.7.0rc4 + + +Setup and Use *skyCatalogs* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This setup step should be repeated for each new session. Here is a ``skycatalogs-setup.sh`` file you can use before each session + +.. code-block:: sh + + source /cvmfs/... # as above + setup lsst_distrib + + export SKYCATALOGS_HOME=*PUT YOUR INSTALL DIRECTORY HERE* + export RUBIN_SIM_DATA_DIR=$SKYCATALOGS_HOME/rubin_sim_data + export SIMS_SED_LIBRARY_DIR=$SKYCATALOGS_HOME/rubin_sim_data/sims_sed_library + + setup -k -r $SKYCATALOGS_HOME/skyCatalogs + +You should now be able to import the code you need from the skyCatalogs package, e.g. + +.. code-block:: python + + from skycatalogs.skyCatalogs import open_catalog + from skycatalogs.utils.shapes import Disk + + skycatalog_root = "path_to/skycatalog_files" # folder containing catalog + config_file = "some_folder/skyCatalog.yaml" + + cat = open_catalog(config_file, skycatalog_root=skycatalog_root) + + # define disk at ra, dec = 45.0, -9.0 of radius 100 arcseconds + disk = disk(45.0, -9.0, 100.0) + + # get galaxies and stars in the region + objects = cat.get_objects_by_region(disk, obj_type_set={'galaxy', 'star'}) diff --git a/doc/roman-rubin-1.1.2/UW_stars.rst b/doc/roman-rubin-1.1.2/UW_stars.rst new file mode 100644 index 00000000..a0ddc6f0 --- /dev/null +++ b/doc/roman-rubin-1.1.2/UW_stars.rst @@ -0,0 +1,52 @@ ++++++++++++++++++++++++++++++++++++++ +Star quantities for Roman-Rubin sims ++++++++++++++++++++++++++++++++++++++ +Data are partitioned by (nside=32, ring ordering) healpixel. For each pixel +there is a so-called "main file" (with information largely coming from the +UW star catalog) and a flux file. The latter contains for each object only +fluxes for lsst bands and the object id so it can be joined with the main +file. Both are parquet files. + +Star main file +---------------- +Note the same schema may be used for SNe. Some fields are unused for stars. + +======================== ============ ========== ========================= +Name Datatype Units Description +======================== ============ ========== ========================= +object_type string N/A In practice always 'star' +id string N/A Unique object identifier +ra double degrees Object right ascension +dec double degrees Object declination +host_galaxy_id int64 N/A Unused for stars +magnorm double N/A To be applied to SED +sed_filepath string N/A Path to object's SED file + relative to env variable + SIMS_SED_LIBRARY_DIR +MW_rv float N/A Extinction parameter +MW_av float N/A Extinction parameter + from F19 dust map +mura double milarcsec RA proper motion + per year +mudec double milarcsec Declin. proper motion + per year +radial_velocity double km/sec Radial velocity +parallax double milarcsec Parallax +variability_model string N/A Unused for stars +salt2_params struct N/A Unused for stars +======================== ============ ========== ========================= + +Star flux file +---------------- + +============= ========= ================ ================================ +Name Datatype Units Description +============= ========= ================ ================================ +id string N/A Unique object identifier +lsst_flux_u float photons/sec/cm^2 Flux integrated over lsst u-band +lsst_flux_g float photons/sec/cm^2 Flux integrated over lsst g-band +lsst_flux_r float photons/sec/cm^2 Flux integrated over lsst r-band +lsst_flux_i float photons/sec/cm^2 Flux integrated over lsst i-band +lsst_flux_z float photons/sec/cm^2 Flux integrated over lsst z-band +lsst_flux_y float photons/sec/cm^2 Flux integrated over lsst y-band +============= ========= ================ ================================ diff --git a/doc/roman-rubin-1.1.2/diffsky_galaxy.rst b/doc/roman-rubin-1.1.2/diffsky_galaxy.rst new file mode 100644 index 00000000..eb4360e7 --- /dev/null +++ b/doc/roman-rubin-1.1.2/diffsky_galaxy.rst @@ -0,0 +1,78 @@ +++++++++++++++++++++++++++++++++++++++++++++++++++ +Galaxy quantities for Roman-Rubin joint simulation +++++++++++++++++++++++++++++++++++++++++++++++++++ +Data are partitioned by (nside=32, ring ordering) healpixel. For each pixel +there is a so-called "main file" (with information largely coming from the +diffsky galaxy catalog), a flux file and a SED file. The flux file contains for +each object only fluxes for lsst and Roman bands and the object id so it can be +joined with the main file. Both it and the main file are parquet files. The +SED file is in hdf5 format. The file names take the form galaxy_.parquet +(main file), galaxy_flux_.parquet (flux file) and galaxy_sed_.hdf5 for +SED files. In all cases is the id of the healpixel covered by the file. + +Galaxy main file +---------------- + +============================= ======== ======= ========================== +Name Datatype Units Description +============================= ======== ======= ========================== +galaxy_id int64 N/A Unique object identifier +ra double degrees Object right ascension +dec double degrees Object declination +redshift double N/A Cosmological redshift + with line-of-sight motion +redshiftHubble double N/A Cosmological redshift +peculiarVelocity double km/sec Peculiar velocity +shear1 double N/A Shear (gamma) component 1, + treecorr/Galsim convention +shear2 double N/A Shear (gamma) component 2, + treecorr/Galsim convention +convergence double N/A Convergence (kappa) +spheroidHalfLightRadiusArcsec float arcsec +diskHalfLisghtRadiusArcsec float arcsec +diskEllipticity1 double N/A Ellipticity component 1 + for disk, not lensed +diskEllipticity2 double N/A Ellipticity component 2 + for disk, not lensed +spheroidEllipticity1 double N/A Ellipticity component 1 + for bulge, not lensed +spheroidEllipticity2 double N/A Ellipticity component 2 + for bulge, not lensed +MW_rv float N/A Extinction parameter +MW_av float N/A Extinction parameter + from F19 dust map +============================= ======== ======= ========================== + + + +Galaxy flux file +---------------- + +=============== ======== ================ ==================================== +Name Datatype Units Description +=============== ======== ================ ==================================== +galaxy_id int64 N/A Unique object identifier +lsst_flux_u float photons/sec/cm^2 Flux integrated over lsst u-band +lsst_flux_g float photons/sec/cm^2 Flux integrated over lsst g-band +lsst_flux_r float photons/sec/cm^2 Flux integrated over lsst r-band +lsst_flux_i float photons/sec/cm^2 Flux integrated over lsst i-band +lsst_flux_z float photons/sec/cm^2 Flux integrated over lsst z-band +lsst_flux_y float photons/sec/cm^2 Flux integrated over lsst y-band +roman_flux_W146 float photons/sec/cm^2 Flux integrated over roman W146-band +roman_flux_R062 float photons/sec/cm^2 Flux integrated over roman R062-band +roman_flux_Z087 float photons/sec/cm^2 Flux integrated over roman Z087-band +roman_flux_Y106 float photons/sec/cm^2 Flux integrated over roman Y106-band +roman_flux_J129 float photons/sec/cm^2 Flux integrated over roman J129-band +roman_flux_H158 float photons/sec/cm^2 Flux integrated over roman H158-band +roman_flux_F184 float photons/sec/cm^2 Flux integrated over roman F184-band +roman_flux_K213 float photons/sec/cm^2 Flux integrated over roman K213-band +=============== ======== ================ ==================================== + +Galaxy SED file +--------------- + +This file has two sections. One (**meta**) has an array **wave_list**, shape(312), +of wavelengths (angstroms), which is used for SEDs of all galaxies in the file's healpixel. +The other section, **galaxy**, contains groups of galaxies. Each group has entries +for individual galaxies, keyed by galaxy id. Such an entry is an array, shape(3, 312), +consisting of SEDs for the three galaxy components (disk, bulge, knot). Units are fnu. diff --git a/doc/roman-rubin-1.1.2/snana.rst b/doc/roman-rubin-1.1.2/snana.rst new file mode 100644 index 00000000..5b9ce187 --- /dev/null +++ b/doc/roman-rubin-1.1.2/snana.rst @@ -0,0 +1,77 @@ ++++++++++++++++++++++++++++++++++++++ +SNANA quantities for Roman-Rubin sims ++++++++++++++++++++++++++++++++++++++ +Data are partitioned by (nside=32, ring ordering) healpixel. For each pixel +there is a so-called "main file" in parquet format, containing static +quantities associated with each source, and an hdf5 file for quantities +which vary with time or wavelength or both. + + +SNANA main file +---------------- + +======================== ============ ========== ========================== +Name Datatype Units Description +======================== ============ ========== ========================== +id int64 N/A Unique object identifier +ra double degrees Object right ascension +dec double degrees Object declination +host_id int64 N/A Host galaxy +gentype int32 N/A Type of object simulated +model_name string N/A Type name +start_mjd float days Earliest visibility +end_mjd float days Latest visibility +z_CMB float N/A redshift +mw_EBV float N/A MW extinction parameter +mw_extinction_applied boolean N/A Here always False +AV float N/A For host galaxy, randomly + assigned +RV float N/A For host galaxy +v_pec float km/sec Peculiar velocity. Not + yet simulated so zero. +host_ra double degrees Host galaxy RA +host_dec double degrees Host galaxy decl. +host_mag_g float N/A Host mag. in Rubin g-band +host_mag_i float N/A Host mag. in Rubin i-band +host_mag_F float N/A Host mag. in Roman F-band +host_sn_sep float arcsec Separation from host +peak_mjd float days Time of peak flux + (model-dependent) +peak_mag_g float N/A g-band mag. at peak +peak_mag_i float N/A i-band mag. at peak +peak_mag_F float N/A F-band mag. at peak +lens_dmu_applied boolean N/A False (distance modulus + lensing shift not applied) +model_param_names list(string) N/A Model parameter names +model_param_values list(string) N/A Model parameter values +MW_av float N/A MW extinction parameter +MW_rv float N/A MW extinction parameter +======================== ============ ========== ========================== + +SNANA varying quantities +------------------------ + +The top-level keys for each file are the ids for sources in that pixel, the +same as the ids appearing in the parquet file but here stored as strings. +Under each id are the following keys + +============= =============== ================ =============================== +Name Datatype Units Description +============= =============== ================ =============================== +mjd float array days Time axis for flambda +lambda double array angstroms Wavelength axis for flambda +flambda float 2-d array erg/sec/A/cm^2 Flux indexed by (mjd,lambda) +mag_ float array N/A Magnitude for each mjd computed + using 5 angstrom bins. +magcor_ float array N/A Correction to magnitude + computed using flambda +synmag_ float array N/A Magnitude computed from flambda +============= =============== ================ =============================== + +where takes on values u, g, r, i, z, y (Rubin bandpasses) and F, H, J, +K, R, W, Y, Z (for Roman). + +mjd values have uniform spacing of 1 day. lambda values have uniform spacing +of 100 angstroms. + +synmag + magcor = mag diff --git a/doc/schema.md b/doc/schema.md deleted file mode 100644 index 6a6ff290..00000000 --- a/doc/schema.md +++ /dev/null @@ -1,64 +0,0 @@ -## Galaxy Schema - -Taken from schema of parquet file produced by current code. -This draft only includes bulge and disk. Some fields will be added for knots. Most likely AGN will also go in the galaxy file. - -| Fieldname | Type | Remarks | -| --------- | ------ | ------- | -| galaxy_id | bigint | | -| ra | R8 | | -| dec | R8 | | -| redshift | R8 | | -| shear_1 | R8 | | -| shear_2 | R8 | treecor | -| convergence | R8 | | -| size_bulge_true | R4 | | -| size_minor_bulge_true | R4| | -| sersic_bulge | R4 | | -| size_disk_true | R4 | | -| size_minor_disk_true | R4| | -| sersic_disk | R4 | | -| position_angle | R8 | | -| sed_val_bulge | R4 * N | list of tophat flux values | -| sed_val_disk | R4 * N | list of tophat flux values | -| internalAv_bulge | R8 | | -| internalRv_bulge | R8 | | -| internalAv_disk | R8 | | -| internalRv_disk | R8 | | -| bulge_magnorm | R8 | currently unused with tophat SEDs | -| disk_magnorm | R8 | currently unused with tophat SEDs | -| MW_rv | R4 | | -| MW_av_lsst_u | R4 | | -| MW_av_lsst_g | R4 | | -| MW_av_lsst_r | R4 | | -| MW_av_lsst_i | R4 | | -| MW_av_lsst_z | R4 | | -| MW_av_lsst_y | R4 | | - -## Pointsource schema - -Will include stars (variable or not) and SNe. May also include AGN. This -draft assumes stars and SNe only. - -| Field | Type | Remarks | -| --------- | ------ | ------- | -| object type | string | 'star' or 'sne' | -| id | bigint? | Current instance catalogs have strings for sn ids | -| ra | R8 | | -| dec | R8 | | -| host galaxy id | bigint | Only include column if we want it for SNe | -| mag norm | R8 | | -| sed filepath | string | relative to $SIMS_SED_LIBRARY_DIR | -| MW_rv | R4 | | -| MW_av_lsst_u | R4 | per-band extinction value for this ra, dec | -| MW_av_lsst_g | R4 | | -| MW_av_lsst_r | R4 | | -| MW_av_lsst_i | R4 | | -| MW_av_lsst_z | R4 | | -| MW_av_lsst_y | R4 | | - -Several other fields which might have been included are not because either -* they are not relevant for point sources or -* they are constant for all objects in the file - -In the latter case the value will be stored in the config. diff --git a/doc/usage_create.rst b/doc/usage_create.rst new file mode 100644 index 00000000..4297f77d --- /dev/null +++ b/doc/usage_create.rst @@ -0,0 +1,145 @@ +Creating New Catalogs +===================== +Catalogs - both the binary data files and yaml config - for some object types +can be created using the script `create_main.py` and +`create_flux.py`. Creation of the main catalog must precede +creation of the flux catalog for the same sky region. +For other object types the data are +created by other means, but it is still necessary to make a suitable +config fragment so that the skyCatalogs API can access the data. + + +The script ``create_main.py`` and its options +------------------------------------------- +``create_main.py`` has a plethora of options, but few are of interest +for most invocations and even fewer are required. The options determine + +* object type for which files will be created (required) +* region of the sky for which files will be created. +* where the output goes +* inputs (usually defaulted, depending on object type) +* numerous options conditioning exactly how the output is to be created, + most of which are usually defaulted + +One particularly handy option, ``--options-file``, allows you to specify +everything else as key-value pairs in a yaml file. + +Options table ++++++++++++++ +Here is the complete list of options as they appear in an options file. +On the command line, prepend ``--`` and change all underscores to hyphens. + +===================== ========= ============ =============================== +Name Datatype Default Description +===================== ========= ============ =============================== +object_type string Required. One of {star, sso, + cosmodc2_galaxy, diffsky_galaxy} +catalog_dir string "." Location of catalog relative + to skycatalog_root + (see below) +catalog_name string "skyCatalog" Name of top-level yaml config + file +config_path string None where to write config. If + ``None``, same folder as data +dc2 boolean False Use dc2 conventions +galaxy_magnitude_cut float 29.0 Discard galaxies above cut. + Ignored for non-galaxy + object types +nside int 32 nside for healpixels +stride int 1_000_000 Max objects output per row + group +truth string None Default depends on object_type +knots_magnitude_cut float 27.0 Omit knots component from + galaxies with i-mag above cut +log_level string "INFO" Log level +no_knots boolean False Omit knot component +options_file string None Path to file where other + options are set +pixels int list [9556] healpix pixels for which + catalog will be created +skip_done boolean False do not overwrite existing files +skycatalog_root string None Abs. path. See catalog_dir +sso_sed string None Path to file to SED to be + used for all SSOs. Defaults + to `solar_sed_thin.txt`, + included in repo. +star_input_fmt string "sqlite" Format of star truth +===================== ========= ============ =============================== + +The script ``create_flux.py`` and its options +------------------------------------------- +``create_flux.py`` has most of the same options as ``create_main.py`` +plus a couple new ones. Only ``object_type`` is required but several +others are specified for most invocations. + +Options table ++++++++++++++ +Here is the complete list of options as they appear in an options file. +On the command line, prepend ``--`` and change all underscores to hyphens. + +===================== ========= ============ =============================== +Name Datatype Default Description +===================== ========= ============ =============================== +object_type string Required. One of {star, sso, + cosmodc2_galaxy, diffsky_galaxy} +catalog_dir string "." Location of catalog relative + to skycatalog_root + (see below) +catalog_name string "skyCatalog" Name of top-level yaml config + file +config_path string None where to write config. If + ``None``, same folder as data +flux_parallel int 16 # processes to run in parallel + when computing fluxes +iclude_roman_flux boolean False If True calculate & store Roman + as well as Rubin fluxes. +log_level string "INFO" Log level +options_file string None Path to file where other + options are set +pixels int list [9556] healpix pixels for which + catalog will be created +skip_done boolean False do not overwrite existing files +skycatalog_root string None Abs. path. See catalog_dir +sso_sed string None Path to file to SED to be + used for all SSOs. Defaults + to `solar_sed_thin.txt`, + included in repo. + +Example options files ++++++++++++++++++++++ +Create cosmodc2-style galaxies main file. This file was one I wrote +primarily for testing the creation code. In order to speed things up, I +set ``galaxy_magnitude_cut`` down to 20.0. The output file is about 1000 times +smaller than with the default cut. + +.. code-block:: yaml + + object_type: cosmodc2_galaxy + catalog_dir: just_testing + pixels: [9683] + galaxy_magnitude_cut: 20.0 # Default is 29.0 + log_level: DEBUG # Default is INFO + +Suppose the file is called `main_galaxy.yaml`. It can be invoked as follows: + +.. code-block:: sh + + python cosmodc2_galaxy --options-file main_galaxy.yaml + +.. note:: + Since ``object_type`` is required it must be specified both on the + command line and in the options file. + +Create star flux file for a couple healpixels. +The default value of ``flux_parallel`` is rather conservative for Perlmutter, +so use something higher to make the process go faster. + +.. code-block:: yaml + + catalog_dir: just_testing + pixels: [9683, 9684] + flux_parallel: 24 # Default is 16 + +.. note:: + The star main files for both healpixels must already exist in the output + directory since they are input to the flux generation. diff --git a/doc/usage_read.rst b/doc/usage_read.rst new file mode 100644 index 00000000..797d10af --- /dev/null +++ b/doc/usage_read.rst @@ -0,0 +1,196 @@ +Reading Catalogs with skyCatalogs +================================= +Typically making use of skyCatalogs involves three steps: + +1. "Open" the catalog. This is accomplished by reading a *config*: one or more + yaml files which describes features of the catalog. Config files will + be described in detail below. +2. Select objects of specified types (e.g. galaxies or stars or both) within + a region of the sky. +3. Obtain properties of the objects for use by your application. + +The last two steps are often executed multiple times. + +Opening a Catalog +----------------- +You open a catalog like this: + +.. code-block:: python + + from skycatalogs.skyCatalogs import open_catalog + + skycatalog_root = "some_path/data_folder" + config_file = "another_path/skyCatalog.yaml" + + cat = open_catalog(config_file, skycatalog_root=skycatalog_root) + +Often the config file is in the same folder as the data but it need not be. + +If ``skycatalog_root`` is not specified, the code will use the value of the +environment variable ``SKYCATALOG_ROOT`` if it exists, + +Structure of skyCatalogs Configs +================================ +Configs contain a variety of information. Some of it is required for the +skyCatalogs API to find and make sense of the binary data. Other quantities +are primarily for human consumption. An up-to-date config (version 1.3.0 +or later) is a mapping with only a few keys, currently ``skycatalog_root``, +``catalog_dir``, ``catalog_name``, ``schema_version`` and ``object_types``. The +first three are used to find the data. ``schema_version`` refers to the +version of the config structure. The value of ``object_types`` +is a mapping with a key for each object type having data in the catalog. +The bulk of the information may be found +under those keys. That information may be included literally in the +config file but it is preferable to isolate information pertaining to each +object type in its own yaml file and use the yaml **!include** +directive to incorporate it. + +Using !include +-------------- + +.. code-block:: yaml + + catalog_dir: . # See Note 1. + catalog_name: skyCatalog # default name for top-level yaml file + object_types: + galaxy: !include galaxy.yaml # See Note 2. + star: !include |- # The |- indicates continue to next line + star.yaml # & may appear in auto-generated top files + skycatalog_root: /some/path/often/absolute # see Note 3. + schema_version: 1.3.0 + +.. note:: + #. ``catalog_dir`` indicates where yaml and data files are to be found + relative to skycatalog_root. See also Note 3. + #. The **!include** directive is not supported by yaml natively, but one can + add an implementation. This has been done for the skyCatalogs API. + #. When the top-level yaml file is written, ``skycatalog_root`` is normally + an absolute path. That file is in the ``catalog_dir`` subdirectory of + ``skycatalog_root``. But, in case the catalog has been copied, + ``skycatalog_root`` may be overridden at run time when invoking + ``open_catalog``. ``catalog_dir`` is then interpreted to be relative to + the new value of ``skycatalog_root``. + +Description of an object type +----------------------------- +For the most part the configuration file fragment for an object type will +either be written by the code generating the binary data for that object +type or will be provided some other way by whoever provides the data. It +is not normally something users of the skyCatalogs API need be concerned with. +However, for those who are curious, such fragments usually include several +kinds of information: + +* information allowing the API to find the data files for the object type +* provenance, which in turn may consist of some or all of the following: + + * inputs used in the creation of the data files + + * run options supplied to the creating program + + * schema version + + * version of the program and information about the state of the git repo containing the program source + +* other information associated with the object type + + +Here is an example file for the ``star`` object type: + +.. code-block:: yaml + + area_partition: + nside: 32 + ordering: ring + type: healpix + data_file_type: parquet + file_template: pointsource_(?P\d+).parquet + flux_file_template: pointsource_flux_(?P\d+).parquet + provenance: + inputs: + star_truth: /global/cfs/cdirs/lsst/groups/SSim/DC2/dc2_stellar_healpixel.db + run_options: + catalog_dir: out_config + catalog_name: skyCatalog + config_path: null + dc2: false + flux_parallel: 16 + galaxy_magnitude_cut: 29.0 + galaxy_nside: 32 + galaxy_stride: 1000000 + galaxy_truth: null + galaxy_type: cosmodc2 + include_roman_flux: false + knots_magnitude_cut: 27.0 + log_level: DEBUG + no_flux: true + no_galaxies: true + no_knots: false + no_main: false + no_pointsources: false + options_file: local/out_config/star_main.yaml + pixels: + - 9556 + sed_subdir: galaxyTopHatSED + skip_done: true + skycatalog_root: null + sso: false + sso_sed: null + sso_truth: null + star_input_fmt: sqlite + skyCatalogs_repo: + git_branch: u/jrbogart/config_reorg + git_hash: 6da4f9636cc63010480c1a1c086cbde8f6ca4dd4 + git_status: + - UNCOMMITTED_FILES + - UNTRACKED_FILES + versioning: + code_version: 1.7.0-rc4 + schema_version: 1.3.0 + sed_file_root_env_var: SIMS_SED_LIBRARY_DIR + sed_model: file_nm + file_nm: + units: nm + internal_extinction: None + +Adding Supported Object Types to a Catalog +========================================== +We expect most users will use pre-assembled catalogs, already containing +all the kinds of objects they need, but it's possible someone will have to +add a new type to a collection. Assuming the data files and a suitable +config fragment for the new type exist somewhere else, one only needs to +copy them to the catalog directory, then edit the top-level config file +by adding a line to the ``object_types`` section: + +.. code-block:: yaml + + object_types: + galaxy: !include galaxy.yaml + star: !include star.yaml + sso: !include sso.yaml # the new one + +Of course the skyCatalogs API has to know how to handle the new type. + +Supported object types +---------------------- +As of August, 2024, the following object types are supported. + +.. glossary:: + + star + as in the DC2 simulation, generated from the UW database + + galaxy + as in the DC2 simulation, generated from the cosmodc2 catalog + + diffsky_galaxy + galaxies simulated from simple stellar populations + + snana + SNe generated by the SNANA simulation program, using either + galaxy or diffsky_galaxy objects as hosts + + sso + solar system objects generated by Sorcha + + gaia_star + Gaia catalog dr2 From 20b00c0adfbac8a583fdce6039325a6638e06a79 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Mon, 21 Oct 2024 16:36:56 -0700 Subject: [PATCH 02/18] get CI to build documentation --- .github/workflows/documentation.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..82e6b6a0 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,24 @@ +name: Docs +on: [push, pull_request, workflow_dispatch] +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install . + pip install sphinx sphinx_rtd_theme sphinx_toolbox sphinxcontrib-autoprogram sphinxcontrib.datatemplates + - name: Sphinx build + run: | + sphinx-build doc _build + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }} + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true From 7ed4e41e8593a9435cecce3c0bd6feb57ca79fb9 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Mon, 21 Oct 2024 16:56:37 -0700 Subject: [PATCH 03/18] copy come files from earlier doc branch --- doc/ops-rehearsals-3-4/SSO.rst | 39 ++++++++++++++ doc/ops-rehearsals-3-4/UW_stars.rst | 59 +++++++++++++++++++++ doc/ops-rehearsals-3-4/galaxies.rst | 80 +++++++++++++++++++++++++++++ doc/usage_create.rst | 2 +- 4 files changed, 179 insertions(+), 1 deletion(-) create mode 100644 doc/ops-rehearsals-3-4/SSO.rst create mode 100644 doc/ops-rehearsals-3-4/UW_stars.rst create mode 100644 doc/ops-rehearsals-3-4/galaxies.rst diff --git a/doc/ops-rehearsals-3-4/SSO.rst b/doc/ops-rehearsals-3-4/SSO.rst new file mode 100644 index 00000000..8b0db513 --- /dev/null +++ b/doc/ops-rehearsals-3-4/SSO.rst @@ -0,0 +1,39 @@ ++++++++++++++++++++++++++++++++++++++++++ +SSO quantities for ops-rehearsals 3 and 4 ++++++++++++++++++++++++++++++++++++++++++ +Data are partitioned by (nside=32, ring ordering) healpixel. For each pixel +there is a so-called "main file" and a flux file. The latter contains +for each object only fluxes for lsst bands, the object id and the time (mjd) +of the observation. The latter two fields may be used to join with the +main file. + +SSO main file +------------- + +======================== ============ ============== =========================== +Name Datatype Units Description +======================== ============ ============== =========================== +id string N/A Unique object identifier +mjd double days Time of observation +ra double degrees Object right ascension +dec double degrees Object declination +trailed_source_mag double N/A Mag. normalization for SED +ra_rate double deg/day RA rate of change * cos(dec) +dec_rate double deg/day Declination rate of change +======================== ============ ============== =========================== + +SSO flux file +---------------- + +============= ========= ================ ================================ +Name Datatype Units Description +============= ========= ================ ================================ +id string N/A Unique object identifier +mjd double days Time of observation (Julian date) +lsst_flux_u float photons/sec/cm^2 Flux integrated over lsst u-band +lsst_flux_g float photons/sec/cm^2 Flux integrated over lsst g-band +lsst_flux_r float photons/sec/cm^2 Flux integrated over lsst r-band +lsst_flux_i float photons/sec/cm^2 Flux integrated over lsst i-band +lsst_flux_z float photons/sec/cm^2 Flux integrated over lsst z-band +lsst_flux_y float photons/sec/cm^2 Flux integrated over lsst y-band +============= ========= ================ ================================ diff --git a/doc/ops-rehearsals-3-4/UW_stars.rst b/doc/ops-rehearsals-3-4/UW_stars.rst new file mode 100644 index 00000000..c1c64bfe --- /dev/null +++ b/doc/ops-rehearsals-3-4/UW_stars.rst @@ -0,0 +1,59 @@ +++++++++++++++++++++++++++++++++++++++++++ +Star quantities for ops-rehearsals 3 and 4 +++++++++++++++++++++++++++++++++++++++++++ +Data are partitioned by (nside=32, ring ordering) healpixel. For each pixel +there is a so-called "main file" (with information largely coming from the +UW star catalog) and a flux file. The latter contains for each object only +fluxes for lsst bands and the object id so it can be joined with the main +file. Both are parquet files. + +Star main file +---------------- +Note the same schema may be used for SNe. Some fields are unused for stars. + +======================== ============ ========== ========================= +Name Datatype Units Description +======================== ============ ========== ========================= +object_type string N/A In practice always 'star' +id string N/A Unique object identifier +ra double degrees Object right ascension +dec double degrees Object declination +host_galaxy_id int64 N/A Unused for stars +magnorm double N/A To be applied to SED +sed_filepath string N/A Path to object's SED file + relative to env variable + SIMS_SED_LIBRARY_DIR +MW_rv float N/A Extinction parameter +MW_av float N/A Extinction parameter + from F19 dust map +mura double milarcsec RA proper motion + per year +mudec double milarcsec Declin. proper motion + per year +radial_velocity double km/sec Radial velocity +parallax double milarcsec Parallax +variability_model string N/A Unused for stars +salt2_params int32 N/A Unused for stars +is_variable boolean N/A If true, the star has + sinusoidal variability + in magnitude +period double days period of variability +mag_amplitude double N/A amplitude of magnitude + variability +phase double radians phase of variability +======================== ============ ========== ========================= + +Star flux file +---------------- + +============= ========= ================ ================================ +Name Datatype Units Description +============= ========= ================ ================================ +id string N/A Unique object identifier +lsst_flux_u float photons/sec/cm^2 Flux integrated over lsst u-band +lsst_flux_g float photons/sec/cm^2 Flux integrated over lsst g-band +lsst_flux_r float photons/sec/cm^2 Flux integrated over lsst r-band +lsst_flux_i float photons/sec/cm^2 Flux integrated over lsst i-band +lsst_flux_z float photons/sec/cm^2 Flux integrated over lsst z-band +lsst_flux_y float photons/sec/cm^2 Flux integrated over lsst y-band +============= ========= ================ ================================ diff --git a/doc/ops-rehearsals-3-4/galaxies.rst b/doc/ops-rehearsals-3-4/galaxies.rst new file mode 100644 index 00000000..45a232fc --- /dev/null +++ b/doc/ops-rehearsals-3-4/galaxies.rst @@ -0,0 +1,80 @@ +++++++++++++++++++++++++++++++++++++++++++++ +Galaxy quantities for ops-rehearsals 3 and 4 +++++++++++++++++++++++++++++++++++++++++++++ +Data are partitioned by (nside=32, ring ordering) healpixel. For each pixel +there is a so-called "main file" (with information largely coming from the +cosmodc2 galaxy catalog) and a flux file. The latter contains +for each object only fluxes for lsst bands and the object id so it can be +joined with the main file. Both are parquet files. The main file can be +rather large (over 3 Gbytes) so, depending on your application, you may +want to iterate over row groups rather than reading it all in at once. + +Galaxy main file +---------------- + +======================== ============ ============== ======================== +Name Datatype Units Description +======================== ============ ============== ======================== +galaxy_id int64 N/A Unique object identifier +ra double degrees Object right ascension +dec double degrees Object declination +redshift double N/A Cosmological redshift + with line-of-sight motion +redshift_hubble double N/A Cosmological redshift +peculiar_velocity double km/sec Peculiar velocity +shear_1 double N/A Shear (gamma) component 1, + treecorr/Galsim convention +shear_2 double N/A Shear (gamma) component 2, + treecorr/Galsim convention +convergence double N/A Convergence (kappa) +size_bulge_true float arcsec Bulge half-light radius + (major axis) not lensed +size_minor_bulge_true float arcsec Bulge half-light radius + (minor axis) not lensed +sersic_bulge float N/A Sersic index of bulge + light profile +size_disk_true float arcsec Disk half-light radius + (major axis) not lensed +size_disk_bulge_true float arcsec Disk half-light radius + (minor axis) not lensed +sersic_disk float N/A Sersic index of disk + light profile +ellipticity_1_disk_true double N/A Ellipticity component 1 + for disk, not lensed +ellipticity_2_disk_true double N/A Ellipticity component 2 + for disk, not lensed +ellipticity_1_bulge_true double N/A Ellipticity component 1 + for bulge, not lensed +ellipticity_2_bulge_true double N/A Ellipticity component 2 + for bulge, not lensed +sed_val_bulge list(double) 4.4659e13 W/Hz Integrated rest-frame AB + luminosities for tophat + filters (bulge component) +sed_val_disk list(double) 4.4659e13 W/Hz Like sed_val_bulge +bulge_magnorm double N/A Normalization for SED +disk_magnorm double N/A Normalization for SED +MW_rv float N/A Extinction parameter +MW_av float N/A Extinction parameter + from F19 dust map +sed_val_knots list(double) 4.4659e13 W/Hz Like sed_val_bulge +n_knots float N/A Number of knots +knots_magnorm double N/A Normalization for SED +======================== ============ ============== ======================== + +NOTE: For tophat definitions (start and width in units of angstroms) see yaml +config file associated with the data. + +Galaxy flux file +---------------- + +============= ========= ================ ================================ +Name Datatype Units Description +============= ========= ================ ================================ +galaxy_id int64 N/A Unique object identifier +lsst_flux_u float photons/sec/cm^2 Flux integrated over lsst u-band +lsst_flux_g float photons/sec/cm^2 Flux integrated over lsst g-band +lsst_flux_r float photons/sec/cm^2 Flux integrated over lsst r-band +lsst_flux_i float photons/sec/cm^2 Flux integrated over lsst i-band +lsst_flux_z float photons/sec/cm^2 Flux integrated over lsst z-band +lsst_flux_y float photons/sec/cm^2 Flux integrated over lsst y-band +============= ========= ================ ================================ diff --git a/doc/usage_create.rst b/doc/usage_create.rst index 4297f77d..ae4e82f1 100644 --- a/doc/usage_create.rst +++ b/doc/usage_create.rst @@ -10,7 +10,7 @@ config fragment so that the skyCatalogs API can access the data. The script ``create_main.py`` and its options -------------------------------------------- +--------------------------------------------- ``create_main.py`` has a plethora of options, but few are of interest for most invocations and even fewer are required. The options determine From 218ae05061a2c7947f12f7448b4f14edcc8d7ee8 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Mon, 21 Oct 2024 17:05:48 -0700 Subject: [PATCH 04/18] format fixes --- doc/usage_create.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/usage_create.rst b/doc/usage_create.rst index ae4e82f1..8fb1973f 100644 --- a/doc/usage_create.rst +++ b/doc/usage_create.rst @@ -67,7 +67,7 @@ star_input_fmt string "sqlite" Format of star truth ===================== ========= ============ =============================== The script ``create_flux.py`` and its options -------------------------------------------- +--------------------------------------------- ``create_flux.py`` has most of the same options as ``create_main.py`` plus a couple new ones. Only ``object_type`` is required but several others are specified for most invocations. @@ -104,6 +104,8 @@ sso_sed string None Path to file to SED to be used for all SSOs. Defaults to `solar_sed_thin.txt`, included in repo. +===================== ========= ============ =============================== + Example options files +++++++++++++++++++++ From 0cdcb67f889aef6b8d903e737ad36f349f5e12b5 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Mon, 21 Oct 2024 17:23:38 -0700 Subject: [PATCH 05/18] try to get documentation deploy to happen --- .github/workflows/documentation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 82e6b6a0..d95069d9 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -16,9 +16,9 @@ jobs: sphinx-build doc _build - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }} + if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/skycat_doc2' }} with: publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} + # github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: _build/ force_orphan: true From 1262624c7cba9ae38da5db458c655a1472c63d29 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Mon, 21 Oct 2024 17:42:29 -0700 Subject: [PATCH 06/18] uncomment github_token line --- .github/workflows/documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index d95069d9..de313041 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -19,6 +19,6 @@ jobs: if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/skycat_doc2' }} with: publish_branch: gh-pages - # github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: _build/ force_orphan: true From 6defbc78d6395e49fb4b39f14113970b6babc260 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Tue, 22 Oct 2024 10:03:39 -0700 Subject: [PATCH 07/18] allow doc deploy with push to development branch --- .github/workflows/documentation.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index de313041..5d36a014 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -16,7 +16,8 @@ jobs: sphinx-build doc _build - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/skycat_doc2' }} + # if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/skycat_doc2' }} + if: ${{ github.ref == 'refs/heads/skycat_doc2' }} with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} From 7f9b4d2f1d919160159b092c318f892a579a93a5 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Tue, 22 Oct 2024 17:11:14 -0700 Subject: [PATCH 08/18] rename doc to docs to be in accord with github publishing conventions --- {doc => docs}/Makefile | 0 {doc => docs}/conf.py | 0 {doc => docs}/contact.rst | 0 {doc => docs}/example-create_sc-options_file.yaml | 0 {doc => docs}/fake_conf.yaml | 0 {doc => docs}/index.rst | 0 {doc => docs}/installation.rst | 0 {doc => docs}/ops-rehearsals-3-4/SSO.rst | 0 {doc => docs}/ops-rehearsals-3-4/UW_stars.rst | 0 {doc => docs}/ops-rehearsals-3-4/galaxies.rst | 0 {doc => docs}/roman-rubin-1.1.2/UW_stars.rst | 0 {doc => docs}/roman-rubin-1.1.2/diffsky_galaxy.rst | 0 {doc => docs}/roman-rubin-1.1.2/snana.rst | 0 {doc => docs}/usage_create.rst | 0 {doc => docs}/usage_read.rst | 0 15 files changed, 0 insertions(+), 0 deletions(-) rename {doc => docs}/Makefile (100%) rename {doc => docs}/conf.py (100%) rename {doc => docs}/contact.rst (100%) rename {doc => docs}/example-create_sc-options_file.yaml (100%) rename {doc => docs}/fake_conf.yaml (100%) rename {doc => docs}/index.rst (100%) rename {doc => docs}/installation.rst (100%) rename {doc => docs}/ops-rehearsals-3-4/SSO.rst (100%) rename {doc => docs}/ops-rehearsals-3-4/UW_stars.rst (100%) rename {doc => docs}/ops-rehearsals-3-4/galaxies.rst (100%) rename {doc => docs}/roman-rubin-1.1.2/UW_stars.rst (100%) rename {doc => docs}/roman-rubin-1.1.2/diffsky_galaxy.rst (100%) rename {doc => docs}/roman-rubin-1.1.2/snana.rst (100%) rename {doc => docs}/usage_create.rst (100%) rename {doc => docs}/usage_read.rst (100%) diff --git a/doc/Makefile b/docs/Makefile similarity index 100% rename from doc/Makefile rename to docs/Makefile diff --git a/doc/conf.py b/docs/conf.py similarity index 100% rename from doc/conf.py rename to docs/conf.py diff --git a/doc/contact.rst b/docs/contact.rst similarity index 100% rename from doc/contact.rst rename to docs/contact.rst diff --git a/doc/example-create_sc-options_file.yaml b/docs/example-create_sc-options_file.yaml similarity index 100% rename from doc/example-create_sc-options_file.yaml rename to docs/example-create_sc-options_file.yaml diff --git a/doc/fake_conf.yaml b/docs/fake_conf.yaml similarity index 100% rename from doc/fake_conf.yaml rename to docs/fake_conf.yaml diff --git a/doc/index.rst b/docs/index.rst similarity index 100% rename from doc/index.rst rename to docs/index.rst diff --git a/doc/installation.rst b/docs/installation.rst similarity index 100% rename from doc/installation.rst rename to docs/installation.rst diff --git a/doc/ops-rehearsals-3-4/SSO.rst b/docs/ops-rehearsals-3-4/SSO.rst similarity index 100% rename from doc/ops-rehearsals-3-4/SSO.rst rename to docs/ops-rehearsals-3-4/SSO.rst diff --git a/doc/ops-rehearsals-3-4/UW_stars.rst b/docs/ops-rehearsals-3-4/UW_stars.rst similarity index 100% rename from doc/ops-rehearsals-3-4/UW_stars.rst rename to docs/ops-rehearsals-3-4/UW_stars.rst diff --git a/doc/ops-rehearsals-3-4/galaxies.rst b/docs/ops-rehearsals-3-4/galaxies.rst similarity index 100% rename from doc/ops-rehearsals-3-4/galaxies.rst rename to docs/ops-rehearsals-3-4/galaxies.rst diff --git a/doc/roman-rubin-1.1.2/UW_stars.rst b/docs/roman-rubin-1.1.2/UW_stars.rst similarity index 100% rename from doc/roman-rubin-1.1.2/UW_stars.rst rename to docs/roman-rubin-1.1.2/UW_stars.rst diff --git a/doc/roman-rubin-1.1.2/diffsky_galaxy.rst b/docs/roman-rubin-1.1.2/diffsky_galaxy.rst similarity index 100% rename from doc/roman-rubin-1.1.2/diffsky_galaxy.rst rename to docs/roman-rubin-1.1.2/diffsky_galaxy.rst diff --git a/doc/roman-rubin-1.1.2/snana.rst b/docs/roman-rubin-1.1.2/snana.rst similarity index 100% rename from doc/roman-rubin-1.1.2/snana.rst rename to docs/roman-rubin-1.1.2/snana.rst diff --git a/doc/usage_create.rst b/docs/usage_create.rst similarity index 100% rename from doc/usage_create.rst rename to docs/usage_create.rst diff --git a/doc/usage_read.rst b/docs/usage_read.rst similarity index 100% rename from doc/usage_read.rst rename to docs/usage_read.rst From 86b1f10c39002fc235f79e0ff941da43519ae9d7 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Tue, 22 Oct 2024 17:17:48 -0700 Subject: [PATCH 09/18] update workflow to build from "docs" rather than "doc" --- .github/workflows/documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 5d36a014..2db136ba 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -13,7 +13,7 @@ jobs: pip install sphinx sphinx_rtd_theme sphinx_toolbox sphinxcontrib-autoprogram sphinxcontrib.datatemplates - name: Sphinx build run: | - sphinx-build doc _build + sphinx-build docs _build - name: Deploy uses: peaceiris/actions-gh-pages@v3 # if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/skycat_doc2' }} From 89faaa49a76e2fc1a9b2bd6680f0aa53cd6af1ee Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Tue, 22 Oct 2024 17:35:45 -0700 Subject: [PATCH 10/18] force another attempt --- .github/workflows/documentation.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 2db136ba..355cf83e 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,5 +1,7 @@ name: Docs -on: [push, pull_request, workflow_dispatch] +# on: [push, pull_request, workflow_dispatch] +# Make changes to "on:" just to force new build +on: [push] jobs: docs: runs-on: ubuntu-latest From 5b97dfc8133f17a5cd5b03923fae7cf8f6f826c2 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Tue, 22 Oct 2024 18:14:21 -0700 Subject: [PATCH 11/18] document parts of the API --- docs/index.rst | 4 ++- docs/reference_python.rst | 57 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 docs/reference_python.rst diff --git a/docs/index.rst b/docs/index.rst index e8184385..31795312 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -37,13 +37,15 @@ https://github.com/LSSTDESC/skyCatalogs. :caption: Reference: :hidden: + reeference_python + .. toctree:: :maxdepth: 2 :caption: Contact: :hidden: contact - + Indices and tables ================== diff --git a/docs/reference_python.rst b/docs/reference_python.rst new file mode 100644 index 00000000..f9984824 --- /dev/null +++ b/docs/reference_python.rst @@ -0,0 +1,57 @@ +=========================== +The ``skyCatalogs`` package +=========================== + +Reference documentation for core objects with the ``sktyCatalogs`` package + +.. _skyCatalog_class: + +The skyCatalog class +===================== + +The ``skyCatalog`` class represents a catalog. Users gain access +to a catalog by calling its static method ``open_catalog``. + +.. autoclass:: skycatalogs.skyCatalogs.SkyCatalog + :members: + + .. automethod:: skycatalogs.skyCatalogs.open_catalog + .. automethod:: skycatalogs.skyCatalogs.SkyCatalog.get_objects_by_region + .. automethod:: skycatalogs.skyCatalogs.SkyCatalog.get_object_type_by_region + .. automethod:: skycatalogs.skyCatalogs.SkyCatalog.get_object_type_names + .. automethod:: skycatalogs.skyCatalogs.SkyCatalog.get_object_type_by_hp + .. automethod:: skycatalogs.skyCatalogs.SkyCatalog.get_hps_by_region + +.. + .. automethod:: skycatalogs.skyCatalogs.SkyCatalog.get_hps_by_type + +.. _baseobject_class: + +There are several classes (one per supported object type) representing +individual objects as observed at a particular time, all subclassing +``BaseObject``. + +.. autoclass:: skycatalogs.objects.base_object.BaseObject + :members: + + .. automethod:: skycatalogs.objects.base_object.BaseObject.id + .. automethod:: skycatalogs.objects.base_object.BaseObject.ra + .. automethod:: skycatalogs.objects.base_object.BaseObject.dec + .. automethod:: skycatalogs.objects.base_object.BaseObject.object_type + .. automethod:: skycatalogs.objects.base_object.BaseObject.get_native_attribute + .. automethod:: skycatalogs.objects.base_object.get_gsobject_components + .. automethod:: skycatalogs.objects.base_object.get_observer_sed_component + .. automethod:: skycatalogs.objects.base_object.get_observer_sed_components + .. automethod:: skycatalogs.objects.base_object.get_total_observer_sed + .. automethod:: skycatalogs.objects.base_object.get_flux + .. automethod:: skycatalogs.objects.base_object.get_LSST_flux + .. automethod:: skycatalogs.objects.base_object.get_LSST_fluxes + .. automethod:: skycatalogs.objects.base_object.get_roman_flux + .. automethod:: skycatalogs.objects.base_object.get_roman_fluxes + +.. _objectlist_class: + +The ``ObjectList`` class is a container for instances of ``BaseObject``. +It subclasses ``Sequence``. + +.. autoclass:: skycatalogs.objects.base_object.ObjectList From 1d140e75aa3bb0d8e42264169798730c4d8204b0 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Fri, 22 Nov 2024 12:07:49 -0800 Subject: [PATCH 12/18] Fix doc for diffsky galaxies --- docs/ops-rehearsals-3-4/galaxies.rst | 81 ++++++++++++---------------- 1 file changed, 33 insertions(+), 48 deletions(-) diff --git a/docs/ops-rehearsals-3-4/galaxies.rst b/docs/ops-rehearsals-3-4/galaxies.rst index 45a232fc..fcf1cbaa 100644 --- a/docs/ops-rehearsals-3-4/galaxies.rst +++ b/docs/ops-rehearsals-3-4/galaxies.rst @@ -12,54 +12,39 @@ want to iterate over row groups rather than reading it all in at once. Galaxy main file ---------------- -======================== ============ ============== ======================== -Name Datatype Units Description -======================== ============ ============== ======================== -galaxy_id int64 N/A Unique object identifier -ra double degrees Object right ascension -dec double degrees Object declination -redshift double N/A Cosmological redshift - with line-of-sight motion -redshift_hubble double N/A Cosmological redshift -peculiar_velocity double km/sec Peculiar velocity -shear_1 double N/A Shear (gamma) component 1, - treecorr/Galsim convention -shear_2 double N/A Shear (gamma) component 2, - treecorr/Galsim convention -convergence double N/A Convergence (kappa) -size_bulge_true float arcsec Bulge half-light radius - (major axis) not lensed -size_minor_bulge_true float arcsec Bulge half-light radius - (minor axis) not lensed -sersic_bulge float N/A Sersic index of bulge - light profile -size_disk_true float arcsec Disk half-light radius - (major axis) not lensed -size_disk_bulge_true float arcsec Disk half-light radius - (minor axis) not lensed -sersic_disk float N/A Sersic index of disk - light profile -ellipticity_1_disk_true double N/A Ellipticity component 1 - for disk, not lensed -ellipticity_2_disk_true double N/A Ellipticity component 2 - for disk, not lensed -ellipticity_1_bulge_true double N/A Ellipticity component 1 - for bulge, not lensed -ellipticity_2_bulge_true double N/A Ellipticity component 2 - for bulge, not lensed -sed_val_bulge list(double) 4.4659e13 W/Hz Integrated rest-frame AB - luminosities for tophat - filters (bulge component) -sed_val_disk list(double) 4.4659e13 W/Hz Like sed_val_bulge -bulge_magnorm double N/A Normalization for SED -disk_magnorm double N/A Normalization for SED -MW_rv float N/A Extinction parameter -MW_av float N/A Extinction parameter - from F19 dust map -sed_val_knots list(double) 4.4659e13 W/Hz Like sed_val_bulge -n_knots float N/A Number of knots -knots_magnorm double N/A Normalization for SED -======================== ============ ============== ======================== +============================= ============ ============== ======================== +Name Datatype Units Description +============================= ============ ============== ======================== +galaxy_id int64 N/A Unique object identifier +ra double degrees Object right ascension +dec double degrees Object declination +redshift double N/A Cosmological redshift + with line-of-sight motion +redshiftHubble double N/A Cosmological redshift +peculiarVelocity double km/sec Peculiar velocity +shear1 double N/A Shear (gamma) component 1, + treecorr/Galsim convention +shear2 double N/A Shear (gamma) component 2, + treecorr/Galsim convention +convergence double N/A Convergence (kappa) +spheroidHalfLightRadiusArcsec float arcsec Bulge component half-light + radius +diskHalfLightRadiusArcsec float arcsec Disk component half-light + radius +diskEllipticity1 double N/A Ellipticity component 1 + for disk, not lensed +diskEllipticity2 double N/A Ellipticity component 2 + for disk, not lensed +spheroidEllipticity1 double N/A Ellipticity component 1 + for bulge, not lensed +spheroidEllipticity2 double N/A Ellipticity component 2 + for bulge, not lensed +um_source_galaxy_obs_sm float solar mass stellar mass + (h=0.7) +MW_rv float N/A Extinction parameter +MW_av float N/A Extinction parameter + from F19 dust map +============================= ============ ============== ======================== NOTE: For tophat definitions (start and width in units of angstroms) see yaml config file associated with the data. From 10efd1e1365faec70d64a3d691ddb09f2e0a8340 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Fri, 22 Nov 2024 12:44:06 -0800 Subject: [PATCH 13/18] undo previous changes, intended for a different file --- docs/ops-rehearsals-3-4/galaxies.rst | 81 ++++++++++++++++------------ 1 file changed, 48 insertions(+), 33 deletions(-) diff --git a/docs/ops-rehearsals-3-4/galaxies.rst b/docs/ops-rehearsals-3-4/galaxies.rst index fcf1cbaa..45a232fc 100644 --- a/docs/ops-rehearsals-3-4/galaxies.rst +++ b/docs/ops-rehearsals-3-4/galaxies.rst @@ -12,39 +12,54 @@ want to iterate over row groups rather than reading it all in at once. Galaxy main file ---------------- -============================= ============ ============== ======================== -Name Datatype Units Description -============================= ============ ============== ======================== -galaxy_id int64 N/A Unique object identifier -ra double degrees Object right ascension -dec double degrees Object declination -redshift double N/A Cosmological redshift - with line-of-sight motion -redshiftHubble double N/A Cosmological redshift -peculiarVelocity double km/sec Peculiar velocity -shear1 double N/A Shear (gamma) component 1, - treecorr/Galsim convention -shear2 double N/A Shear (gamma) component 2, - treecorr/Galsim convention -convergence double N/A Convergence (kappa) -spheroidHalfLightRadiusArcsec float arcsec Bulge component half-light - radius -diskHalfLightRadiusArcsec float arcsec Disk component half-light - radius -diskEllipticity1 double N/A Ellipticity component 1 - for disk, not lensed -diskEllipticity2 double N/A Ellipticity component 2 - for disk, not lensed -spheroidEllipticity1 double N/A Ellipticity component 1 - for bulge, not lensed -spheroidEllipticity2 double N/A Ellipticity component 2 - for bulge, not lensed -um_source_galaxy_obs_sm float solar mass stellar mass - (h=0.7) -MW_rv float N/A Extinction parameter -MW_av float N/A Extinction parameter - from F19 dust map -============================= ============ ============== ======================== +======================== ============ ============== ======================== +Name Datatype Units Description +======================== ============ ============== ======================== +galaxy_id int64 N/A Unique object identifier +ra double degrees Object right ascension +dec double degrees Object declination +redshift double N/A Cosmological redshift + with line-of-sight motion +redshift_hubble double N/A Cosmological redshift +peculiar_velocity double km/sec Peculiar velocity +shear_1 double N/A Shear (gamma) component 1, + treecorr/Galsim convention +shear_2 double N/A Shear (gamma) component 2, + treecorr/Galsim convention +convergence double N/A Convergence (kappa) +size_bulge_true float arcsec Bulge half-light radius + (major axis) not lensed +size_minor_bulge_true float arcsec Bulge half-light radius + (minor axis) not lensed +sersic_bulge float N/A Sersic index of bulge + light profile +size_disk_true float arcsec Disk half-light radius + (major axis) not lensed +size_disk_bulge_true float arcsec Disk half-light radius + (minor axis) not lensed +sersic_disk float N/A Sersic index of disk + light profile +ellipticity_1_disk_true double N/A Ellipticity component 1 + for disk, not lensed +ellipticity_2_disk_true double N/A Ellipticity component 2 + for disk, not lensed +ellipticity_1_bulge_true double N/A Ellipticity component 1 + for bulge, not lensed +ellipticity_2_bulge_true double N/A Ellipticity component 2 + for bulge, not lensed +sed_val_bulge list(double) 4.4659e13 W/Hz Integrated rest-frame AB + luminosities for tophat + filters (bulge component) +sed_val_disk list(double) 4.4659e13 W/Hz Like sed_val_bulge +bulge_magnorm double N/A Normalization for SED +disk_magnorm double N/A Normalization for SED +MW_rv float N/A Extinction parameter +MW_av float N/A Extinction parameter + from F19 dust map +sed_val_knots list(double) 4.4659e13 W/Hz Like sed_val_bulge +n_knots float N/A Number of knots +knots_magnorm double N/A Normalization for SED +======================== ============ ============== ======================== NOTE: For tophat definitions (start and width in units of angstroms) see yaml config file associated with the data. From f19b3709759d57df1b6672ec688ca53dd3eb020c Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Fri, 22 Nov 2024 12:45:55 -0800 Subject: [PATCH 14/18] add missing quantity --- docs/roman-rubin-1.1.2/diffsky_galaxy.rst | 60 ++++++++++++----------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/docs/roman-rubin-1.1.2/diffsky_galaxy.rst b/docs/roman-rubin-1.1.2/diffsky_galaxy.rst index eb4360e7..a6a8fdf2 100644 --- a/docs/roman-rubin-1.1.2/diffsky_galaxy.rst +++ b/docs/roman-rubin-1.1.2/diffsky_galaxy.rst @@ -13,35 +13,37 @@ SED files. In all cases is the id of the healpixel covered by the file. Galaxy main file ---------------- -============================= ======== ======= ========================== -Name Datatype Units Description -============================= ======== ======= ========================== -galaxy_id int64 N/A Unique object identifier -ra double degrees Object right ascension -dec double degrees Object declination -redshift double N/A Cosmological redshift - with line-of-sight motion -redshiftHubble double N/A Cosmological redshift -peculiarVelocity double km/sec Peculiar velocity -shear1 double N/A Shear (gamma) component 1, - treecorr/Galsim convention -shear2 double N/A Shear (gamma) component 2, - treecorr/Galsim convention -convergence double N/A Convergence (kappa) -spheroidHalfLightRadiusArcsec float arcsec -diskHalfLisghtRadiusArcsec float arcsec -diskEllipticity1 double N/A Ellipticity component 1 - for disk, not lensed -diskEllipticity2 double N/A Ellipticity component 2 - for disk, not lensed -spheroidEllipticity1 double N/A Ellipticity component 1 - for bulge, not lensed -spheroidEllipticity2 double N/A Ellipticity component 2 - for bulge, not lensed -MW_rv float N/A Extinction parameter -MW_av float N/A Extinction parameter - from F19 dust map -============================= ======== ======= ========================== +============================= ======== ========== ========================== +Name Datatype Units Description +============================= ======== ========== ========================== +galaxy_id int64 N/A Unique object identifier +ra double degrees Object right ascension +dec double degrees Object declination +redshift double N/A Cosmological redshift + with line-of-sight motion +redshiftHubble double N/A Cosmological redshift +peculiarVelocity double km/sec Peculiar velocity +shear1 double N/A Shear (gamma) component 1, + treecorr/Galsim convention +shear2 double N/A Shear (gamma) component 2, + treecorr/Galsim convention +convergence double N/A Convergence (kappa) +spheroidHalfLightRadiusArcsec float arcsec Bulge component half-light +diskHalfLightRadiusArcsec float arcsec Disk component half-light +diskEllipticity1 double N/A Ellipticity component 1 + for disk, not lensed +diskEllipticity2 double N/A Ellipticity component 2 + for disk, not lensed +spheroidEllipticity1 double N/A Ellipticity component 1 + for bulge, not lensed +spheroidEllipticity2 double N/A Ellipticity component 2 + for bulge, not lensed +um_source_galaxy_obs_sm float solar mass stellar mass + (h=0.7) +MW_rv float N/A Extinction parameter +MW_av float N/A Extinction parameter + from F19 dust map +============================= ======== ========== ========================== From 879f9ad9257b3ca7a50f716a422265d2aca9a6ef Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Fri, 22 Nov 2024 12:57:15 -0800 Subject: [PATCH 15/18] cosmetic changes to descriptions --- docs/roman-rubin-1.1.2/diffsky_galaxy.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/roman-rubin-1.1.2/diffsky_galaxy.rst b/docs/roman-rubin-1.1.2/diffsky_galaxy.rst index a6a8fdf2..b4ad8537 100644 --- a/docs/roman-rubin-1.1.2/diffsky_galaxy.rst +++ b/docs/roman-rubin-1.1.2/diffsky_galaxy.rst @@ -29,7 +29,9 @@ shear2 double N/A Shear (gamma) component 2, treecorr/Galsim convention convergence double N/A Convergence (kappa) spheroidHalfLightRadiusArcsec float arcsec Bulge component half-light + radius diskHalfLightRadiusArcsec float arcsec Disk component half-light + radius diskEllipticity1 double N/A Ellipticity component 1 for disk, not lensed diskEllipticity2 double N/A Ellipticity component 2 @@ -38,7 +40,7 @@ spheroidEllipticity1 double N/A Ellipticity component 1 for bulge, not lensed spheroidEllipticity2 double N/A Ellipticity component 2 for bulge, not lensed -um_source_galaxy_obs_sm float solar mass stellar mass +um_source_galaxy_obs_sm float solar mass Stellar mass (h=0.7) MW_rv float N/A Extinction parameter MW_av float N/A Extinction parameter From 5584fa08fce2b4b327e487bbb12c607feb79de1c Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Mon, 2 Dec 2024 13:50:13 -0800 Subject: [PATCH 16/18] README - link to more comprehensive doc docs/index.rst - fix typo docs/ops-rehearsals-3-4/SSO.rst - Define "SSO" --- README.md | 7 +++++-- docs/index.rst | 2 +- docs/ops-rehearsals-3-4/SSO.rst | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1cd6f990..517de24a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,14 @@ # The skyCatalogs package -This package will contain +This package contains * code to create sky catalogs from input like cosmoDC2 (for galaxies) and similar catalogs for other source types -* implement an API to access information in the catalogs and products, such as flux calculations, derived from the catalogs +* an API to access information in the catalogs and products, such as flux calculations, derived from the catalogs Sky Catalogs are chiefly intended for use by simulation programs. The physical representation is meant to compactly represent information needed to compute fluxes at a given time, under specified conditions (e.g. band). +For more complete information on installation and use see +[https://lsstdesc.org/skyCatalogs/](https://lsstdesc.org/skyCatalogs/) + ## Set-up and testing From bash ``` diff --git a/docs/index.rst b/docs/index.rst index 31795312..6d0fc6b6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -37,7 +37,7 @@ https://github.com/LSSTDESC/skyCatalogs. :caption: Reference: :hidden: - reeference_python + reference_python .. toctree:: :maxdepth: 2 diff --git a/docs/ops-rehearsals-3-4/SSO.rst b/docs/ops-rehearsals-3-4/SSO.rst index 8b0db513..fbc82461 100644 --- a/docs/ops-rehearsals-3-4/SSO.rst +++ b/docs/ops-rehearsals-3-4/SSO.rst @@ -1,6 +1,6 @@ -+++++++++++++++++++++++++++++++++++++++++ -SSO quantities for ops-rehearsals 3 and 4 -+++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Solar System Object (SSO) quantities for ops-rehearsals 3 and 4 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Data are partitioned by (nside=32, ring ordering) healpixel. For each pixel there is a so-called "main file" and a flux file. The latter contains for each object only fluxes for lsst bands, the object id and the time (mjd) From 1459b4261923fa57cbda6707b6d629bc642a040a Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Mon, 2 Dec 2024 14:05:33 -0800 Subject: [PATCH 17/18] fix typo --- docs/reference_python.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference_python.rst b/docs/reference_python.rst index f9984824..934a858a 100644 --- a/docs/reference_python.rst +++ b/docs/reference_python.rst @@ -2,7 +2,7 @@ The ``skyCatalogs`` package =========================== -Reference documentation for core objects with the ``sktyCatalogs`` package +Reference documentation for core objects with the ``skyCatalogs`` package .. _skyCatalog_class: From ec938e617a0388ea451e69b0d15861760060cee1 Mon Sep 17 00:00:00 2001 From: Joanne Bogart Date: Mon, 2 Dec 2024 14:35:13 -0800 Subject: [PATCH 18/18] update documentation workflow to use main branch --- .github/workflows/documentation.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 355cf83e..c12b1408 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -8,6 +8,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 + with: + python-version: "3.12" - name: Install dependencies run: | python -m pip install --upgrade pip @@ -18,8 +20,8 @@ jobs: sphinx-build docs _build - name: Deploy uses: peaceiris/actions-gh-pages@v3 - # if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/skycat_doc2' }} - if: ${{ github.ref == 'refs/heads/skycat_doc2' }} + if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }} + # if: ${{ github.ref == 'refs/heads/skycat_doc2' }} with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }}