FAQ
Can neuroresp extract run on fMRIPrep desc-preproc_bold.nii.gz images?
Run neuroresp extract on the raw native BIDS BOLD file (sub-*_bold.nii.gz or sub-*_echo-1_bold.nii.gz) before fMRIPrep. Motion correction, slice timing interpolation, and spatial warping resample slices across the volume and erase the tiny phase-encoding shifts between slice groups that carry the breathing signal. Once respiration.csv has been extracted from the raw file, pass it to neuroresp denoise alongside your fMRIPrep or tedana outputs (see Input requirements and Usage).
How do --skip-initial and --discarded differ?
The two flags act at separate stages while keeping all timestamps on the original scan clock. In neuroresp extract, --skip-initial 5 leaves the first five dummy frames out of the temporal median reference image while keeping volume 0 at the start of respiration.csv. In neuroresp denoise, --discarded K states how many leading volumes were physically removed from the target BOLD image or tedana mixing matrix. Keep --discarded 0 when desc-preproc_bold.nii.gz retains every frame, and pass --discarded 8 if eight dummy volumes were dropped before tedana. This sets the leading volume count, not the sampling time within each volume. The default volume-timed design reads the target JSON’s StartTime when available, falls back to TR/2, and can be overridden with --volume-offset.
Does positive respiration correspond to inhalation?
The sign of pe_mm depends on PhaseEncodingDirection (AP versus PA, or LR versus RL) and scanner field orientation. Reversing phase-encoding polarity between paired runs flips the sign of the magnetic field shift. Sine and cosine RETROICOR harmonics and RV regressors are unaffected by a sign flip. Studies that compare inhalation directly against exhalation in MRI need an external sign reference such as a belt, an opposite-polarity scan pair, nasal CO2, or a task cue. In neuroresp meg, vagal respiratory sinus arrhythmia (-RR) orients the waveform toward the end of inhalation automatically whenever polarity_ambiguous is false (see ECG shape and heart rate).
When should I choose --slow rv versus --slow rv,rvt?
Use --slow rv by default. Rolling 6 s standard deviation (rv) is defined across every observed stretch of the waveform, whereas rvt requires uninterrupted peak intervals and left slightly more slow belt variance than rv at TR = 1.8 s in multi-echo benchmarks.
Why use Echo-1 regression after tedana when global signal regression also reduces slow CO2 waves?
Global signal regression subtracts the mean cortical time series from every voxel, centring connectivity matrices near zero and shifting network correlations. In addition, roughly half of the slow respiratory variance retained in accepted tedana components varies across cortical regions and survives removing the uniform cortical mean. Orthogonalised Echo-1 regression removes ~80%–89% of fast and ~61% of slow belt variance using an early echo trace while preserving baseline correlation structure.
Can slice-stack registration recover ~1 Hz cardiac pulses?
Rigid slice-stack registration targets the breathing band (0.05–0.75 Hz). Between 0.8 and 2.0 Hz, small static geometry differences across slice groups create spectral peaks at multiples of the volume rate (1 / TR and 2 / TR) that overlap the heart rate. For cardiac phase estimation from multiband EPI without a pulse oximeter, pair neuroresp with vascular intensity tools such as happy (Aslan et al., 2019).
How reliable is single-band (MB = 1) extraction?
When a single-band scan acquires odd and even slices in two separate passes across the TR, interleaved_2pass pools half the brain in each pass and doubles the Nyquist limit (30 breaths/min at TR = 2.0 s) with good stability. When slices are acquired sequentially without odd/even passes, single_band_2d aligns individual 2D slices. That works on scans with strong tissue contrast and loses lock when apical slices or head pitch degrade alignment on a single slice, so always inspect qc.png and resp.qc['status'] on MB = 1 runs (see Quality metrics).
Why use QRS morphology instead of heart-rate variability (RSA) or pulse oximetry?
Heart-rate respiratory sinus arrhythmia (RSA) drops by roughly half to two-thirds across adult ageing, degrading pure R–R and finger PPG respiratory estimators in older and low-HRV cohorts. Chest expansion mechanically tilts the heart relative to the ECG electrodes on every beat regardless of vagal tone, so neuroresp meg uses R-wave amplitude and QRS area to carry the 4 Hz breathing waveform and rate (CCC = 0.97 in adults aged 50–73), combining morphology and RSA spectra for rate and using RSA to orient the waveform approximately toward inhalation. The polarity gate can remain ambiguous, and weak respiratory modulation fails QC rather than establishing a plausible-looking rhythm.
When should I use neuroresp belt --states versus neuroresp airflow?
Use neuroresp airflow whenever you have spirometry, pneumotachography, or nasal-cannula pressure and want absolute airway timing (Ti, Te, zero-flow pauses) or calibrated tidal volume and minute ventilation. Use neuroresp belt --states --dc-coupled (ideally with dual chest and abdomen RIP bands via --second-column) for within-person comparisons of chest-wall expansion, recoil, and peak or trough holds across experimental conditions. Avoid reading single AC-coupled scanner belt dwells as airway pauses, because high-pass filtering decays plateaus back toward baseline.
Where did the respiratory simulator go?
Forward lung-mechanics, gas-exchange, and coupled multi-sensor simulation now lives in the sister package phrenic (with an interactive browser simulator). The files written by phrenic simulate plug directly into neuroresp airflow, neuroresp belt, and neuroresp meg.
From that single breathing state, the sensor layer generates calibrated airflow, nasal pressure, a dead-space CO2 capnogram (flat square wave at rest, rising shark-fin under heterogeneity), a sleep thermistor, paired DC RIP, a clipped and decaying AC belt, bedside thoracic impedance, ECG and finger PPG on a shared RSA and Mayer-wave beat clock, MEG head coils, sub-TR and volume MRI shifts, and a delayed cortical BOLD CO2 wave. Recorded spirometry can also drive the same sensor layer via simulate_sensors_from_flow().