RSK

class pyrsktools.RSK(fname: str, readHiddenChannels: bool = False)

The class used to interact with an RSK dataset produced by Ruskin.

Parameters:
  • fname (str) – file name of the RSK dataset.

  • readHiddenChannels (bool, optional) – read hidden channels when set as True. Defaults to False.

Internal state attributes:

filename

File name of the RSK dataset.

Type:

str

version

The current pyRSKtools version.

Type:

str

logs

A dictionary for holding logs of the major actions/methods conducted/invoked during the lifetime of the current RSK instance. The key of each element is the time the log was generated, while the value is the log entry itself. Defaults to {}.

Type:

Dict[np.datetime64, str]

Informational attributes:

dbInfo

Information about the opened dataset, e.g., version and type. Defaults to None.

Type:

DbInfo

instrument

Instrument of the dataset. Defaults to None.

Type:

Instrument

deployment

Deployment header information. Defaults to None.

Type:

Deployment

channels

A list of instrument channels. Defaults to [].

Type:

List[Channel]

diagnosticsChannels

Diagnostics channel name and unit information. Defaults to [].

Type:

List[DiagnosticsChannels]

diagnosticsData

Diagnostics information containing battery and time synchronization. Defaults to [].

Type:

List[DiagnosticsData]

epoch

The dataset epoch times. Defaults to None.

Type:

Epoch

schedule

Instrument schedule information. Defaults to None.

Type:

Schedule

scheduleInfo

Information relating to the instrument schedule, changes depending on the mode field of RSK.schedule. Defaults to None.

Type:

ScheduleInfo

power

Power information of the current deployment. Defaults to [].

Type:

List[Power]

calibrations

Instrument calibration information. Defaults to [].

Type:

List[Calibration]

parameters

Parameter header. Defaults to [].

Type:

List[Parameter]

parameterKeys

Keys relating to RSK.parameters. Defaults to [].

Type:

List[ParameterKey]

appSettings

Metadata about the current dataset. Defaults to [].

Type:

List[AppSetting]

ranging

Instrument range/gain information. Defaults to [].

Type:

List[Range]

instrumentSensors

Instrument sensor information. Defaults to [].

Type:

List[InstrumentSensor]

instrumentChannels

Instrument channel order and status information. Defaults to [].

Type:

List[InstrumentChannel]

regions

Dataset regions. Note, this field is an immutable tuple, please see RSK.removecasts() to remove cast type regions. Defaults to ().

Type:

Tuple[Region]

Computational attributes:

channelNames

The channel names of RSK.data, excluding “timestamp”, used to index into RSK.data.

Type:

List[str]

data

A structured NumPY array containing sample data of the current dataset. Populated by RSK.readdata. Defaults to [].

Type:

npt.NDArray

processedChannelNames

The channel names of RSK.processedData, excluding “timestamp”, used to index into RSK.processedData.

Type:

List[str]

processedData

A structured NumPY array containing processed sample data of the current dataset. Populated by RSK.readprocesseddata. Defaults to [].

Type:

npt.NDArray

Example

>>> with RSK("/path/to/data.rsk") as rsk:
...     # Read, process, view, or export data here
...     rsk.readdata()