|
Methods defined here:
- __init__(self, pid, eventfile, datafile, fixfile, segfile, log_time_offset=None, aoifile=None, prune_length=None, require_valid_segs=True, auto_partition_low_quality_segments=False)
- Inits Participant_Basic 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
segfile: a string containing the name of the '.seg' file for this participant
log_time_offset: If not None, an integer indicating the time offset between the
external log file and eye tracking logs
aoifile: If not None, a string conatining the name of the '.aoi' file
with definitions of the "AOI"s.
prune_length: If not None, an integer that specifies the time
interval (in ms) from the begining 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.
auto_partition_low_quality_segments: a boolean indicating whether EMDAT should
split the "Segment"s which have low sample quality, into two new
sub "Segment"s discarding the largest gap of invalid samples.
Yields:
a Participant object
- is_valid(self, threshold=None)
- Determines if the samples for this Participant meets the validity threshold
Args:
threshold: if not None, the threshold value that should be used for the
validity criterion
Returns:
True or False
Methods inherited from Participant.Participant:
- 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
|