Signal

public class Signal extends PythonAdapter

Class mimicking the CDBSignal Python class. In a few aspects, it is more object-oriented and lazy-evaluated to simplify manipulation in MATLAB/IDL.

Author:pipek

Constructors

Signal

public Signal(SignalReference signalRef, String units)

Signal

protected Signal(Signal parent, int nthChild, PythonAdapter signalTree, DictionaryAdapter unitFactorTree)

Constructor for dependent objects from signal tree with unit factor.

Parameters:
  • parent – Signal that uses this as an axis.
  • nthChild – The order of this signal among axes in the parent signal.
  • signalTree – Signal subtree.
  • unitFactorTree – Unit factor subtree.

Signal

protected Signal(Signal parent, int nthChild, PythonAdapter signalTree, String units)

Constructor for dependent objects from signal tree without unit factor.

Parameters:
  • parent – Signal that uses this as an axis.
  • nthChild – The order of this signal among axes in the parent signal.
  • signalTree – Signal subtree.
  • units – Most times, this will be “default”, but any other value can used.

Methods

getAxes

public SortedMap<String, Signal> getAxes()

A map of all existing axes.

Throws:
Returns:

A dictionary of [ axis_name, Signal object ] values.

getAxis

public Signal getAxis(int i)

An axis as Signal instance.

Parameters:
  • i – 0-time axis, N-axisN
Throws:
Returns:

null if not found

getData

public synchronized Data getData()

Numerical data of the signal. Note: this method is not used in bindings using JyCDB (IDL/MATLAB) due to efficiency. Try using native implementations of file reading.

getDataFile

public DataFile getDataFile()

getDataFileId

public long getDataFileId()

getDescription

public String getDescription()

Generic signal description.

getGenericSignal

public GenericSignal getGenericSignal()

getGenericSignalId

public long getGenericSignalId()

getGenericSignalReference

public GenericSignal getGenericSignalReference()

getName

public String getName()

Generic signal name.

getParameters

public SignalParameters getParameters()

getPythonObject

public PyObject getPythonObject()

Return the Python object of CDBSignal class.

Returns:null if CDBSignal not found. Note: This method catches exceptions thus hiding problems.

getRecordNumber

public long getRecordNumber()

getSignalCalibration

public SignalCalibration getSignalCalibration(boolean includeUnitFactor)

Signal calibration for default/DAV/RAW.

Throws:

getSignalReference

public SignalReference getSignalReference()

getTimeAxis

public Signal getTimeAxis()

Time axis as Signal instance. Just shortcut to getAxis method.

getUnit

public String getUnit()

Unit name.

Throws:
  • CDBException – RAW/DAQ/default GS units or units from factor tree (if requested).

getUnitFactor

public double getUnitFactor()

Unit factor, by which the default signal has to be multiplied.

Throws:
  • CDBException – If DAV/RAW/default are selected, this factor is 1.0. If another unit/unit system is selected, this is a conversion from the default unit to the selected one. Internally, this reflects unit_factor_tree returned from Python.

hasUnitFactor

public boolean hasUnitFactor()

Whether the signal has associated unit factor tree. This is true only if unit or unit system were requested.

isDAV

public boolean isDAV()

isFile

public boolean isFile()

isLinear

public boolean isLinear()

isRaw

public boolean isRaw()