dwfpy.analog_recorder.AnalogRecorder

class AnalogRecorder(module)[source]

Bases: object

Recorder for Analog Input data

Methods

process

Checks the instrument status and processes a chunk of data if available.

record

Starts the recording and processes all samples until the recording is complete.

Attributes

channels

Gets a collection of data channels.

corrupted_samples

Gets the number of corrupted samples.

lost_samples

Gets the number of lost samples.

requested_samples

Gets the number of requested samples for recording.

status

Gets the last acquisition status.

total_samples

Gets the total number of acquired and lost samples.

class ChannelData[source]

Bases: object

Represents the acquired data of a channel.

property data_samples: tuple

Gets the acquired data samples.

Return type

tuple

property channels: Tuple[ChannelData, ...]

Gets a collection of data channels.

Return type

Tuple[ChannelData, ...]

property corrupted_samples: int

Gets the number of corrupted samples.

Return type

int

property lost_samples: int

Gets the number of lost samples.

Return type

int

process()[source]

Checks the instrument status and processes a chunk of data if available.

bool

If True, then if there is more data to process, and the function must be called again. If False, the recording is complete, and you must stop calling this function.

This function must be called repeatedly by the user to process the recording data. Failure to call this function in a timely manner will cause samples to get lost or corrupted.

Return type

bool

record(callback=None)[source]

Starts the recording and processes all samples until the recording is complete.

callbackfunction

A user-defined function that is called every time a data chunk is processed. Return True to continue recording, False to abort the recording.

This function blocks until the recording is complete.

Return type

None

property requested_samples: int

Gets the number of requested samples for recording.

Return type

int

property status: Status

Gets the last acquisition status.

Return type

Status

property total_samples: int

Gets the total number of acquired and lost samples.

Return type

int