CpEfdClient

class lsst.cp.pipe.CpEfdClient(efdInstance='usdf_efd', log=None)

Bases: object

An EFD client to retrieve calibration results.

Parameters:
efdInstancestr, optional

EFD instance name to connect to.

loglogging.Logger, optional

Log to write messages to.

Methods Summary

getEfdMonochromatorData([dataSeries, ...])

Retrieve Electrometer data from the EFD.

getSchemaDtype(topicName)

Get datatypes for a topic.

parseMonochromatorStatus(data, dateStr)

Determine monochromator status for a specific date.

query(query)

Execute an EFD query.

selectTimeSeries(topicName[, fields, ...])

Query a topic for a time series.

Methods Documentation

getEfdMonochromatorData(dataSeries=None, dateMin=None, dateMax=None)

Retrieve Electrometer data from the EFD.

Parameters:
dataSeriesstr, optional

Data series to request from the EFD.

dateMinstr, optional

Minimum date to retrieve from EFD.

dateMaxstr, optional

Maximum date to retrieve from EFD.

Returns:
resultspandas.DataFrame

The table of results returned from the EFD.

getSchemaDtype(topicName)

Get datatypes for a topic.

Parameters:
topicNamestr

Topic to get datatypes for

Returns:
datatypeslist [tuple [str, str]]

List of tuples of field names and data types.

parseMonochromatorStatus(data, dateStr)

Determine monochromator status for a specific date.

Parameters:
dataastropy.table.Table

The dataframe of monochromator results from the EFD.

dateStrstr

The date to look up in the status for.

Returns:
indexDatestr

Date string indicating the monochromator state change.

wavelengthfloat

Monochromator commanded peak.

query(query)

Execute an EFD query.

Parameters:
querystr

Query to run.

Returns:
resultsdict

Dictionary of results returned.

Raises:
RuntimeError

Raised if the the database could not be read from.

selectTimeSeries(topicName, fields=[], startDate=None, endDate=None)

Query a topic for a time series.

Parameters:
topicNamestr

Database “topic” to query.

fieldslist, optional

List of fields to return. If empty, all fields are returned.

startDateastropy.time.Time, optional

Start date (in UTC) to limit the results returned.

endDateastropy.time.Time, optional

End date (in UTC) to limit the results returned.

Returns:
tableastropy.table.Table

A table containing the fields requested, with each row corresponding to one date (available in the "time" column).