Apologies for the belated reply.

I am not sure what cosine regressors were used? For example, one can use cosine regressors to mirror FFT-like bandpassing, but that depends on which frequencies were used and how they were set up.

You can check the FFT of a time series with 3dDFT (NB: 3dFFT does a spatial Fourier Transform; DFT = discrete Fourier Transform, across time at each element). For example, with the AFNI_demos/FATCAT_DEMO data, I can run the following on 0.01-0.1 Hz bandpassed resting state dataset:

3dDFT -prefix dft -abs REST_in_DWI.nii.gz... to get a new time series of the FT magnitude values (magnitude = sqrt(power)). There are 195 time points in this particular time series, so there will be 195 FT magnitudes, with some fun aspects: the [0]th should be the mean of the dataset, which is often muuuch larger than the other frequency magnitudes. And there are only ~N/2 independent FT magnitudes---from 0 to the Nyquist frequency are the mirror image of the next N/2. So, to view just the independent set and to skip over the super-large mean value (which might be smeared over the first couple magnitudes), one open up the following in the GUI:

afni dft+orig'[2..97]'... which looks like the attached. Note how the lower frequencies (left side of the plot, since the abscissa here is frequency) have nonzero magnitudes, while the larger ones (from 0.1 to Nyquist, actually) have zero magnitudes. That is one way I know that this data has been bandpassed.

I *could* run this through 3dRSFC now. *But* the fALFF values would be meaningless. The ALFF values, if I ask for htem within the non-bandpassed range, should be approximately the same as what they would be if I calculated from the not-already-bandpassed data (there is probably a bit of rounding/tapering difference, which should be minimal). The fALFF can't be calculated, because that is the ratio of the sum of the LFF magnitudes to the sum of all magnitudes (not including baseline)---since they higher frequencies have been removed, that is unfair to now ask. So, it really depends what you want to estimate.

I think doing what you suggest:

3dRSFC -prefix RSFC 0.008 0.1 -input data.nii.gz -nodetrend -ort f.1Dmakes sense and should be done appropriately. But are you sure you don't want to detrend?

The processing should be done correctly (from 3dRSFC's help):

* The order of processing steps is the following (most are optional), and for the LFFs, the bandpass is done between the specified fbot and ftop, while for the `whole spectrum' (i.e., fALFF denominator) the bandpass is: done only to exclude the time series mean and the Nyquist frequency: (0) Check time series for initial transients [does not alter data] (1) Despiking of each time series (2) Removal of a constant+linear+quadratic trend in each time series (3) Bandpass of data time series (4) Bandpass of -ort time series, then detrending of data with respect to the -ort time series (5) Bandpass and de-orting of the -dsort dataset, then detrending of the data with respect to -dsort (6) Blurring inside the mask [might be slow] (7) Local PV calculation [WILL be slow!] (8) L2 normalization [will be fast.] (9) Calculate spectrum and amplitudes, for RSFC parameters.

3dRSFC is not made to handle censoring. I don't think that can be done here with the ort regressors, because the regressors get bandpassed before application. 3dRSFC is made for non-censored time series.

3dLombScargle (with 3dAmpToRSFC) is the program to take censored data (or data+censoring information) and estimate a power spectrum for RSFC parameters. That one doesn't take orts---the assumption is that you have already processed your data.

In general, one is in a bit of a quandary with bandpassing during processing and later estimating RSFC params, if one wants fALFF.

--pt]]>

Best regards,

Sam]]>

I denoised my functional data using a combination of cosine regressors and CompCor components. My understanding is that it will high-pass filter the data. In this case, it will be innacurate to run 3dRSFC on already high-pass filtered data, right?

However, what if I use the not-denoised data but include the cosine regressors (using 128s cutoff) and CompCor components in the ort file and run:

3dRSFC -prefix RSFC 1/128 0.1 -input data.nii.gz -nodetrend -ort f.1D

Will this work? Or will 3dRSFC simply apply the high-pass filtering

I also have a similar question for censored volumes. Can I include 1s for censored volumes in my ort file when running:

3dRSFC -prefix RSFC 1/128 0.1 -input data.nii.gz -nodetrend -ort f.1D

or is it also not recommended?

Thanks for your help!

Sam]]>

I wouldn't expect these outputs to be numerically identical (equal to an infinite number of decimals).

For example, doing these kind of regressions+bandpasses in multiple steps will be different than performing everything in one, for starters.

If you want to share the data, I can take a look at your specific case.

-pt]]>

That should be fine, assuming you are not censoring.

If you *are* censoring, then 3dLombScargle+3dAmpToRSFC would be better.

--pt]]>

No, they don't give the exact same results (although they are not very different), so the question is: shouldn't the results be exactly the same?

The settings to each function are equivalent - detrending, bandpass, removal of orts, etc. The only difference is that in the first case I use 3dTProject to first remove the nuisance time series and then pass the (cleaned) time series to 3dRSFC, whereas in the second case the nuisance time series are removed directly with 3dRSFC.

But otherwise the two approaches should give me identical results, shouldn't they?

Best regards,

Sam]]>

Yes, I have already cleaned the time series data with 3dTProject (without band-pass filtering, but with default polort) before 3dRSFC.

Just to be clear then, after I get the cleaned time series with 3dTProject, I can simply run the command

3dRSFC -prefix RSFC 0.01 0.1 -input cleaned_data.nii.gz -nodetrend

and that will appropriately compute the parameters, is that correct?

Best regards,

Sam]]>

Umm, did you get the same results from those two approaches with your data?

Is your input time series residuals from processing, or something else?

--pt]]>

1) I just doublechecked by running the command here, and indeed I do get a filtered time series of low frequency fluctuations (LFFs) when I run it by default; the file is called PREFIX_LFF+orig. Can you check and see if you have that? You should. A lot of output files have similar names, so it might be lurking in there... If not, what is your version of AFNI ("afni -ver" on the command line).

2) The PREFIX_LFF time series *is* the bandpassed data.

3) Are you running 3dRSFC on residuals (which I assume that you would be)? Then I don't know that you should need any further regression/projection...

--pt]]>

Can I ask you another question regarding 3dRSFC please? Will ALFF computation with 3dRSFC be equivalent in these two situations?

1)

3dTproject -input orig_data.nii.gz -prefix cleaned_data.nii.gz -ort nuisance.1D -bandpass 0.01 0.1

3dRSFC -input cleaned_data.nii.gz -prefix RSFC -nodetrend -band 0 99999

2)

3dRSFC -input orig_data.nii.gz -prefix RSFC -band 0.01 0.1 -ort nuisance.1D

My understanding is that frequencies within 0.01 and 0.1 will be removed in both cases before calculating ALFF is that correct?

Best regards,

Sam]]>

Thank you again for your response! Do you mind if I ask a few related questions please?

I ran the command

3dRSFC -prefix RSFC 0.01 0.1 data.nii.gz

and I got these files:

RSFC_ALFF+orig.BRIK, RSFC_mALFF+orig.BRIK, RSFC_fALFF+orig.BRIK, RSFC_RSFA+orig.BRIK, RSFC_mRSFA+orig.BRIK, RSFC_fRSFA+orig.BRIK (and the corresponding HEAD files).

1 - I'm confused about the -no_rs_out option. In the help file it says this doesn't output the processed time series, which I assume is outputed by default. However running the program without this option does not output any other file apart from the ones I mention above. In fact I ran the command above with and without this option but the result is the same (so omitting this flag does not change any of the outputs nor create new outputs).

2 - You say that there is an option to output the bandpassed data, but the only option I found in the help file was the -un_bp_out which outputs the un-bandpassed filter. Is there another option that I can define to output the bandpassed time series?

3 -The idea is to run 3dRSFC after motion correction and perform detrending and orts in one go with either 3dRSFC or 3dTProject. My question is whether it makes a difference whether I use the -ort option in 3dRSFC or 3dTProject? Or are they equivalent?

Thank you very much in advance!

Best regards,

Sam]]>

You input a non-bandpassed time series to 3dRSFC, and you can get out:

+ voxelwise map of ALFF (single value per voxel), which contains the sum of LFF amplitudes.

+ voxelwise map of fALFF (single value per voxel), which contains the ratio of LFF amplitudes to the full time series' amplitudes.

+ and similarly maps of RSFA and fRSFA, as well as a couple other related parameters.

The LFF range is defined by user, and during that process, the time series are bandpassed, and so one can also output the bandpassed time series, if that is of interest.

--pt]]>

Thank you very much, that was very helpful.

If I understood correctly, the fALFF output of the 3dRSFC command will contain the bandpassed time series right? You suggested in the previous post that I don't need to use the bandpassed time series later. However if bandpass is required to calculate the LFFs that go into fALFF, then the bandpassed time series should be used if I intend to use fALFF, or did I misunderstand?

In that case, in what situations is the un-bandpassed data useful for RSFC parameters?

Best regards,

Sam]]>

For most RSFC parameters, one needs to specify a range of frequencies that define the "low frequence fluctuations" (LFFs) of interest. A typical range of LFFs in resting state might be approx. 0.01 - 0.1 Hz, for example.

fALFF is a ratio:

(the sum of amplitudes of those LFFs) / (sum of amplitudes of all frequencies in time series).

Bandpassing is the mechanism for selecting out the LFFs, and so it is necessary to bandpass your data to calculate LFF. You don't have to use the output bandpassed time series later, but you have to do it beforehand. Note that if you are calculating RSFC parameters, then you can*not* have bandpassed your time series earlier, nor censored your data (e.g., removed volumes of high motion).

I suppose you could use 3dTrproject to get rid of orts, but have you processed these time series already, for example using afni_proc.py? Then your data should already have been detrended, likely.

--pt]]>

I'd like to calculate falff using 3dRSFC. However it seems that 3dRSFC bandpass filters the data which would be a problem for falff. Is there a way to shut off bandpass filtering?

Also is the -ort option equivalent to the -ort option in 3dtproject? I was planning to use 3dtproject to remove nuisance timeseries before computing falff with 3dRSFC but I think I can do it with 3dRSFC directly right?

Thanks in advance!

Best regards,

Sam]]>