TRACKPixx

class tracker.TRACKPixx3[source]

Bases: Tracker, DpxDevice

Class Definition for the DATAPixx3 Device.

The bases defined below are the core subsystems attached to a DATAPixx3 devices. A DATAPixx3 device also has very specific subsystems which are used through handles. See the example bellow for more details.

Note

If you have a Lite version of the device, some of these handles will not be available. The usage of the handles is as follows:

>>> from pypixxlib.datapixx import DATAPixx3
>>> my_device = DATAPixx3()
>>> my_device.adc.function() # adc is the subsystem in this example.
>>> my_device.BaseFunction() # A base function from one of the class' bases.
clearDeviceCalibration()[source]

Clear calibration from tracker, making device not calibrated

close()[source]

Closes a TrackPixx device.

This method is used to release a handle on a TrackPixx device.

finishCalibration()[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.

getDistance()[source]

Returns the tracking distance in cm.

This returns the current distance set in tracker in cm. This is used along with lens to determine the iris size.

Returns:

The distance in cm

getEyePosition()[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.

Returns:

A list of gaze position, such that first elements are screen_x_left_eye, screen_y_left_eye, screen_x_right_eye, screen_y_right_eye

getEyePositionDuringCalib(x_screen, y_screen, eye_to_verify)[source]

Tells the camera to get eye position now.

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

Note

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

getImagePtr()[source]

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

getLEDintensity()[source]

Get the len intensity of the IR led connected to the camera tracker.

Returns:

Value of the intensity between 1 to 8.

Return type:

int

getLens()[source]

Returns the lens type currently selected.

Lens can take three different values:
  • 0 (25mm)

  • 1 (50mm)

  • 2 (75mm)

getTargetCalibrationImages(fileNamePrefix, path, disableMedianFilter, disableHDR)[source]

Save 16 frames images in the png format to disk

getTime()[source]

Gets the device time from DataPixx since power up.

Returns:

Time in seconds.

Return type:

float

hideOverlay()[source]

Desactivate Datapixx3 Overlay to display the eye image and eye cursors on monitor.

isDeviceCalibrated()[source]

Returns the calibrated state of the tracker.

Returns:

True when tracked has been successfully calibrated, false otherwise.

isSleepMode()[source]

Returns True if TRACKPixx sleep mode is enabled.

loadCalibration()[source]

Load calibration saved to tracker

open()[source]

Opens a TrackPixx device.

This method is used to get a handle on a TrackPixx device.

saveBufferedData()[source]

Save from last_read_address up to TPxGetReadAddr(), into the default file for today.

saveCalibration()[source]

Save last executed calibration to tracker

setDistance(distance)[source]

Sets the current setup tracking distance in cm. This is used along with lens to determine the iris size.

setEyePositionToPROPIxx(eye_x_final, eye_y_final)[source]

Provide the position of eyes to the PROPIXX

setIrisSize(lens, dist=0)[source]

Set the iris size depending of lens type and distance

Parameters:
  • lens (int) – Diameter of the len in millimeter (25, 50,75).

  • dist (int) – Distance between the camera and the observer.

setLEDintensity(led_intensity)[source]

Set the len intensity of the IR led connected to the camera tracker.

Parameters:

led_intensity (int) – Value of the intensity between 1 to 8.

setLens(lens)[source]

Sets the lens specified to Datapixx3. This will have an impact on camera object image size calculation.

Lens can take three different values:
  • 0 (25mm)

  • 1 (50mm)

  • 2 (75mm)

setScreenProportionToCalibrate(proportion)[source]

Set the proportion of the screen to calibrate (TRACKPixx-mini only)

setSleepMode(enable)[source]

Enables or disables the sleep mode.

Enabling this mode turns the TRACKPixx off. Disabling it will turn the TRACKPixx on.

Parameters:

enable (bool) – Set to true to enable sleep mode.

setUpDataRecording(saveFolder)[source]

Set up the the base address and buffer size for schedule recording of TRACKPixx data.

showOverlay(presetDisposition='FULL_STIMULI_HALF_TRACK')[source]

Activate Datapixx3 Overlay to display the eye image and eye cursors on monitor.

class tracker.TRACKPixxMini[source]

Bases: Tracker

This class is the concrete class specific to TRACKPixx-mini Tracker only .

close()[source]

Closes a TrackPixx device.

This method is used to release a handle on a TrackPixx device.

finishCalibration()[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.

getEyePosition()[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.

Returns:

A list of gaze position, such that first elements are screen_x_left_eye, screen_y_left_eye, screen_x_right_eye, screen_y_right_eye

getEyePositionDuringCalib(x_screen, y_screen, eye_to_verify)[source]

Tells the camera to get eye position now.

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

Note

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

getImagePtr()[source]

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

getName()[source]

Return part number

isDeviceCalibrated()[source]

Returns the calibrated state of the tracker.

Returns:

True when tracked has been successfully calibrated, false otherwise.

open(licenseFileDir='')[source]

Opens a TrackPixx device.

This method is used to get a handle on a TrackPixx device.

saveBufferedData()[source]

Save from last_read_address up to TPxGetReadAddr(), into the default file for today.

setScreenProportionToCalibrate(proportion)[source]

Set the proportion of the screen to calibrate (TRACKPixx-mini only)

setUpDataRecording(saveFolder)[source]

Set up the the base address and buffer size for schedule recording of TRACKPixx data.

class tracker.Tracker[source]

Bases: object

This class is the bridge between C commands that access device and python commands. When you initiate a new device Access object, all functions are loaded from a .DLL file, and the appropriate C types conversion happen. After that, new functions are created with more Pythonic names that handle the calling of C functions.

classmethod buildTrackerObject(cls)[source]

Return a specific object on the detected tracker

calibrateBuiltInTarget(targetIndex)[source]

“Calibrate a target with built-in calibration (TRACKPixx-mini only).

Parameters:

targetIndex (int) – Index of the target to calibrate.

clearDeviceCalibration()[source]

Clear calibration from tracker, making device not calibrated

close()[source]

Closes a TrackPixx device.

This method is used to release a handle on a TrackPixx device.

convertCoordSysToCartesian(inList)[source]

Convert custom coordinate to system coordinate.

Parameters:

inList (List) – List of coordinates to convert.

Returns:

List of coordinates to converted.

Return type:

(List)

convertCoordSysToCustom(inList)[source]

Convert custom coordinate to system coordinate.

Parameters:

inList (List) – List of coordinates to convert.

Returns:

List of coordinates to converted.

Return type:

(List)

finalizeBuiltInCalibration()[source]

Finalize the built-in calibration (TRACKPixx-mini only)

Returns:

Retrun 0 if the calibration is finished properly.

Return type:

int

finishCalibration()[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.

getDistance()[source]

Returns the tracking distance in cm.

This returns the current distance set in tracker in cm. This is used along with lens to determine the iris size.

Returns:

The distance in cm

getEyePosition()[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.

Returns:

A list of gaze position, such that first elements are screen_x_left_eye, screen_y_left_eye, screen_x_right_eye, screen_y_right_eye

getEyePositionDuringCalib(x_screen, y_screen, eye_to_verify)[source]

Tells the camera to get eye position now.

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

Note

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

getImagePtr()[source]

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

getLEDintensity()[source]

Get the len intensity of the IR led connected to the camera tracker.

Returns:

Value of the intensity between 1 to 8.

Return type:

int

getLens()[source]

Returns the lens type currently selected.

Lens can take three different values:
  • 0 (25mm)

  • 1 (50mm)

  • 2 (75mm)

getTime()[source]

Gets the device time from DataPixx since power up.

Returns:

Time in seconds.

Return type:

float

hideOverlay()[source]

Desactivate Datapixx3 Overlay to display the eye image and eye cursors on monitor.

initializeBuiltInCalibration()[source]

Initialize the built-in calibration (TRACKPixx-mini only)

isDeviceCalibrated()[source]

Returns the calibrated state of the tracker.

Returns:

True when tracked has been successfully calibrated, false otherwise.

isSleepMode()[source]

Returns True if TRACKPixx sleep mode is enabled.

loadCalibration()[source]

Load calibration saved to tracker

open()[source]

Opens a TrackPixx device.

This method is used to get a handle on a TrackPixx device.

saveBufferedData()[source]

Save from last_read_address up to TPxGetReadAddr(), into the default file for today.

saveCalibration()[source]

Save last executed calibration to tracker

setActive()[source]

Use to fake calls on dpxDevice

setDistance(distance)[source]

Sets the current setup tracking distance in cm. This is used along with lens to determine the iris size.

setEyePositionToPROPIxx(eye_x_final, eye_y_final)[source]

Provide the position of eyes to the PROPIXX

setIrisSize(lens, dist=0)[source]

Set the iris size depending of lens type and distance

Parameters:
  • lens (int) – Diameter of the len in millimeter (25, 50,75).

  • dist (int) – Distance between the camera and the observer.

setLEDintensity(led_intensity)[source]

Set the len intensity of the IR led connected to the camera tracker.

Parameters:

led_intensity (int) – Value of the intensity between 1 to 8.

setLens(lens)[source]

Sets the lens specified to Datapixx3. This will have an impact on camera object image size calculation.

Lens can take three different values:
  • 0 (25mm)

  • 1 (50mm)

  • 2 (75mm)

setScreenProportionToCalibrate(proportion)[source]

Set the proportion of the screen to calibrate (TRACKPixx-mini only)

setSleepMode(enable)[source]

Enables or disables the sleep mode.

Enabling this mode turns the TRACKPixx off. Disabling it will turn the TRACKPixx on.

Parameters:

enable (bool) – Set to true to enable sleep mode.

setUpDataRecording(saveFolder)[source]

Set up the the base address and buffer size for schedule recording of TRACKPixx data.

showOverlay(presetDisposition='FULL_STIMULI_HALF_TRACK')[source]

Activate Datapixx3 Overlay to display the eye image and eye cursors on monitor.

updateRegisterCache()[source]

Use to fake calls on dpxDevice