Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Parsing data without pygaze (pylink)

 We are performing various experiments involving pupillometry. We are interested in using your established and automated workflow for data preprocessing using datamatrix.


I cannot parse the data correctly using the existing code. I noticed the ASC file has a different set of messages. For example, here is the messages in our file example (attached). I only could manage to parse the file by changing the source code to:

def is_start_trial(self, l):

     # MSG 6735155 start_trial 1

     if self.match(l, u'MSG', int, u'TRIALID', ANY_VALUE):

       self.trialid = l[3]

       self.current_phase = None

       return True

but this was enough and still the resulting datamatrix does not have the pupil data. Is there some workflow to change the defualt format created from an experiment by pylink only to be used and parsed?

Attached is some lines of the .asc file created

MSG 11751341 TRIALID 1

MSG 11751344 RECCFG CR 500 2 1 L

MSG 11751344 ELCLCFG MTABLER

MSG 11751344 GAZE_COORDS 0.00 0.00 1919.00 1199.00

MSG 11751344 THRESHOLDS L 54 206

MSG 11751344 ELCL_WINDOW_SIZES 176 188 0 0

MSG 11751344 CAMERA_LENS_FOCAL_LENGTH 38.00 

MSG 11751344 PUPIL_DATA_TYPE RAW_AUTOSLIP

MSG 11751344 ELCL_PROC CENTROID (3)

MSG 11751344 ELCL_PCR_PARAM 5 3.0

START 11751345 LEFT SAMPLES EVENTS

PRESCALER 1

VPRESCALER 1

PUPIL AREA

EVENTS GAZE LEFT RATE 500.00 TRACKING CR FILTER 2

SAMPLES GAZE LEFT RATE 500.00 TRACKING CR FILTER 2 INPUT

INPUT 11751345 127

MSG 11751345 !MODE RECORD CR 500 2 1 L

11751345  997.2  517.6 1390.0  127.0 ...

11751347  998.7  523.2 1393.0  127.0 ...

SFIX L  11751349

11751349  999.7  521.5 1394.0  127.0 ...

11751351 1001.5  518.4 1392.0  127.0 ...

MSG 11751352 trial_onset

11751353 1000.8  519.9 1391.0  127.0 ...

11751355  999.4  518.5 1389.0  127.0 ...

11751357  999.8  517.4 1391.0  127.0 ...

11751359 1001.7  517.5 1394.0  127.0 ...

Sign In or Register to comment.