Skip to content

Commit

Permalink
Fix links or punt on links that are not stable
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Jan 22, 2025
1 parent 6a3b336 commit 7cad961
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 33 deletions.
53 changes: 24 additions & 29 deletions docs/archived_topics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fetching and using telemetry data into a single function call. This includes:
either full-resolution, 5-minute, or daily data.
- Filter out bad or missing data.
- Interpolate (resample) all MSID values to a common uniformly-spaced time sequence.
- Remove or select time intervals corresponding to specified Kadi event types.
- Remove or select time intervals corresponding to specified |kadi| event types.
- Change the time format from CXC seconds (seconds since 1998.0) to something more
convenient like GRETA time.
- Write the MSID telemetry data to a zip file.
Expand Down Expand Up @@ -90,9 +90,9 @@ remove_events Remove kadi events expression (default=None)
select_events Select kadi events expression (default=None)
============== ======================================================

These arguments allow you to select or remove intervals in the data using the `Kadi event
definitions <http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/#event-definitions>`_.
For instance we can select times of stable NPM dwells during radiation zones::
These arguments allow you to select or remove intervals in the data using the |kadi|
event definitions. For instance we can select times of stable NPM dwells during
radiation zones::

>>> dat = get_telem(['aoatter1', 'aoatter2', 'aoatter3'],
start='2014:001', stop='2014:010', interpolate_dt=32.8,
Expand All @@ -101,8 +101,7 @@ For instance we can select times of stable NPM dwells during radiation zones::
The order of processing is to first remove event intervals, then select event intervals.

The expression for ``remove_events`` or ``select_events`` can be any logical expression
involving Kadi query names (see the `event definitions table
<http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/#event-definitions>`_). The
involving |kadi| event query names. The
following string would be valid: ``'dsn_comms | (dwells[pad=-300] & ~eclipses)'``, and for
``select_events`` this would imply selecting telemetry which is either during a DSN pass
or (within a NPM dwell and not during an eclipse). The ``[pad=-300]`` qualifier means
Expand Down Expand Up @@ -168,7 +167,7 @@ fetching and using telemetry data:
either full-resolution, 5-minute, or daily data.
- Filter out bad or missing data.
- Interpolate (resample) all MSID values to a common uniformly-spaced time sequence.
- Remove or select time intervals corresponding to specified Kadi event types.
- Remove or select time intervals corresponding to specified |kadi| event types.
- Change the time format from CXC seconds (seconds since 1998.0) to something more
convenient like GRETA time.
- Write the MSID telemetry data to a zip file.
Expand All @@ -180,16 +179,15 @@ optional.
Getting started
----------------

The very first thing is to get set up to use the Ska environment following the
instructions in the `Ska Analysis Tutorial <tutorial.html#configure>`_. Assuming that is
done, then you need to enter the Ska environment using the ``ska`` (or ``skatest``)
alias::
The very first thing is to `get set up to use the Ska environment
<https://github.com/sot/skare3/wiki/Ska-Overview#how-to-use-ska>`_. Assuming that is
done, then you need to enter the Ska environment using the ``ska3`` alias::

% ska
$ ska3

(In case you don't use linux frequently, the ``%`` is meant to represent the command
prompt, so don't type that). After doing ``ska`` you should see your prompt change to
include a ``ska-`` prefix.
(In case you don't use linux frequently, the ``$`` is meant to represent the command
prompt, so don't type that). After doing ``ska3`` you should see your prompt change to
include a ``ska3-`` prefix.

Getting help
^^^^^^^^^^^^^
Expand Down Expand Up @@ -384,9 +382,9 @@ Argument Description
--select_events Select kadi events expression (default=None)
================ ======================================================

These arguments allow you to select or remove intervals in the data using the `Kadi event
definitions <http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/#event-definitions>`_.
For instance we can select times of stable NPM dwells during radiation zones::
These arguments allow you to select or remove intervals in the data using the |kadi|
event definitions. For instance we can select times of stable NPM dwells during
radiation zones::

% ska_fetch AOATTER1 AOATTER2 AOATTER3 --start=2014:001 --stop=2014:010 \
select_events='dwells & rad_zones'
Expand All @@ -397,14 +395,13 @@ by the shell.

The order of processing is to first remove event intervals, then select event intervals.

The expression for ``--remove_events`` or ``--select_events`` can be any logical expression
involving Kadi query names (see the `event definitions table
<http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/#event-definitions>`_). The
following string would be valid: ``'dsn_comms | (dwells[pad=-300] & ~eclipses)'``, and for
``select_events`` this would imply selecting telemetry which is either during a DSN pass
or (within a NPM dwell and not during an eclipse). The ``[pad=-300]`` qualifier means
that a buffer of 300 seconds is applied on each edge to provide padding from the maneuver.
A positive padding expands the event intervals while negative contracts the intervals.
The expression for ``--remove_events`` or ``--select_events`` can be any logical
expression involving |kadi| event query names. The following string would be valid:
``'dsn_comms | (dwells[pad=-300] & ~eclipses)'``, and for ``select_events`` this would
imply selecting telemetry which is either during a DSN pass or (within a NPM dwell and
not during an eclipse). The ``[pad=-300]`` qualifier means that a buffer of 300 seconds
is applied on each edge to provide padding from the maneuver. A positive padding expands
the event intervals while negative contracts the intervals.

Another example of practical interest is using the LTT bad times event to remove bad times
for long-term trending plots by MSID. In this case we get daily IRU-2 temps since 2004,
Expand All @@ -414,9 +411,7 @@ removing known LTT bad times::
--remove-events='ltt_bads[msid="AIRU2BT"]'

Notice the syntax here which indicates selecting all the LTT bad times corresponding
to ``AIRU2BT``. See the
`LTT bad times <http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/kadi/#ltt-bad-times>`_
section for more details.
to ``AIRU2BT``.

Output
^^^^^^^
Expand Down
7 changes: 3 additions & 4 deletions docs/fetch_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@ Using Kadi
^^^^^^^^^^^

Frequently one can handle this with the :func:`~cheta.fetch.MSID.remove_intervals`
:func:`~cheta.fetch.MSID.select_intervals` methods in conjunction with the `kadi event
intervals <https://sot.github.io/kadi/events.html#interval-events>`_
mechanism.
:func:`~cheta.fetch.MSID.select_intervals` methods in conjunction with the |kadi| event
intervals mechanism.

As a simple example, the following code fetches the pitch component of the spacecraft
rate. The samples during maneuvers are then selected and then replotted. This
Expand Down Expand Up @@ -267,7 +266,7 @@ after the end of each maneuver.
Using logical intervals
^^^^^^^^^^^^^^^^^^^^^^^^

For cases where the intervals to be filtered cannot be expressed as Kadi events,
For cases where the intervals to be filtered cannot be expressed as |kadi| events,
the approach is to use the :func:`~cheta.utils.logical_intervals` function
located in the ``cheta.utils`` module. This function creates an intervals
table where each row represents a desired interval and includes a ``datestart`` and
Expand Down
1 change: 1 addition & 0 deletions docs/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.. |fetch_MSIDset| replace:: :func:`~cheta.fetch.MSIDset`
.. |fetch_MSIDset_interpolate| replace:: :func:`~cheta.fetch.MSIDset.interpolate`
.. |get_telem| replace:: :func:`~cheta.fetch.get_telem`
.. |kadi| replace:: `kadi <https://sot.github.io/kadi/>`_

.. _`Main`: index.html
.. _`overview`: index.html
Expand Down

0 comments on commit 7cad961

Please sign in to comment.