edb

engineering_database.py

Module for dealing with JWST DMS Engineering Database mnemonics.

This module provides jwql with convenience classes and functions to retrieve and manipulate mnemonics from the JWST DMS EDB. It uses the edb_interface module to interface the EDB directly.

Authors

  • Johannes Sahlmann

Use

This module can be imported and used with

from jwql.edb.engineering_database import get_mnemonic
get_mnemonic(mnemonic_identifier, start_time, end_time)

Required arguments:

mnemonic_identifier - String representation of a mnemonic name. start_time - astropy.time.Time instance end_time - astropy.time.Time instance

Notes

There are three possibilities for MAST authentication:

1. A valid MAST authentication token is present in the local jwql configuration file (config.json). 2. The MAST_API_TOKEN environment variable is set to a valid MAST authentication token. 3. The user has logged into the jwql web app, in which case they are authenticated via auth.mast.

When querying mnemonic values, the underlying MAST service returns data that include the datapoint preceding the requested start time and the datapoint that follows the requested end time.

class jwql.edb.engineering_database.EdbMnemonic(mnemonic_identifier, start_time, end_time, data, meta, info)[source]

Class to hold and manipulate results of DMS EngDB queries.

bokeh_plot()[source]

Make basic bokeh plot showing value as a function of time.

Returns:
[div, script]list

List containing the div and js representations of figure.

interpolate(times, **kwargs)[source]

Interpolate value at specified times.

jwql.edb.engineering_database.get_mnemonic(mnemonic_identifier, start_time, end_time)[source]

Execute query and return a EdbMnemonic instance.

The underlying MAST service returns data that include the datapoint preceding the requested start time and the datapoint that follows the requested end time.

Parameters:
mnemonic_identifierstr

Telemetry mnemonic identifiers, e.g. ‘SA_ZFGOUTFOV’

start_timeastropy.time.Time instance

Start time

end_timeastropy.time.Time instance

End time

Returns:
mnemonicinstance of EdbMnemonic

EdbMnemonic object containing query results

jwql.edb.engineering_database.get_mnemonic_info(mnemonic_identifier)[source]

Return the mnemonic description.

Parameters:
mnemonic_identifierstr

Telemetry mnemonic identifier, e.g. SA_ZFGOUTFOV

Returns:
infodict

Object that contains the returned data

jwql.edb.engineering_database.get_mnemonics(mnemonics, start_time, end_time)[source]

Query DMS EDB with a list of mnemonics and a time interval.

Parameters:
mnemonicslist or numpy.ndarray

Telemetry mnemonic identifiers, e.g. [‘SA_ZFGOUTFOV’, ‘IMIR_HK_ICE_SEC_VOLT4’]

start_timeastropy.time.Time instance

Start time

end_timeastropy.time.Time instance

End time

Returns:
mnemonic_dictdict

Dictionary. keys are the queried mnemonics, values are instances of EdbMnemonic