|
Methods defined here:
- __init__(self, pid, eventfile, datafile, fixfile, aoifile=None, prune_length=None)
- Inits Participant class
Args:
pid: Participant id
eventfile: a string containing the name of the "Event-Data.tsv" file for this participant
datafile: a string containing the name of the "All-Data.tsv" file for this participant
fixfile: a string containing the name of the "Fixation-Data.tsv" file for this participant
aoifile: If not None, a string containing the name of the aoifile
with definitions of the "AOI"s.
prune_length: If not None, an integer that specifies the time
interval (in ms) from the beginning of each Segment in which
samples are considered in calculations. This can be used if,
for example, you only wish to consider data in the first
1000 ms of each Segment. In this case (prune_length = 1000),
all data beyond the first 1000ms of the start of the "Segment"s
will be disregarded.
Yields:
a Participant object
- export_features(self, featurelist=None, aoifeaturelist=None, aoifeaturelabels=None, id_prefix=False, require_valid=True)
- Returns feature names and their values for this Participant
Args:
featurelist: if not None, a list of strings containing the name of the features to be
returned
aoifeaturelist: if not None, a list of features to be returned for each of the "AOI"s.
aoifeaturelabels: if not None, a list of AOI related features to be returned.
*Note: while aoifeaturelist is a subset of features that will be returned for all
"AOI"s, aoifeaturelabels contains the exact AOI feature name, i.e., a feature
of the form: [AOI name]_[feature name]
For example for an AOI called 'graph', aoifeaturelabels may contain 'graph_fixationrate'
id_prefix: a boolean determining if the method should also export the participant id
require_valid: a boolean determining if only valid segments should be used when
calculating the features. default = True
Returns:
featnames: a list of feature names sorted alphabetically
featvals: a corresponding list of feature values
e.g.
featnames = ['fixationrate', 'length', 'meanabspathangles']
featvals = [0.00268522882294', '1529851', '1.60354714212']
- export_features_tsv(self, featurelist=None, aoifeaturelist=None, id_prefix=False, require_valid=True)
- Returns feature names and their values for this Participant in a tab separated format
Args:
featurelist: if not None, a list of strings containing the name of the features to be
returned
aoifeaturelist: if not None, a list of features to be returned for each of the "AOI"s.
id_prefix: a boolean determining if the method should also export the participant id.
require_valid: a boolean determining if only valid segments should be used when
calculating the features. default = True
Returns:
A two-line string with the first line having the feature names sorted alphabetically
and separated by a tab '/t', and the second line containing the corresponding values
separated by a tab '/t'
For example:
fixationrate length meanabspathangles
0.00268522882294 1529851 1.60354714212
- invalid_segments(self)
- Returns a list of invalid segments in this particiapnt's eye gaze data
Returns:
a list of "Segment ids" of invalid Segments in this particiapnt's eye gaze data
- print_(self)
- Outputs all feature names and their values for this Participant to the console
- valid_segments(self)
- Returns a list of valid segments in this particiapnt's eye gaze data
Returns:
a list of "Segment ids" of invalid Segments in this particiapnt's eye gaze data
|