expyfun.analyze.press_times_to_hmfc#

expyfun.analyze.press_times_to_hmfc(presses, targets, foils, tmin, tmax, return_type='counts')[source]#

Convert press times to hits/misses/FA/CR and reaction times

Parameters:
presseslist

List of press times (in seconds).

targetslist

List of target times.

foilslist

List of foil (distractor) times.

tminfloat

Minimum time after a target/foil to consider a press, exclusive.

tmaxfloat

Maximum time after a target/foil to consider a press, inclusive. The final bounds will be \((t_{min}, t_{max}]\).

Note

Do do not rely on floating point arithmetic to get exclusive/inclusive bounds right consistently. Such exact equivalence in floating point arithmetic should not be relied upon.

return_typestr | list of str

A list containing one or more of ['counts', 'rts'] to return a tuple of outputs (see below for description). Can also be a single string, in which case only the single requested type is returned (not within a tuple).

Returns:
hmfcotuple

5-element tuple of hits, misses, false alarms, correct rejections, and other presses (not within the window for a target or a masker). Only returned if 'counts' is in return_type.

rtstuple

2-element tuple of reaction times for hits and false alarms. Only returned if 'rts' is in return_type.

Notes

Multiple presses within a single “target window” (i.e., between tmin and tmax of a target) or “masker window” get treated as a single press by this function. However, there is no such de-bouncing of responses to “other” times.