RSK¶
- class pyrsktools.RSK(fname: str, readHiddenChannels: bool = False)¶
The class used to interact with an RSK dataset produced by Ruskin.
- Parameters:
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:
- deployment¶
Deployment header information. Defaults to None.
- Type:
- 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]
- 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]
- 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:
- calibrations¶
Instrument calibration information. Defaults to [].
- Type:
List[Calibration]
- parameterKeys¶
Keys relating to
RSK.parameters. Defaults to [].- Type:
List[ParameterKey]
- appSettings¶
Metadata about the current dataset. Defaults to [].
- Type:
List[AppSetting]
- 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 intoRSK.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 byRSK.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 intoRSK.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()