Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #68 from sot/discontinue-package
Browse files Browse the repository at this point in the history
Discontinue support for chandra_cmd_states
  • Loading branch information
taldcroft authored Dec 6, 2023
2 parents 89e1c47 + 6ba4a50 commit efd4c94
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
19 changes: 19 additions & 0 deletions chandra_cmd_states/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import warnings

message_warn = (
"\n"
"The chandra_cmd_states package is no longer supported and is replaced\n"
"by kadi.commands.states. Please update your code accordingly.\n"
)
message_error = (
"\n"
"To temporarily continue using this package set the environment variable\n"
"SKA_ALLOW_DISCONTINUED_PACKAGES=1"
)

if os.environ.get("SKA_ALLOW_DISCONTINUED_PACKAGES") == "1":
warnings.warn(message_warn, FutureWarning)
else:
raise RuntimeError(message_warn + message_error)

import ska_helpers
from .cmd_states import *
from .get_cmd_states import fetch_states
Expand Down
18 changes: 5 additions & 13 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
Chandra commanded states database
==================================

.. Warning:: the commanded states database and package described here is
**discontinued and no longer supported**. Instead use the
`Kadi commands and states
package <http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/commands_states.html>`_.

This suite of tools provides the interface for creation and maintenance of the
Chandra commanded states database. This database provides the commanded state
of Chandra from 2002 through to the end of all approved command loads that are
ingested to the OFLS database. The database thus contains both the definitive
state and a predictive state at any time.

.. Warning:: Use of the commanded states database described here is deprecated
in favor of the `Kadi commands and states
package <http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/commands_states.html>`_.
The replacement for the :func:`~chandra_cmd_states.fetch_states` function is described
in the `Chandra states and continuity
<http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/commands_states.html#states>`_
section which makes use of the `get_states
<http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/api.html#kadi.commands.states.get_states>`_
function.

The commanded states database is still being maintained, but no new development
is expected.

A commanded state is an interval of time over which certain parameters of
interest (obsid, SIM-Z position, commanded attitude, ACIS power configuration,
etc) are invariant. This database is useful for several reasons:
Expand Down

0 comments on commit efd4c94

Please sign in to comment.