Closed tsalo closed 3 weeks ago
In #1064 I just made a single function utils.create_legendre_polynomial_basis_set
and that function is now used both in gscontrol_raw
and external.py
I'm adding the number of detrending regressors used in the fits to LGR.info
, but we are not saving that value elsewhere and we're not writing out the actual detrending regressors used.
To options to log this info are:
utils.create_legendre_polynomial_basis_set
Thoughts?
How do the Legendre results look compared to the standard polynomial terms?
I didn't directly compare, but the Legendre polynomials are fine for detrending and I agree that there's no reason to use two different methods in two different places. I've confirmed the code is working as expected, but I haven't looked at the detrended vs non-detrended time series (since the code is just fitting them all to a single model rather than outputting a detrended fit)
As discussed in our June 2024 dev call, I'm closing this issue. Currently, Legendre polynomials are the only method and they are only used with gscontrol_raw
When #1064 is merged, the code to create the Legendre polynomials will be modularized and also used when fitting external regressors.
In #1064, we start using scaled monomials to detrend data, but in
gscontrol_raw
we use Legendre polynomials. I want to consistently use one or the other. If there's a good reason to use Legendre in one case and monomials in the other, then I'd like to document that somewhere._Originally posted by @tsalo in https://github.com/ME-ICA/tedana/pull/1064#discussion_r1585422641_