Skip to content

Commit

Permalink
update docs for 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
andycasey committed Oct 11, 2023
1 parent 6aa92c8 commit 482b53d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
22 changes: 19 additions & 3 deletions docs/sphinx/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

4 changes: 2 additions & 2 deletions notebooks/20231011_sdss5_targeting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion python/sdss_semaphore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.2.1"
__version__ = "0.2.2"

import numpy as np
import warnings
Expand Down
9 changes: 7 additions & 2 deletions python/sdss_semaphore/targeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = sdss_semaphore
version = 0.2.0
version = 0.2.2
author = Andy Casey
author_email = [email protected]
description = Fun with SDSS flags
Expand Down

0 comments on commit 482b53d

Please sign in to comment.