diff --git a/docs/sphinx/api.rst b/docs/sphinx/api.rst index 570b6b8..d6cc09a 100644 --- a/docs/sphinx/api.rst +++ b/docs/sphinx/api.rst @@ -9,15 +9,31 @@ API Targeting Flags --------------- -.. automodule:: sdss_semaphore.targeting +The `TargetingFlags` class is relevant to SDSS carton-to-bit version 1 (`SDSSC2BV`). + +.. autoclass:: sdss_semaphore.targeting.TargetingFlags :members: + :inherited-members: :exclude-members: mapping, dtype - :inherited-members: :show-inheritance: +Base Targeting Flags +-------------------- + +The `BaseTargetingFlags` class provides utilities for targeting flags which do not depend on a specific version of the SDSS carton-to-bit mapping. + +.. autoclass:: sdss_semaphore.targeting.BaseTargetingFlags + :members: + :inherited-members: + :show-inheritance: + + Base Flags ---------- -.. automodule:: sdss_semaphore +The `BaseFlags` class provides functionality for any kind of flagging system, irrespective of the bit-attribute mapping. + +.. autoclass:: sdss_semaphore.BaseFlags :members: :show-inheritance: + diff --git a/notebooks/20231011_sdss5_targeting.ipynb b/notebooks/20231011_sdss5_targeting.ipynb index af3289f..c273049 100644 --- a/notebooks/20231011_sdss5_targeting.ipynb +++ b/notebooks/20231011_sdss5_targeting.ipynb @@ -15,9 +15,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You will need the `sdss_semaphore` package (version ``0.2.0``) to easily interpret the SDSS flags. You can install it with:\n", + "You will need the `sdss_semaphore` package (version ``0.2.2``) to easily interpret the SDSS flags. You can install it with:\n", "\n", - "```pip install sdss-semaphore==0.2.0```\n" + "```pip install sdss-semaphore==0.2.2```\n" ] }, { diff --git a/python/sdss_semaphore/__init__.py b/python/sdss_semaphore/__init__.py index 14cd318..de29c5f 100644 --- a/python/sdss_semaphore/__init__.py +++ b/python/sdss_semaphore/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.2.1" +__version__ = "0.2.2" import numpy as np import warnings diff --git a/python/sdss_semaphore/targeting.py b/python/sdss_semaphore/targeting.py index 2f3c06f..b1fbfee 100644 --- a/python/sdss_semaphore/targeting.py +++ b/python/sdss_semaphore/targeting.py @@ -2,9 +2,10 @@ from typing import Tuple from sdss_semaphore import BaseFlags -class TargetingFlags(BaseFlags): - """Communicating SDSS-V targeting information with flags.""" +class BaseTargetingFlags(BaseFlags): + + """A base class for communicating SDSS-V targeting information with flags.""" @property def all_mappers(self) -> Tuple[str]: @@ -103,6 +104,10 @@ def count(self, skip_empty: bool = False) -> dict: ) +class TargetingFlags(BaseTargetingFlags): + + """Communicating with SDSS-V targeting flags.""" + dtype, n_bits = (np.uint8, 8) meta = { "SDSSC2BV": 1.0 } mapping = { diff --git a/setup.cfg b/setup.cfg index c72a36d..9b26817 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = sdss_semaphore -version = 0.2.0 +version = 0.2.2 author = Andy Casey author_email = andrew.casey@monash.edu description = Fun with SDSS flags