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

schedules

List-like container of instrument schedule information for all schedules. Supports both integer indexing (e.g., schedules[0]) and label lookup (e.g., schedules["s.CTD"]). Defaults to [].

Type:

ScheduleList[Schedule]

schedule

Alias for schedules[0]. The first schedule.

Type:

Schedule

scheduleInfos

List-like container of schedule info for all schedules. Supports both integer indexing and label lookup. Defaults to [].

Type:

ScheduleInfoList[ScheduleInfo]

scheduleInfo

Alias for scheduleInfos[0]. The first schedule info.

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]

dataArrays

List-like container of structured NumPy arrays, one per schedule. Supports both integer indexing (e.g., dataArrays[0]) and label lookup (e.g., dataArrays["s.CTD"]). Populated by RSK.readdata. Defaults to [].

Type:

DataArrayList[npt.NDArray]

data

Alias for dataArrays[0]. The data for the first schedule.

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

Utility methods:

dataFetcher

A method that returns the data array for the specified schedule number. For example, data from schedule 1 can be retrieved with RSK.dataFetcher(1).

Type:

Callable

Example

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