cardioception.HSD.config.TaskConfig#

class cardioception.HSD.config.TaskConfig(axis='absolute', nTones=5, minTones=3, absoluteDelays=(80.0, 600.0, 20.0), phaseDelays=(0.1, 0.75, 0.025), explore=0.1, targets=('mu', ), minTrials=15, maxTrials=60, ciWidth=100.0, ciWidthPhase=0.17, minDelay=0.13, maxPeriodFraction=0.75, ceilingMargin=0.1, audioLead=0.05, latencyBias=0.05, isi=(0.25, 0.25), respMax=5.0, minRatingTime=0.5, maxRatingTime=5.0, startKey='space', response_keys=<factory>, textSize=0.04, fixationSize=0.04, toneFreq=1000.0, toneSecs=0.03, toneRamp=0.005, toneVolume=0.5)[source]#

Design factors of an HSD session.

__init__(axis='absolute', nTones=5, minTones=3, absoluteDelays=(80.0, 600.0, 20.0), phaseDelays=(0.1, 0.75, 0.025), explore=0.1, targets=('mu', ), minTrials=15, maxTrials=60, ciWidth=100.0, ciWidthPhase=0.17, minDelay=0.13, maxPeriodFraction=0.75, ceilingMargin=0.1, audioLead=0.05, latencyBias=0.05, isi=(0.25, 0.25), respMax=5.0, minRatingTime=0.5, maxRatingTime=5.0, startKey='space', response_keys=<factory>, textSize=0.04, fixationSize=0.04, toneFreq=1000.0, toneSecs=0.03, toneRamp=0.005, toneVolume=0.5)#

Methods

__init__([axis, nTones, minTones, ...])

apply(parameters)

Write these factors into a parameters dictionary.

bounds(period)

(min_delay, max_delay) for next_delay, given the period in s.

candidates()

Candidate delays in engine units: ms (absolute) or fractions (phase).

ci_width()

Stopping width of the mu credible interval, in engine units.

describe()

The whole configuration, for the manifest, ready for json.dumps.

engine([rng])

A fresh posterior over the envelope for this configuration.

grids()

Parameter grids for SynchronyPsi.

Attributes

absoluteDelays

Candidate delays on the absolute axis, as (low, high, step) in ms.

allowedKeys

The keys the decision screen listens for.

audioLead

Seconds a tone is scheduled ahead of its onset.

axis

"absolute" (delay in ms after the R-wave) or "phase" (delay as a fraction of the anticipated interbeat interval).

ceilingMargin

Fraction by which the absolute-axis ceiling drawn at the start of a trial is lowered below maxPeriodFraction of the period.

ciWidth

Width of the 95% credible interval of mu at which to stop, in ms (absolute axis) and in fractions of the period (phase axis).

ciWidthPhase

explore

Probability that a trial draws its delay uniformly instead of by expected information gain.

fixationSize

Fixation cross, in height units.

isi

Inter-stimulus interval, drawn uniformly between the two values.

latencyBias

Seconds of physical delay the recordings cannot see: the transport before the ECG is stamped plus the speaker after the onset the audio driver reports, 30 to 70 ms on the PAT dry run.

maxPeriodFraction

Longest delay, as a fraction of the current interbeat interval.

maxRatingTime

Seconds before the rating scale gives up and records no rating.

maxTrials

minDelay

Shortest physical R-to-tone delay requested, in seconds, on both axes: the 31 ms (p95, bench) it takes to know of a beat, plus audioLead, plus latencyBias (see cardioception.HSD._constants).

minRatingTime

Seconds before a confidence rating can be submitted.

minTones

Fewest tones a train must deliver for its trial to update the posterior.

minTrials

The session stops once the credible interval of mu is no wider than ci_width(), but not before minTrials and never after maxTrials.

nTones

Tones per trial.

phaseDelays

Candidate delays on the phase axis, as (low, high, step) in fractions of the interbeat interval.

respMax

Seconds a participant has to make the decision.

startKey

Key that advances instruction screens.

targets

Parameters whose posterior entropy the delay placement minimizes.

textSize

Text height, in height units.

toneFreq

The tone: frequency in Hz, duration and ramps in seconds, volume 0 to 1.

toneRamp

toneSecs

toneVolume

response_keys

Which key means which judgement.