aligntcs

Description:

Given two timecourses:
  • Resample the second timecourse to the samplerate of the first timecourse

  • Use crosscorrelation to determine the time delay between the sequences

  • Apply a time shift to align the second timecourse with the first timecourse

Inputs:

Two text files containing timecourses

Outputs:

A text file containing the second input timecourse, resampled and time shifted to match the first timecourse

Usage:

Resample and align two time series.

usage: aligntcs [-h] [--nodisplay] [--verbose] [--searchrange LAGMIN LAGMAX]
                [--filterband {None,vlf,lfo,resp,cardiac,hrv_ulf,hrv_vlf,hrv_lf,hrv_hf,hrv_vhf,lfo_legacy}]
                [--filterfreqs LOWERPASS UPPERPASS]
                [--filterstopfreqs LOWERSTOP UPPERSTOP]
                infile1[:COLNUM] insamplerate1 infile2[:COLNUM] insamplerate2
                outputfile

Positional Arguments

infile1[:COLNUM]

text file containing a timeseries. Select column COLNUM if multicolumn file.

insamplerate1

The input data file (BOLD fmri file or NIRS text file)

infile2[:COLNUM]

text file containing a timeseries. Select column COLNUM if multicolumn file.

insamplerate2

The input data file (BOLD fmri file or NIRS text file)

outputfile

The name of the output file

Named Arguments

--nodisplay

Do not plot the data (for noninteractive use)

Default: True

--verbose

Print out more debugging information

Default: False

--searchrange

Limit fit to a range of lags from LAGMIN to LAGMAX. Default is -30.0 to 30.0 seconds.

Default: (-30.0, 30.0)

Filtering options

--filterband

Possible choices: None, vlf, lfo, resp, cardiac, hrv_ulf, hrv_vlf, hrv_lf, hrv_hf, hrv_vhf, lfo_legacy

Filter timecourses to specific band. Use “None” to disable filtering. Default is “lfo”.

Default: “lfo”

--filterfreqs

Filter timecourses to retain LOWERPASS to UPPERPASS. If –filterstopfreqs is not also specified, LOWERSTOP and UPPERSTOP will be calculated automatically.

--filterstopfreqs

Filter timecourses to with stop frequencies LOWERSTOP and UPPERSTOP. LOWERSTOP must be <= LOWERPASS, UPPERSTOP must be >= UPPERPASS. Using this argument requires the use of –filterfreqs.