Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Jan 19, 2025
1 parent 1ac3a42 commit 38a72e2
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 38 deletions.
63 changes: 32 additions & 31 deletions cheta/derived/mups_valve.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,38 @@
This cleaning technique recovers on average about 90% of data for PM2THV1T. Since
2015, about 60% of telemetry is good (no dropout) while 30% is in a recoverable
fully-dropped state (and 10% is not recoverable).
::
def fetch_clean_msid(msid, start, stop=None, dt_thresh=5.0, median=7, model_spec=None,
version=None):
Fetch a cleaned version of telemetry for ``msid``.
If not supplied the model spec will come from
``xija.get_model_spec.get_xija_model_spec(msid, version=version)``
(which uses ``$SKA/data/chandra_models/chandra_models/xija/mups_valve/{msid}_spec.json``).
This function returns a `fetch.Msid` object like a normal fetch but with extra attributes:
- vals: cleaned telemetry (either original or corrected telemetry, or xija model prediction)
- source: label for each vals data point
- 0: unrecoverable, so use xija model value
- 1: original telemetry
- 2: corrected telemetry
- vals_raw: raw (uncleaned) telemetry
- vals_nan: cleaned telem but with np.nan at points where data are unrecoverable (this is
for plotting)
- vals_corr: telemetry with the MUPS correction applied
- vals_model: xija model prediction
:param start: start time
:param stop: stop time (default=NOW)
:param dt_thresh: tolerance for matching model to data in degF (default=5 degF)
:param median: length of median filter (default=7, use 0 to disable)
:param model_spec: file name or URL containing relevant xija model spec
:param version: version of chandra_models repo (tag, branch, or commit)
:returns: fetch.Msid object
```
def fetch_clean_msid(msid, start, stop=None, dt_thresh=5.0, median=7, model_spec=None,
version=None):
Fetch a cleaned version of telemetry for ``msid``.
If not supplied the model spec will come from
``xija.get_model_spec.get_xija_model_spec(msid, version=version)``
(which uses ``$SKA/data/chandra_models/chandra_models/xija/mups_valve/{msid}_spec.json``).
This function returns a `fetch.Msid` object like a normal fetch but with extra attributes:
- vals: cleaned telemetry (either original or corrected telemetry, or xija model prediction)
- source: label for each vals data point
- 0: unrecoverable, so use xija model value
- 1: original telemetry
- 2: corrected telemetry
- vals_raw: raw (uncleaned) telemetry
- vals_nan: cleaned telem but with np.nan at points where data are unrecoverable (this is
for plotting)
- vals_corr: telemetry with the MUPS correction applied
- vals_model: xija model prediction
:param start: start time
:param stop: stop time (default=NOW)
:param dt_thresh: tolerance for matching model to data in degF (default=5 degF)
:param median: length of median filter (default=7, use 0 to disable)
:param model_spec: file name or URL containing relevant xija model spec
:param version: version of chandra_models repo (tag, branch, or commit)
:returns: fetch.Msid object
```
"""

import os
Expand Down Expand Up @@ -154,6 +154,7 @@ def volts_to_counts(volts):

def get_corr_mups_temp(temp):
"""Calculate a MUPS valve thermistor corrected temperature.
Args:
temp (float, int): Temperature in Fahrenheit to which a correction will be applied.
Expand Down
5 changes: 5 additions & 0 deletions docs/api/comps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ Computed MSIDs

.. automodule:: cheta.derived.comps
:members:

MUPS valve
----------
.. automodule:: cheta.derived.mups_valve
:members:
6 changes: 0 additions & 6 deletions docs/api/derived.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ EPS
.. automodule:: cheta.derived.eps
:members:

MUPS valve
----------

.. automodule:: cheta.derived.mups_valve
:members:

Orbit
-----

Expand Down
2 changes: 1 addition & 1 deletion docs/pseudo_msids.rst
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ Cheta provides support for on-the-fly computed MSIDs with the following features
or application of a function to any other MSID.
* Support for 5-minute and daily stats also included.

See the `Built-in computed MSIDs and API`_ section for a list of the available
See the :ref:`computed-msids` section for a list of the available
computed MSIDs.

See the `DAWG computed MSIDs notebook
Expand Down

0 comments on commit 38a72e2

Please sign in to comment.