Libdpx Wrapper

Description: This module is a wrapper of VPixx low-level library for Python. It provides all functions found in “Libdpx.h”, as well as the error codes “defined”. The first section is the list of all functions available to the user. The second section is the list of all error codes. The last section provides short descriptions for each error codes.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Copyright (C) 2008-2017 VPixx Technologies

_libdpx.DP3DisableTPxAnalogOut()[source]

Disable Analog Out

Low-level C definition:

void DP3DisableTPxAnalogOut(void)

_libdpx.DP3EnableTPxAnalogOut(eye)[source]

Enables Analog Out

eye: Eye to disable (LEFT_EYE : 0, RIGHT_EYE : 1)

Low-level C definition:

void DP3EnableTPxAnalogOut(int eye)

_libdpx.DP3EnableTxVideoPassthru()[source]

Enable the Tx Video Pass through mode on the Datapixx3.

Low-level C definition:

void DP3EnableTxVideoPassthru(int channel)

_libdpx.DP3GetPowerMonitor(powNum)[source]

Get DATAPixx3 Power Monitor.

powNum :

  • DP3_POW_VOLTAGE_0V95: 0

  • DP3_POW_CURRENT_0V95: 1

  • DP3_POW_POWER_0V95: 2

  • DP3_POW_VOLTAGE_1V03: 3

  • DP3_POW_CURRENT_1V03: 4

  • DP3_POW_POWER_1V03: 5

  • DP3_POW_VOLTAGE_1V8: 6

  • DP3_POW_CURRENT_1V8: 7

  • DP3_POW_POWER_1V8: 8

  • DP3_POW_VOLTAGE_5V0: 9

  • DP3_POW_CURRENT_5V0: 10

  • DP3_POW_POWER_5V0: 11

Returns:

Voltage

Return type:

double

Low-level C definition:

double DP3GetPowerMonitor(int powNum)

_libdpx.DP3GetTemperature(tempNum)[source]

Get DATAPixx3 temperature Monitor

tempNum : Temperature type to monitor

  • DP3_TEMP_FPGA:0

  • DP3_TEMP_DP:1

  • DP3_TEMP_FF:2

  • DP3_TEMP_USB:3

  • DP3_TEMP_ADC:4

  • DP3_TEMP_POW_0V95:5

  • DP3_TEMP_POW_1V03:6

  • DP3_TEMP_POW_1V8:7

  • DP3_TEMP_POW_5V0:8

Returns:

temperature

Return type:

double

Low-level C definition:

double DP3GetTemperature(int tempNum)

_libdpx.DP3IsRxVideoBuffer(channel)[source]

“Check if RX Video is buffered

channel : Rx Channel

Returns:

1 if buffered

Low-level C definition:

int DP3IsRxVideoBuffer(int channel)

_libdpx.DP3IsRxVideoLocked(channel)[source]

Check if RX Video is locked

channel : Rx Channel

Returns:

1 if lock

Return type:

int

Low-level C definition:

int DP3IsRxVideoLocked(int channel)

_libdpx.DP3IsTxVideoLocked(channel)[source]

Check if RX Video is locked

channel : Rx Channel

Returns:

1 if lock

Return type:

int

Low-level C definition:

int DP3IsTxVideoLocked(int channel)

_libdpx.DP3IsTxVideoPassthru(channel)[source]

“Check if TX Video is passthru

channel : Rx Channel

Returns:

1 if passthru

Low-level C definition:

int DP3IsTxVideoPassthru(int channel)

_libdpx.DP3SetVidConsoleDisplay(presetDisposition='FULL_STIMULI_HALF_TRACK')[source]

Select a preset video console disposition for the stimulis window and the tracker window. Only available for Datapixx3 Revision 8 and higher.

Parameters:

presetDisposition (str) –

Determins the resolution and disposition of the windows. It can take on one of the following values

  • FULL_STIMULI_HALF_TRACK (0): Tracker window will take half of its full resolution, Stimulis window will take full resolution and will be bound to the bottom right side of the screen.

  • FULL_STIMULI_NO_TRACK (1): Tracker window will be turned off. Stimulis window will take full resolution and will be bound to the bottom right side of the screen.

  • FULL_STIMULI_FULL_TRACK (2): Tracker window will take its full resolution. Stimulis window will take full resolution and will be bound to the bottom right side of the screen.

  • HALF_STIMULI_FULL_TRACK (3): Tracker window will take its full resolution. Stimulis window will take half of its full resolution and will be bound to the bottom right side of the screen.

_libdpx.DPxAutoVidHorizSplit()[source]

Sets the Horizontal Split mode automatically

DATAPixx will automatically split video across the two VGA outputs if the horizontal resolution is at least twice the vertical resolution (default mode).

Low-level C definition:

void DPxAutoVidHorizSplit()

_libdpx.DPxAutoVidVertStereo()[source]

Turns on the automatic mode for Video Vertical Stereo.

Vertical stereo is enabled automatically when vertical resolution > horizontal resolution (default mode)

Low-level C definition:

void DPxAutoVidVertStereo()

_libdpx.DPxClearCustomDevName()[source]

Clear user-specified device name, ignoring whether or not it has been assigned to dpxSysDevsel

Low-level C definition:

void DPxClearCustomDevName()

_libdpx.DPxClearError()[source]

Clear any error on the device.

Low-level C definition:

void DPxClearError()

_libdpx.DPxClose()[source]

Close currently selected VPixx device.

Low-level C definition:

void DPxClose()

_libdpx.DPxDetectDevice(devsel, offset=0)[source]

Verifies if a specific device exists in the system.

Parameters:
  • devsel (string) –

    Any of the predefined constants.

    • DATAPixx: DATAPixx.

    • DATAPixx2: DATAPixx2.

    • VIEWPixx: VIEWPixx.

    • PROPixx Ctrl: PROPixx Controller.

    • PROPixx: PROPixx.

    • TRACKPIXX

  • offset (int) – Offset if more than one device of same type is connected, 0 by default.

Returns:

Non-zero if the device exists, 0 if the device does not exist.

Return type:

int

Low-level C definition:

int DPxDetectDevice(int devsel)

_libdpx.DPxDisableAdcBuffAllChans()[source]

Disables RAM buffering of all ADC channels.

Low-level C definition:

void DPxDisableAdcBuffAllChans()

_libdpx.DPxDisableAdcBuffChan(channel)[source]

Disables RAM buffering of an ADC channel.

This function is only available for channels 0-15.

Parameters:

channel (int) – Channel number.

Low-level C definition:

void DPxDisableAdcBuffChan(int channel)

_libdpx.DPxDisableAdcCalibRaw()[source]

Sets the hardware calibration mode.

Disables ADC “raw” mode, causing normal ADC hardware calibration.

Low-level C definition:

void DPxDisableAdcCalibRaw()

_libdpx.DPxDisableAdcFreeRun()[source]

Disables ADC free-run mode.

ADCs will only convert on schedule ticks, for microsecond-precise sampling.

Low-level C definition:

void DPxDisableAdcFreeRun()

_libdpx.DPxDisableAdcLogTimetags()[source]

Disables ADC timetag mode.

Buffered data has no timetags.

Low-level C definition:

void DPxDisableAdcLogTimetags()

_libdpx.DPxDisableAdcSchedCountdown()[source]

Disables ADC schedule count down.

SchedCount increments at SchedRate, and schedule is stopped by calling SchedStop.

Low-level C definition:

void DPxDisableAdcSchedCountdown()

_libdpx.DPxDisableAudMicLoopback()[source]

Disables loopback between audio outputs and microphone inputs

Low-level C definition:

void DPxDisableAudMicLoopback()

_libdpx.DPxDisableAudSchedCountdown()[source]

Disables AUD schedule countdown.

SchedCount increments at SchedRate, and schedule is stopped by calling SchedStop.

Low-level C definition:

void DPxDisableAudSchedCountdown()

_libdpx.DPxDisableAuxSchedCountdown()[source]

Disables the AUX Schedule Countdown

SchedCount increments at SchedRate, and schedule is stopped by calling Sched

Low-level C definition:

void DPxDisableAuxSchedCountdown()

_libdpx.DPxDisableDacAdcLoopback()[source]

Disables the loopback between ADC and DAC, causes ADC readings to reflect real analog inputs.

Low-level C definition:

void DPxDisableDacAdcLoopback()

_libdpx.DPxDisableDacBuffAllChans()[source]

Disables RAM buffering of all DAC channels.

Low-level C definition:

void DPxDisableDacBuffAllChans()

See also

DPxEnableDacBuffChan, DisableDacBuffChan

_libdpx.DPxDisableDacBuffChan(channel)[source]

Disables RAM buffering of a DAC channel.

Parameters:

channel (int) – Channel number.

Low-level C definition:

void DPxDisableDacBuffChan(int channel)

_libdpx.DPxDisableDacCalibRaw()[source]

Sets the hardware calibration mode.

Disables DAC “raw” mode, causing normal DAC hardware calibration.

Low-level C definition:

void DPxDisableDacCalibRaw()

_libdpx.DPxDisableDacSchedCountdown()[source]

Disables DAC schedule count down.

SchedCount increments at SchedRate, and schedule is stopped by calling SchedStop.

Low-level C definition:

void DPxDisableDacSchedCountdown()

_libdpx.DPxDisableDinDebounce()[source]

Enables the input debounce mode.

Immediately recognize all DIN transitions (after possible stabilization).

Low-level C definition:

void DPxDisableDinDebounce()

_libdpx.DPxDisableDinLogEvents()[source]

Disables log events mode.

Disables automatic logging of DIN transitions. A schedule is required to look at DIN transitions.

Low-level C definition:

void DPxDisableDinLogEvents()

_libdpx.DPxDisableDinLogTimetags()[source]

Disables Din timetag mode.

Buffered data has no timetags.

Low-level C definition:

void DPxDisableDinLogTimetags()

_libdpx.DPxDisableDinSchedCountdown()[source]

Disables Din schedule count down.

SchedCount increments at SchedRate, and schedule is stopped by calling SchedStop.

Low-level C definition:

void DPxDisableDinSchedCountdown()

_libdpx.DPxDisableDinStabilize()[source]

Disables the input stabilization mode.

Immediately recognize all DIN transitions, possibly with debouncing.

Low-level C definition:

void DPxDisableDinStabilize()

_libdpx.DPxDisableDoutBacklightPulse()[source]

Disables the Dout backlight pulse mode.

LCD backlight LEDs are unaffected by DOUT system.

Low-level C definition:

void DPxDisableDoutBacklightPulse()

_libdpx.DPxDisableDoutButtonSchedules()[source]

Disables automatic DOUT schedules upon DIN button presses.

Low-level C definition:

void DPxDisableDoutButtonSchedules()

_libdpx.DPxDisableDoutDinLoopback()[source]

Disables loopback between digital outputs and digital inputs.

Immediately recognize all DIN transitions (after possible stabilization).

Low-level C definition:

void DPxDisableDoutDinLoopback()

_libdpx.DPxDisableDoutPixelMode()[source]

Disables pixel mode.

When this function is called, the digital ouputs do not show the RGB value of first upper left pixel of the screen. The digital outputs can then be used normally. This is the default mode. This feature is only available on VIEWPixx with firmware revision 31 and higher.

Low-level C definition:

void DPxDisableDoutPixelMode()

_libdpx.DPxDisableDoutPixelModeGB()[source]

Disables pixel mode.

When this function is called, the digital ouputs do not show the green and blue components of the RGB value of first upper left pixel of the screen. The digital outputs can then be used normally. This is the default mode.

Note: This feature is only available on VIEWPixx with firmware revision 31 and higher.

Low-level C definition:

void DPxDisableDoutPixelMode()

_libdpx.DPxDisableDoutSchedCountdown()[source]

Disables Dout schedule count down.

SchedCount increments at SchedRate, and schedule is stopped by calling SchedStop.

Low-level C definition:

void DPxDisableDoutSchedCountdown()

_libdpx.DPxDisableGcdShiftHardwareBridge()[source]

PROPixx Controller does not send hardware data to PROPixx for Gaze-Contingent Display shifting

_libdpx.DPxDisableMicSchedCountdown()[source]

Disables MIC schedule count down.

SchedCount increments at SchedRate, and schedule is stopped by calling SchedStop.

Low-level C definition:

void DPxDisableMicSchedCountdown()

_libdpx.DPxDisablePPxCeilingMount()[source]

Disables the PROPixx Ceiling Mount mode.

Low-level C definition:

void DPxDisablePPxCeilingMount(void)

_libdpx.DPxDisablePPxGcdShift()[source]

PROPixx display is not shifted

_libdpx.DPxDisablePPxGcdShiftHardware()[source]

PROPixx Gaze-Contingent Display shift is controlled by software registers

_libdpx.DPxDisablePPxGcdShiftSubframe()[source]

PROPixx Gaze-Contingent Display only modifies shift once per video frame

_libdpx.DPxDisablePPxLampLed()[source]

Disables the lamp LED of the PROPixx.

Note: Only available for PROPixx Revision 12 and higher.

Low-level C definition:

void DPxDisablePPxLampLed(void)

_libdpx.DPxDisablePPxQuietFanMode()[source]

Disables the quiet fan mode on the PROPixx.

Disabling this mode sets the fans to maximum speed, thus increasing the noise produced by them.

Note: Only available for PROPixx Revision 19 and higher.

Low-level C definition:

void DPxDisablePPxQuietFanMode(void)

_libdpx.DPxDisablePPxRearProjection()[source]

Disables the Rear Projection of the PROPixx.

Low-level C definition:

void DPxDisablePPxRearProjection(void)

_libdpx.DPxDisablePPxSwtpLoad()[source]

Stops the loading of the current video input directly into the DRAM to be played back later using the TScope modes.

_libdpx.DPxDisablePPxTScope()[source]

Enable the PROPixx T-Scope subsystem. This will return the PROPixx to normal display of incoming video. Contains an implicit call to RegWrRd.

_libdpx.DPxDisablePPxTScopePrepReq()[source]

Wait for the current video frame to terminate, then load and show cover page of TScope movie. Note that TScope requires a transition from DPxDisablePPxTScopePrepReq to DPxEnablePPxTScopePrepReq.

_libdpx.DPxDisablePPxTScopeQuad()[source]

The entire uploaded image is presented

_libdpx.DPxDisableTouchpixx()[source]

Disables the TOUCHPixx touch panel hardware subsystem.

Low-level C definition:

void DPxDisableTouchpixx()

_libdpx.DPxDisableTouchpixxLogContinuousMode()[source]

Disables Touchpixx continuous logging mode.

TOUCHPixx logging only returns initial press and release events.

Low-level C definition:

void DPxDisableTouchpixxLogContinuousMode()

_libdpx.DPxDisableTouchpixxLogEvents()[source]

Disables log events mode.

Disables automatic logging of Touchpixx transitions. A schedule is needed to log transitions.

Low-level C definition:

void DPxDisableTouchpixxLogEvents()

_libdpx.DPxDisableTouchpixxLogTimetags()[source]

Disables Touchpixx timetag mode.

Buffered data has no timetags.

Low-level C definition:

void DPxDisableTouchpixxLogTimetags()

_libdpx.DPxDisableVidClutTransparencyColorMode()[source]

Disables video CLUT transparency color mode

Low-level C definition:

void DPxDisableVidClutTransparencyColorMode()

_libdpx.DPxDisableVidHorizOverlay()[source]

Disables the Horizontal overlay.

Low-level C definition:

void DPxDisableVidHorizOverlay()

_libdpx.DPxDisableVidHorizSplit()[source]

Disables Video Horizontal Split.

VGA 1 and VGA 2 both show the entire video’s image (hardware video mirroring)/

Low-level C definition:

void DPxDisableVidHorizSplit()

_libdpx.DPxDisableVidLcd3D60Hz()[source]

Returns to normal pixel polarity inversion.

Low-level C definition:

int DPxIsVidLcd3D60Hz(void)

_libdpx.DPxDisableVidPsyncBlankLine()[source]

Disables the PSync Blank Line.

Pixel sync raster line is displayed normally when this is disabled.

Low-level C definition:

void DPxDisableVidPsyncBlankLine()

_libdpx.DPxDisableVidPsyncSingleLine()[source]

Disables Psync for Single (Raster) Line.

Low-level C definition:

void DPxDisableVidPsyncSingleLine()

_libdpx.DPxDisableVidRescanWarning()[source]

Disables VIEWPixx Rescan Warning.

Low-level C definition:

void DPxDisableVidRescanWarning()

_libdpx.DPxDisableVidScanningBacklight()[source]

Disables VIEWPixx scanning backlight.

Low-level C definition:

void DPxDisableVidScanningBacklight()

_libdpx.DPxDisableVidVertStereo()[source]

Disables the Video Vertical Stereo.

A normal display will be in this mode.

Low-level C definition:

void DPxDisableVidVertStereo()

_libdpx.DPxDisableVidVesaBlueline()[source]

Disables the Video blue line mode.

When enabled, the VESA 3D output interprets the middle pixel on last raster line as a blue line code. When disabled, the VESA 3D output is not dependent on video content.

Low-level C definition:

void DPxDisableVidVesaBlueline()

_libdpx.DPxDisableVidVesaFreeRun()[source]

Disables PROPixx 3D VESA output freeRun enable bit

Note

PROPixx Rev >= 7 only.

Low-level C definition:

void DPxDisableVidVesaFreeRun(void)

_libdpx.DPxEnableAdcBuffChan(channel)[source]

Enables RAM buffering of an ADC channel.

This function is only available for channels 0-15.

Parameters:

channel (int) – Channel number.

Low-level C definition:

void DPxEnableAdcBuffChan(int channel)

_libdpx.DPxEnableAdcCalibRaw()[source]

Sets the hardware calibration mode.

Enables ADC “raw” mode, causing ADC data to bypass hardware calibration.

Low-level C definition:

void DPxEnableAdcCalibRaw()

_libdpx.DPxEnableAdcFreeRun()[source]

Sets the ADC in free-run mode, making them convert continuously.

This can add up to 4 microseconds of random latency to scheduled samples.

Low-level C definition:

void DPxEnableAdcFreeRun()

_libdpx.DPxEnableAdcLogTimetags()[source]

Enables ADC timetag mode.

Each buffered ADC sample is preceeded by a 64-bit nanosecond timetag.

Low-level C definition:

void DPxEnableAdcLogTimetags()

_libdpx.DPxEnableAdcSchedCountdown()[source]

Enables ADC schedule count down.

SchedCount decrements at SchedRate, and schedule stops automatically when count hits 0.

Low-level C definition:

void DPxEnableAdcSchedCountdown()

_libdpx.DPxEnableAudMicLoopback()[source]

Enables loopback between audio outputs and microphone inputs

Low-level C definition:

void DPxEnableAudMicLoopback()

_libdpx.DPxEnableAudSchedCountdown()[source]

Enables MIC schedule countdown.

SchedCount increments at SchedRate, and schedule is stopped by calling SchedStop.

Low-level C definition:

void DPxEnableAudSchedCountdown()

_libdpx.DPxEnableAuxSchedCountdown()[source]

Enables the AUX Schedule count down.

SchedCount increments at SchedRate, and schedule is stopped by calling Sched

Low-level C definition:

void DPxEnableAuxSchedCountdown()

_libdpx.DPxEnableCalibReload()[source]

Reload LED, DAC and ADC hardware calibration tables

Low-level C definition:

void DPxEnableCalibReload()

_libdpx.DPxEnableDacAdcLoopback()[source]

Sets the loopback between ADC and DAC mode. ADC data readings are looped back internally from programmed DAC voltages:

  • DAC_DATA0 => ADC_DATA0/2/4/6/8/10/12/14

  • DAC_DATA1 => ADC_DATA1/3/5/7/9/11/13/15

  • DAC_DATA2 => ADC_REF0

  • DAC_DATA3 => ADC_REF1

Low-level C definition:

void DPxEnableDacAdcLoopback()

_libdpx.DPxEnableDacBuffChan(channel)[source]

Enables RAM buffering of a DAC channel.

Parameters:

channel (int) – Channel number.

Low-level C definition:

void DPxEnableDacBuffChan(int channel)

_libdpx.DPxEnableDacCalibRaw()[source]

Sets the hardware calibration mode.

Enables DAC “raw” mode, causing DAC data to bypass hardware calibration.

Low-level C definition:

void DPxEnableDacCalibRaw()

_libdpx.DPxEnableDacSchedCountdown()[source]

Enables DAC schedule count down.

SchedCount decrements at SchedRate, and schedule stops automatically when count hits 0.

Low-level C definition:

void DPxEnableDacSchedCountdown()

_libdpx.DPxEnableDinDebounce()[source]

Enables the input debounce mode.

When a DIN transitions, ignore further DIN transitions for next 30 milliseconds (good for response buttons)

Low-level C definition:

void DPxEnableDinDebounce()

_libdpx.DPxEnableDinLogEvents()[source]

Enables log events mode.

Each DIN transition is automatically logged. No schedule is required. Best way to log response buttons.

Low-level C definition:

void DPxEnableDinLogEvents()

_libdpx.DPxEnableDinLogTimetags()[source]

Enables Din timetag mode.

Each buffered Din sample is preceeded with a 64-bit nanosecond timetag.

Low-level C definition:

void DPxEnableDinLogTimetags()

_libdpx.DPxEnableDinSchedCountdown()[source]

Enables Din schedule count down.

SchedCount decrements at SchedRate, and schedule stops automatically when count hits 0.

Low-level C definition:

void DPxEnableDinSchedCountdown()

_libdpx.DPxEnableDinStabilize()[source]

Enables the input stabilization mode.

Low-level C definition:

void DPxEnableDinStabilize()

_libdpx.DPxEnableDoutBacklightPulse()[source]

Enables the Dout backlight pulse mode.

LCD backlight LED are controlled by DOUT15. Can be used to make a tachistoscope by pulsing DOUT15 with a schedule.

Low-level C definition:

void DPxEnableDoutBacklightPulse()

_libdpx.DPxEnableDoutButtonSchedules()[source]

Enables automatic DOUT schedules upon DIN button presses.

Low-level C definition:

void DPxEnableDoutButtonSchedules()

_libdpx.DPxEnableDoutDinLoopback()[source]

Enables loopback between digital output ports and digital inputs.

Low-level C definition:

void DPxEnableDoutDinLoopback()

_libdpx.DPxEnableDoutPixelMode()[source]

Enables pixel mode.

When this function is enabled, the digital outputs show the RGB value of first upper left pixel of the screen. In which case, digital outputs cannot be used for other purposes. This feature is only available on VIEWPixx with firmware revision 31 and higher.

Low-level C definition:

void DPxEnableDoutPixelMode()

_libdpx.DPxEnableDoutPixelModeGB()[source]

Enables pixel mode.

When this function is called, the digital outputs reflects the green and blue components of the RGB value of first upper left pixel of the screen. In which case, pin 8 onwards of the digital outputs cannot be used for other purposes.

Note: This feature is only available on VIEWPixx with firmware revision 31 and higher.

Low-level C definition:

void DPxEnableDoutPixelMode()

_libdpx.DPxEnableDoutSchedCountdown()[source]

Enables Dout schedule count down.

SchedCount decrements at SchedRate, and schedule stops automatically when count hits 0.

Low-level C definition:

void DPxEnableDoutSchedCountdown()

_libdpx.DPxEnableGcdShiftHardwareBridge()[source]

PROPixx Controller bridges hardware inputs to PROPixx for Gaze-Contingent Display shifting

_libdpx.DPxEnableMicSchedCountdown()[source]

Enables MIC schedule count down.

SchedCount increments at SchedRate, and schedule is stopped by calling SchedStop.

Low-level C definition:

void DPxEnableMicSchedCountdown()

_libdpx.DPxEnablePPxCeilingMount()[source]

Enables the PROPixx Ceiling Mount mode.

Low-level C definition:

void DPxEnablePPxCeilingMount(void)

_libdpx.DPxEnablePPxGcdShift()[source]

PROPixx Gaze-Contingent Display is shifted horizontally and vertically

_libdpx.DPxEnablePPxGcdShiftHardware()[source]

PROPixx Gaze-Contingent Display shift is controlled by hardware

_libdpx.DPxEnablePPxGcdShiftSubframe()[source]

PROPixx Gaze-Contingent Display can modify image shift on every DLP sub-frame

_libdpx.DPxEnablePPxLampLed()[source]

Enables the lamp LED of the PROPixx.

Note: Only available for PROPixx Revision 12 and higher.

Low-level C definition:

void DPxEnablePPxLampLed(void)

_libdpx.DPxEnablePPxQuietFanMode()[source]

Enables the quiet fan mode on the PROPixx.

Enabling this mode reduces the speed of the fans to reduce noise.

Note: Only available for PROPixx Revision 19 and higher.

Low-level C definition:

void DPxEnablePPxQuietFanMode(void)

_libdpx.DPxEnablePPxRearProjection()[source]

Enables the Rear Projection of the PROPixx.

Low-level C definition:

void DPxEnablePPxRearProjection(void)

_libdpx.DPxEnablePPxSwtpLoad()[source]

Load the current video input directly into the DRAM to be played back later using the TScope modes.

_libdpx.DPxEnablePPxTScope()[source]

Enable the PROPixx T-Scope subsystem. This will terminate normal display of incoming video. Contains an implicit call to RegWrRd.

_libdpx.DPxEnablePPxTScopePrepReq()[source]

Wait for the current video frame to terminate, then load and show cover page of TScope movie. Note that TScope requires a transition from DPxDisablePPxTScopePrepReq to DPxEnablePPxTScopePrepReq.

_libdpx.DPxEnablePPxTScopeQuad()[source]

Only one quadrant of an uploaded image is presented at a time

_libdpx.DPxEnableTouchpixx()[source]

Enables the TOUCHPixx touch panel hardware subsystem.

Low-level C definition:

void DPxEnableTouchpixx()

_libdpx.DPxEnableTouchpixxLogContinuousMode()[source]

Enables Touchpixx continuous logging mode.

TOUCHPixx logging returns continuous position updates during a panel press.

Low-level C definition:

void DPxEnableTouchpixxLogContinuousMode()

_libdpx.DPxEnableTouchpixxLogEvents()[source]

Enables log events mode.

Each Touchpixx transition is automatically logged. No schedule is required, so this is the best way to log response buttons.

Low-level C definition:

void DPxEnableTouchpixxLogEvents()

_libdpx.DPxEnableTouchpixxLogTimetags()[source]

Enables Touchpixx timetag mode.

Each buffered Touchpixx sample is preceeded with a 64-bit nanosecond timetag.

Low-level C definition:

void DPxEnableTouchpixxLogTimetags()

_libdpx.DPxEnableVidClutTransparencyColorMode()[source]

Enables video CLUT transparency color mode.

Low-level C definition:

void DPxEnableVidClutTransparencyColorMode()

_libdpx.DPxEnableVidHorizOverlay()[source]

Enables the Horizontal overlay

VGA 1 and VGA 2 both show an overlay composite of the left/right halves of the video image

Low-level C definition:

void DPxEnableVidHorizOverlay()

_libdpx.DPxEnableVidHorizSplit()[source]

Enables Video Horizontal Split.

VGA 1 shows the left half of video image, VGA 2 shows the right half of video image. The two VGA outputs are perfectly synchronized.

Low-level C definition:

void DPxEnableVidHorizSplit()

_libdpx.DPxEnableVidLcd3D60Hz()[source]

Enables 3D pixel polarity inversion

Low-level C definition:

void DPxEnableVidLcd3D60Hz(void)

_libdpx.DPxEnableVidPsyncBlankLine()[source]

Enables the PSync Black Line

The sync raster line is always displayed black.

Low-level C definition:

void DPxEnableVidPsyncBlankLine()

_libdpx.DPxEnableVidPsyncSingleLine()[source]

Enables Psync for Single (Raster) Line.

Low-level C definition:

void DPxEnableVidPsyncSingleLine()

_libdpx.DPxEnableVidRescanWarning()[source]

Enables VIEWPixx Rescan Warning

Low-level C definition:

void DPxEnableVidRescanWarning()

_libdpx.DPxEnableVidScanningBacklight()[source]

Enables VIEWPixx scanning backlight

Low-level C definition:

void DPxEnableVidScanningBacklight()

_libdpx.DPxEnableVidVertStereo()[source]

Enables Vertical Stereo Video.

Top/bottom halves of input image are output in two sequencial video frames. VESA L/R output is set to 1 when first frame (left eye) is displayed, and set to 0 when second frame (right eye) is displayed.

Low-level C definition:

void DPxEnableVidVertStereo()

_libdpx.DPxEnableVidVesaBlueline()[source]

Enables the Video blue line mode.

When enabled, the VESA 3D output interprets the middle pixel on last raster line as a blue line code. When disabled, the VESA 3D output is not dependent on video content.

Low-level C definition:

void DPxEnableVidVesaBlueline()

_libdpx.DPxEnableVidVesaFreeRun()[source]

Enables PROPixx 3D VESA output freeRun enable bit.

Note

PROPixx Rev >= 7 only.

Low-level C definition:

void DPxEnableVidVesaFreeRun(void)

_libdpx.DPxGetAdcBuffBaseAddr()[source]

Gets the ADC RAM buffer start address.

Returns:

Base address.

Return type:

int

Low-level C definition:

unsigned DPxGetDacBuffBaseAddr()

_libdpx.DPxGetAdcBuffChanRef(channel)[source]

Gets the reference associated with a channel.

Returns:

one of the following predefined constants:
  • gnd: Referenced to ground.

  • diff: Referenced to adjacent analog input.

  • ref0: Referenced to REF0 analog input.

  • ref1: Referenced to REF1 analog input.

Return type:

reference (string)

Low-level C definition:

int DPxGetAdcBuffChanRef(int channel)

_libdpx.DPxGetAdcBuffSize()[source]

Gets the ADC RAM buffer size in bytes.

Returns:

buffer size.

Return type:

int

Low-level C definition:

unsigned DPxGetAdcBuffSize()

_libdpx.DPxGetAdcBuffWriteAddr()[source]

Gets RAM address from which next ADC datum will be written.

Returns:

Write address.

Return type:

int

Low-level C definition:

unsigned DPxGetAdcBuffWriteAddr()

_libdpx.DPxGetAdcNumChans()[source]

Gets the number of channel available.

This method returns the number of ADC channels in the system (18 in current implementation)

Returns:

Number of channels.

Return type:

int

Low-level C definition:

int DPxGetAdcNumChans()

_libdpx.DPxGetAdcRange(channel)[source]

Gets the voltage range.

This method returns the voltage range; +-10V for all channels

Parameters:

channel (int) – Channel number.

Returns:

Range of channel.

Return type:

int

Low-level C definition:

void DPxGetAdcRange(int channel, double *minV, double *maxV)

_libdpx.DPxGetAdcSchedCount()[source]

Gets ADC schedule update count.

Returns:

Schedule sample count.

Return type:

int

Low-level C definition:

unsigned DPxGetAdcSchedCount()

_libdpx.DPxGetAdcSchedOnset()[source]

Gets the nanosecond delay between schedule start and first ADC sample.

Returns:

onset.

Return type:

int

Low-level C definition:

unsigned DPxGetAdcSchedOnset()

_libdpx.DPxGetAdcSchedRate()[source]

Returns the ADC schedule rate in hertz.

Returns:

schedule rate (Hz)

Return type:

int

Low-level C definition:

unsigned DPxGetAdcSchedRate(int *rateUnits)

_libdpx.DPxGetAdcStatus(inDict)[source]

Updates the information dictionary for the ADC schedule.

Parameters:

inDict (dict) – The dictionary returned by the schedule setup

Updates the dictionary with the following information:

“dacAdcLoopback” is True if ADC inputs are driven internally by DAC outputs, or False if ADC inputs report real analog inputs. “freeRunning” is True if ADC hardware is sampling continuously, or False if it only samples on ADC acquisition schedule ticks. “scheduleRunning” is True if the analog acquisition schedule is currently running, or False if stopped. “scheduleOnset” is the programmed delay in seconds between StartAdcSchedule execution, and the first ADC sample acquisition. “scheduleRate” is the rate at which subsequent ADC samples are acquired. “scheduleRateUnits” is the programmed units of scheduleRate: “Hz” is samples per second, “video” is samples per video frame, “nano” is seconds per sample “numAdcSchedChans” is the number of ADC channels scheduled for acquisition. “channelList” is the list of channels and their reference, if enabled. “bufferBaseAddress” is the acquisition data buffer base address within the Datapixx. “bufferSize” is the number of bytes in the acquisition data buffer. “numBufferFrames” is the total number of samples which fit in the acquisition data buffer. “currentWriteFrame” is the buffer frame which will be written by the next acquired ADC sample. “currentReadFrame” is the buffer frame which will be read by the next streaming call to ReadAdcBuffer. “newBufferFrames” = currentWriteFrame - currentReadFrame. This is the maximum number of frames which can be read by the next call to ReadAdcBuffer in streaming mode, without causing a streaming underflow. “maxScheduleFrames”, if non-0, is the value of currentWriteFrame which will automatically stop the schedule.

_libdpx.DPxGetAdcValue(channel)[source]

Gets the value for one ADC channel.

This method returns the 16-bit 2’s complement signed value for one ADC channel. Can be used on channels 0-17.

Parameters:

channel (int) – Channel number.

Returns:

Channel value.

Return type:

int

Low-level C definition:

int DPxGetAdcValue(int channel)

_libdpx.DPxGetAdcVoltage(channel)[source]

Gets the voltage for an ADC channel.

Parameters:

channel (int) – Channel number.

Returns:

Voltage of channel.

Return type:

float

Low-level C definition:

double DPxGetAdcVoltage(int channel)

_libdpx.DPxGetAudBuffBaseAddr()[source]

Gets the AUD RAM buffer start address.

Returns:

Base address

Return type:

int

Low-level C definition:

unsigned DPxGetAudBuffBaseAddr()

_libdpx.DPxGetAudBuffReadAddr()[source]

Gets AUD address from which next AUD datum will be read.

Returns:

Read address.

Return type:

int

Low-level C definition:

unsigned DPxGetAudBuffReadAddr()

_libdpx.DPxGetAudBuffSize()[source]

Gets the AUD RAM buffer size in bytes.

Returns:

buffer size.

Return type:

int

Low-level C definition:

unsigned DPxGetAudBuffSize()

_libdpx.DPxGetAudCodecOutLeftVolume(dBUnits=0)[source]

Gets the volume for the DATAPixx Audio OUT Left channel

Parameters:

dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0

Returns:

volume

Return type:

double

Low-level C definition:

double DPxGetAudCodecOutLeftVolume(int DBUnits)

_libdpx.DPxGetAudCodecOutRightVolume(dBUnits=0)[source]

Gets the volume for the DATAPixx Audio OUT Right channel

Parameters:

dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0

Returns:

volume

Return type:

double

Low-level C definition:

double DPxGetAudCodecOutRightVolume(int DBUnits)

_libdpx.DPxGetAudCodecOutVolume(dBUnits=0)[source]

Gets the volume for the DATAPixx Audio OUT Left and Right channels

Parameters:

dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0

Returns:

[left Speaker Volume, Right speaker Volume]

Return type:

A tuple containing floats

Low-level C definition:

double DPxGetAudCodecOutVolume(int DBUnits)

_libdpx.DPxGetAudCodecSpeakerLeftVolume(dBUnits=0)[source]

Gets the volume for the DATAPixx Speaker Left channel

Parameters:

dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0

Returns:

volume

Return type:

double

Low-level C definition:

double DPxGetAudCodecSpeakerLeftVolume(int DBUnits)

_libdpx.DPxGetAudCodecSpeakerRightVolume(dBUnits=0)[source]

Gets the volume for the DATAPixx Speaker Right channel

Parameters:

dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0.

Returns:

Volume

Return type:

double

Low-level C definition:

double DPxGetAudCodecSpeakerRightVolume(int DBUnits)

_libdpx.DPxGetAudCodecSpeakerVolume(dBUnits=0)[source]

Gets volume for the DATAPixx Speaker Left and Right channels

Parameters:

dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0.

Returns:

[left Speaker Volume, Right speaker Volume]

Return type:

A tuple containing floats

Low-level C definition:

double DPxGetAudCodecSpeakerVolume(int DBUnits)

_libdpx.DPxGetAudGroupDelay(sampleRate)[source]

Gets the CODEC Audio OUT group delay in seconds.

Parameters:

sampleRate (float) – The rate at which your schedule is running.

Returns:

delay in seconds.

Return type:

float

Low-level C definition:

double DPxGetAudGroupDelay(double sampleRate)

_libdpx.DPxGetAudLRMode()[source]

Gets the audio schedule update mode.

Returns:

Any of the following predefined constants.
  • mono: Each AUD schedule datum goes to left and right channels

  • left: Each AUD schedule datum goes to left channel only

  • right: Each AUD schedule datum goes to right channel only

  • stereo1: Pairs of AUD data are copied to left/right channels

  • stereo2: AUD data goes to left channel, AUX data goes to right

Return type:

String

Low-level C definition:

int DPxGetAudLRMode()

_libdpx.DPxGetAudLeftValue()[source]

Get the 16-bit 2’s complement signed value for the Left audio output channel

Low-level C definition:

int DPxGetAudLeftValue()

_libdpx.DPxGetAudLeftVolume()[source]

Get volume for the Left audio output channel, range 0-1

Returns:

volume

Return type:

double

Low-level C definition:

double DPxGetAudLeftVolume()

_libdpx.DPxGetAudRightValue()[source]

Get the 16-bit 2’s complement signed value for the Right audio output channel

Low-level C definition:

int DPxGetAudRightValue()

_libdpx.DPxGetAudRightVolume()[source]

Get volume for the Right audio output channel, range 0-1

Returns:

volume

Return type:

double

Low-level C definition:

double DPxGetAudRightVolume()

_libdpx.DPxGetAudSchedCount()[source]

Gets AUD schedule update count.

Returns:

The current MIC schedule count.

Return type:

int

Low-level C definition:

unsigned DPxGetAudSchedCount()

_libdpx.DPxGetAudSchedOnset()[source]

Gets the nanosecond delay between schedule start and first AUD update.

Returns:

The nanosecond onset between the first update and the start of schedule.

Return type:

int

Low-level C definition:

unsigned DPxGetAudSchedOnset()

_libdpx.DPxGetAudSchedRate()[source]

Gets the audio schedule update rate and optionally get rate units.

This method allows the user to get the audio’s left schedule update rate and optionally get rate units. The return value is a tuple containing the rate and the rate unit.

The unit can be any of the following predefined constants.

  • hz: Updates per second, maximum 96 kHz.

  • video: Updates per video frame, maximum 96 kHz.

  • nano: Update period in nanoseconds, minimum 10417 ns.

Returns:

Rate, Unit

Return type:

Tuple

Low-level C definition:

unsigned DPxGetAudSchedRate(int *rateUnits)

_libdpx.DPxGetAudVolume()[source]

Gets the volume for both Left/Right audio channels

Returns:

[left Speaker Volume, Right speaker Volume]

Return type:

A tuple containing floats

Low-level C definition:

double DPxGetAudVolume()

_libdpx.DPxGetAuxBuffBaseAddr()[source]

Gets the AUX RAM buffer start address.

Returns:

Base address.

Return type:

int

Low-level C definition:

unsigned DPxGetAuxBuffBaseAddr()

_libdpx.DPxGetAuxBuffReadAddr()[source]

Gets RAM address from which next AUX datum will be read.

Returns:

Read address.

Return type:

int

Low-level C definition:

unsigned DPxGetAuxBuffReadAddr()

_libdpx.DPxGetAuxBuffSize()[source]

Gets the AUX RAM buffer size in bytes.

Returns:

buffer size.

Return type:

int

Low-level C definition:

unsigned DPxGetAuxBuffSize()

_libdpx.DPxGetAuxSchedCount()[source]

Gets AUX schedule update count.

Returns:

The schdule update total count.

Return type:

int

Low-level C definition:

unsigned DPxGetAuxSchedCount()

_libdpx.DPxGetAuxSchedOnset()[source]

Gets the nanosecond delay between schedule start and the first AUX update.

Returns:

The nanosecond onset between the first update and the start of the schedule.

Return type:

int

Low-level C definition:

unsigned DPxGetAuxSchedOnset()

_libdpx.DPxGetAuxSchedRate()[source]

Gets AUX schedule update rate and the rate units.

Returns:

rate and unit.

Return type:

tuple

Low-level C definition:

unsigned DPxGetAuxSchedRate(int *rateUnits))

_libdpx.DPxGetCPLDFirmwareRev()[source]

Gets the VPixx Device firmware revision.

Returns:

Value higher than 0.

Return type:

int

Low-level C definition:

int DPxGetFirmwareRev()

_libdpx.DPxGetCustomDevName()[source]

Get user-specified device name, ignoring whether or not it has been assigned to dpxSysDevsel

Returns:

Custom Device Name

Low-level C definition:

const char* DPxGetCustomDevName()

_libdpx.DPxGetDPCoreReg(channel, addOffset, addr)[source]

Read an 32-bit register from DP Core

Low-level C definition:

unsigned DPxGetDPCoreReg(int channel, int addOffset, int addr)

_libdpx.DPxGetDacBuffBaseAddr()[source]

Gets the DAC RAM buffer start address.

Returns:

Base address.

Return type:

int

Low-level C definition:

unsigned DPxGetDacBuffBaseAddr()

_libdpx.DPxGetDacBuffReadAddr()[source]

Gets RAM address from which next DAC datum will be read.

Returns:

Read address.

Return type:

int

Low-level C definition:

unsigned DPxGetDacBuffReadAddr()

_libdpx.DPxGetDacBuffSize()[source]

Gets the DAC RAM buffer size in bytes.

Returns:

buffer size.

Return type:

int

Low-level C definition:

unsigned DPxGetDacBuffSize()

_libdpx.DPxGetDacNumChans()[source]

Gets the number of channels available.

This method returns the number of DAC channels in the system (4 in current implementation)

Returns:

Number of channels.

Return type:

int

Low-level C definition:

int DPxGetDacNumChans()

_libdpx.DPxGetDacRange(channel)[source]

Gets the voltage range.

This method returns the voltage range; For a VIEWPixx: +-10V, for a DATAPixx: +-10V for ch0/1, +-5V for ch2/3

Parameters:

channel (int) – Channel number

Returns:

voltage range.

Return type:

int

Low-level C definition:

DPxGetDacRange(int channel, double *minV, double *maxV)

_libdpx.DPxGetDacSchedCount()[source]

Gets DAC schedule update count.

Returns:

Schedule sample count.

Return type:

int

Low-level C definition:

unsigned DPxGetDacSchedCount()

_libdpx.DPxGetDacSchedOnset()[source]

Gets the nanosecond delay between the schedule start and first DAC update.

Returns:

onset.

Return type:

int

Low-level C definition:

unsigned DPxGetDacSchedOnset()

_libdpx.DPxGetDacSchedRate()[source]

Gets DAC schedule update rate and the rate units.

Returns:

rate and unit.

Return type:

tuple

Low-level C definition:

unsigned DPxGetDacSchedRate(int *rateUnits)

_libdpx.DPxGetDacStatus(inDict)[source]

Updates the information dictionary for the DAC schedule.

Parameters:

inDict (dict) – The dictionary returned by the schedule setup

Updates the dictionary with the following information:

“scheduleRunning” is True if the DAC schedule is currently running, or False if stopped. “scheduleOnset” is the programmed delay in seconds between StartAdcSchedule execution, and the first ADC sample acquisition. “scheduleRate” is the rate at which subsequent ADC samples are acquired. “scheduleRateUnits” is the programmed units of scheduleRate: “Hz” is samples per second, “video” is samples per video frame, “nano” is seconds per sample “numDacSchedChans” is the number of ADC channels scheduled for acquisition. “channelList” is the list of channels and their reference, if enabled. “bufferBaseAddress” is the acquisition data buffer base address within the Datapixx. “bufferSize” is the number of bytes in the acquisition data buffer. “numBufferFrames” is the total number of samples which fit in the acquisition data buffer. “currentReadFrame” is the buffer frame which will be read by the next streaming call to ReadAdcBuffer. “maxScheduleFrames”, if non-0, is the value of currentWriteFrame which will automatically stop the schedule.

_libdpx.DPxGetDacValue(channel)[source]

Gets the value for one DAC channel.

Parameters:

channel (int) – Channel number.

Returns:

A 16-bit 2’s complement signed value.

Return type:

int

Low-level C definition:

int DPxGetDacValue(int channel)

See also

DPxSetDacValue

_libdpx.DPxGetDacVoltage(channel)[source]

Gets the value for one DAC channel.

Parameters:

channel (int) –

Channel number.

  • For channel 0 and 1: ± 10V.

  • For channel 2 and 3: ± 5V.

Returns:

Voltage.

Return type:

float

Low-level C definition:

double DPxGetDacVoltage(int channel)

See also

DPxSetDacValue

_libdpx.DPxGetDebug()[source]

Returns the current debug level

Returns:

Debug level

Return type:

int

Low-level C definition:

int DPxGetDebug()

_libdpx.DPxGetDevicesCount()[source]

Return the size of one image in RAM.

Returns:

(int) Thethe size of image in byte

Low-level C definition:

int TPxSaveImageGap()

_libdpx.DPxGetDinBuffBaseAddr()[source]

Gets the DIN RAM buffer start address.

Returns:

Base address.

Return type:

int

Low-level C definition:

unsigned DPxGetDinBuffBaseAddr()

_libdpx.DPxGetDinBuffSize()[source]

Gets the Din RAM buffer size in bytes.

Returns:

buffer size.

Return type:

int

Low-level C definition:

unsigned DPxGetDinBuffSize()

_libdpx.DPxGetDinBuffWriteAddr()[source]

Gets RAM address from which next DIN datum will be written.

Returns:

Write address.

Return type:

int

Low-level C definition:

unsigned DPxGetDinBuffWriteAddr()

_libdpx.DPxGetDinDataDir()[source]

Gets the port direction mask.

Returns:

Bit set to 1 is an enabled port. Bit set to 0 is a disabled port.

Return type:

int

Low-level C definition:

int DPxGetDinDataDir()

_libdpx.DPxGetDinDataOut()[source]

Gets the data which is being driven on each output port.

This function allows the user to get the data which is currently driven on the output port.

Returns:

Data which is being driven on each output port.

Return type:

int

Low-level C definition:

int DPxGetDinDataOut()

_libdpx.DPxGetDinDataOutStrength()[source]

Gets the strength of the driven outputs.

This function allows the user to get the strength currently driven by the outputs. The implementation actual values uses 1/16 up to 16/16. So minimum strength will be 0.0625 and maximum will be 1. The strength can be increased by 0.0625 up to 1.

Returns:

Any value in a range of 0 to 1.

Return type:

float

Low-level C definition:

double DPxSetDinDataOutStrength()

_libdpx.DPxGetDinNumBits()[source]

Gets the number of bits available.

This method returns the number of digital input bits in the system (24 in current implementation).

Returns:

Number of bits.

Return type:

int

Low-level C definition:

int DPxGetDinNumBits()

_libdpx.DPxGetDinSchedCount()[source]

Gets Din schedule update count.

Returns:

Schedule sample count.

Return type:

int

Low-level C definition:

unsigned DPxGetDinSchedCount()

_libdpx.DPxGetDinSchedOnset()[source]

Gets the nanosecond delay between schedule start and first Din sample.

Returns:

onset.

Return type:

int

Low-level C definition:

unsigned DPxGetDinSchedOnset()

_libdpx.DPxGetDinSchedRate()[source]

This function gets the Din schedule rate and the rate unit.

Return value: (schedule rate, rate unit)

Low-level C definition:

unsigned DPxGetDinSchedRate(int *rateUnits)

_libdpx.DPxGetDinStatus(inDict)[source]

Takes a dictionary and populates it with the following digital input status information:

Parameters:

inDict

  • “doutDinLoopback” is 1 if digital inputs are driven internally by digital outputs, or 0 if digital inputs report real inputs from db-25 connector.

  • ”dataDirection” is a mask showing which of the 24 bits are driving their outputs.

  • ”dataOutStrength” is the drive strength for the ports whose outputs have been enabled by SetDinDataDirection.

  • ”debounce” is 1 if digital inputs are debounced for 30 milliseconds.

  • ”logRunning” is 1 if transition logging is currently active, or 0 if stopped.

  • ”bufferBaseAddress” is the acquisition data buffer base address within the Datapixx.

  • ”bufferSize” is the number of bytes in the acquisition data buffer.

  • ”numBufferFrames” is the total number of samples which fit in the acquisition data buffer.

  • ”currentWriteFrame” is the buffer frame which will be written by the next acquired sample.

  • ”currentReadFrame” is the buffer frame which will be read by the next call to ReadDinLog.

  • ”newLogFrames” = currentWriteFrame - currentReadFrame. This is the maximum number of frames which can be read by the next call to ReadDinLog, without causing an underflow.

  • ”numLogUnderflows” is the number of ReadDinLog underflows which have occurred since SetDinLog. See ReadDinLog for details. See DatapixxSimonGame, DatapixxDin*Demo files for examples.

_libdpx.DPxGetDinValue()[source]

Gets the values of the 24 DIN bits.

Returns:

Bit values.

Return type:

int

Low-level C definition:

int DPxGetDinValue()

_libdpx.DPxGetDoutBuffBaseAddr()[source]

Gets the Dout RAM buffer start address.

Returns:

Base address.

Return type:

int

Low-level C definition:

unsigned DPxGetDoutBuffBaseAddr()

_libdpx.DPxGetDoutBuffReadAddr()[source]

Gets RAM address from which next Dout datum will be read.

Returns:

Read address.

Return type:

int

Low-level C definition:

unsigned DPxGetDoutBuffReadAddr()

_libdpx.DPxGetDoutBuffSize()[source]

Gets the Dout RAM buffer size in bytes.

Returns:

buffer size.

Return type:

int

Low-level C definition:

unsigned DPxGetDoutBuffSize()

_libdpx.DPxGetDoutButtonSchedulesMode()[source]

Set the automatic DOUT schedules upon DIN button presses mode.

Parameters:

mode (int) – Mode should be 0 for standard setup and 1 for MRI set-up. Mode 0 and 1 will only trigger on a button push, while Mode 2 will trigger on both events. In Mode 2, the increment between push/release schedules is 2kB (2048).

Low-level C definition:

void DPxDisableDoutButtonSchedules()

_libdpx.DPxGetDoutNumBits()[source]

Gets the number of bits available.

This method returns the number of digital output bits in the system (24 in current implementation).

Returns:

Number of bits.

Return type:

int

Low-level C definition:

int DPxGetDoutNumBits()

_libdpx.DPxGetDoutSchedCount()[source]

Gets Dout schedule update count.

Returns:

Schedule sample count.

Return type:

int

Low-level C definition:

unsigned DPxGetDoutSchedCount()

_libdpx.DPxGetDoutSchedOnset()[source]

Gets the nanosecond delay between schedule start and first Dout update.

Returns:

onset.

Return type:

int

Low-level C definition:

unsigned DPxGetDoutSchedOnset()

_libdpx.DPxGetDoutSchedRate()[source]

Gets Dout schedule update rate and the rate units.

Returns:

rate and unit.

Return type:

tuple

Low-level C definition:

unsigned DPxGetDoutSchedRate(int *rateUnits)

_libdpx.DPxGetDoutValue()[source]

Gets the values of the 24 Dout bits.

Returns:

Bit values.

Return type:

int

Low-level C definition:

int DPxGetDoutValue()

_libdpx.DPxGetError()[source]

Returns the error code

Returns:

Error code if an error occured, otherwise 0.

Return type:

int

Low-level C definition:

int DPxGetError()

_libdpx.DPxGetErrorString()[source]

Returns the current error string

Returns:

Latest error string

Return type:

string

Low-level C definition:

const char* DPxGetErrorString()

_libdpx.DPxGetFirmwareRev()[source]

Gets the VPixx Device firmware revision.

Returns:

Value higher than 0.

Return type:

int

Low-level C definition:

int DPxGetFirmwareRev()

_libdpx.DPxGetID()[source]

Gets the VPixx device identifier code.

Returns:

Value higher than 0.

Return type:

int

Low-level C definition:

int DPxGetID()

_libdpx.DPxGetMarker()[source]

Gets the current marker from the register.

This function allows the user to get the marker value previously latched.

Returns:

Time in seconds.

Return type:

float

Low-level C definition:

double DPxGetMarker()

_libdpx.DPxGetMicBuffBaseAddr()[source]

Gets the MIC RAM buffer start address.

Returns:

Base address.

Return type:

int

Low-level C definition:

unsigned DPxGetMicBuffBaseAddr()

_libdpx.DPxGetMicBuffSize()[source]

Gets the DAC RAM buffer size in bytes.

Returns:

buffer size.

Return type:

int

Low-level C definition:

unsigned DPxGetMicBuffSize()

_libdpx.DPxGetMicBuffWriteAddr()[source]

Gets RAM address from which next MIC datum will be written.

Returns:

Write address.

Return type:

int

Low-level C definition:

unsigned DPxGetMicBuffWriteAddr()

_libdpx.DPxGetMicGroupDelay(sampleRate)[source]

Gets the CODEC Audio OUT group delay in seconds.

Parameters:

sampleRate (float) – The sample rate of your schedule

Returns:

delay in seconds.

Return type:

float

Low-level C definition:

double DPxGetMicGroupDelay(double sampleRate)

_libdpx.DPxGetMicLRMode()[source]

Gets the microphone Left/Right configuration mode.

This method allows the user to get the microphone left and right channels schedule buffer mode.

Returns:

Any of the following predefined constants.

  • mono: Mono data is written to the schedule buffer. The average of the Left/Right CODEC data.

  • left: Left data is written to the schedule buffer.

  • right: Right data is written to the schedule buffer.

  • stereo: Left and Right data are both written to the schedule buffer.

Return type:

String

Low-level C definition:

int DPxGetMicLRMode()

_libdpx.DPxGetMicLeftValue()[source]

Get the 16-bit 2’s complement signed value for left MIC channel

Returns:

value for left MIC channel

Return type:

int

Low-level C definition:

int DPxGetMicLeftValue()

_libdpx.DPxGetMicRightValue()[source]

Get the 16-bit 2’s complement signed value for right MIC channel

Returns:

value for right MIC channel

Return type:

int

Low-level C definition:

int DPxGetMicRightValue()

_libdpx.DPxGetMicSchedCount()[source]

Gets MIC schedule update count.

Returns:

The current MIC schedule count.

Return type:

int

Low-level C definition:

unsigned DPxGetMicSchedCount()

_libdpx.DPxGetMicSchedOnset()[source]

Gets the nanosecond delay between schedule start and first MIC update.

Returns:

The nanosecond onset between the first update and the start of schedule.

Return type:

int

Low-level C definition:

unsigned DPxGetMicSchedOnset()

_libdpx.DPxGetMicSchedRate()[source]

Gets MIC schedule update rate and the rate units.

Returns:

rate and unit.

Return type:

tuple

Low-level C definition:

unsigned DPxGetDacSchedRate(int *rateUnits)

_libdpx.DPxGetMicSource(dBUnits=0)[source]

Gets the source and the gain of the microphone input.

Parameters:

dBUnits (int, optional) – Set to non-zero to return the gain in dB. Defaults to 0.

Returns:

A list containing the [gain value, microphone source]

Return type:

list

Low-level C definition:

int DPxGetMicSource(int DBUnits)

_libdpx.DPxGetNanoMarker()[source]

Gets the current marker from the register with high precision.

This function allows the user to get the marker value previously latched.

Returns:

Time in seconds.

Return type:

tuple

Low-level C definition:

void DPxGetNanoMarker(unsigned *nanoHigh32, unsigned *nanoLow32)

_libdpx.DPxGetNanoTime()[source]

Gets the current time since power up with high precision.

This function allows the user to get the marker value previously latched.

Returns:

Time in seconds.

Return type:

tuple

Low-level C definition:

void DPxGetNanoTime(unsigned *nanoHigh32, unsigned *nanoLow32)

_libdpx.DPxGetNbMaxDevices()[source]

Get the number maximum of devices supported

Low-level C definition:

unsigned int DPxGetNbMaxDevices()

_libdpx.DPxGetPPx3dCrosstalk()[source]

Gets 3D crosstalk (0-1) which is being subtracted from stereoscopic stimuli.

Warning

This only works with RB3D mode and requires revision 6 of the PROPixx.

Returns:

Value for the 3D Crosstalk.

Return type:

double

Low-level C definition:

double DPxGetPPx3dCrosstalk(void)

_libdpx.DPxGetPPxDlpSeqPgrm()[source]

Get PROPixx DLP Sequencer program.

This method returns the current program loaded in the PROPixx sequencer.

Returns:

Any of the following predefined constants.

  • RGB: Default RGB

  • RB3D: R/B channels drive grayscale 3D

  • RGB240: Only show the frame for 1/2 a 120 Hz frame duration.

  • RGB180: Only show the frame for 2/3 of a 120 Hz frame duration.

  • QUAD4X: Display quadrants are projected at 4x refresh rate.

  • QUAD12X: Display quadrants are projected at 12x refresh rate with grayscales.

  • GREY3X: Converts 640x1080@360Hz RGB to 1920x1080@720Hz Grayscale with blank frames.

Return type:

String

Low-level C definition:

int DPxGetPPxDlpSeqPgrm(void)

_libdpx.DPxGetPPxFanPwm()[source]

Returns the Fans PWN.

Returns:

Current fan PWN as a double.

Return type:

double

Low-level C definition:

double DPxGetPPxFanPwm(void)

_libdpx.DPxGetPPxFanTachometer(fanNum)[source]

Returns the speed at which a fan is rotating.

Parameters:

fanNum (int) – The number of the fan.

Low-level C definition:

double DPxGetPPxFanTachometer(int fanNum)

_libdpx.DPxGetPPxHotSpotCenter()[source]
_libdpx.DPxGetPPxLedCurrent(ledNum)[source]

Get PROPixx LED Current.

Parameters:

ledNum (int) – The number of the LED.

Returns:

The value of the current of the selected LED as a double in Amps.

Return type:

double

Low-level C definition:

double DPxGetPPxLedCurrent(int ledNum)

_libdpx.DPxGetPPxLedMask()[source]

Get the PROPixx LED mask.

Only available for PROPixx Revision 33 and higher.

Returns:

Any of the following number.

  • 0: All LEDs are on.

  • 1: RED is turned off.

  • 2: GREEN is turned off.

  • 3: RED and GREEN are turned off.

  • 4: BLUE is turned off.

  • 5: RED and BLUE are turned off.

  • 6: BLUE and GREEN are turned off.

  • 7: ALL LEDs are off.

Return type:

Int

Low-level C definition:

int DPxGetPPxDlpSeqPgrm()

_libdpx.DPxGetPPxTScopeSchedCount()[source]

Get T-Scope schedule update count

_libdpx.DPxGetPPxTemperature(tempNum)[source]

Get a PROPixx temperature for a given sensor number.

Parameters:

tempNum (int) – Number of the sensor.

Returns

double: The temperature in Celcius of the sensor.

Low-level C definition:

double DPxGetPPxTemperature(int tempNum)

_libdpx.DPxGetPPxVoltageMonitor(voltageNum)[source]

Gets the Voltage for the given sensor.

Parameters:

voltageNum (int) – The number of the sensor.

Returns:

The volatage in Volts for the chosen monitor.

Return type:

double

Low-level C definition:

double DPxGetPPxVoltageMonitor(int voltageNum)

_libdpx.DPxGetPartNumber()[source]

Gets the integer part number of the VPixx Device.

Returns:

Value higher than 0.

Return type:

int

Low-level C definition:

int DPxGetPartNumber()

_libdpx.DPxGetRamSize()[source]

Gets the number of bytes of RAM in the VPixx device.

Returns:

Value higher than 0.

Return type:

int

Low-level C definition:

int DPxGetRamSize()

_libdpx.DPxGetSupply2Current()[source]

Gets the current being supplied from the +12V power supply.

Returns:

Value higher than 0 in Amperes.

Return type:

float

Low-level C definition:

double DPxGetSupply2Current()

_libdpx.DPxGetSupply2Voltage()[source]

Gets the voltage being supplied from the 12V power supply.

Returns:

Value higher than 0 in Volts.

Return type:

float

Low-level C definition:

double DPxGetSupply2Voltage()

_libdpx.DPxGetSupplyCurrent()[source]

Gets the current being supplied from the 5V power supply.

Returns:

Value higher than 0 in Amperes.

Return type:

float

Low-level C definition:

double DPxGetSupplyCurrent()

_libdpx.DPxGetSupplyVoltage()[source]

Gets the voltage being supplied from +5V supply.

Returns:

Value higher than 0 in Volt.

Return type:

float

Low-level C definition:

double DPxGetSupplyVoltage()

_libdpx.DPxGetTemp2Celcius()[source]

Gets the temperature inside a VPixx device.

This function gets the board temperature of any VPixx device except the DATAPixx.

Returns:

Temperature in degrees Celsius.

Return type:

float

Low-level C definition:

double DPxGetTemp2Celcius()

_libdpx.DPxGetTemp3Celcius()[source]

Gets the FPGA temperature inside a VPixx device.

This function cannot be used with a DATAPixx.

Returns:

Temperature in degrees Celsius.

Return type:

float

Low-level C definition:

double DPxGetTemp3Celcius()

_libdpx.DPxGetTempCelcius()[source]

Gets the temperature inside a VPixx device chassis.

When used with a PROPixx, this function gets the temperature of the Receiver DVI. When used with other devices, it gets the chassis temperature.

Returns:

Temperature in degrees Celsius.

Return type:

float

Low-level C definition:

double DPxGetTempCelcius()

_libdpx.DPxGetTempFarenheit()[source]

Gets the temperature inside a VPixx device in Fahrenheit.

Returns:

Temperature in degrees Fahrenheit.

Return type:

float

Low-level C definition:

double DPxGetTempFarenheit()

_libdpx.DPxGetTime()[source]

Gets the device time since last power up.

Returns:

Time in seconds.

Return type:

float

Low-level C definition:

double DPxGetTime()

_libdpx.DPxGetTouchpixxBuffBaseAddr()[source]

Gets the Touchpixx RAM buffer start address.

Returns:

Base address.

Return type:

int

Low-level C definition:

unsigned DPxGetDacBuffBaseAddr()

_libdpx.DPxGetTouchpixxBuffSize()[source]

Gets the Touchpixx RAM buffer size in bytes.

Returns:

buffer size.

Return type:

int

Low-level C definition:

unsigned DPxGetTouchpixxBuffSize()

_libdpx.DPxGetTouchpixxBuffWriteAddr()[source]

Gets RAM address from which the next TOUCHPixx datum will be written.

Returns:

Write address.

Return type:

int

Low-level C definition:

unsigned DPxGetTouchpixxBuffWriteAddr()

_libdpx.DPxGetTouchpixxCoords()[source]

Gets the current touch panel (X,Y) coordinates. Returns (0,0) if panel not pressed.

Returns:

A tuple that contains the current pressed (X,Y) coordinate. (0,0) is returned when nothing is pressed. If there are multiple presses, it returns an average.

Low-level C definition:

void DPxGetTouchpixxCoords(int* x, int* y)

_libdpx.DPxGetTouchpixxStabilizeDuration()[source]

Gets the Touchpixx stabilization duration.

Gets the duration in seconds that TOUCHPixx panel coordinates must be stable before being recognized as a touch in DPxGetTouchpixxCoords

Returns:

duration in seconds.

Return type:

float

Low-level C definition:

unsigned DPxGetTouchpixxStabilizeDuration()

_libdpx.DPxGetVidBacklightIntensity()[source]

Returns the display current back light intensity.

Returns:

current backlight intensity in a scale between 0 and 255.

Return type:

int

Example:

>>> print my_device.getBacklightIntensity()
255

See also

DPxSetBacklightIntensity

Low-level C definition:

int DPxGetVidBacklightIntensity()

_libdpx.DPxGetVidClutTransparencyColor()[source]

Get 48-bit RGB video CLUT transparency color

This function allows the user to know the current register value for the RGB video CLUT transparency color. The returned value is a tupple which contains the red, green and blue values.

Returns:

Pixel color value for the red channel. green (int): Pixel color value for the green channel. blue (int): Pixel color value for the blue channel.

Return type:

red (int)

Low-level C definition:

void DPxGetVidClutTransparencyColor(UInt16* red, UInt16* green, UInt16* blue)

_libdpx.DPxGetVidDotFreq()[source]

Gets the dot frequency for the device in Hz.

The dot frequency represents the time taken for a pixel to be switched on. It is calculated by considering all pixels (including those in blanking time) times the refresh rate.

Low-level C definition:

double DPxGetVidDotFreq()

_libdpx.DPxGetVidHActive()[source]

Gets the number of visible pixels in one horizontal scan line.

Low-level C definition:

int DPxGetVidHActive()

_libdpx.DPxGetVidHFreq()[source]

Gets the video horizontal line rate in Hz

The Horizontal line rate in Hz, which represents the time taken for a whole horizontal line to be switched on, including the blanking time.

Low-level C definition:

double DPxGetVidHFreq()

_libdpx.DPxGetVidHTotal()[source]

Get the number of video dot times in one horizontal scan line (includes horizontal blanking interval)

Low-level C definition:

int DPxGetVidHTotal()

_libdpx.DPxGetVidHorizOverlayBounds()[source]

Gets the bounding rectangle of horizontal overlay window

Returns:

A tuple of the form (X1, Y1, X2, Y2)

Low-level C definition:

void DPxGetVidHorizOverlayBounds(int* X1, int* Y1, int* X2, int* Y2)

_libdpx.DPxGetVidLine(Hex=False)[source]

Reads pixels from the VPixx device line buffer, and returns a list containing the data. For each pixel, the buffer contains 16 bits R/G/B/U (where U is thrown away). The returned data is a list containing three lists for the respective R/G/B colors.

Parameters:

Hex (bool, optional) – True returns the value in hexadecimal. Everything else will return the value in decimal.

Returns:

A list which has [[RED], [GREEN], [BLUE]]

Return type:

lists of list

Low-level C definition:

short* DPxGetVidLine()

_libdpx.DPxGetVidMode()[source]

Gets the video processing mode.

Allows the user to know if it is in the correct mode or which mode is currently used on the device.

Returns:

Any of the following predefined constants.

  • L48: DVI RED[7:0] is used as an index into a 256-entry 16-bit RGB colour lookup table.

  • M16: DVI RED[7:0] & GREEN[7:0] concatenate into a VGA 16-bit value sent to all three RGB components.

  • C48: Even/Odd pixel RED/GREEN/BLUE[7:0] concatenate to generate 16-bit RGB components at half the horizontal resolution.

  • L48D: DVI RED[7:4] & GREEN[7:4] concatenate to form an 8-bit index into a 256-entry 16-bit RGB colour lookup table.

  • M16D: DVI RED[7:3] & GREEN[7:3] & BLUE[7:2] concatenate into a VGA 16-bit value sent to all three RGB components.

  • C36D: Even/Odd pixel RED/GREEN/BLUE[7:2] concatenate to generate 12-bit RGB components at half the horizontal resolution.

  • C24: Straight passthrough from DVI 8-bit (or HDMI “deep” 10/12-bit) RGB to VGA 8/10/12-bit RGB.

Return type:

String

Low-level C definition:

int DPxGetVidMode()

_libdpx.DPxGetVidPsyncRasterLine()[source]

Gets the raster line on which pixel sync sequence is expected.

Returns:

An integer which represents the line which has the PSync.

Low-level C definition:

int DPxGetVidPsyncRasterLine()

_libdpx.DPxGetVidSource(return_str=False)[source]

Gets source of video being displayed.

Parameters:

return_str (Bool) – When True, the return value is a string describing the video source used. Else, an integer is returned.

Returns:

The source currently displayed.

  • DVI: Monitor displays DVI signal.

  • SWTP: Software test pattern showing image from RAM.

  • SWTP 3D: 3D Software test pattern flipping between left/right eye images from RAM.

  • RGB SQUARES: RGB ramps.

  • GRAY: Uniform gray display having 12-bit intensity.

  • BAR: Drifting bar.

  • BAR2: Drifting bar.

  • DOTS: Drifting dots.

  • RAMP: Drifting ramp, with dots advancing x*2 pixels per video frame, where x is a 4-bit signed.

  • RGB: Uniform display with 8-bit intensity nn, send to RGBA channels enabled by mask m.

  • PROJ: Projector Hardware test pattern.

Return type:

vidSource (str)

Low-level C definition:

int DPxGetVidSource()

_libdpx.DPxGetVidVActive()[source]

Gets number of visible lines in one vertical frame.

Low-level C definition:

int DPxGetVidVActive()

_libdpx.DPxGetVidVFreq()[source]

Gets video vertical line rate in Hz.

The vertical line rate in Hz, which represents the time taken for a whole vertical line to be switched on, including the blanking time.

Low-level C definition:

double DPxGetVidVFreq()

_libdpx.DPxGetVidVPeriod()[source]

Gets video vertical frame period in nanoseconds

The period is the inverse of the frequency.

Low-level C definition:

unsigned DPxGetVidVPeriod()

_libdpx.DPxGetVidVTotal()[source]

Gets number of video lines in one vertical frame (includes vertical blanking interval)

Low-level C definition:

int DPxGetVidVTotal()

_libdpx.DPxGetVidVesaPhase()[source]

Gets the 8 bits unsigned phase of the VESA 3D waveform.

Returns:

Phase of the VESA 3D waveform.

Return type:

phase (int)

Low-level C definition:

int DPxGetVidVesaPhase()

_libdpx.DPxGetVidVesaWaveform()[source]

Gets the waveform which is being sent to the DATAPixx VESA 3D connector.

Returns:

Any of the following predefined constants.

  • LR: VESA port drives straight L/R squarewave for 3rd party emitter.

  • CRYSTALEYES: VESA port drives 3DPixx IR emitter for CrystalEyes 3D goggles.

  • NVIDIA: VESA port drives 3DPixx IR emitter for NVIDIA 3D goggles.

  • VOLFONI: VESA port drives Volfoni RF emitter and goggles for 3D.

Return type:

String

Low-level C definition:

int DPxGetVidVesaWaveform()

_libdpx.DPxInitAudCodec()[source]

Initialize the required subsystems to play audio.

You are required to call this once before other audio or microphone routines to configure initial audio CODEC state.

Low-level C definition:

void DPxInitAudCodec()

_libdpx.DPxIs5VFault()[source]

Verifies the state of the 5V power supply.

This function allows the user to know if the VESA and Analog +5V input/output pins are trying to draw more than 500 mA.

Returns:

0 if the current is normal, non-zero otherwise (too much current drawn).

Return type:

int

Low-level C definition:

int DPxIs5VFault()

_libdpx.DPxIsAdcBuffChan(channel)[source]

Verifies if RAM buffering is enabled for an ADC channel.

This function is only available for channels 0-15.

Parameters:

channel (int) – Channel number.

Returns:

Non-zero if RAM buffering is enabled for an ADC channel.

Return type:

int

Low-level C definition:

int DPxIsAdcBuffChan(int channel)

_libdpx.DPxIsAdcCalibRaw()[source]

Verifies if the hardware calibration mode is enabled.

Returns:

Non-zero if ADC data is bypassing hardware calibration.

Return type:

int

Low-level C definition:

int DPxIsAdcCalibRaw()

_libdpx.DPxIsAdcFreeRun()[source]

Verifies if the loopback between ADC and DAC is enabled.

Returns:

Non-zero if ADCs are performing continuous conversions.

Return type:

int

Low-level C definition:

void DPxIsAdcFreeRun()

_libdpx.DPxIsAdcLogTimetags()[source]

Verifies if the ADC timetag mode is enabled.

Returns:

Non-zero if buffered data is preceeded with nanosecond timetag.

Return type:

int

Low-level C definition:

int DPxIsAdcLogTimetags()

_libdpx.DPxIsAdcSchedCountdown()[source]

Verifies if RAM buffering is enabled for an ADC channel.

Returns:

Non-zero if SchedCount decrements to 0 and automatically stops schedule.

Return type:

int

Low-level C definition:

int DPxIsAdcSchedCountdown()

_libdpx.DPxIsAdcSchedRunning()[source]

Verifies if an ADC schedule is currently running.

Returns:

Non-zero if an ADC schedule is currently running, zero if there is one.

Return type:

int

Low-level C definition:

int DPxIsAdcSchedRunning()

_libdpx.DPxIsAudMicLoopback()[source]

Returns non-zero if microphone inputs are driven by audio outputs.

Low-level C definition:

int DPxIsAudMicLoopback()

_libdpx.DPxIsAudSchedCountdown()[source]

Returns non-zero if SchedCount decrements to 0 and automatically stops schedule.

Returns:

non-zero if ShedCount is 0

Return type:

int

Low-level C definition:

int DPxIsAudSchedCountdown()

_libdpx.DPxIsAudSchedRunning()[source]

Returns non-zero if AUD schedule is currently running.

Low-level C definition:

int DPxIsAudSchedRunning()

_libdpx.DPxIsAuxSchedCountdown()[source]

Returns non-zero if SchedCount decrements to 0 and automatically stops the schedule.

Returns:

non-zero if ShedCount is 0

Return type:

int

Low-level C definition:

int DPxIsAuxSchedCountdown()

_libdpx.DPxIsAuxSchedRunning()[source]

Returns non-zero if an AUX schedule is currently running.

Low-level C definition:

int DPxIsAuxSchedRunning()

_libdpx.DPxIsCustomStartupConfig()[source]

Returns True if VPixx device has loaded custom startup register values

Note

PROPixx Rev >= 8 only and VIEWPixx/PROPixxCTRL Rev >= 26 only

Low-level C definition:

int DPxIsCustomStartupConfig(void)

_libdpx.DPxIsDacAdcLoopback()[source]

Verifies if the loopback between ADC and DAC is enabled.

Returns:

Non-zero if ADC inputs are looped back from DAC outputs.

Return type:

int

Low-level C definition:

int DPxIsDacAdcLoopback()

_libdpx.DPxIsDacBuffChan(channel)[source]

Verifies if RAM buffering is enabled for a DAC channel.

Parameters:

channel (int) – Channel number.

Returns:

Non-zero if RAM buffering is enabled for a DAC channel.

Return type:

int

Low-level C definition:

int DPxIsDacBuffChan(int channel)

_libdpx.DPxIsDacCalibRaw()[source]

Verifies if the hardware calibration mode is enabled.

Returns:

Non-zero if DAC data is bypassing hardware calibration.

Return type:

int

Low-level C definition:

int DPxIsDacCalibRaw()

_libdpx.DPxIsDacSchedCountdown()[source]

Verifies if RAM buffering is enabled for a DAC channel.

Returns:

Non-zero if SchedCount decrements to 0 and automatically stops schedule.

Return type:

int

Low-level C definition:

int DPxIsDacSchedCountdown()

_libdpx.DPxIsDacSchedRunning()[source]

Verifies if a DAC schedule is currently running.

Returns:

Non-zero if a DAC schedule is currently running, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsDacSchedRunning()

_libdpx.DPxIsDatapixx()[source]

Verifies if the device is a DATAPixx.

Returns:

Non-zero if a DATAPixx was found, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsDatapixx()

_libdpx.DPxIsDatapixx2()[source]

Verifies if the device is a DATAPixx2.

Returns:

Non-zero if a DATAPixx2 was found, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsDatapixx2()

_libdpx.DPxIsDatapixx3()[source]

Verifies if the device is a DATAPixx3.

Returns:

Non-zero if a DATAPixx3 was found, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsDatapixx3()

_libdpx.DPxIsDinDebounce()[source]

Verifies if the DIN debounce mode is enabled.

Returns:

Non-zero if DIN transitions are being debounced.

Return type:

int

Low-level C definition:

int DPxIsDinDebounce()

_libdpx.DPxIsDinLogEvents()[source]

Verifies if the Din timetag mode is enable.

Returns:

Non-zero if DIN transitions are being logged to RAM buffer.

Return type:

int

Low-level C definition:

int DPxIsDinLogEvents()

_libdpx.DPxIsDinLogTimetags()[source]

Verifies if the Din timetag mode is enabled.

Returns:

Non-zero if buffered data is preceeded with nanosecond timetag.

Return type:

int

Low-level C definition:

int DPxIsDinLogTimetags()

_libdpx.DPxIsDinSchedCountdown()[source]

Verifies if RAM buffering is enabled for a Din channel.

Returns:

Non-zero if SchedCount decrements to 0 and automatically stops schedule.

Return type:

int

Low-level C definition:

int DPxIsDinSchedCountdown()

_libdpx.DPxIsDinSchedRunning()[source]

Verifies if a Din schedule is currently running.

Returns:

Non-zero if a Din schedule is currently running, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsDinSchedRunning()

_libdpx.DPxIsDinStabilize()[source]

Verifies if the hardware calibration mode is enabled.

Returns:

Non-zero if DIN transitions are being stabilized.

Return type:

int

Low-level C definition:

int DPxIsDinStabilize()

_libdpx.DPxIsDoutBacklightPulse()[source]

Verifies if the Dout backlight pulse mode is enabled.

Returns:

Non-zero if LCD backlight LED enables are gated by DOUT15.

Return type:

int

Low-level C definition:

int DPxIsDoutBacklightPulse()

_libdpx.DPxIsDoutButtonSchedules()[source]

Verifies if the DOUT automatic DOUT schedules mode is enabled.

Returns:

Non-zero if automatic DOUT schedules occur upon DIN button presses.

Return type:

int

Low-level C definition:

int DPxIsDoutButtonSchedules()

_libdpx.DPxIsDoutDinLoopback()[source]

Verifies if the DIN DOUT loopback is enabled.

Returns:

Non-zero if DIN are driven by digital output ports.

Return type:

int

Low-level C definition:

int DPxIsDoutDinLoopback()

_libdpx.DPxIsDoutPixelMode()[source]

Verifies if the pixel mode is enabled on digital outputs.

Returns:

Non-zero if pixel mode is enabled, 0 if disabled.

Return type:

int

Low-level C definition:

int DPxIsDoutPixelMode()

_libdpx.DPxIsDoutPixelModeGB()[source]

Verifies if the pixel mode is enabled on digital outputs.

Returns:

Non-zero if pixel mode is enabled, 0 if disabled.

Return type:

int

Low-level C definition:

int DPxIsDoutPixelMode()

_libdpx.DPxIsDoutSchedCountdown()[source]

Verifies if RAM buffering is enabled for a Dout channel.

Returns:

Non-zero if SchedCount decrements to 0 and automatically stops schedule.

Return type:

int

Low-level C definition:

int DPxIsDoutSchedCountdown()

_libdpx.DPxIsDoutSchedRunning()[source]

Verifies if a Dout schedule is currently running.

Returns:

Non-zero if a Dout schedule is currently running, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsDoutSchedRunning()

_libdpx.DPxIsIOHub()[source]

Verifies if the device is a USB IOHub.

Returns:

Non-zero if a USB IOHub was found. Else if not.

Return type:

int

Low-level C definition:

int DPxIsIOHub()

_libdpx.DPxIsMicSchedCountdown()[source]

Returns non-zero if SchedCount decrements to 0 and automatically stops schedule

Low-level C definition:

int DPxIsMicSchedCountdown()

_libdpx.DPxIsMicSchedRunning()[source]

Returns non-zero if MIC schedule is currently running

Low-level C definition:

int DPxIsMicSchedRunning()

_libdpx.DPxIsPPxAwake()[source]

Check to see if the PROPixx is awake.

Returns:

0 (False) if the PROPixx is in sleep mode, 1 (True) otherwise.

Low-level C definition:

int DPxIsPPxAwake(void)

_libdpx.DPxIsPPxCeilingMount()[source]

Check to see if the PROPixx is in Ceiling Mount mode.

Returns:

0 (False) if the PROPixx is not in Ceiling Mount mode, 1 (True) otherwise.

Return type:

int

Low-level C definition:

int DPxIsPPxCeilingMount(void)

_libdpx.DPxIsPPxHotSpotCorrection()[source]
_libdpx.DPxIsPPxLampLedEnabled()[source]

Check to see if the PROPixx lamp LED is enabled.

Note: Only available for PROPixx Revision 12 and higher.

Returns:

0 (False) if the PROPixx lamp LED is disabled, 1 (True) otherwise.

Low-level C definition:

int DPxIsPPxLampLedEnabled(void)

_libdpx.DPxIsPPxQuietFanMode()[source]

Check to see if the PROPixx quiet mode is enabled.

Note: Only available for PROPixx Revision 19 and higher.

Returns:

0 (False) if the PROPixx quiet mode is disabled, 1 (True) otherwise.

Low-level C definition:

int DPxIsPPxQuietFanMode(void)

_libdpx.DPxIsPPxRearProjection()[source]

Check to see if the PROPixx is in Rear projection

Returns:

0 (False) if the PROPixx is not in rear projection, 1 (True) otherwise.

Return type:

int

Low-level C definition:

int DPxIsPPxRearProjection(void)

_libdpx.DPxIsPPxTScopePrepAck()[source]

Returns non-zero when cover page has been presented, and T-Scope schedule can be started

_libdpx.DPxIsPPxVidSeqEnabled()[source]

Checks to see if the PROPixx Video Sequencer is enabled.

Returns:

0 (False) if the PROPixx Video Sequencer is Disabled, 1 (True) if Enabled.

Return type:

int

Low-level C definition:

int DPxIsPPxVidSeqEnabled(void)

_libdpx.DPxIsPropixx()[source]

Verifies if the device is a PROPixx.

This function will not detect the PROPixx Controller.

Returns:

Non-zero if the device exists, 0 if the device does not exist.

Return type:

int

Low-level C definition:

int DPxIsPropixx()

_libdpx.DPxIsPropixxCtrl()[source]

Verifies if the device is a PROPixx Controller.

Returns:

Non-zero if a PROPixx Controller was found, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsPropixxCtrl()

_libdpx.DPxIsPsyncTimeout()[source]

Verifies if a timeout occurred on the pixel synchronization.

This function allows the user to know if the VESA and Analog +5V input/output pins are trying to draw more than 500 mA.

Returns:

Non-zero if a timeout occurred, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsPsyncTimeout()

_libdpx.DPxIsRamOffline()[source]

Verifies if the RAM controller is offline.

Returns:

Zero if the RAM is online, non-zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsRamOffline()

_libdpx.DPxIsReady()[source]

Verifies if the current device is ready to use.

Returns:

Non-zero if the device is ready to use, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsReady()

_libdpx.DPxIsTPxAwake()[source]

Check to see if the PROPixx is awake.

Returns:

0 (False) if the PROPixx is in sleep mode, 1 (True) otherwise.

Low-level C definition:

int DPxIsPPxAwake(void)

_libdpx.DPxIsTouchpixx()[source]

Verifies if a Dout schedule is currently running.

Returns:

Non-zero if TOUCHPixx touch panel hardware is present and enabled.

Return type:

int

Low-level C definition:

int DPxIsTouchpixx()

_libdpx.DPxIsTouchpixxLogContinuousMode()[source]

Verifies if the TOUCHPixx continuous logging mode is enabled.

Returns:

Non-zero if the TOUCHPixx is in continuous logging mode, zero otherwise.

Return type:

int

Low-level C definition:

void DPxIsTouchpixxLogContinuousMode()

_libdpx.DPxIsTouchpixxLogEvents()[source]

Verifies if the Touchpixx timetag mode is enabled.

Returns:

Non-zero if Touchpixx transitions are being logged to RAM buffer.

Return type:

int

Low-level C definition:

int DPxIsTouchpixxLogEvents()

_libdpx.DPxIsTouchpixxLogTimetags()[source]

Verifies if the Touchpixx timetag mode is enabled.

Returns:

Non-zero if buffered data is preceeded with nanosecond timetag.

Return type:

int

Low-level C definition:

int DPxIsTouchpixxLogTimetags()

_libdpx.DPxIsTouchpixxPressed()[source]

Returns Non-zero if touch panel is currently pressed

Low-level C definition:

int DPxIsTouchpixxPressed()

_libdpx.DPxIsTrackpixx()[source]

Verifies if the device is a TRACKPixx.

Returns:

Non-zero if a TRACKPixx was found. Else if not.

Return type:

int

Low-level C definition:

int DPxIsTrackpixx()

_libdpx.DPxIsVidClutTransparencyColorMode()[source]

Verifies is the video CLUT transparency color mode is enabled.

This function allows the user to know if the video CLUT transparency color mode is enabled or not.

Returns:

When the mode is disabled, 0 is returned. When the mode is enabled, it returns Non-zero.

Return type:

int

Low-level C definition:

int DPxIsVidClutTransparencyColorMode()

_libdpx.DPxIsVidDviActive()[source]

Returns non-zero if DATAPixx is currently receiving video data over DVI link

Low-level C definition:

int DPxIsVidDviActive()

_libdpx.DPxIsVidDviActiveDual()[source]

Returns non-zero if DATAPixx is currently receiving video data over dual-link DVI

Low-level C definition:

int DPxIsVidDviActiveDual()

_libdpx.DPxIsVidDviLockable()[source]

Returns non-zero if VIEWPixx is currently receiving video whose timing can directly drive display.

Low-level C definition:

int DPxIsVidDviLockable()

_libdpx.DPxIsVidHorizOverlay()[source]

Verifies if the left/right halves of the video image are being overlayed

Returns:

Returns non-zero if the left/right halves of the video image are being overlayed, 0 otherwise.

Low-level C definition:

int DPxIsVidHorizOverlay()

_libdpx.DPxIsVidHorizSplit()[source]

Verifies if the video is being split across the two VGA outputs, or not.

Returns:

Returns non-zero if video is being split across the two VGA outputs.

Return type:

int

Low-level C definition:

int DPxIsVidHorizSplit()

_libdpx.DPxIsVidLcd3D60Hz()[source]

Returns non-zero if 3D pixel polarity inversion is enabled

Low-level C definition:

int DPxIsVidLcd3D60Hz(void)

_libdpx.DPxIsVidOverClocked()[source]

Returns non-zero if DATAPixx is receiving video at clock frequency that is higher than normal.

Low-level C definition:

int DPxIsVidOverClocked()

_libdpx.DPxIsVidPsyncBlankLine()[source]

Returns non-zero if pixel sync raster line is always displayed black

Low-level C definition:

int DPxIsVidPsyncBlankLine()

_libdpx.DPxIsVidPsyncSingleLine()[source]

Returns non-zero if pixel sync is only recognized on a single raster line.

Low-level C definition:

int DPxIsVidPsyncSingleLine()

_libdpx.DPxIsVidScanningBacklight()[source]

Returns non-zero if VIEWPixx scanning backlight is enabled

Low-level C definition:

int DPxIsVidScanningBacklight()

_libdpx.DPxIsVidVertStereo()[source]

Returns non-zero if DATAPixx is separating input into sequencial left/right stereo images.

Low-level C definition:

int DPxIsVidVertStereo()

_libdpx.DPxIsVidVesaBlueline()[source]

Returns non-zero if VESA 3D output is dependent on video blueline codes

Low-level C definition:

int DPxIsVidVesaBlueline()

_libdpx.DPxIsVidVesaFreeRun()[source]

Returns non-zero if PROPixx VESA 3D output is enabled.

Note

PROPixx Rev >= 7 only.

Low-level C definition:

int DPxIsVidVesaFreeRun(void)

_libdpx.DPxIsVidVesaLeft()[source]

Returns non-zero if VESA connector has left-eye signal

Low-level C definition:

int DPxIsVidVesaLeft()

_libdpx.DPxIsViewpixx()[source]

Verifies if the device is a VIEWPixx.

Returns:

Non-zero if a VIEWPixx (VIEWPixx, VIEWPixx /EEG or VIEWPixx /3D) is detected, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsViewpixx()

_libdpx.DPxIsViewpixx3D()[source]

Verifies if the device is a VIEWPixx3D.

Returns:

Non-zero if a VIEWPixx3D was found, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsViewpixx3D()

_libdpx.DPxIsViewpixxEeg()[source]

Verifies if the device is a VIEWPixxEEG.

Returns:

Non-zero if a VIEWPixxEEG was found, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsViewpixxEeg()

_libdpx.DPxIsViewpixxXL()[source]

Verifies if the device is a VIEWPixxXL.

Returns:

Non-zero if a VIEWPixxXL was found, zero otherwise.

Return type:

int

Low-level C definition:

int DPxIsViewpixxXL()

_libdpx.DPxOpen()[source]

Opens VPixx devices.

Must be called before any other DPx functions.

Low-level C definition:

void DPxOpen()

_libdpx.DPxOpenIp(ip='127.0.0.1')[source]
Does a DPxOpen on a particular server address Args:
ip (string): A valid IP address formatted according to the normal address classes.

Four dot seperated digits ranging from 0 to 255.

Returns:

Non-zero if the address fails, 0 if the address exists.

Return type:

int

Low-level C definition:

int DPxOpenIp(char* inIpAddr)

_libdpx.DPxRGBToTrigger(color)[source]

Helper function determines expected trigger from a given RGB 255 colour tuple.

Returns:

trigger value in decimal (base 10)

Return type:

int

Low-level C definition:

none

_libdpx.DPxReadAdcBuffer(inDict, numFrames=0, customReadAddr=None)[source]

Reads data from the ADC buffer.

Parameters:
  • inDict (dict) – The dictionary returned by the schedule setup

  • numFrames (int) – Number of frames of information to retrieve from the ADC buffer. Leave to 0 to read the full buffer, which is the default argument.

  • customReadAddr (int) – The byte address in Datapixx RAM where the buffered data can be found. If this argument is not provided, it will take on the value of bufferBaseAddress passed to the last call to SetAdcSchedule. Specifying abufferAddress of -1 will cause data to be streamed from the buffer which was defined in the last call to SetAdcSchedule.

Returns:

Returns a tuple of list, where the first one is the data and the second one are its timetags. The data will be nChan*numFrames, where nChan is the number of channels activated for recording.

Return type:

[data], [timetag] (list,list)

_libdpx.DPxReadDinLog(inDict, nReadFrames=0)[source]

Upload digital input data from a Datapixx internal log buffer to the local host.

Parameters:
  • inDict (Dictionary) –

    • “logData” is a row vector of acquired digital input values. Each column of the vector contains an unsigned integer with the new state of digital inputs 0 to 15 after a transition.

    • ”logTimetags” is a row vector of acquisition timetags, indicating when the corresponding transition to the state in logData occurred. The timetags are in double precision seconds since Datapixx powerup. Response times can be calculated by calling SetMarker() at stimulus onset, then subtracting GetMarker() from the logged timetags.

    • ”underflow” is set to 1 if calls to ReadDinLog read too many frames. The newLogFrames field returned by GetDinStatus indicates the maximum number of frames which can be read by ReadDinLog. If more than this number of frames is read, an underflow occurs and there will be errors in the logged data. In addition to returning an underflow flag, the numLogUnderflows field returned by GetDinStatus will be incremented. See DatapixxSimonGame, DatapixxDin*Demo files for examples.

  • nReadFrames – The number of frames to upload, and should not exceed newLogFrames returned by GetDinStatus. If numFrames argument is missing, ReadDinLog will return all remaining logged data.

_libdpx.DPxReadProductionInfo(address=None)[source]

Read a SPI block and return some production information.

Parameters:

address (int) – Any even value equal to or greater than zero.

Returns:

Production informations

Return type:

dictionary

_libdpx.DPxReadRam(address, length)[source]

Reads a block of VPixx RAM into a local buffer.

Parameters:
  • address (int) – Any even value equal to or greater than zero.

  • length (int) – Any value from zero to the RAM size.

Returns:

Values taken from RAM.

Return type:

list

Low-level C definition:

void DPxReadRam(unsigned address, unsigned length, void* buffer)

Example:

>>> from _libdpx import *
>>>
>>> DPxOpen()
>>>
>>> # Here is a list with the data to write in RAM.
>>> data = [1,2,3,4,5,6]
>>> DPxWriteRam(address= 42, int_list= data)
>>>
>>> DPxUpdateRegCache()
>>>
>>> print'DPxReadRam() = ', DPxReadRam(address= 42, length= 6)
>>>
>>> DPxClose()
_libdpx.DPxRestoreRegs()[source]

Write the local copy back to the DATAPixx

Low-level C definition:

void DPxRestoreRegs()

_libdpx.DPxSaveRegs()[source]

Get all DATAPixx registers, and save them in a local copy

Low-level C definition:

void DPxSaveRegs()

_libdpx.DPxSelectDevice(devsel, offset=0)[source]

Selects which of the device found in the system should be used.

Parameters:
  • devsel (string) –

    Any of the predefined constants.

    • Auto: Lets the low-level choose the device.

    • DATAPixx: DATAPixx.

    • DATAPixx2: DATAPixx2.

    • DATAPixx3: DATAPixx3.

    • VIEWPixx: VIEWPixx.

    • PROPixx Ctrl: PROPixx Controller.

    • PROPixx: PROPixx.

    • TRACKPIXX

  • offset (int) – Offset if more than one device of same type is connected, 0 by default.

Returns:

Non-zero if the device exists, 0 if the device does not exist.

Return type:

int

Low-level C definition:

int DPxSelectDevice(int)

_libdpx.DPxSelectDeviceSubName(devsel, name, offset=0)[source]

Select which VPixx device to access by specifying the sub name.

Parameters:
  • devsel (string) –

    Any of the predefined constants.

    • Auto: Lets the low-level choose the device.

    • DATAPixx: DATAPixx.

    • DATAPixx2: DATAPixx2.

    • VIEWPixx: VIEWPixx.

    • PROPixx Ctrl: PROPixx Controller.

    • PROPixx: PROPixx.

    • TRACKPIXX

  • name (string) – Must me a valid custom device sub name.

  • offset (int) – Offset if more than one device of same type is connected, 0 by default.

Returns:

Non-zero if the device exists, 0 if the device does not exist.

Return type:

int

Low-level C definition:

int DPxSelectDeviceSubName(int, char*)

_libdpx.DPxSetAdcBuff(buffAddr, buffSize)[source]

Sets base address, write address and buffer size for ADC schedules.

This function is a shortcut which assigns Size/BaseAddr/WriteAddr

Parameters:
  • buffAddr (int) – Base address.

  • buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetAdcBuff(unsigned buffAddr, unsigned buffSize)

_libdpx.DPxSetAdcBuffBaseAddr(buffBaseAddr)[source]

Sets the ADC RAM buffer start address.

Must be an even value.

Parameters:

buffBaseAddr (int) – Base address.

Low-level C definition:

void DPxSetAdcBuffBaseAddr(unsigned buffBaseAddr)

_libdpx.DPxSetAdcBuffChanRef(channel, reference)[source]

Sets a reference to a channel.

This method allows the user to enable or disable ram buffering on a given channel. When enabled, a given channel is buffered in ram. Enabling RAM buffering can only be done for channels 0 to 15.

Parameters:
  • channel (int) – Channel number to associate with a reference.

  • reference (str) – Valid argument is one of the following predefined constants: - gnd: Referenced to ground. - diff: Referenced to adjacent analog input. - ref0: Referenced to REF0 analog input. - ref1: Referenced to REF1 analog input.

Low-level C definition:

void DPxSetAdcBuffChanRef(int channel, int chanRef)

_libdpx.DPxSetAdcBuffSize(buffSize)[source]

Sets ADC RAM buffer size in bytes.

The Buffer size must be an even value. Buffer wraps to Base after Size.

Parameters:

buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetAdcBuffSize(unsigned buffSize)

_libdpx.DPxSetAdcBuffWriteAddr(buffWriteAddr)[source]

Sets RAM address from which next ADC datum will be written.

Must be an even value.

Parameters:

buffWriteAddr (int) – Write address.

Low-level C definition:

void DPxSetAdcBuffWriteAddr(unsigned buffWriteAddr)

_libdpx.DPxSetAdcSched(onset, rateValue, rateUnits, count)[source]

Sets ADC schedule onset, count and rate.

This function is a shortcut which assigns Onset/Rate/Count. If count is greater than zero, the count down mode is enabled.

Parameters:
  • onset (int) – Schedule onset.

  • rateValue (int) – Rate value.

  • rateUnits (str) – Usually hz. Can also be video to update every rateValue video frames or nano to update every rateValue nanoseconds.

  • count (int) – Schedule count.

Low-level C definition:

void DPxSetAdcSched(unsigned onset, unsigned rateValue, int rateUnits, unsigned count)

_libdpx.DPxSetAdcSchedCount(count)[source]

Sets ADC schedule update count.

Parameters:

count (int) – Schedule count.

Low-level C definition:

void DPxSetAdcSchedCount(unsigned count)

_libdpx.DPxSetAdcSchedOnset(onset)[source]

Sets nanosecond delay between schedule start and first ADC sample.

Parameters:

onset (int) – delay in nanoseconds.

Low-level C definition:

void DPxSetAdcSchedOnset(unsigned onset)

_libdpx.DPxSetAdcSchedRate(rate, unit)[source]

Sets the schedule rate.

This method allows the user to set the schedule rate. Since the rate can be given with different units, the method also needs to have a unit associated with the rate.

If no delay is required, this method does not need to be used. Default value is 0.

Parameters:
  • rate (int) – Any positive value equal to or greater than zero.

  • unit (str) – Any of the predefined constants. - hz: rate updates per second, maximum 200 kHz. - video: rate updates per video frame, maximum 200 kHz. - nano: rate updates period in nanoseconds, minimum 5000 ns.

Low-level C definition:

void DPxSetAdcSchedRate(unsigned  rateValue, int  rateUnits)

_libdpx.DPxSetAdcSchedule(onSet, rateValue, rateUnits, maxScheduleFrames, channelList=None, bufferBaseAddr=4000000.0, numberBufferFrames=None)[source]

Configure a schedule for autonomous ADC analog signal acquisition.

This function is used to fully setup an acquisition schedule on the device. Regardless of the actual format chosen, the resulting sample rate cannot exceed 200 kHz. It returns a dictionary that is needed when reading data or updating the buffer. Use ReadAdcBuffer to upload the acquired data from this address after calling StartAdcSchedule. Note that every call to StartAdcSchedule must be preceeded by a call to SetAdcSchedule (ie: multiple calls to StartAdcSchedule each require their own call to SetAdcSchedule).

Parameters:
  • onSet (float) – The desired delay (in double precision seconds) between schedule initiation, and the first ADC sample acquisition.

  • rateValue (int) – The rate at which the ADC’s acquire successive samples.

  • rateUnits (str) – This can have three values: “Hz” for samples/seconds, “video” for samples/video frame or “nano” for seconds/samples

  • maxScheduleFrames (int) – If the dataset has a known length, then maxScheduleFrames should be that number. If it is a dynamic length, pass 0.

  • channelList (list) – The channelList can have two formats, a list of the channels you want to use, or a list of the channels you want to use in the first row, and the 2nd row contains the differential. The first row of the list contains 1 or more integers in the range 0 to GetAdcNumChannels-1. This is the list of ADC channels which will be acquired. The second row of the matrix indicates the differential voltage references for each acquired channel. The list must have this format: [[chanNum, ref]…] or 1D list [chanNum, chanNum2, …]. The reference is selected using a string with value “gnd”, “diff”, “ref0” or “ref1”. Code “gnd” is used when no differential subtraction is required during acquisition. All analog inputs are referenced to ground, also known as single-ended acquisition. Code “diff” implements fully differential inputs, subtracting the adjacent channel’s voltage before acquiring (eg: acquiring ADC0 with code = “diff” would subtract the ADC1 voltage from the ADC0 voltage, writing the result to the acquisition buffer). When using this mode, data is typically acquired only on the even channels, effectively halving the number of available channels. Code “ref0” implements a differential input referenced to the REF0 analog input (see the Datapixx user manual for pinouts). This has the benefits of high-impedance differential inputs, without having to sacrifice half of the channels as with fully differential inputs. Code “ref1” implements a differential input referenced to the REF1 analog input. It is possible to use different codes for different analog channels in a single acquisition schedule. For example ADC0 and ADC1 could be acquired single-ended while ADC2 is referenced to ADC3, and ADC4/5/6/7 could be referenced to REF0. It is also possible to pass only a single row of ADC channels to channelList. In this case, all of the ADC channels will be acquired single-ended.

  • bufferBaseAddress (int) – The start of the RAM buffer which should hold the acquired data inside the Datapixx. Default value is 4e6.

  • numBufferFrames (int) – Specifies the desired size of the acquisition buffer in the Datapixx RAM. Default value of maxScheduleFrames. If maxScheduleFrames is larger than numBufferFrames (or 0), then each time the acquisition frame counter reaches a multiple of numBufferFrames, the acquisition buffer address automatically wraps back to bufferBaseAddress. This circular buffer effect can be used for acquiring arbitrarily long analog datasets. Simply monitor newBufferFrames returned by GetAdcStatus, and use ReadAdcBuffer in streaming mode to upload newly acquired data from the Datapixx RAM to the host.

Returns:

Returns a dictionary which has some global information which must be passed to other ADC functions.

Return type:

AdcDictionary (dict)

_libdpx.DPxSetAudBuff(buffAddr, buffSize)[source]

Sets base address, reads address and buffer size for AUD schedules.

This function is a shortcut which assigns Size/BaseAddr/ReadAddr

Parameters:
  • buffAddr (int) – Base address.

  • buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetAudBuff(unsigned buffAddr, unsigned buffSize)

_libdpx.DPxSetAudBuffBaseAddr(buffBaseAddr)[source]

Sets the AUD RAM buffer start address.

The address must be an even value.

Parameters:

buffBaseAddr (int) – Base address.

Low-level C definition:

void DPxSetAudBuffBaseAddr(unsigned buffBaseAddr)

_libdpx.DPxSetAudBuffReadAddr(buffReadAddr)[source]

Sets RAM address from which next AUD datum will be read.

The address must be an even value.

Parameters:

buffReadAddr (int) – Read address.

Low-level C definition:

void DPxSetAudBuffReadAddr(unsigned buffReadAddr)

_libdpx.DPxSetAudBuffSize(buffSize)[source]

Sets AUD RAM buffer size in bytes.

The size must be an even value. Buffer wraps to Base once it reaches the size.

Parameters:

buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetAudBuffSize(unsigned buffSize)

_libdpx.DPxSetAudCodecOutLeftVolume(volume, dBUnits=0)[source]

Sets the volume for the DATAPixx Audio OUT Right channel

Parameters:
  • volume (float) – The value for the desired volume, between 0 and 1 or in dB.

  • dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0

Low-level C definition:

void DPxSetAudCodecOutLeftVolume(double volume, int DBUnits)

_libdpx.DPxSetAudCodecOutRightVolume(volume, dBUnits=0)[source]

Sets the volume for the DATAPixx Audio OUT Right channel

Parameters:
  • volume (float) – The value for the desired volume, between 0 and 1 or in dB.

  • dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0

Low-level C definition:

void DPxSetAudCodecOutRightVolume(double volume, int DBUnits)

_libdpx.DPxSetAudCodecOutVolume(volume, dBUnits=0)[source]

Sets the volume for the DATAPixx Audio OUT Left and Right channels

Parameters:
  • volume (float) – The value for the desired volume, between 0 and 1 or in dB.

  • dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0

Low-level C definition:

void DPxSetAudCodecOutVolume(double volume, int DBUnits)

_libdpx.DPxSetAudCodecSpeakerLeftVolume(volume, dBUnits=0)[source]

Sets volume for the DATAPixx Speaker LEft channels

Parameters:
  • volume (float) – The value for the desired volume, between 0 and 1 or in dB.

  • dBUnits (int, optional) – Set non-zero to set the gain in dB. Defaults to 0.

Low-level C definition:

void DPxSetAudCodecSpeakerLeftVolume(double volume, int DBUnits)

_libdpx.DPxSetAudCodecSpeakerRightVolume(volume, dBUnits=0)[source]

Sets volume for the DATAPixx Speaker Right channels

Parameters:
  • volume (float) – The value for the desired volume, between 0 and 1 or in dB.

  • dBUnits (int, optional) – Set non-zero to set the gain in dB. Defaults to 0

Low-level C definition:

void DPxSetAudCodecSpeakerRightVolume(double volume, int DBUnits)

_libdpx.DPxSetAudCodecSpeakerVolume(volume, dBUnits=0)[source]

Sets volume for the DATAPixx Speaker Left and Right channels

Parameters:
  • volume (float) – The value for the desired volume, between 0 and 1 or in dB.

  • dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0.

Low-level C definition:

void DPxSetAudCodecSpeakerVolume(double volume, int DBUnits)

_libdpx.DPxSetAudLRMode(mode)[source]

Sets how audio data are updated by schedules.

Parameters:

mode (str) –

Any of the following predefined constants.

  • mono: Each AUD schedule datum goes to left and right channels

  • left: Each AUD schedule datum goes to left channel only

  • right: Each AUD schedule datum goes to right channel only

  • stereo1: Pairs of AUD data are copied to left/right channels

  • stereo2: AUD data goes to left channel, AUX data goes to right

Low-level C definition:

void DPxSetAudLRMode(int lrMode)

_libdpx.DPxSetAudLeftValue(volume)[source]

Set the 16-bit 2’s complement signed value for the Left audio output channel

Parameters:

volume (float) – Value for the desired volume, between 0 and 1.

Low-level C definition:

void DPxSetAudLeftValue(int value)

_libdpx.DPxSetAudLeftVolume(volume)[source]

Sets volume for the Right audio channels, range 0-1

Parameters:

volume (float) – Value for the desired volume, between 0 and 1.

Low-level C definition:

void DPxSetAudRightVolume(double volume)

_libdpx.DPxSetAudRightValue(volume)[source]

Set the 16-bit 2’s complement signed value for the Right audio output channel

Parameters:

volume (float) – Value for the desired volume, between 0 and 1.

Low-level C definition:

void DPxSetAudRightValue(int value)

_libdpx.DPxSetAudRightVolume(volume)[source]

Sets volume for the Right audio channels, range 0-1

Parameters:

volume (float) – Value for the desired volume, between 0 and 1.

Low-level C definition:

void DPxSetAudRightVolume(double volume)

_libdpx.DPxSetAudSched(onset, rateValue, rateUnits, count)[source]

Sets AUD schedule onset, count and rate.

This function is a shortcut which assigns Onset/Rate/Count. If count is greater than zero, the count down mode is enabled.

Parameters:
  • onset (int) – Schedule onset.

  • rateValue (int) – Rate value.

  • rateUnits (str) – Usually hz. Can also be video to update every rateValue video frames or nano to update every rateValue nanoseconds.

  • count (int) – Schedule count.

Low-level C definition:

void DPxSetAudSched(unsigned onset, unsigned rateValue, int rateUnits, unsigned count)

_libdpx.DPxSetAudSchedCount(count)[source]

Sets MIC schedule update count.

Parameters:

count (int) – Schedule count.

Low-level C definition:

void DPxSetAudSchedCount(unsigned count)

_libdpx.DPxSetAudSchedOnset(onset)[source]

Sets nanosecond delay between schedule start and first MIC update.

Parameters:

onset (int) – The onset value.

Low-level C definition:

void DPxSetAudSchedOnset(unsigned onset)

_libdpx.DPxSetAudSchedRate(rate, unit)[source]

Sets the schedule rate.

This method allows the user to set the schedule rate. Since the rate can be given with different units, the method also needs to have a unit associated with the rate.

If no delay is required, this method does not need to be used. Default value is 0.

Parameters:
  • rate (int) – Any positive value equal to or greater than zero.

  • unit (str) –

    Any of the following predefined constants.

    • hz: rate updates per second, maximum 96 kHz.

    • video: rate updates per video frame, maximum 96 kHz.

    • nano: rate updates period in nanoseconds, minimum 10417 ns.

Low-level C definition:

void DPxSetAudSchedRate(unsigned rateValue, int rateUnits)

_libdpx.DPxSetAudVolume(volume)[source]

Sets the volume for both Left/Right audio channels, range 0-1

Parameters:

volume (float) – Value for the desired volume, between 0 and 1.

Low-level C definition:

void DPxSetAudVolume(double volume)

_libdpx.DPxSetAudioSchedule(scheduleOnset, scheduleRate, maxScheduleFrames, lrMode='mono', bufferAddress=16000000, numBufferFrames=None)[source]

Implements an audio schedule in a DATAPixx.

Mimics the behavior of Datapixx(‘SetAudioSchedule’) in MATLAB, but with more flexibility in the ‘lrMode’ format. ‘lrMode’ can be passed as an integer (as in MATLAB), or as a string.

Parameters:
  • scheduleOnset (float) – the audio schedule delay in seconds

  • scheduleRate (int) – the audio codec sampling rate in Hz

  • maxScheduleFrames – the number of samples after which the audio codec stops sampling. if maxScheduleFrames > numBufferFrames, the audio codec loops back to sample data at the start address of the audio buffer.

Exceptions:
  1. scheduleOnset is not of type float or is less than 0

  2. scheduleOnset * 10**9 is greater than 0xffffffff

  3. scheduleRate is not of type int. warning when scheduleRate is not in the interval (8000,96000)

  4. maxScheduleFrames is not of type int or is less than 0

  5. maxScheduleFrames is zero and numBufferFrames is omitted

  6. lrMode is not equal to any acceptable values. acceptable values given in error message

  7. bufferAddress is not of type int or is less than 0 or is odd

  8. numBufferFrames is not of type int or is less than 0

_libdpx.DPxSetAuxBuff(buffAddr, buffSize)[source]

Sets base address, reads address and buffer size for AUX schedules.

This function is a shortcut which assigns Size/BaseAddr/ReadAddr

Parameters:
  • buffAddr (int) – Base address.

  • buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetAuxBuff(unsigned buffAddr, unsigned buffSize)

_libdpx.DPxSetAuxBuffBaseAddr(buffBaseAddr)[source]

Sets the AUX RAM buffer start address.

The address must be an even value.

Parameters:

buffBaseAddr (int) – Base address.

Low-level C definition:

void DPxSetAuxBuffBaseAddr(unsigned buffBaseAddr)

_libdpx.DPxSetAuxBuffReadAddr(buffReadAddr)[source]

Sets RAM address from which next AUX datum will be read.

The address must be an even value.

Parameters:

buffReadAddr (int) – Read address.

Low-level C definition:

void DPxSetAuxBuffReadAddr(unsigned buffReadAddr)

_libdpx.DPxSetAuxBuffSize(buffSize)[source]

Sets AUX RAM buffer size in bytes.

The size must be an even value. Buffer wraps to Base once it reaches the size.

Parameters:

buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetAuxBuffSize(unsigned buffSize)

_libdpx.DPxSetAuxSched(onset, rateValue, rateUnits, count)[source]

Sets AUX schedule onset, count and rate.

This function is a shortcut which assigns Onset/Rate/Count. If count is greater than zero, the count down mode is enabled.

Parameters:
  • onset (int) – Schedule onset.

  • rateValue (int) – Rate value.

  • rateUnits (str) – Usually hz. Can also be video to update every rateValue video frames or nano to update every rateValue nanoseconds.

  • count (int) – Schedule count.

Low-level C definition:

void DPxSetAuxSched(unsigned onset, unsigned rateValue, int rateUnits, unsigned count)

_libdpx.DPxSetAuxSchedCount(count)[source]

Sets the AUX schedule update count

Parameters:

count (int) – Schedule count.

Low-level C definition:

void DPxSetAuxSchedCount(unsigned count)

_libdpx.DPxSetAuxSchedOnset(onset)[source]

Sets nanosecond delay between schedule start and first AUX update.

Parameters:

onset (int) – The nanosecond onset between the first update and the start of schedule.

Low-level C definition:

void DPxSetAuxSchedOnset(unsigned onset)

_libdpx.DPxSetAuxSchedRate(rate, unit)[source]

Sets the schedule rate.

This method allows the user to set the schedule rate. Since the rate can be given with different units, the method also needs to have a unit associated with the rate.

If no delay is required, this method does not need to be used. Default value is 0.

Parameters:
  • rate (int) – Any positive value equal to or greater than zero.

  • unit (str) –

    Any of the following predefined constants.

    • hz: rate updates per second, maximum 96 kHz.

    • video: rate updates per video frame, maximum 96 kHz.

    • nano: rate updates period in nanoseconds, minimum 10417 ns.

Low-level C definition:

void DPxSetAuxSchedRate(unsigned rateValue, int rateUnits)

_libdpx.DPxSetCustomDevName(devName)[source]

Set user-specified device name, ignoring whether or not it has been assigned to dpxSysDevsel

Low-level C definition:

void DPxSetCustomDevName(unsigned char* devName)

_libdpx.DPxSetCustomStartupConfig()[source]

Saves the current registers to be used on start up.

This can be useful if you set your projector to ceiling mode or rear projection and you want those settings to persist.

Note

PROPixx Rev >= 6 only and VIEWPixx/PROPixxCTRL Rev >= 25 only

Low-level C definition:

void DPxSetCustomStartupConfig(void)

_libdpx.DPxSetDacBuff(buffAddr, buffSize)[source]

Sets base address, read address and buffer size for DAC schedules.

This function is a shortcut which assigns Size/BaseAddr/ReadAddr

Parameters:
  • buffAddr (int) – Base address.

  • buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetDacBuff(unsigned buffAddr, unsigned buffSize)

_libdpx.DPxSetDacBuffBaseAddr(buffBaseAddr)[source]

Sets the DAC RAM buffer start address.

Must be an even value.

Parameters:

buffBaseAddr (int) – Base address.

Low-level C definition:

void DPxSetDacBuffBaseAddr(unsigned buffBaseAddr)

_libdpx.DPxSetDacBuffReadAddr(buffReadAddr)[source]

Sets RAM address from which next DAC datum will be read.

Must be an even value.

Parameters:

buffReadAddr (int) – Read address.

Low-level C definition:

void DPxSetDacBuffReadAddr(unsigned buffReadAddr)

_libdpx.DPxSetDacBuffSize(buffSize)[source]

Sets DAC RAM buffer size in bytes.

Must be an even value. Buffer wraps to Base after Size.

Parameters:

buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetDacBuffSize(unsigned buffSize)

_libdpx.DPxSetDacSched(onset, rateValue, rateUnits, count)[source]

Sets DAC schedule onset, count and rate.

This function is a shortcut which assigns Onset/Rate/Count. If count is greater than zero, the count down mode is enabled.

Parameters:
  • onset (int) – Schedule onset.

  • rateValue (int) – Rate value.

  • rateUnits (str) – Usually hz. Can also be video to update every rateValue video frames or nano to update every rateValue nanoseconds.

  • count (int) – Schedule count.

Low-level C definition:

void DPxSetDacSched(unsigned onset, unsigned rateValue, int rateUnits, unsigned count)

_libdpx.DPxSetDacSchedCount(count)[source]

Sets DAC schedule update count.

Parameters:

count (int) – Schedule count.

Low-level C definition:

void DPxSetDacSchedCount(unsigned count)

_libdpx.DPxSetDacSchedOnset(onset)[source]

Sets the nanosecond delay between schedule start and first DAC update.

Parameters:

onset (int) – delay in nanoseconds.

Low-level C definition:

void DPxSetDacSchedOnset(unsigned onset)

_libdpx.DPxSetDacSchedRate(rate, unit)[source]

Sets the schedule rate.

This method allows the user to set the schedule rate. Since the rate can be given with different units, the method also needs to have a unit associated with the rate.

If no delay is required, this method does not need to be used. Default value is 0.

Parameters:
  • rate (int) – Any positive value equal to or greater than zero.

  • unit (str) –

    Any of the predefined constants.

    • hz: rate updates per second, maximum 1 MHz.

    • video: rate updates per video frame, maximum 1 MHz.

    • nano: rate updates period in nanoseconds, minimum 1000 ns.

Low-level C definition:

void DPxSetDacSchedRate(unsigned rateValue, int rateUnits)

_libdpx.DPxSetDacSchedule(scheduleOnset, scheduleRate, rateUnits, maxScheduleFrames, channelList=None, bufferBaseAddress=0, numBufferFrames=None)[source]

Configure a schedule for autonomous DAC analog signal acquisition.

This function is used to fully setup an acquisition schedule on the device. Regardless of the actual format chosen, the resulting sample rate cannot exceed 1 MHz. It returns a dictionary that is needed when reading data or updating the buffer. Use ReadAdcBuffer to upload the acquired data from this address after calling StartAdcSchedule. Note that every call to StartAdcSchedule must be preceeded by a call to SetAdcSchedule (ie: multiple calls to StartAdcSchedule each require their own call to SetAdcSchedule).

Parameters:
  • onSet (float) – The desired delay (in double precision seconds) between schedule initiation, and the first ADC sample acquisition.

  • rateValue (int) – The rate at which the ADC’s acquire successive samples.

  • rateUnits (str) – This can have three values: “Hz” for samples/seconds, “video” for samples/video frame or “nano” for seconds/samples

  • maxScheduleFrames (int) – If the dataset has a known length, then maxScheduleFrames should be that number. If it is a dynamic length, pass 0.

  • channelList (list) – List of the DAC channels which should be updated from the waveform buffer. The list should contain 1 or more integers in the range 0 toGetDacNumChannels-1.

  • bufferBaseAddress (int) – The start of the RAM buffer which should hold the acquired data inside the Datapixx. Default value is 4e6.

  • numBufferFrames (int) – Specifies the desired size of the acquisition buffer in the Datapixx RAM. Default value of maxScheduleFrames. If maxScheduleFrames is larger than numBufferFrames (or 0), then each time the acquisition frame counter reaches a multiple of numBufferFrames, the acquisition buffer address automatically wraps back to bufferBaseAddress. This circular buffer effect can be used for acquiring arbitrarily long analog datasets. Simply monitor newBufferFrames returned by GetAdcStatus, and use ReadAdcBuffer in streaming mode to upload newly acquired data from the Datapixx RAM to the host.

Returns:

Returns a dictionary which has some global information which must be passed to other DAC functions.

Return type:

DACDictionary (dict)

_libdpx.DPxSetDacValue(value, channel)[source]

Sets the current value of a channel.

This method allows the user to set the 16-bit 2’s complement signed value for one DAC channel. In other words, this means that you have access to values between -32768 and +32768. For a positive number, you will simply need to leave it as is. For a negative number, since we are using signed, you will need to convert it to the 2’s complement representation.

Parameters:
  • value (int) – Value of the channel. It is a 16-bit 2’s complement signed number.

  • channel (int) – Channel number.

Low-level C definition:

void DPxSetDacValue(int value, int channel)

See also

DPxGetDacValue

_libdpx.DPxSetDacVoltage(voltage, channel)[source]

Sets the voltage for one DAC channel.

For channels 0 and 1: ± 10V for ch0/1. For channels 2 and 3: ± 5V.

Args:4

voltage (float): Voltage of the channel. channel (int): Channel number.

Low-level C definition:

void DPxSetDacVoltage(double voltage, int channel)

See also

DPxGetDacVoltage

_libdpx.DPxSetDebug(level)[source]

Debugging level controls verbosity of debug and trace messages.

Parameters:

level (int) – Set to 0 to disable messages, 1 to print libdpx, 2, to print libusb debug messages.

Low-level C definition:

void DPxSetDebug(int level)

_libdpx.DPxSetDinBuff(buffAddr, buffSize)[source]

Sets base address, write address and buffer size for Din schedules.

This function is a shortcut which assigns Size/BaseAddr/WriteAddr

Parameters:
  • buffAddr (int) – Base address.

  • buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetDinBuff(unsigned buffAddr, unsigned buffSize)

_libdpx.DPxSetDinBuffBaseAddr(buffBaseAddr)[source]

Sets the DIN RAM buffer start address.

Must be an even value.

Parameters:

buffBaseAddr (int) – Base address.

Low-level C definition:

void DPxSetDinBuffBaseAddr(unsigned buffBaseAddr)

_libdpx.DPxSetDinBuffSize(buffSize)[source]

Sets Din RAM buffer size in bytes.

Must be an even value. Buffer wraps to Base after Size.

Parameters:

buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetDinBuffSize(unsigned buffSize)

_libdpx.DPxSetDinBuffWriteAddr(buffWriteAddr)[source]

Sets RAM address from which next DIN datum will be written.

Must be an even value.

Parameters:

buffWriteAddr (int) – Write address.

Low-level C definition:

void DPxSetDinBuffWriteAddr(unsigned buffWriteAddr)

_libdpx.DPxSetDinDataDir(direction_mask)[source]

Sets the port direction mask.

Sets the port direction for each bit in direction_mask. The mask is one value representing all bits from the port. The given direction_mask will set the direction of all digital input channels. For each bit which should drive its port, the corresponding direction_mask value should be set to 1. An hexadecimal direction_mask can be given.

For example, direction_mask = 0x0000F will enable the port for the first 4 bits on the right. All other ports will be disabled.

Parameters:

int – Value which corresponds in binary to the desired open ports.

Low-level C definition:

void DPxSetDinDataDir(int DirectionMask)

_libdpx.DPxSetDinDataOut(dataOut)[source]

Sets the data which should be driven on each port.

In order to be able to drive the ports with the given value, the port direction has to be properly enabled. This can be done using the DPxSetDinDataDir with the appropriate bit mask.

Parameters:

dataOut (int) – Set bit to 1 will enable the port for that bit. Set bit to 0 will disable it.

Low-level C definition:

void DPxSetDinDataOut(int dataOut)

_libdpx.DPxSetDinDataOutStrength(strength)[source]

Sets the strength of the driven outputs.

This function allows the user to set the current (Ampere) strength of the driven outputs. The implementation actual value uses 1/16 up to 16/16. So minimum strength will be 0.0625 and maximum will be 1. The strength can be increased by 0.0625 up to 1. Giving a strength of 0 will thus set it to 0.0625. Giving a strength between 0.0625 and 0.125 will round the given strength to one of the two increments.

The strength is the same for all channels.

Parameters:

strength (float) – Any value in a range of 0 to 1.

Low-level C definition:

void DPxSetDinDataOutStrength(double strength)

_libdpx.DPxSetDinLog(buffBaseAddr=12000000, numBuffFrames=1000)[source]
Configure digital input transition logging. The log reports rising and falling

edges of the digital inputs, with associated timetags, and is the best way to monitor button box responses or read parallel port data.

Note that the first call to StartDinLog must be preceeded by a call to SetDinLog to initialize and clear the log. Once SetDinLog has been called, StartDinLog and StopDinLog may be called multiple times to enable and disable logging. Note that logged timetags are implemented in hardware with microsecond precision.

Parameters:
  • bufferBaseAddress (int) – Specifies the start of the RAM buffer which should hold the logged data inside the Datapixx. Use ReadDinLog to upload the logged data from this address after calling StartDinLog.

  • numBufferFrames – Specifies the desired size of the log buffer in the Datapixx RAM. This buffer is circular, so it must be large enough to hold all logged transitions between successive calls to ReadDinLog. newLogFrames returned by GetDinStatus indicates the number of transitions logged since the last call to ReadDinLog.

_libdpx.DPxSetDinSched(onset, rateValue, rateUnits, count)[source]

Sets Din schedule onset, count and rate.

This function is a shortcut which assigns Onset/Rate/Count. If count is greater than zero, the count down mode is enabled.

Parameters:
  • onset (int) – Schedule onset.

  • rateValue (int) – Rate value.

  • rateUnits (str) – Usually hz. Can also be video to update every rateValue video frames or nano to update every rateValue nanoseconds.

  • count (int) – Schedule count.

Low-level C definition:

void DPxSetDinSched(unsigned onset, unsigned rateValue, int rateUnits, unsigned count)

_libdpx.DPxSetDinSchedCount(count)[source]

Sets Din schedule update count.

Parameters:

count (int) – Schedule count.

Low-level C definition:

void DPxSetDinSchedCount(unsigned count)

_libdpx.DPxSetDinSchedOnset(onset)[source]

Sets nanosecond delay between schedule start and first Din sample.

Parameters:

onset (int) – delay in nanoseconds.

Low-level C definition:

void DPxSetDinSchedOnset(unsigned onset)

_libdpx.DPxSetDinSchedRate(rate, unit)[source]

Sets the schedule rate.

This method allows the user to set the schedule rate. Since the rate can be given with different units, the method also needs to have a unit associated with the rate.

If no delay is required, this method does not need to be used. Default value is 0.

Parameters:
  • rate (int) – Any positive value equal to or greater than zero.

  • unit (str) –

    Any of the predefined constants.

    • hz: samples per second, maximum 1 MHz.

    • video: samples per video frame, maximum 1 MHz.

    • nano: sample period in nanoseconds, minimum 1000 ns.

Low-level C definition:

void DPxSetDinSchedRate(unsigned  rateValue, int  rateUnits)

_libdpx.DPxSetDoutBuff(buffAddr, buffSize)[source]

Sets base address, read address and buffer size for Dout schedules.

This function is a shortcut which assigns Size/BaseAddr/ReadAddr

Parameters:
  • buffAddr (int) – Base address.

  • buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetDoutBuff(unsigned buffAddr, unsigned buffSize)

_libdpx.DPxSetDoutBuffBaseAddr(buffBaseAddr)[source]

Sets the Dout RAM buffer start address.

Must be an even value.

Parameters:

buffBaseAddr (int) – Base address.

Low-level C definition:

void DPxSetDoutBuffBaseAddr(unsigned buffBaseAddr)

_libdpx.DPxSetDoutBuffReadAddr(buffReadAddr)[source]

Sets RAM address from which next Dout datum will be read.

Must be an even value.

Parameters:

buffReadAddr (int) – Read address.

Low-level C definition:

void DPxSetDoutBuffReadAddr(unsigned buffReadAddr)

_libdpx.DPxSetDoutBuffSize(buffSize)[source]

Sets Dout RAM buffer size in bytes.

Must be an even value. Buffer wraps to Base after Size.

Parameters:

buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetDoutBuffSize(unsigned buffSize)

_libdpx.DPxSetDoutButtonSchedulesMode(mode: int = 0)[source]

Set the automatic DOUT schedules upon DIN button presses mode.

Parameters:

mode (int) – Mode should be 0 for standard setup and 1 for MRI set-up. Mode 0 and 1 will only trigger on a button push, while Mode 2 will trigger on both events. In Mode 2, the increment between push/release schedules is 2kB (2048).

Low-level C definition:

void DPxDisableDoutButtonSchedules()

_libdpx.DPxSetDoutSched(onset, rateValue, rateUnits, count)[source]

Sets Dout schedule onset, count and rate.

This function is a shortcut which assigns Onset/Rate/Count. If count is greater than zero, the count down mode is enabled.

Parameters:
  • onset (int) – Schedule onset.

  • rateValue (int) – Rate value.

  • rateUnits (str) – Usually hz. Can also be video to update every rateValue video frames or nano to update every rateValue nanoseconds.

  • count (int) – Schedule count.

Low-level C definition:

void DPxSetDoutSched(unsigned onset, unsigned rateValue, int rateUnits, unsigned count)

_libdpx.DPxSetDoutSchedCount(count)[source]

Sets Dout schedule update count.

Parameters:

count (int) – Schedule count.

Low-level C definition:

void DPxSetDoutSchedCount(unsigned count)

_libdpx.DPxSetDoutSchedOnset(onset)[source]

Sets nanosecond delay between schedule start and first Dout update.

Parameters:

onset (int) – delay in nanoseconds.

Low-level C definition:

void DPxSetDoutSchedOnset(unsigned onset)

_libdpx.DPxSetDoutSchedRate(rate, unit)[source]

Sets the schedule rate.

This method allows the user to set the schedule rate. Since the rate can be given with different units, the method also needs to have a unit associated with the rate.

Parameters:
  • rate (int) – Any positive value equal to or greater than zero.

  • unit (str) –

    Any of the predefined constants.

    • hz: rate updates per second, maximum 10 MHz.

    • video: rate updates per video frame, maximum 10 MHz.

    • nano: rate updates period in nanoseconds, minimum 100 ns.

Low-level C definition:

void DPxSetDoutSchedRate(unsigned rateValue, int rateUnits)

_libdpx.DPxSetDoutSchedule(scheduleOnset, scheduleRate, maxScheduleFrames, bufferAddress=8000000, numBufferFrames=None)[source]

Implements a digital output schedule in a DATAPixx.

Mimics the behavior of Datapixx(‘SetDoutSchedule’) in MATLAB.

Parameters:
  • scheduleOnset (float) – the audio schedule delay in seconds

  • scheduleRate (int or list) – the sampling rate of the digital output schedule in one of several formats:

  • integer (1) 'scheduleRate' is an) –

  • Hertz (0 'hz' sampling rate specified in) –

  • an (2) 'scheduleRate' is a list with 2 elements. the first element is) –

  • either (integer indicating the sampling rate. the second element is) –

  • allowable (an integer or a string indicating the sampling rate units.) –

  • below (values for the second element are in the 'int' and 'str' columns) –

  • description (int str) –

  • Hertz

  • frames (1 'video' sampling rate specified in DATAPixx video) –

  • nanoseconds (2 'nano' sampling rate specified in) –

  • NOTE – regardless of the choosen format, sampling rate cannot exceed 10 MHz

  • maxScheduleFrames (int) – the number of samples after which the digital output schedule stops sampling. if maxScheduleFrames > numBufferFrames, the digital output schedule loops back to sample datum at the start address of the digital output buffer.

  • bufferAddress (int) – memory location in DATAPixx RAM default=int(8e6)

  • numBufferFrames (int) – number of digital output schedule samples written into DATAPixx RAM. NOTE: these are specified in bytes, while the data format is int16. therefore, numBufferFrames = maxScheduleFrames*2 default = maxScheduleFrames*2

Exceptions:
  1. scheduleOnset is not of type float or is less than 0

  2. scheduleOnset is greater than 4.295 seconds

  3. scheduleRate does not obey supported format

  4. scheduleRate specifies sampling rate greater than 10 MHz, regardless of format

  5. maxScheduleFrames is not of type int or is less than 0

  6. maxScheduleFrames is zero and numBufferFrames was omitted

  7. bufferAddress is not of type int or is less than 0 or is odd

  8. numBufferFrames is not of type int or is less than 0

_libdpx.DPxSetDoutValue(bit_value, bit_mask)[source]

Sets the port direction mask.

Sets the port direction for each bit in bit_mask. The mask is one value representing all bits from the port. The given bit_mask will set the direction of all digital input channels. For each bit which should drive its port, the corresponding direction_mask value should be set to 1. An hexadecimal direction_mask can be given.

For example, bit_mask = 0x0000F will enable the port for the first 4 bits on the right. All other ports will be disabled.

Parameters:
  • bit_value (int) – value of bits.

  • bit_mask (int) – Turns on or off the specific Digital Out channel. 1 for on, 0 for off.

Low-level C definition:

void DPxSetDoutValue(int bitValue, int bitMask)

_libdpx.DPxSetError(errCode)[source]

Sets the device to the given error code.

Parameters:

errCode (int) – Given error code we wish to set the device to.

Low-level C definition:

void DPxSetError(int error)

_libdpx.DPxSetFactoryStartupConfig()[source]

Returns your device’s configurable registers to their default state. This will reset all your customs setting such as rear projection.

Low-level C definition:

void DPxSetFactoryStartupConfig(void)

_libdpx.DPxSetGcdShiftHardwareMode(mode=0)[source]

Sets the PROPixx TScope Mode.

Parameters:

mode (int) – the percentage of the screen to calibrate. - 0: X and Y are foced to 0. - 1: X and Y are signed 16-bit numbers from ADC0 and ADC1. - 2: X and Y are signed 12-bit numbers from DIN11:00 and DIN23:12..

Raises:

Error if the mode is not a support value

_libdpx.DPxSetGcdShiftHardwareTransform(xGain, xOffset, yGain, yOffset)[source]

Specifies the transformation between hardware inputs and pixel shifts for gaze contingent displays.

PROPixx Controller implements a gain and an offset when mapping hardware inputs to x/y pixel shifts.

Parameters:
  • xGain (int) – Gain terms indicate how many pixels should be shifted for a full-scale hardware input, divided by 4.

  • xOffset (int) – Terms in straight pixels.

For example, the gain default value of 512 means that a full-scale input from the ADC (+10V) will shift the image 2048 pixels to the right. For example, The offset assigning a value of 10 would cause the above +10V ADC to shift the image by 2058 instead of 1048 pixels.

_libdpx.DPxSetMarker()[source]

Latches the current time value into the marker register.

Low-level C definition:

void DPxGetMarker()

_libdpx.DPxSetMicBuff(buffAddr, buffSize)[source]

Sets base address, reads address and buffer size for MIC schedules.

This function is a shortcut which assigns Size/BaseAddr/ReadAddr.

Parameters:
  • buffAddr (int) – Base address.

  • buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetMicBuff(unsigned buffAddr, unsigned buffSize)

_libdpx.DPxSetMicBuffBaseAddr(buffBaseAddr)[source]

Sets the MIC RAM buffer start address.

The address must be an even value.

Parameters:

buffBaseAddr (int) – Base address.

Low-level C definition:

void DPxSetMicBuffBaseAddr(unsigned buffBaseAddr)

_libdpx.DPxSetMicBuffSize(buffSize)[source]

Sets MIC RAM buffer size in bytes.

Must be an even value. Buffer wraps to Base after Size.

Parameters:

buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetMicBuffSize(unsigned buffSize)

_libdpx.DPxSetMicBuffWriteAddr(buffWriteAddr)[source]

Sets RAM address from which next MIC datum will be written.

The address must be an even value.

Low-level C definition:

void DPxSetMicBuffWriteAddr(unsigned buffWriteAddr)

_libdpx.DPxSetMicLRMode(mode)[source]

Sets the schedule buffer storing mode.

This method allows the user to configure how the microphone left and right channels are stored to the schedule buffer.

Parameters:

mode (str) –

Any of the following predefined constants.

  • mono: Mono data is written to the schedule buffer. The average of Left/Right CODEC data.

  • left: Left data is written to the schedule buffer.

  • right: Right data is written to the schedule buffer.

  • stereo: Left and Right data are both written to the schedule buffer.

Low-level C definition:

void DPxSetMicLRMode(int lrMode)

_libdpx.DPxSetMicSched(onset, rateValue, rateUnits, count)[source]

Sets MIC schedule onset, count and rate.

This function is a shortcut which assigns Onset/Rate/Count. If count is greater than zero, the count down mode is enabled.

Parameters:
  • onset (int) – Schedule onset.

  • rateValue (int) – Rate value.

  • rateUnits (str) – Usually hz. Can also be video to update every rateValue video frames or nano to update every rateValue nanoseconds.

  • count (int) – Schedule count.

Low-level C definition:

void DPxSetMicSched(unsigned onset, unsigned rateValue, int rateUnits, unsigned count)

_libdpx.DPxSetMicSchedCount(count)[source]

Sets MIC schedule update count.

Parameters:

count (int) – Schedule count.

Low-level C definition:

void DPxSetMicSchedCount(unsigned count)

_libdpx.DPxSetMicSchedOnset(onset)[source]

Sets nanosecond delay between schedule start and first MIC update.

Parameters:

onset (int) – The onset value.

Low-level C definition:

void DPxSetMicSchedOnset(unsigned onset)

_libdpx.DPxSetMicSchedRate(rate, unit)[source]

Sets the MIC schedule rate.

This method allows the user to set the schedule rate. Since the rate can be given with different units, the method also needs to have a unit associated with the rate.

If no delay is required, this method does not need to be used. Default value is 0.

Parameters:
  • rate (int) – Any positive value equal to or greater than zero.

  • unit (str) –

    Any of the following predefined constants.

    • hz: rate updates per second, maximum 102.4 kHz.

    • video: rate updates per video frame, maximum 102.4 kHz.

    • nano: rate updates period in nanoseconds, minimum 9750 ns.

Low-level C definition:

void DPxSetMicSchedRate(unsigned rateValue, int rateUnits)

_libdpx.DPxSetMicSource(source, gain, dBUnits=0)[source]

Sets the source for the microphone.

Selects the source of the microphone input. Typical gain values would be around 100 for a microphone input, and around 1 for line-level input.

Parameters:
  • source (str) –

    One of the following:

    • MIC: Microphone level input

    • LINE: Line level audio input.

  • gain (int) –

    The gain can take the following values depnding on the scale:

    • linear scale : [1, 1000]

    • dB scale : [0, 60] dB

  • dBUnits (int, optional) – Set non-zero to return the gain in dB. Defaults to 0.

Low-level C definition:

void DPxSetMicSource(int source, double gain, int dBUnits)

_libdpx.DPxSetPPx3dCrosstalk(crosstalk)[source]

Sets the 3D crosstalk (0-1) which should be subtracted from stereoscopic stimuli.

Note

This only works with RB3D mode and requires revision 6 of the PROPixx.

Parameters:

crosstalk (double) – A value between 0 and 1 which represents the 3d crosstalk.

Low-level C definition:

void DPxSetPPx3dCrosstalk(double crosstalk)

_libdpx.DPxSetPPxAwake()[source]

Turns on the PROPixx.

Note: Only available for PROPixx Revision 12 and higher.

Low-level C definition:

void DPxSetPPxAwake()

_libdpx.DPxSetPPxDefaultLedCurrents()[source]

Set PROPixx default current depending on sequence or T-Scope

Low-level C definition:

void DPxSetPPxDefaultLedCurrents(void)

_libdpx.DPxSetPPxDlpSeqPgrm(program)[source]

Sets the PROPixx DLP Sequencer program.

Note: Only available for PROPixx Revision 6 and higher.

Parameters:

String

Any of the following predefined constants.

  • RGB: Default RGB

  • RB3D: R/B channels drive grayscale 3D

  • RGB240: Only show the frame for 1/2 a 120 Hz frame duration.

  • RGB180: Only show the frame for 2/3 of a 120 Hz frame duration.

  • QUAD4X: Display quadrants are projected at 4x refresh rate.

  • QUAD12X: Display quadrants are projected at 12x refresh rate with grayscales.

  • GREY3X: Converts 640x1080@360Hz RGB to 1920x1080@720Hz Grayscale with blank frames.

  • RGB2: Older RGB Sequencer.

Low-level C definition:

void DPxSetPPxDlpSeqPgrm(int program)

_libdpx.DPxSetPPxGreyLedCurrents(index)[source]

Set LED calibrated LED currents for grey sequencer

This method takes the 0 based index of the calibration to apply. Two calibrations are available:

  • index = 0 : Greyscale #1 (default)

  • index = 1 : Greyscale #2

_libdpx.DPxSetPPxHotSpotCenter(x, y)[source]

Sets the hotspot correction location only.

Parameters:
  • x (int) – The position in x from the center, + to the left.

  • y (int) – The position in y from the center, + to the bottom.

_libdpx.DPxSetPPxLedMask(mask)[source]

Sets the PROPixx mask to turn off specific LEDs.

Only available for PROPixx Revision 33 and higher.

Parameters:

Int

Any of the following predefined constants.

  • 0: All LEDs are on.

  • 1: RED is turned off.

  • 2: GREEN is turned off.

  • 3: RED and GREEN are turned off.

  • 4: BLUE is turned off.

  • 5: RED and BLUE are turned off.

  • 6: BLUE and GREEN are turned off.

  • 7: ALL LEDs are off.

Low-level C definition:

void DPxSetPPxLedMask(int mask)

_libdpx.DPxSetPPxRgbCustomLedCurrents(index)[source]

Set LED custom LED currents for RGB sequencer

This method takes the 0 based index of the calibration to apply. Two calibrations are available:

  • index = 0 : Custom RGB #1 (default)

  • index = 1 : Custom RGB #2

_libdpx.DPxSetPPxSleep()[source]

Turns off the PROPixx.

Note: Only available for PROPixx Revision 12 and higher.

Low-level C definition:

void DPxSetPPxSleep()

_libdpx.DPxSetPPxSwtpLoadPage(page)[source]

Sets the page to load a test pattern directly into the RAM.

Parameters:

page (int) – Page value, between 0 and 127

Raises:

Error if page value is not in the right range

_libdpx.DPxSetPPxTScopeMode(mode=0)[source]

Sets the PROPixx TScope Mode.

Parameters:

mode (int) – the percentage of the screen to calibrate. - 0: Binary Images stored in PROPixx DRAM. - 1: Single video image stored in the base page. - 2: Sequence of video image, depending on the uploaded program.

Raises:

Error if the mode is not a support value

_libdpx.DPxSetPPxTScopeProg(program)[source]

Sends a microcode program to the PROPixx TScope system. The program is a list of two dimensions. :param program: The list should be a 2D list, with the first collumn ([0][i]) contains the frame index which should be presented. The second collumn ([1][i]) is the number of times the frame should be presented. :type program: list

If the number of times a frame should be presented is set to zero, the program will continue showing this frame until stopped.

Ex for the unpacked program:

program2 = np.zeros((1024,2), np.uint16) for i in range(1023):

frame = i % 32 value = math.floor(frame/4) * 256 + (frame % 4) program2[i][0] = int(value) program2[i][1] = int(60)

program2[1023][0] = 0

_libdpx.DPxSetPPxTScopeProgAddr(addr=0)[source]

Sets the program that the third Tscope mode uses to present video.

Parameters:

addr (int) – The address of the program (between 0 and 1024)

Raises:

Error if the address is not between 0 and 1024

_libdpx.DPxSetPPxTScopeProgOffsetPage(offset)[source]

Sets the offset for the PROPixx TScope Mode, the value is a 16-bit unsigned integer”

Raises:

Error when the offset is not in the right ranged.

_libdpx.DPxSetServerAddress(ip='127.0.0.1')[source]

Sets a server address in the low-level API

Parameters:

ip (string) – A valid IP address formatted according to the normal address classes. Four dot seperated digits ranging from 0 to 255.F

Returns:

Non-zero if the address fails, 0 if the address exists.

Return type:

int

Low-level C definition:

int DPxSetServerAddress(char* inIpAddr)

_libdpx.DPxSetTPxAwake()[source]

Turns on the TRACKPixx.

Low-level C definition:

void DPxSetTPxAwake()

_libdpx.DPxSetTPxSleep()[source]

Turns off the TRACKPixx.

Low-level C definition:

void DPxSetTPxSleep()

_libdpx.DPxSetTouchpixxBuff(buffAddr, buffSize)[source]

Sets base address, write address and buffer size for Touchpixx schedules.

This function is a shortcut which assigns Size/BaseAddr/WriteAddr

Parameters:
  • buffAddr (int) – Base address.

  • buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetTouchpixxBuff(unsigned buffAddr, unsigned buffSize)

_libdpx.DPxSetTouchpixxBuffBaseAddr(buffBaseAddr)[source]

Sets the Touchpixx RAM buffer start address.

The address must be an even value.

Parameters:

buffBaseAddr (int) – Base address.

Low-level C definition:

void DPxSetTouchpixxBuffBaseAddr(unsigned buffBaseAddr)

_libdpx.DPxSetTouchpixxBuffSize(buffSize)[source]

Sets Touchpixx RAM buffer size in bytes.

The size must be an even value. Buffer wraps to Base when it reaches the size.

Parameters:

buffSize (int) – Buffer size.

Low-level C definition:

void DPxSetTouchpixxBuffSize(unsigned buffSize)

_libdpx.DPxSetTouchpixxBuffWriteAddr(buffWriteAddr)[source]

Sets RAM address from which next Touchpixx datum will be written.

The address must be an even value.

Parameters:

buffWriteAddr (int) – Write address.

Low-level C definition:

void DPxSetTouchpixxBuffWriteAddr(unsigned buffWriteAddr)

_libdpx.DPxSetTouchpixxStabilizeDuration(duration)[source]

Sets the Touchpixx stabilization duration.

This function sets duration in seconds that TOUCHPixx panel coordinates must be stable before being recognized as a touch in DPxGetTouchpixxCoords

Parameters:

duration (double) – Duration in seconds.

Low-level C definition:

void DPxSetTouchpixxStabilizeDuration(double duration)

_libdpx.DPxSetVidBacklightIntensity(intensity)[source]

Sets the display current back light intensity.

Parameters:

intensity (int) – Set to 0 for the lowest intensity level, 255 for the highest, or any other value in between.

Example:

>>> my_device.setBacklightIntensity(42)
>>> my_device.updateRegisterCache()
>>> print my_device.getBacklightIntensity()
42

See also

DPxGetBacklightIntensity

Low-level C definition:

void DPxSetBacklightIntensity(int intensity)

_libdpx.DPxSetVidClut(CLUT)[source]

Sets the video color lookup table (CLUT).

This function returns immediately; the CLUT is implemented at the next vertical blanking interval.

Parameters:

CLUT (list) – A list of 3 lists representing the colors [[RED], [GREEN], [BLUE]]

Low-level C definition:

void DPxSetVidClut(UInt16* clutData)

_libdpx.DPxSetVidClutTransparencyColor(red, green, blue)[source]

Set 48-bit RGB video CLUT transparency color.

This function allows the user to set the value for the RGB video CLUT transparency color.

Parameters:
  • red (int) – Pixel color value for the red channel.

  • green (int) – Pixel color value for the green channel.

  • blue (int) – Pixel color value for the blue channel.

Low-level C definition:

void DPxSetVidClutTransparencyColor(UInt16 red, UInt16 green, UInt16 blue)

_libdpx.DPxSetVidCluts(CLUTs)[source]

Sets the video color lookup tables.

Parameters:

CLUT (list) – A list of 3 lists representing the colors [[RED], [GREEN], [BLUE]]

Low-level C definition:

void DPxSetVidCluts(UInt16* clutData)

_libdpx.DPxSetVidHorizOverlayAlpha(int_list)[source]

Sets 1024 16-bit video horizontal overlay alpha values, in order X0,X1..X511,Y0,Y1…Y511.

Parameters:

int_list (list) – A list of integers to set the overlay alpha values, defaults to all zeros

Low-level C definition:

void DPxSetVidHorizOverlayAlpha(UInt16* alphaData)

_libdpx.DPxSetVidHorizOverlayBounds(x1, y1, x2, y2)[source]

Sets bounding rectangle within left half image whose contents are composited with right half image.

Parameters:
  • x1 (int) – Bottom left x position.

  • y1 (int) – Bottom left y position.

  • x2 (int) – Top right x position.

  • y2 (int) – Top right y position.

Low-level C definition:

void DPxSetVidHorizOverlayBounds(int X1, int Y1, int X2, int Y2)

_libdpx.DPxSetVidMode(mode)[source]

Sets the video processing mode.

Only available for PROPixx Revision 6 and higher.

Parameters:

mode (str) –

Any of the following predefined constants.

  • L48: DVI RED[7:0] is used as an index into a 256-entry 16-bit RGB colour lookup table.

  • M16: DVI RED[7:0] & GREEN[7:0] concatenate into a VGA 16-bit value sent to all three RGB components.

  • C48: Even/Odd pixel RED/GREEN/BLUE[7:0] concatenate to generate 16-bit RGB components at half the horizontal resolution.

  • L48D: DVI RED[7:4] & GREEN[7:4] concatenate to form an 8-bit index into a 256-entry 16-bit RGB colour lookup table.

  • M16D: DVI RED[7:3] & GREEN[7:3] & BLUE[7:2] concatenate into a VGA 16-bit value sent to all three RGB components.

  • C36D: Even/Odd pixel RED/GREEN/BLUE[7:2] concatenate to generate 12-bit RGB components at half the horizontal resolution.

  • C24: Straight passthrough from DVI 8-bit (or HDMI “deep” 10/12-bit) RGB to VGA 8/10/12-bit RGB.

Low-level C definition:

void DPxSetVidMode(int vidMode)

_libdpx.DPxSetVidPsyncRasterLine(line)[source]

Sets the raster line on which the pixel sync sequence is expected.

Parameters:

line (int) – The line which will contain de PSync.

Low-level C definition:

void DPxSetVidPsyncRasterLine(int line)

_libdpx.DPxSetVidSource(vidSource)[source]

Sets the source of video to be displayed.

Parameters:

vidSource (str) –

The source we want to display.

  • DVI: Monitor displays DVI signal.

  • SWTP: Software test pattern showing image from RAM.

  • SWTP 3D: 3D Software test pattern flipping between left/right eye images from RAM.

  • RGB SQUARES: RGB ramps.

  • GRAY: Uniform gray display having 12-bit intensity.

  • BAR: Drifting bar.

  • BAR2: Drifting bar.

  • DOTS: Drifting dots.

  • RAMP: Drifting ramp, with dots advancing x*2 pixels per video frame, where x is a 4-bit signed.

  • RGB: Uniform display with 8-bit intensity nn, send to RGBA channels enabled by mask m.

  • PROJ: Projector Hardware test pattern.

Low-level C definition:

void DPxSetVidSource(int vidSource)

_libdpx.DPxSetVidVesaLeft()[source]

VESA connector outputs left-eye signal.

Low-level C definition:

void DPxSetVidVesaLeft()

_libdpx.DPxSetVidVesaPhase(phase)[source]

Sets the 8-bit unsigned phase of the VESA 3D waveform.

Varying this phase from 0-255, allows adjustements to the phase relationship between stereo video and 3D goggles switching.

The following combinations have been found to work well:

If you are using a VIEWPIxx/3D, you should set the phase to 0x64 for 3DPixx or 0x64 for Volfoni. If you are using a CTR with our DATAPixx, it should be set to 0xF5.

Parameters:

phase (int) – Phase of the VESA 3D waveform

Low-level C definition:

void DPxSetVidVesaPhase(int phase)

_libdpx.DPxSetVidVesaRight()[source]

VESA connector outputs right-eye signal.

Low-level C definition:

void DPxSetVidVesaRight()

_libdpx.DPxSetVidVesaWaveform(waveform)[source]

Sets the waveform which will be sent to the DATAPixx VESA 3D connector.

Only available for PROPixx Revision 6 and higher.

Parameters:

waveform (str) –

Any of the following predefined constants.

  • LR: VESA port drives straight L/R squarewave for 3rd party emitter.

  • CRYSTALEYES: VESA port drives 3DPixx IR emitter for CrystalEyes 3D goggles.

  • NVIDIA: VESA port drives 3DPixx IR emitter for NVIDIA 3D goggles.

  • VOLFONI: VESA port drives Volfoni RF emitter and goggles for 3D.

Low-level C definition:

void DPxSetVidVesaWaveform(int waveform)

_libdpx.DPxSpiErase(address, n_byte)[source]
Erase (sets to 1) a SPI block of any size.

Assumes that spiAddr starts on a 64kB boundary. The SPI is erased in 64kB chunks; if nEraseBytes is not a 64k multiple, it is rounded up to the next 64k multiple.

Parameters:
  • address (int) – Any even value equal to or greater than zero.

  • n_byte (int) – Count to erease.

Returns:

Error code (0 if no error)

Return type:

ctypes.c_int

Low-level C definition:

int DPxSpiErase(int spiAddr, int nEraseBytes, PercentCompletionCallback percentCompletionCallback)

_libdpx.DPxSpiModify(address, nWriteBytes, writeBuffer)[source]

Modify a region of SPI within a single 64kB page

Parameters:
  • address (int) – Any even value equal to or greater than zero.

  • nWriteBytes (int) – Count to write.

  • writeBuffer (ctypes.c_int) – Value to write

Returns:

Error code (0 if no error)

Return type:

ctypes.c_int

Low-level C definition:

void DPxSpiModify(int spiAddr, int nWriteBytes, unsigned char* writeBuffer)

_libdpx.DPxSpiRead(address, nReadBytes, spiBuffer=None)[source]
Read a SPI block of any size.

Assumes that spiAddr starts on a 256-byte boundary.

Parameters:

address (int) – Any even value equal to or greater than zero.

Low-level C definition:

int DPxSpiRead(int spiAddr, int nReadBytes, char* readBuffer, PercentCompletionCallback percentCompletionCallback)

_libdpx.DPxSpiWrite(address, writeBuffer)[source]
Write a SPI block of any size.

Assumes that spiAddr starts on a 256-byte boundary. If nWriteBytes is not a multiple of 256 bytes, the last page is padded with 0.

Parameters:
  • address (int) – Any even value equal to or greater than zero.

  • writeBuffer (int) – value to write

Returns:

Error code (0 if no error)

Return type:

ctypes.c_int

Low-level C definition:

int DPxSpiWrite(int spiAddr, int nWriteBytes, char* writeBuffer, PercentCompletionCallback percentCompletionCallback)

_libdpx.DPxStartAdcSched()[source]

Starts running an ADC schedule.

Low-level C definition:

void DPxStartAdcSched()

_libdpx.DPxStartAudSched()[source]

Starts running an AUD schedule

Low-level C definition:

void DPxStartAudSched()

_libdpx.DPxStartAuxSched()[source]

Starts running an AUX schedule.

Low-level C definition:

void DPxStartAuxSched()

_libdpx.DPxStartDacSched()[source]

Starts running a DAC schedule.

Low-level C definition:

void DPxStartDacSched()

_libdpx.DPxStartDinSched()[source]

Starts running a Din schedule.

Low-level C definition:

void DPxStartDinSched()

_libdpx.DPxStartDoutSched()[source]

Starts running a Dout schedule.

Low-level C definition:

void DPxStartDoutSched()

_libdpx.DPxStartMicSched()[source]

Starts running a MIC schedule

Low-level C definition:

void DPxStartMicSched()

_libdpx.DPxStartPPxTScopeSched()[source]

Starts running a PROPixx TScope schedule. The schedule will start on the next register update. The cover page will first be shown until the offset set by the schedule has passed. Every call to DPxStartPPxTScopeSched muust be preceeded by a call to DPxSetPPxTScopeSched

_libdpx.DPxStopAdcSched()[source]

Stops running an ADC schedule.

Low-level C definition:

void DPxStopAdcSched()

_libdpx.DPxStopAllScheds()[source]

Shortcut to stop running all DAC/ADC/DOUT/DIN/AUD/AUX/MIC schedules.

Low-level C definition:

void DPxStopAllScheds()

_libdpx.DPxStopAudSched()[source]

Stops running an AUD schedule

Low-level C definition:

void DPxStopAudSched()

_libdpx.DPxStopAuxSched()[source]

Stops running an AUX schedule.

Low-level C definition:

void DPxStopAuxSched()

_libdpx.DPxStopDacSched()[source]

Stops running a DAC schedule.

Low-level C definition:

void DPxStopDacSched()

_libdpx.DPxStopDinSched()[source]

Stops running a Din schedule.

Low-level C definition:

c

_libdpx.DPxStopDoutSched()[source]

Stops running a Dout schedule.

Low-level C definition:

void DPxStopDoutSched()

_libdpx.DPxStopMicSched()[source]

Stops running a MIC schedule.

Low-level C definition:

void DPxStopMicSched()

_libdpx.DPxStopPPxTScopeSched()[source]

Stops running a PROPixx TScope schedule. The schedule will stop on the next register update. If the maxScheduleFrames is not set to zero, the schedule will end once zero is reached.

_libdpx.DPxTriggerToRGB(trigger)[source]

Helper function determines pixel mode RGB 255 colour value based on desired 24-bit trigger (in decimal, base 10)

Returns:

list of containint [R, G, B] in RGB 255

Return type:

list

Low-level C definition:

none

_libdpx.DPxUpdateRegCache()[source]

Updates the local register cache.

DPxWriteRegCache, then readback registers over USB into local cache

Low-level C definition:

void DPxUpdateRegCache()

_libdpx.DPxUpdateRegCacheAfterPixelSync(pixelData, timeout=255)[source]

Writes local register cache to VPixx device over USB, using Pixel Sync timing.

This function is like DPxUpdateRegCache, but waits for a pixel sync sequence before executing.

Parameters:
  • pixelData (list, tuple, or numpy array) – The requested pattern for PSync. Formatted such that the array is shape (3*N,) or (N,3) where ‘N’ is the number of RGB pixel triplets.

  • timeout (int) – Maximum time to wait before a PSync in video frames.

Exceptions:
  1. pixelData is 1D and its length is not divisible by 3 or pixelData is

    2D but does not have 3 columns or has more than 8 rows

  2. pixelData contains values outside of the range [0,255]

  3. timeout is not an integer or is outside of the range [0,65535]

Low-level C definition:

void DPxUpdateRegCacheAfterPixelSync(int nPixels, unsigned char* pixelData, int timeout)

_libdpx.DPxUpdateRegCacheAfterVideoSync()[source]

Updates local register cache with VPixx device.

This function is like DPxUpdateRegCache, but the device only writes the registers on the leading edge of the next vertical sync pulse.

Low-level C definition:

void DPxUpdateRegCacheAfterVideoSync()

_libdpx.DPxWriteAudioBuffer(bufferData, bufferAddress=16000000)[source]

Writes the audio waveform data in ‘bufferData’ to the DATAPixx RAM at memory address ‘bufferAddress’.

Mimics the behavior of Datapixx(‘WriteAudioBuffer’) in MATLAB, but with more flexibility in the data format:

  1. ‘bufferData’ can be of type float or of type int.

    If ‘bufferData’ is of type float, it must be scaled between (-1,1). If ‘bufferData’ is of type int, it must be scaled between (-32768,32768).

  2. ‘bufferData’ can be either a list or a numpy.array.

  3. ‘bufferData’ can be shaped either (N,), (N,1), (N,2), (1,N), or (2,N)

Parameters:
  • bufferData (list or numpy.array) – contains waveform data. if a list, must be castable to a numeric numpy.array

  • bufferAddress (int) – memory location in DATAPixx RAM. default = int(16e6)

Exceptions:
  1. bufferData cannot be casted into a numeric numpy.array

  2. bufferData is empty

  3. bufferData has more than 2 dimensions

  4. bufferData has 2 dimensions but has no dimension of size 2

  5. bufferAddress is not of type int or is less than 0 or is odd

_libdpx.DPxWriteDacBuffer(bufferData, bufferAddress=0, channelList=None)[source]

Writes the data that will be used by the DAC buffer to drive the analogue outputs.

Parameters:
  • bufferData (multi-dimension list) – nChans x nFrame list where each row of the matrix contains the sample data for one DAC channel. Each column of the list contains one sample for each DAC channel.

  • bufferAddress (int) – The byte address in Datapixx RAM where the buffer should start. Default value of zero. Streaming value of -1 not implemented yet.

  • channelList (list) – channelList by default is channel 0…nChans channels. If provided, it needs to be a list of size nChans.

Returns:

nextBufferAddress, the next address availible to write to memory after the DAC buffer.

Return type:

int

_libdpx.DPxWriteDoutBuffer(bufferData, bufferAddress=8000000)[source]

Writes the digital output waveform data in ‘bufferData’ to the DATAPixx RAM at memory address ‘bufferAddress’.

Mimics the behavior of Datapixx(‘WriteDoutBuffer’) in MATLAB.

  1. ‘bufferData’ must be of type int scaled between (0,65535)

  2. ‘bufferData’ can be either a list or a numpy.array

  3. ‘bufferData’ must be shaped as (N,)

Parameters:
  • bufferData (list or numpy.array) – contains waveform data. if a list, must be castable to a numeric numpy.array

  • bufferAddress (int) – memory location in DATAPixx RAM. default = int(8e6)

Exceptions:
  1. bufferData cannot be casted into a numpy.array of type int

  2. bufferData is empty

  3. bufferData has more than 1 dimension

  4. bufferAddress is not of type int or is less than 0 or is odd

_libdpx.DPxWritePPxTScopePages(index, data)[source]

Download 1 ore more TScope images to the PROPixx Ram. TScope images are 1920 * 1080 bits = 2 703 600 bits = 259 200 bytes. The data of the TScope images should be stored little-endian, so bit 0 of byte 0 controls the top left pixel. Maximum number of pages depends on the size of RAM. Most PROPixx will have 2016 MB for TScope at most.

TScope pages are stored by 256kB bounderies, therefore a maxumum of 8064 pages are availible.

Parameters:
  • index (int) – Indicates the location (range 1-8064), where the write should start

  • data (numpy array of uint8) – 2D List of data to write, each bit represents 1 pixel. This should be a 240x1080*nPages array, where each data (8 bits) is 8 horizontal pixels.

The data should have a length multiple of 259 200 bytes.

For example:

import numpy as np pageData = np.zeros((1920//8, 1080), np.uint8) for i in range(200): pageData[i] = [255] * 1080 This put the top 200 rows of pixels to be white.

Raises:
  • Error if the index is not between 1 and 8064

  • Error if the size of data is not a multiple of 259200 or is smaller.

_libdpx.DPxWriteRam(address, int_list)[source]

Writes a local buffer into VPixx RAM.

Parameters:
  • address (int) – Any even value equal to or greater than zero.

  • int_list (int) – int_list is a list which will fill the RAM data. The length of RAM used is based on the length of int_list. It can’t be greater than RAM size.

Low-level C definition:

void DPxWriteRam(unsigned address, unsigned length, void* buffer)

See also

DPxGetRamSize

Example:

>>> from _libdpx import *
>>>
>>> DPxOpen()
>>>
>>> # Here is a list with the data to write in RAM.
>>> data = [1,2,3,4,5,6]
>>> DPxWriteRam(address= 42, int_list= data)
>>>
>>> DPxUpdateRegCache()
>>>
>>> print'DPxReadRam() = ', DPxReadRam(address= 42, length= 6)
>>>
>>> DPxClose()
_libdpx.DPxWriteRegCache()[source]

Write local register cache to VPixx device over USB.

Low-level C definition:

void DPxWriteRegCache()

_libdpx.DPxWriteRegCacheAfterPixelSync(pixelData, timeout=255)[source]

Write local register cache to VPixx device over USB.

This function is like DPxWriteRegCache, but it waits for a pixel sync sequence.

Parameters:
  • pixelData (list, tuple, or numpy array) – The requested pattern for PSync. Formatted such that the array is shape (3*N,) or (N,3) where ‘N’ is the number of RGB pixel triplets.

  • timeout (int) – Maximum time to wait before a PSync in video frames.

Exceptions:
  1. pixelData is 1D and its length is not divisible by 3 or pixelData is

    2D but does not have 3 columns or has more than 8 rows

  2. pixelData contains values outside of the range [0,255]

  3. timeout is not an integer or is outside of the range [0,65535]

Low-level C definition:

void DPxWriteRegCacheAfterPixelSync(int nPixels, unsigned char* pixelData, int timeout)

_libdpx.DPxWriteRegCacheAfterVideoSync()[source]

Write local register cache to VPixx device over USB on the next video frame.

This function is like DPxWriteRegCache, but the device only writes the registers on leading edge of next vertical sync pulse.

Low-level C definition:

void DPxWriteRegCacheAfterVideoSync()

_libdpx.DetectTrackerType()[source]

Return the tracker type

Return :

(int) tracker type (TPX3 : 0, TPXMINI : 1)

_libdpx.DisableTPxAnalogOut()[source]

Sets up the Analog out to its default behavior (schedules) instead of TRACKPixx3 data.

_libdpx.EnableTPxAnalogOut(modeDAC0=0, modeDAC1=0, modeDAC2=0, modeDAC3=0)[source]

Enables Analog Out for TRACKPixx3 data on the DATAPixx3

mode follows this chart:

  • 0: Default schedule controlled analog.

  • 1: Left eye screen X.

  • 2: Right eye screen X.
    • 3: Left eye screen Y.

    • 4: Right eye screen Y.

    • 5: Left eye pupil diameter.

    • 6: Right eye pupil diameter.

    • 7: Average eye screen X.

  • 8: Average eye screen Y.
    • 9: Average eye pupil diameter.

    • 10: Blink detection flag.

    • 11: Left eye raw X.

    • 12: Right eye raw X.

  • 13: Left eye raw Y.

  • 14: Right eye raw Y.
    • 15: Left eye saccade & fixation flag.

    • 16: Right eye saccade & fixation flag.

Low-level C definition:

void TPxSetAllDACOutput(int combinedMode)

_libdpx.PPxLoadTestPattern(image, add, page)[source]

Loads an image in the PROPixx since the PROPixx is different for software test patterns.

Low-level C definition:

void PPxDownloadTestPattern(TestStruct* testPattern, int loadAddr, int page)

_libdpx.SetPropixxTScopeSchedule(onset, rate, maxScheduleFrame, startPage=1, nPages=None)[source]

Configure a schedule for T-Scope image sequence playback on PROPixx.

Parameters:
  • onset (float) – Time in seconds before the schedule should start. Between 0 and 4.29 seconds

  • rate (list) – List with 1 or 2 elements. the first element is an integer indicating the sampling rate. the second element is either an integer indicating the sampling rate units, or not present. When this is just an int, it is considered to be pages/second. int description 1 sampling rate specified in pages/second. 2 sampling rate specified in pages/video frame being recieved on DVI. 3 sampling rate specified in seconds/page (frame period) Maximum speed is 10 kHz.

  • maxScheduleFrame (int) – If the duration of the schedule is known, pass the number of frames. The schedule will terminate automatically when the countdown reaches 0. If duration is unknown, pass 0.

  • startPage (int) – Where the schedule should start. This represents the cover page. First page shown when DPxEnablePPxTScopePrepReq is called.

  • nPages (int) – Specify how many pages in the PROPixx RAM should be used in this sequence. If the schedule requests more pages than nPages, then it will wrap back to the cover page.

For many applications, the complete stimulus is represented by a single pass through a fixed block of pages. In these cases, nPages could be left at its default value of maxScheduleFrames. Note that every call to StartPropixxTScopeSchedule must be preceeded by a call to SetPropixxTScopeSchedule (ie: multiple calls to StartPropixxTScopeSchedule each require their own call to SetPropixxTScopeSchedule).

Schedule timing is implemented in hardware with microsecond precision.

_libdpx.TPxBestPolyFinishCalibration()[source]

Finishes the calibration on the Device.

This function is to be called when you are done displaying stimuli for calibration. It will calculate the calibrations parameter on the device and set the state to calibrated (which can be verified through isDeviceCalibrated.

Low-level C definition:

void TPxFinishCalibration()

_libdpx.TPxBestPolyGetEyePosition(packed_data, raw_data)[source]

Returns the current gaze position by finding the best polynomial.

This returns the current calibrated gaze position on the screen using the calibration parameters found for the latest calibration.

Parameters:
  • packed_data (float) – A list of position, such that first element is screen_x_left_eye, screen_y_left_eye, screen_x_right_eye, screen_y_right_eye

  • raw_data (float) – A list of raw position, such that first element is x_left_eye, y_left_eye, x_right_eye, y_right_eye

Returns:

Return the timestamp from the tracker associated with the position

Example

>>import ctypes >>packed_data = [0.0]*4 >>raw_data = [0.0]*4 >>timeStamp = TPxBestPolyGetEyePosition( (ctypes.c_double*4)(*packed_data), (ctypes.c_double*4)(*raw_data)  ) >>packed_data = packed_data[:]

Low-level C definition:

double TPxBestPolyGetEyePosition(double* eyeReturn, double* rawData)

_libdpx.TPxCalibrateTarget(targetIndex)[source]

Calibrate the specified target index on the tracker.

Parameters:

targetIndex (int) – The index of the target to calibrate.

Low-level C definition:

void TpxCalibrateTarget(float *targets)

_libdpx.TPxClearDeviceCalibration()[source]

Clear calibration from tracker, making device not calibrated

Low-level C definition:

void TPxClearDeviceCalibration()

_libdpx.TPxClearSearchLimits()[source]

Clear the TPx search limits

Low-level C definition:

void TPxClearSearchLimits(void)

_libdpx.TPxCloseTPxMini()[source]

Close the TPx/mini.

Replicates the behavior of Datapixx(‘CloseTPxMini’)

_libdpx.TPxConvertCoordSysToCartesian(inList, scaleX=1, offsetX=-960, scaleY=1, offsetY=-540)[source]

Convert custom coordinate to system coordinate

Parameters:
  • inList (List) – List of coordinates to convert.

  • scaleX (int) – Scaling factor of the horizontal axis. Should be 1 most of the time

  • scaleY (int) – Scaling factor of the vertical axis. Should be 1 if the origin is at bottom of the screen and -1 if the origin is at the top

  • offsetX (int) – x axis offset of the custom system origin from the center of the screen

  • offsetY (int) – y axis offset of the custom system origin from the center of the screen using the Cartesian system with origin at center of the screen

Low-level C definition:

void TPxConvertCoordSysToCartesian(double * inPtrX, double * inPtrY, int inSize, double scaleX, double offsetX, double scaleY, double offsetY, double * outPtrX, double * outPtrY)`

_libdpx.TPxConvertCoordSysToCustom(inList, scaleX=1, offsetX=-960, scaleY=1, offsetY=-540)[source]

Convert system coordinate to custom coordinate

Parameters:
  • inList (List) – List of coordinates to convert.

  • scaleX (int) – Scaling factor of the horizontal axis. Should be 1 most of the time.

  • scaleY (int) – Scaling factor of the vertical axis. Should be 1 if the origin is at bottom of the screen and -1 if the origin is at the top.

  • offsetX (int) – x axis offset of the custom system origin from the center of the screen.

  • offsetY (int) – y axis offset of the custom system origin from the center of the screen. using the Cartesian system with origin at center of the screen

Low-level C definition:

void TPxConvertCoordSysToCustom(double * inPtrX, double * inPtrY, int inSize, double scaleX, double offsetX, double scaleY, double offsetY, double * outPtrX, double * outPtrY)

_libdpx.TPxDisableFreeRun()[source]

Disable the schedule to automatically record all data

Low-level C definition:

void TPxDisableFreeRun()

_libdpx.TPxDisableHDR()[source]

Disable the High Dynamic Range mode

Low-level C definition:

void TPxDisableHDR()

_libdpx.TPxDisableMedianFilter()[source]

Disable the the median filter

Low-level C definition:

`` void TPxDisableMedianFilter()``

_libdpx.TPxDisableSearchLimits()[source]

Disable search limits

Low-level C definition:

void TPxDisableSearchLimits(void)

_libdpx.TPxEnableFreeRun()[source]

Enable the schedule to automatically record all data

Low-level C definition:

void TPxEnableFreeRun()

_libdpx.TPxEnableHDR()[source]

Enable the High Dynamic Range mode

Low-level C definition:

void TPxEnableHDR()

_libdpx.TPxEnableMedianFilter()[source]

Enable the the median filter

Low-level C definition:

void TPxEnableMedianFilter()

_libdpx.TPxEnableSearchLimits()[source]

Enable search limit

Low-level C definition:

void TPxEnableSearchLimits(void)

_libdpx.TPxFinalizeCalibration()[source]

Finalize the buit-in calibration process on the tracker.

Low-level C definition:

void TpxFinalizeCalibration()

_libdpx.TPxGetAllDACOutput()[source]

Get the analog state.

Low-level C definition:

unsigned int TPxSetAllDACOutput()

_libdpx.TPxGetBuffBaseAddr()[source]

Get DATAPixx3 RAM buffer start address

Returns:

Address of RAM buffer (int32)

Return type:

int

Low-level C definition:

unsigned TPxGetBuffBaseAddr()

_libdpx.TPxGetBuffSize()[source]

Get DATAPixx3 RAM TPx buffer size in bytes

Returns:

Buffer size in bytes. (int32)

Return type:

int

Low-level C definition:

unsigned TPxGetBuffSize()

_libdpx.TPxGetBuffWriteAddr()[source]

Get RAM address to which next DATAPixx3 datum will be written

Returns:

Address of the next DATAPixx3 datum (int32)

Return type:

int

Low-level C definition:

unsigned TPxGetBuffWriteAddr(void)`

_libdpx.TPxGetCRCoordinatesInPixels()[source]

Get the (x,y) screen coordinates for left/right corneal reflection centers.

Replicates MATLAB function Datapixx(‘GetCRCoordinatesInPixels’);

Returns:

[leftX, leftY, rightX, rightY]

Return type:

list

Low-level C definition:

void TPxGetRawCRCoordinates(double* pupilSize)

_libdpx.TPxGetCalibCoeffs()[source]

Get the calibrated coefficients for the polynomial that transforms raw eye vectors into screen coordinates for the left/right eyes. The polynomial is applied to the x and y component of the left and right eyes separately.

Replicates MATLAB function Datapixx(‘GetCalibrationCoeff’);

Returns:

elements 0: 8 are for the x component of the right eye elements 9:18 are for the y component of the right eye elements 19:26 are for the x component of the left eye elements 27:35 are for the y component of the left eye

Return type:

list

Low-level C definition:

void TPxGetCalibCoeffs(double* pupilSize)

_libdpx.TPxGetCalibrationImagePtr(imageIndex)[source]

Allocates memory for the image data to be stored in ram and return a int pointing to it.

Parameters:
  • height (int) – Height in pixel of the image.

  • width (int) – Width in pixel of the image.

  • imageIndex (int) – Index of the image [0-15].

Returns:

Pointing to the image data NULL, if problem with malloc of ram reading.

Return type:

ctypes.c_uint pointer

Low-level C definition:

unsigned short * TPxGetCalibrationImagePtr(int *height, int *width, int imageIndex)

_libdpx.TPxGetDistance()[source]

Get the tracking distance saved to the system.

Low-level C definition:

unsigned int TPxGetDistance()

_libdpx.TPxGetEyeImage()[source]

Returns a static image from the TRACKPixx3 camera feed. Duplicates MATLAB function Datapixx(‘GetEyeImage’).

Returns:

numpy.ndarray of size (512,1280) and of type uint8

_libdpx.TPxGetEyePosition()[source]

Returns the current calibrated eye position, raw vectors, and timestamp.

Duplicates MATLAB function Datapixx(‘GetEyePosition’).

Returns:

[xScreenLeft, yScreenLeft, xScreenRight, yScreenRight,

xLeftRaw, yLeftRaw, xRightRaw, yRightRaw, timeStamp]

where “Screen” elements are calibrated eye positions in Cartesian screen pixel coordinates, “Raw” elements are uncalibrated corneal-to-pupil-center vectors in radians, and “timeStamp” is the DATAPixx time of the samples in seconds

Return type:

list

Low-level C definition:

double TPxBestPolyGetEyePosition(double* eyeReturn, double* rawData)

_libdpx.TPxGetEyePositionDuringCalib(x_screen, y_screen, eye_to_verify=3)[source]

Tells the camera to calibrate the current eye position.

This function is to be called during calibration, when there is a focus point displayed on the stimulus display.

Parameters:
  • x_screen (float) – x-coordinate of the stimulus

  • y_screen (float) – y-coordinate of the stimulus

  • eye_to_verify (int) – enable data verification for each eye (bit 0 -> left eye, bit 1 -> rigth eye, active high)

Note

It is possible to call this soon after stimulus is displayed (~500 ms after) since the tracker will wait for a fixation itself.

Low-level C definition:

void TPxGetEyePositionDuringCalib(float screen_x, float screen_y, int eyeToVerify)

_libdpx.TPxGetEyePositionDuringCalib_returnsRaw(x_screen, y_screen, eye_to_verify=3)[source]

Tells the camera to calibrate the current eye position and returns the raw (uncalibrated) vectors.

This function is to be called during calibration, when there is a focus point displayed on the stimulus display.

Parameters:
  • x_screen (float) – x-coordinate of the stimulus

  • y_screen (float) – y-coordinate of the stimulus

  • eye_to_verify (int) – enable data verification for each eye (bit 0 -> left eye, bit 1 -> rigth eye, active high)

Note

It is possible to call this soon after stimulus is displayed (~500 ms after) since the tracker will wait for a fixation itself.

Returns:

A list of raw eye vectors [xRightEye, yRightEye, xLeftEye, yLeftEye]

Low-level C definition:

void TPxGetEyePositionDuringCalib_returnsRaw(float screen_x, float screen_y, double* rawPosition, int eyeToVerify)

_libdpx.TPxGetEyePositionFromBuiltInCalibration()[source]

Get Eye position specifically from the built-in calibration for TPx mini

Returns:

Tuple with

eyePosition a list of [xLeftEye, yLeftEye, xRightEye, yRightEye] pupil_size a list of [leftDiameter, rightDiameter] tracking_distance is the current distance (cm) between TPx and eye

Low-level C definition:

void TpxGetEyePositionFromBuiltInCalibration(double* eyeReturn)

_libdpx.TPxGetHorizontalFOV()[source]

Returns the horizontal field of view according to distance and lens saved to system.

Low-level C definition:

double TPxGetHorizontalFOV()

_libdpx.TPxGetImagePtr()[source]

Allocates memory for the image data to be stored in ram and return a int pointing to it.

Parameters:
  • height (int) – Height in pixel of the image.

  • width (int) – Width in pixel of the image.

Returns:

Pointing to the image data NULL, if problem with malloc of ram reading.

Return type:

ctypes.c_uint pointer

Low-level C definition:

unsigned char* TPxGetImagePtr(int *height, int *width)

_libdpx.TPxGetIrisExpectedSize()[source]

Get the Iris expected size in pixel from the DP3

Low-level C definition:

int TPxGetIrisExpectedSize()

_libdpx.TPxGetLEDIntensity()[source]

Get the infrared LED array intensity value

Low-level C definition:

unsigned int TPxGetLEDIntensity()

_libdpx.TPxGetLens()[source]

Get the lens type saved to the system.

Low-level C definition:

unsigned int TPxGetLens()

_libdpx.TPxGetPixelDensity()[source]

Returns the number of pixels it takes to represent an object of 1 mm according to distance and lens saved to the system.

Low-level C definition:

double TPxGetPixelDensity()

_libdpx.TPxGetPixelSize()[source]

Returns the size represented by 1 pixel according to distance and lens saved to the system.

Low-level C definition:

double TPxGetPixelSize()

_libdpx.TPxGetPupilCoordinatesInPixels()[source]

Get the (x,y) screen coordinates for left/right pupil centers.

Replicates MATLAB function Datapixx(‘GetPupilCoordinatesInPixels’);

Returns:

[leftX, leftY, rightX, rightY]

Return type:

list

Low-level C definition:

void TPxGetPupilSize(double* pupilSize)

_libdpx.TPxGetPupilSize()[source]

Get pupil size as the semi- major/minor axes of an ellipse fitted to the left/right pupil.

Replicates MATLAB function Datapixx(‘GetPupilSize’);

Returns:

(leftMajor, leftMinor, rightMajor, rightMinor)

Return type:

tuple

Low-level C definition:

void TPxGetPupilSize(double* pupilSize)

_libdpx.TPxGetPupilsCenter()[source]

Return the pupiles center

Low-level C definition:

void TPxGetPupilsCenter(uint32_t *left_x, uint32_t *left_y, uint32_t *right_x, uint32_t *right_y)

_libdpx.TPxGetSearchLimits()[source]

Gets the search limits

Low-level C definition:

void TPxGetSearchLimits(void)

_libdpx.TPxGetStatus(TPxDict)[source]

Updates a dictionary with entries indicating TRACKPixx status information. This dictionary is returned by TPxSetupSchedule(). Replicates the behavior of Datapixx(‘GetTPxStatus’) in MATLAB.

Parameters:

TPxDict (dict) –

Returned by TPxSetupSchedule(). Contains the following key/entry pairs: ‘isRecording’ : (bool) is the acquisition currently running? ‘isLogTimetag’ : (bool) are we acquiring timetags in addition to eye tracking data?

’bufferBaseAddress’ : (int) the acquisition data buffer base address within the Datapixx ‘bufferSize’ : (int) the number of allocated bytes in the acquisition data buffer ‘currentWriteAddr’ : (int) the buffer address which will be written by the next acquired TPx sample ‘currentReadAddr’ : (int) the buffer address which will be read by the next streaming call to TPxReadData

’numBufferFrames’ : (int) the total number of samples which fit in the acquisition data buffer ‘currentWriteFrame’ : (int) the buffer frame which will be written by the next acquired TPx sample ‘currentReadFrame’ : (int) the buffer frame which will be read by the next call to TPxReadData ‘newBufferFrames’ : (int) the number of new buffer frames since last call to TPxReadData (i.e., currentWriteFrame - currentReadFrame)

’numStreamUnderflows’ : (int) the number of TRACKPixx streaming underflows which have occurred since TPxSetSchedule ‘numStreamOverflows’ : (int) the number of TRACPixx streaming overflows which have occurred since TPxSetSchedule

_libdpx.TPxGetTime()[source]

Return the timestamp related to the tracker

Low-level C definition:

double TPXGetTime()

_libdpx.TPxGetTrackerScheduleFrameLength(firmwareRev)[source]

Get the tracker schedule frame length for the actual device.

Low-level C definition:

int TPxGetTrackerScheduleFrameLength()

_libdpx.TPxGetTrackerStatus()[source]

Return the DATAPixx3 status flag from registry (DP3REG_TRK_STATUS_FLAG @ 0x59A).

From registry DP3REG_TRK_STATUS_FLAG 0x59A bit 0 - Blink left bit 1 - Blink right bit 2 - Saccade left bit 3 - Fixation left bit 4 - Saccade right bit 5 - Fixation right bit 6 to 15 - padding

Low-level C definition:

int TPxGetTrackerStatus(void)

_libdpx.TPxGetVerticalFOV()[source]

Returns the vertical field of view according to distance and lens saved to system.

Low-level C definition:

double TPxGetVerticalFOV()

_libdpx.TPxHideOverlay()[source]

Deactivate Datapixx3 Overlay to hide the eyes image and eye cursors

Low-level C definition:

void TPxHideOverlay()

_libdpx.TPxInitPWM()[source]

Close currently selected VPixx device.

Low-level C definition:

void DPxClose()

_libdpx.TPxInitialize(gazePointFilterMode, licenseFilePath='')[source]

Initialize the tracker dependently of tractor type

Parameters:

gazePointFilterMode (enum) –

s

  • QL_DEVICE_GAZE_POINT_FILTER_NONE

  • QL_DEVICE_GAZE_POINT_FILTER_MEDIAN_FRAMES

  • QL_DEVICE_GAZE_POINT_FILTER_MEDIAN_TIME

  • QL_DEVICE_GAZE_POINT_FILTER_HEURISTIC_FRAMES

  • QL_DEVICE_GAZE_POINT_FILTER_HEURISTIC_TIME

  • QL_DEVICE_GAZE_POINT_FILTER_WEIGHTED_PREVIOUS_FRAME

  • QL_DEVICE_GAZE_POINT_FILTER_MEAN_FRAMES

  • QL_DEVICE_GAZE_POINT_FILTER_MEAN_TIME

Low-level C definition:

void TPxInitialize(int  gazePointFilterMode, char *licenseFilePath)

_libdpx.TPxInitializeCalibration()[source]

Initialize the buit-in calibration process on the tracker.

Parameters:

targets (float) – The x and y position of the targets. This is in percentage of the horizontal area to be calibrated (0.-100.).

Low-level C definition:

void TpxInitializeCalibration(float *targets, int *targetsCount)

_libdpx.TPxIsAwakePictureRequest()[source]

Return True if tracker is awake

Low-level C definition:

void TPxSetAwakePictureRequest()

_libdpx.TPxIsDeviceCalibrated()[source]

Returns the calibrated state of the tracker.

Returns:

True (1) when tracked has been successfully calibrated, False (0) otherwise.

Return type:

int

Low-level C definition:

int TPxIsDeviceCalibrated()

_libdpx.TPxIsFreeRun()[source]

Query the free-run status of the TPx.

Low-level C definition:

int TPxIsFreeRun(void)

_libdpx.TPxIsHDREnabledCall()[source]

Returns the state of the HDR Filter

Low-level C definition:

int TPxIsHDREnabled()

_libdpx.TPxIsLogTimetags()[source]

Query the timetag logging status of the TPx.

Low-level C definition:

int TPxIsLogTimetags(void)

_libdpx.TPxIsMedianFilterEnabled()[source]

Returns the state of the Median filter

Low-level C definition:

`` int TPxIsMedianFilterEnabledCall``

_libdpx.TPxIsPpSizeCalibrated()[source]

Return pupil size calibration state.

Low-level C definition:

int TPxIsPpSizeCalibrated()

_libdpx.TPxIsRemoteCalibrated()[source]

Verifies if the tracker is remote calibrated.

Low-level C definition:

void TPxIsRemoteCalibrated()

_libdpx.TPxIsSubjectFixating()[source]

Returns two Boolean flags, one for each eye, to indicate whether the subject is currently fixating.

Replicates the behabivor of Datapixx(‘IsSubjectFixating’)

Returns:

(leftFixationFlag, rightFixationFlag) where each element is type(bool)

and indicates whether the left and right eye are currently fixating.

Return type:

tuple

_libdpx.TPxIsSubjectMakingSaccade()[source]

Returns two Boolean flags, one for each eye, to indicate whether the subject is currently saccading.

Replicates the behabivor of Datapixx(‘IsSubjectMakingSaccade’)

Returns:

(leftSaccadeFlag, rightSaccadeFlag) where each element is type(bool)

and indicates whether the left and right eye are currently saccading.

Return type:

tuple

_libdpx.TPxLoadCalibration()[source]

Load calibration saved to tracker

Low-level C definition:

void TPxLoadCalibration()

_libdpx.TPxMiniGetData()[source]

Gets the following information:

timestamp, x_left, y_left, pp_size_left, x_right, y_right, pp_size_right, distance

This function can only be called once you have done a built-in calibration (remote)

Returns:

List containing timestamp, x_left, y_left, pp_size_left, x_right, y_right, pp_size_right, distance

Return type:

list

Low-level C definition:

double TPxGetDataMini(double*)

_libdpx.TPxMiniGetDataServer(numElem)[source]
_libdpx.TPxMiniGetEyePosition()[source]

Return the last eye position in an array.

Low-level C definition:

void TPxMiniGetEyePosition(double * lastEyePosition)

_libdpx.TPxMiniRecordData()[source]
_libdpx.TPxMiniServerSetUpDataRecording(numElem)[source]
_libdpx.TPxMiniSetDownScaleFactor(scaleFactor=0)[source]

Set the TPxMini downscale factor to a user-specified value.

Low-level C definition:

void TPxMiniSetDownScaleFactor(int newValue)

_libdpx.TPxMiniSetScreenProportion(screenProportion=80)[source]

Set the TPxMini screen proportion to calibrate.

Low-level C definition:

void TPxMiniSetScreenProportion(int newValue)

_libdpx.TPxMiniStopRecording()[source]

Return the pupil calibration factor in an array.

Low-level C definition:

void TPxMiniStopRecording()

_libdpx.TPxMiniTeardown()[source]

Teardown the TPx/mini.

Low-level C definition:

void TPxMiniTeardown(void)

_libdpx.TPxOpenTPxMini(proportion=80)[source]

Replicates the behabivor of Datapixx(‘OpenTPxMini’)

Parameters:

proportion (int) – the percentage of the screen to calibrate.

Raises:
  • 1) proportion is outside the interval (40,100) or is not an integer

  • 2) user attempting to use TPx/mini on non-windows machine

  • 3) invalid or missing TPx/mini license file

_libdpx.TPxPpSizeCalibrationApply(slope, pp_size_norm, pp_size, raw)[source]

Apply pupil size calibration to raw data from the camera. Note that the pupil size calibration is applied directly in the FPGA. This function is used only as reference.

Formula : rawNorm = slope * (ppSizeNorm - ppSize) + raw

Low-level C definition:

double TPxPpSizeCalibrationApply(double slope, double ppSizeNorm, double ppSize, double raw)

_libdpx.TPxPpSizeCalibrationClear()[source]

Clear the pupil size calibartion.

:low-level C definition

void TPxPpSizeCalibrationClear()

_libdpx.TPxPpSizeCalibrationDoneGatheringData()[source]

Stops gathering data for the pupil size calibration

Low-level C definition:

void TPxPpSizeCalibrationDoneGatheringData()

_libdpx.TPxPpSizeCalibrationGet()[source]

Return the pupil calibration factor in an array.

Low-level C definition:

void TPxPpSizeCalibrationGet(double * ppSizeSlope)

_libdpx.TPxPpSizeCalibrationGetEyeData()[source]

Starts gathering data for the pupil size calibration

Low-level C definition:

void TPxPpSizeCalibrationGetEyeData()

_libdpx.TPxPpSizeCalibrationLinearRegression()[source]

Analyze the data gathered and extract linear regression slope that will serve as a normalization factor for the pupil size calibration

Low-level C definition:

void TPxPpSizeCalibrationLinearRegression()

_libdpx.TPxPpSizeCalibrationSet()[source]

Set the pupil size calibration factor found in global variables in the FPGA thus activating pupil size calibration.

Low-level C definition:

void TPxPpSizeCalibrationSet()

_libdpx.TPxReadData(TPxDict, numFrames=None)[source]

Return new TRACKPixx samples from a Datapixx buffer while a TRACKPixx schedule is running. Replicates the behavior of Datapixx(‘ReadTPxData’) in MATLAB.

Parameters:
  • TPxDict (dict) – Returned by TPxSetupSchedule(). Contains the following key/entry pairs: ‘isRecording’ : (bool) is the acquisition currently running? ‘isLogTimetag’ : (bool) are we acquiring timetags in addition to eye tracking data? ‘bufferBaseAddress’ : (int) the acquisition data buffer base address within the Datapixx ‘bufferSize’ : (int) the number of allocated bytes in the acquisition data buffer ‘currentWriteAddr’ : (int) the buffer address which will be written by the next acquired TPx sample ‘currentReadAddr’ : (int) the buffer address which will be read by the next streaming call to TPxReadData ‘numBufferFrames’ : (int) the total number of samples which fit in the acquisition data buffer ‘currentWriteFrame’ : (int) the buffer frame which will be written by the next acquired TPx sample ‘currentReadFrame’ : (int) the buffer frame which will be read by the next call to TPxReadData ‘newBufferFrames’ : (int) the number of new buffer frames since last call to TPxReadData (i.e., currentWriteFrame - currentReadFrame) ‘numStreamUnderflows’ : (int) the number of TRACKPixx streaming underflows which have occurred since TPxSetSchedule ‘numStreamOverflows’ : (int) the number of TRACPixx streaming overflows which have occurred since TPxSetSchedule

  • numFrames (int) – Number of new frames to read from DATAPixx RAM. Must be greater than 0. If omitted, this defaults to reading the entire buffer.

Returns:

an N x 20 numpy.ndarray where each row is a TRACKPixx sample

and each column corresponds to a particular TRACKPixx metric enumerated below:

Col# Name Type Description

1 timetag float Time stamp of DATAPixx time in seconds 2 leftScrPosX float Cartesian screen coordinate for x component of left eye in pixels 3 leftScrPosY float Cartesian screen coordinate for y component of left eye in pixels 4 leftPPSize float Diameter of left eye pupil in pixels 5 rightScrPosX float Cartesian screen coordinate for x component of right eye in pixels 6 rightScrPosY float Cartesian screen coordinate for y component of right eye in pixels 7 rightPPSize float Diameter of right eye pupil in pixels 8 DigitalInput int Digital input state in base10 9 leftBlink bool Is left eye blinking? 10 rightBlink bool Is right eye blinking? 11 DigitalOutput int Digital output state in base10 12 leftFixation bool Is left eye fixated? 13 rightFixation bool Is right eye fixated? 14 leftSaccade bool Is left eye saccading? 15 rightSaccade bool Is right eye saccading? 16 messageC int Integer event code sent to DPx (not yet implemented) 17 leftRawX float Pupil-to-corneal reflection vector x component for left eye 18 leftRawY float Pupil-to-corneal reflection vector y component for left eye 19 rightRawX float Pupil-to-corneal reflection vector x component for right eye 20 rightRawY float Pupil-to-corneal reflection vector y component for right eye

Return type:

bufferData (ndarray)

_libdpx.TPxReadTPxData(addr, readFrames=-1)[source]

Retreive data acquired by the scheduler.

Parameters:
  • addr (unsigned int) – Set to a number less than the total amount of memory available.

  • readFrames (unsigned int) – -1 for all acquired data, positive for specific amount.

Returns:

a list of four elements

[0] = Acquired data [1] = Current read address [2] = Underflow flag, set to 1 when underflow [3] = Overflow flag, set to 1 when overflow. [4] = Read frame count (which should correspond to result[0].size())

Return type:

List

Low-level C definition:

void TPxReadTPxData(uint addr, double* packed_data, uint numberOfFrames)

_libdpx.TPxSaveCalibration()[source]

Save last executed calibration to tracker

Low-level C definition:

void TPxSaveCalibration()

_libdpx.TPxSaveImageBaseAddr()[source]

Save the images to RAM

Returns:

The adress of the first frame.

Return type:

int

Low-level C definition:

int TPxSaveImages()

_libdpx.TPxSaveImageGap()[source]

Return the size of one image in RAM.

Returns:

the size of image in bytes

Return type:

int

Low-level C definition:

int TPxSaveImageGap()

_libdpx.TPxSaveImages()[source]

Write 16 Images at base address

Returns:

The address of the first frame.

Return type:

int

Low-level C definition:

int TPxSaveImages()

_libdpx.TPxSaveToCSV(last_read_address, fileName)[source]

Save from last_read_address up to TPxGetReadAddr(), into the default file for today

Low-level C definition:

unsigned TPxSaveToCsv(unsigned address)`

_libdpx.TPxSetAllDACOutput(allChannelValue)[source]

Set the DAC value

Low-level C definition:

`` TPxSetAllDACOutput``

_libdpx.TPxSetAwakePictureRequest()[source]

Awake tracker by activating the picture request thus turning on the IR

Low-level C definition:

void TPxSetAwakePictureRequest()

_libdpx.TPxSetBuff(buffer_addres, buffer_size)[source]

Shortcut to set up the the base address and buffer size for schedule recording of TRACKPixx data.

Low-level C definition:

void TPxSetBuff(unsigned buffAddr, unsigned buffSize)

_libdpx.TPxSetDistance(distance)[source]

Set the tracking distance of the setup in centimeter. Distance should be taken perpendicularly from the plan parralel to the lens, passing by the subject’s eyes up to about 1 cm behind the tip of the lens.

Parameters:

distance (unsigned int) – distance, in cm, between the camera and a parallel plan passing by the eyes of the subject.

Low-level C definition:

void TPxSetDistance(unsigned int distance)

_libdpx.TPxSetFixationThresholds(maxSpeed=2500.0, minNumberOfConsecutiveSamples=25)[source]

Used to define the thresholds for classifying fixation events.

Replicates the behabivor of Datapixx(‘SetFixationThresholds’ [, maxSpeed=2500] [, minNumberOfConsecutiveSamples=25])

Parameters:
  • maxSpeed (float) – the eye velocity threshold below which to classify fixations. Uses units of pixels per second

  • minNumberOfConsecutiveSamples (int) – the minimum number of consecutive samples required to classify a fixation event.

_libdpx.TPxSetIrisExpectedSize(size)[source]

Set the Iris expected size to the DP3 and the TPx in pixel as required

Low-level C definition:

void TPxSetIrisExpectedSize(int irisExcpectedSize)

_libdpx.TPxSetLEDIntensity(intensity)[source]

Set the infrared LED array intensity

Low-level C definition:

void TPxSetLEDIntensity(unsigned int intensity)

_libdpx.TPxSetLens(lens)[source]

Set the lens type used in the setup.

Parameters:
  • lens – lens type used in the setup

  • are (Accepted values) –

  • 0 (-) –

  • 1 (-) –

  • 2 (-) –

Low-level C definition:

void TPxSetLens(unsigned int lens)

_libdpx.TPxSetRobotEyesPositionInPixels(xL, yL, xR, yR)[source]

Close currently selected VPixx device.

Low-level C definition:

void DPxClose()

_libdpx.TPxSetSaccadeThresholds(minSpeed=10000.0, minNumberOfConsecutiveSamples=10)[source]

Used to define the thresholds for classifying saccade events.

Replicates the behabivor of Datapixx(‘SetSaccadeThresholds’ [, mainSpeed=10000] [, minNumberOfConsecutiveSamples=10])

Parameters:
  • minSpeed (float) – the eye velocity threshold above which to classify saccades. Uses units of pixels per second

  • minNumberOfConsecutiveSamples (int) – the minimum number of consecutive samples required to classify a saccade event.

_libdpx.TPxSetSearchLimits(left_eye, right_eye)[source]

Set search limits

Low-level C definition:

void TPxSetSearchLimits(void)

_libdpx.TPxSetSleepPictureRequest()[source]

Put tracker to sleep by deactivating the picture request thus turning off the IR

Low-level C definition:

void TPxSetSleepPictureRequest()

_libdpx.TPxSetTrackerWindowBrightness(brightness=200)[source]

Set the tracker window brightness.

Low-level C definition:

void TPxSetTrackerWindowBrightness(int brightness)

_libdpx.TPxSetupSchedule(bufferbaseAddress=12000000, numBuffFrames=3600000)[source]

Set up the base address and buffer size for TRACKPxix recording. Replicates the behavior of Datapixx(‘SetupTPxSchedule’) in MATLAB. This function must be proceeded by a call to TPxStartSchedule().

Parameters:
  • bufferbaseAddress (int) – base address for writing TRACKPixx samples into DATAPixx RAM default = int(12e6)

  • numBuffFrames (int) – number of frames in DATAPixx RAM allocated for writing TRACKPixx samples default = int(36e5), which is ~30 minutes of 2KHz recording

Returns:

‘isRecording’ : (bool) is the acquisition currently running? ‘isLogTimetag’ : (bool) are we acquiring timetags in addition to eye tracking data?

’bufferBaseAddress’ : (int) the acquisition data buffer base address within the Datapixx ‘bufferSize’ : (int) the number of allocated bytes in the acquisition data buffer ‘currentWriteAddr’ : (int) the buffer address which will be written by the next acquired TPx sample ‘currentReadAddr’ : (int) the buffer address which will be read by the next streaming call to TPxReadData

’numBufferFrames’ : (int) the total number of samples which fit in the acquisition data buffer ‘currentWriteFrame’ : (int) the buffer frame which will be written by the next acquired TPx sample ‘currentReadFrame’ : (int) the buffer frame which will be read by the next call to TPxReadData ‘newBufferFrames’ : (int) the number of new buffer frames since last call to TPxReadData (i.e., currentWriteFrame - currentReadFrame)

’numStreamUnderflows’ : (int) the number of TRACKPixx streaming underflows which have occurred since TPxSetSchedule ‘numStreamOverflows’ : (int) the number of TRACPixx streaming overflows which have occurred since TPxSetSchedule

Return type:

Dictionary with the following key/entry pairs to indicate TRACKPixx status information

Raises:
  • 1) 'bufferbaseAddress' is not an integer or is less than 0 or is not even

  • 2) 'numBuffFrames' is not an integer or is less than 1

  • 3) 'numBuffFrames' exceeds what is available in DATAPixx RAM

_libdpx.TPxSetupTPxSchedule(buffBaseAddr=0, numBuffFrames=7200000)[source]

Setup a schedule

Parameters:
  • buffBaseAddr (int) – Any positive value equal to or greater than zero.

  • numBuffFrames (int) – Specify the the frame count to get.

Low-level C definition:

`` void TPxSetupTPxSchedule(unsigned int buffBaseAddr, unsigned int numBuffFrames)``

_libdpx.TPxShowOverlay()[source]

Activate Datapixx3 Overlay to display the eye image and eye cursors on monitor

Low-level C definition:

void TPxShowOverlay()

_libdpx.TPxStartSchedule()[source]

Enable TRACKPixx scheduling

_libdpx.TPxStopSchedule()[source]

Disable TRACKPixx scheduling

_libdpx.TPxUninitialize()[source]

Uninitialize the tracker dependently of tractor type.

Low-level C definition:

void TPxUninitialize()