Art Tab : Stimulus Artefact SubtractionSubtract stimulus artefacts from patchclamp recordings via extrapolation of a baseline and exponential function. One method to remove an electrical stimulus artefact from a recording is to simply blank/null the artefact from the time it starts to the time it ends (see Main Tab Clip Events operation). However, sometimes the tail of the artefact contaminates the onset of the neuron’s response to the stimuli, for example an excitatory postsynaptic current (EPSC). NeuroMatic’s Art Tab is designed to help remove such a contamination by simulating (i.e. curve fitting) the tail end of the artefact with an exponential function, and then subtracting this exponential function from the recording via extrapolation at longer times. A baseline is also simulated via extrapolation, but from a time window immediately before the stimulus artefact.
Preartefact Baseline FitInput/output parameters for the baseline function computation immediately before the stimulus artefact (green lines in Channel Graph). The baseline function is extrapolated to times after the stimulus artefact (see sub win). Baseline Function: Avg – average, for baselines that are flat, i.e. have zero slope. Line – for baselines with a linear slope. Exp – for baselines with an exponential decay. Note, this function assumes your baseline decays to zero, i.e. your data has been baseline subtracted (see Main Tab Baseline operation or Channel Graph Baseline Transform). See BslnExpSlopeThreshold. Zero – for baselines that are zero. dt: negative delta/shift time before the stimulus onset, which determines the end of the baseline window (win). win: length of time window for the average or curvefit baseline computation (green vertical dashed drag lines in Channel Graph). display outputs: (a) amplitude, (t) time constant, (m) slope, (b) intercept. Artefact Tail FitInput/output parameters for the exponential fit to the stimulus artefact tail (red lines in Channel Graph). The exponential function is extrapolated to times after the stimulus artefact, set by sub win. Artefact Fit Function: Exp – single exponential decay. 2Exp – double exponential decay. fit win: length of time window for curve fitting the artefact tail (red vertical dashed drag lines in Channel Graph). The onset of this window is set to the peak (inflection point) of the artefact's tail, but can be shifted via the configuration parameter ArtPeakDT. sub win: length of time window for computing the artefact subtraction, including the extrapolation time beyond the fit window. The length of this window should be long enough so that the extrapolated fit of the artefact converges with the extrapolated baseline. display outputs: (a) amplitude, (t) time constant. Artefact Onset TimesInput/output parameters for setting the onset times of the stimulus artefacts. Use the Spike Tab to compute onset times via a level threshold detection. Wave Select: use this dropdown menu to select a wave containing the stimulus onset times, e.g. a spike raster generated by the Spike Tab. Or select Compute to create a wave of stimulus onset times (with wave prefix name “xAT_”) using a threshold leveldetection routine (Igor Pro’s FindLevels routine). Artefact # Increment Controls < >: use these controls to step through the stimulus onset times of the selected wave. Subtract: click the checkbox to compute the subtraction for the current stimulus onset time, or unclick the checkbox to remove the subtraction. display output: (t) current stimulus onset time. MiscReset – remove/reset artefact subtraction(s) to start again. Fit – compute baseline and artefact fit. Fit All – automatically compute artefact subtractions for the CurrentWave (3) or all currently selected waves (7). Auto Fit – automatically compute baseline and artefact fit when incrementing through stimulus onset times. Table – create a table of the AT_F_ fit results wave. Graph – create a graph of the AT_F_ fit results wave. ConfigurationsArtShape: artefact shape polarity. “PN” indicates the artefact ends with a large positive peak followed by a small negative peak with exponential decay (tail). “NP” indicates the artefact ends with a large negative peak followed by a small positive peak with exponential decay (tail). Default is “PN”. ArtWidth: approximate width/length of the artefact. Default is 0.5. ArtPeakDT: optional shift parameter for the artefact fit win, which is automatically set to begin at the peak of the artefact tail. Values can be positive or negative. Default is 0 (i.e. no time shift). BslnSubtract: besides subtracting the artefact’s extrapolated exponential fit from the data wave, one can also subtract the extrapolated baseline by setting this flag to True. Default is False (i.e. no baseline subtraction). BslnConvergeNstdv: steadystate [ss] convergence test between the baseline (bsln) and artefact fit at the end of sub win (see BslnConvergeWin). The fit is acceptable (i.e. subtraction is permissible) if:
where:
AVG is the average and STDV(data) is the standard deviation of the data wave within the same steadystate window. Note, failure of the baseline and artefact fits to converge may be an indication sub win is too short. Default is 1 STDV. BslnConvergeWin: window length of steadystate [ss] convergence test as defined above. Default is 0.5. BslnExpSlopeThreshold: when using the exponential (Exp) curvefit option for the baseline analysis, the fit may fail if there is negligible decay of the baseline. To avoid such a failure, set this parameter to a slope value greater than 0. NeuroMatic will then compute the slope (m) of the baseline within the baseline window (win). If m > BslnExpSlopeThreshold, the Exp function will be fit to the baseline. Otherwise, the average (Avg) baseline will be computed. Default is 0 (i.e. always compute Exp fit). SaveFitParameters: if this configuration flag is True (default value), fit parameter and chisquare values will be saved to the AT_F_ output waves. SaveSubtractedArt: if this configuration flag is True (default value), subtracted artefacts will be saved to AT_A_ output waves. t1_hold: time constant (t1) of the artefact exponential decay. Set this parameter to a value greater than 0 to hold t1 constant during the artefact curve fit. This will reduce the curvefit computational time. Parameter t2_hold can be used to hold t2 constant. Default is NaN (time constant is a variable during the curve fit). Output Waves “AT_”The Art Tab performs its operations on a copy of the original data wave. The wave name of this copy begins with prefix “AT_”, e.g. AT_RecordA0, where the original data wave is RecordA0. The Art Tab also creates a results output wave with prefix name “AT_F_”, e.g. AT_F_RecordA0. The first column of this wave contains the artefact onset times and the second column contains the subtraction progress flag (1 for subtracted or NaN for unsubtracted). If configuration variable SaveFitParameters is True, fit parameter and chisquare values will be saved in the remaining columns. Column names are: onset, finished, b_k1, b_k2, b_chi, a_k1, a_k2, a_chi. Use the Table and Graph functions to view this output wave. If configuration variable SaveSubtractedArt is True, subtracted artefacts will be saved to output waves with prefix name “AT_A_”, e.g. AT_A_RecordA0. Stimulus artefact onset times computed by the WaveSelect Compute function are saved in waves begining with prefix “xAT_”, e.g. xAT_RecordA0.
1. Channel Graph: Avg BaselineAbove: a NeuroMatic Channel Graph displaying the baseline (green) and artefact (red) analysis of an evoked EPSC recorded from a cerebellar granule cell, where the data wave is named RecordA0. The blue wave is a copy of the original recording, named AT_RecordA0. The small red vertical solid line denotes the onset time of the stimulus artefact (most of the artefact is offscale). The baseline analysis (Avg) was computed immediately before the stimulus artefact between the baseline drag waves (green vertical dashed lines) and the results were extrapolated to times after the artefact (green solid line). A singleexponential function (Exp) was curve fitted to the tail of the artefact between the artefact drag waves (red vertical dashed lines) and the fit was also extrapolated to times after the artefact (red solid line). Note, the baseline and exponential fit to the artefact should converge at later times before executing the subtraction via the subtract checkbox. The baseline and artefact fit windows can be adjusted via their drag waves (green and red vertical dashed lines). Adjustments will either effect all unsubtracted artefacts (default mode) or the current artefact. Use the channel graph Drag checkbox to toggle between adjustment modes. Below: results of the same analysis after clicking the subtract checkbox. The original data wave with artefact (RecordA0) is plotted in black.
2. Channel Graph: Exp BaselineAbove: a NeuroMatic Channel Graph as described in the previous section (1). Here, a singleexponential function (Exp) has been fit to the baseline since there is residual decay from the previous EPSC. Note how the baseline and artefact exponential fits converge at later times. Below: results of the same analysis after clicking the subtract checkbox.
