Module Expr Str Import alias Import alias identifier ImportFrom alias alias alias ImportFrom alias ImportFrom alias identifier ImportFrom alias Import alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num Num NameLoad Str body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign SubscriptStore NameLoad Ellipsis Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Ellipsis Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign SubscriptStore NameLoad Ellipsis Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore NameLoad Ellipsis Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Num Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If NameLoad body Assign SubscriptStore NameLoad Ellipsis Call AttributeLoad NameLoad attr NameLoad orelse Assign SubscriptStore NameLoad Ellipsis BinOpMult BinOpAdd BinOpMult Num Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Num Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Ellipsis Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Num Num NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return BinOpMult NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad ExtSlice Slice Index Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad AugAssignAdd NameStore Call AttributeLoad NameLoad attr Num Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad BinOpPow NameLoad Num attr keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword Num Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Num Assign NameStore Num Assign TupleStore NameStore NameStore NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Str Expr Call NameLoad CompareLt Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr keyword Num attr BinOpMult Num AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Expr Call NameLoad CompareLt Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr keyword Num attr BinOpMult Num AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call NameLoad CompareLt Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr keyword Num attr BinOpMult Num AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad ExtSlice Index AttributeLoad NameLoad attr Slice Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword Str Expr Call NameLoad Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr keyword Num attr BinOpMult Num AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Num Assign NameStore Num Assign TupleStore NameStore NameStore NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignPow NameStore Num Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Num Assign NameStore Num Assign TupleStore NameStore NameStore NameStore Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad CompareLt Call AttributeLoad Call NameLoad BinOpSub NameLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad attr Expr Call NameLoad CompareGt Call AttributeLoad Call NameLoad NameLoad keyword NameLoad keyword Num keyword NameLoad attr Num Expr Call NameLoad CompareLt Call AttributeLoad Call NameLoad NameLoad keyword NameLoad keyword Num keyword NameLoad attr Num Expr Call NameLoad CompareGt Call AttributeLoad Call NameLoad NameLoad keyword NameLoad keyword Num attr Num Expr Call NameLoad NameLoad NameLoad NameLoad keyword Num keyword Num decorator_list FunctionDef arguments args defaults body Assign TupleStore NameStore NameStore NameStore Call NameLoad keyword Num keyword Num keyword Num Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad CompareLt Call AttributeLoad Call NameLoad NameLoad attr BinOpMult Num NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad CompareLt Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad attr BinOpMult Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call AttributeLoad NameLoad attr TupleLoad Num Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr AugAssignAdd NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Num Expr Call NameLoad Call AttributeLoad CompareGt Call NameLoad NameLoad Num attr Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Num Expr Call NameLoad Call AttributeLoad CompareLt Call NameLoad NameLoad BinOpMult Num NameLoad attr Assign NameStore BinOpMult Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr keyword Num Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Assign TupleStore NameStore NameStore NameStore Call NameLoad keyword Num keyword Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword SubscriptLoad NameLoad ExtSlice Slice Index Num Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword ListLoad NameLoad SubscriptLoad NameLoad ExtSlice Slice Slice Num Num NameLoad SubscriptLoad NameLoad ExtSlice Slice Index Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Call AttributeLoad NameLoad attr Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Call AttributeLoad NameLoad attr TupleLoad Num Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword Call AttributeLoad NameLoad attr TupleLoad Num Num Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Num Slice keyword NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword ListLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad Num Num keyword NameLoad keyword Call AttributeLoad NameLoad attr Num keyword NameLoad attr Call AttributeLoad NameLoad attr TupleLoad Num Num decorator_list FunctionDef arguments args defaults body Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign TupleStore NameStore NameStore NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Str Assign TupleStore NameStore NameStore NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Assign NameStore BinOpMult Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Assert CompareEq AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num Assert CompareEq AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad Assert CompareEq AttributeLoad NameLoad attr TupleLoad NameLoad Num Assign NameStore NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad BinOpSub NameLoad NameLoad BinOpAdd NameLoad NameLoad keyword Num Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list
N/A N/A 
Test the signals module
 N/A os.path N/A numpy np nose.tools assert_true assert_false assert_raises sklearn.utils.testing assert_less nilearn signal nisignal nilearn.signal clean N/A scipy.signal generate_signals N/A N/A n_features n_confounds length same_variance order N/A 17 5 41 True C N/A N/A Generate test signals.

    All returned signals have no trends at all (to machine precision).

    Parameters
    ==========
    n_features, n_confounds : int, optional
        respectively number of features to generate, and number of confounds
        to use for generating noise signals.

    length : int, optional
        number of samples for every signal.

    same_variance : bool, optional
        if True, every column of "signals" have a unit variance. Otherwise,
        a random amplitude is applied.

    order : "C" or "F"
        gives the contiguousness of the output arrays.

    Returns
    =======
    signals : numpy.ndarray, shape (length, n_features)
        unperturbed signals.

    noises : numpy.ndarray, shape (length, n_features)
        confound-based noises. Each column is a signal obtained by linear
        combination of all confounds signals (below). The coefficients in
        the linear combination are also random.

    confounds : numpy.ndarray, shape (length, n_confounds)
        random signals used as confounds.
     N/A rand_gen N/A N/A N/A np random RandomState 0 N/A confounds_shape N/A length n_confounds N/A confounds N/A N/A np ndarray confounds_shape order order N/A N/A confounds N/A N/A N/A rand_gen randn confounds_shape N/A N/A confounds N/A N/A N/A N/A scipy signal detrend confounds axis 0 N/A factors N/A N/A rand_gen randn n_confounds n_features N/A noises_shape N/A length n_features N/A noises N/A N/A np ndarray noises_shape order order N/A N/A noises N/A N/A N/A np dot confounds factors N/A N/A noises N/A N/A N/A N/A scipy signal detrend noises axis 0 N/A signals_shape noises_shape N/A signals N/A N/A np ndarray signals_shape order order N/A same_variance N/A N/A N/A signals N/A N/A N/A rand_gen randn signals_shape N/A N/A N/A signals N/A N/A N/A N/A 4.0 N/A abs N/A N/A rand_gen randn N/A signals_shape N/A 1 0.5 N/A N/A rand_gen randn signals_shape N/A N/A signals N/A N/A N/A N/A scipy signal detrend signals axis 0 N/A N/A signals noises confounds N/A generate_trends N/A N/A n_features length N/A 17 41 N/A N/A Generate linearly-varying signals, with zero mean.

    Parameters
    ==========
    n_features, length : int
        respectively number of signals and number of samples to generate.

    Returns
    =======
    trends : numpy.ndarray, shape (length, n_features)
        output signals, one per column.
     N/A rand_gen N/A N/A N/A np random RandomState 0 N/A trends N/A N/A N/A scipy signal detrend N/A N/A np linspace 0 1.0 length type constant N/A trends N/A N/A np repeat N/A N/A N/A np atleast_2d trends T n_features axis 1 N/A factors N/A N/A rand_gen randn n_features N/A N/A trends factors N/A test_butterworth N/A N/A N/A N/A N/A rand_gen N/A N/A N/A np random RandomState 0 N/A n_features 20000 N/A n_samples 100 N/A sampling 100 N/A low_pass 30 N/A high_pass 10 N/A data N/A N/A rand_gen randn n_samples N/A data_original N/A N/A data copy N/A out_single N/A N/A nisignal butterworth data sampling low_pass low_pass high_pass high_pass copy True N/A N/A N/A N/A np testing assert_almost_equal data data_original N/A N/A N/A nisignal butterworth data sampling low_pass low_pass high_pass high_pass copy False save_memory True N/A N/A N/A N/A np testing assert_almost_equal out_single data N/A data N/A N/A rand_gen randn n_samples n_features N/A N/A data N/A N/A N/A 0 data_original N/A data_original N/A N/A data copy N/A out1 N/A N/A nisignal butterworth data sampling low_pass low_pass high_pass high_pass copy True N/A N/A N/A N/A np testing assert_almost_equal data data_original N/A N/A N/A N/A np testing assert_almost_equal N/A out1 N/A N/A N/A 0 out_single N/A N/A N/A nisignal butterworth data sampling low_pass low_pass high_pass high_pass copy False N/A N/A N/A N/A np testing assert_almost_equal out1 data N/A out1 N/A N/A nisignal butterworth data sampling low_pass 50.0 copy True N/A out2 N/A N/A nisignal butterworth data sampling low_pass 80.0 copy True N/A N/A N/A N/A np testing assert_almost_equal out1 out2 N/A test_standardize N/A N/A N/A N/A N/A rand_gen N/A N/A N/A np random RandomState 0 N/A n_features 10 N/A n_samples 17 N/A a N/A N/A rand_gen random_sample N/A n_samples n_features N/A a N/A N/A np linspace 0 2.0 n_features N/A b N/A N/A nisignal _standardize a normalize True N/A energies N/A N/A N/A b 2 sum axis 0 N/A N/A N/A N/A np testing assert_almost_equal energies N/A N/A np ones n_features N/A N/A N/A N/A np testing assert_almost_equal N/A N/A b sum axis 0 N/A N/A np zeros n_features N/A a N/A N/A N/A np atleast_2d N/A N/A np linspace 0 2.0 n_features T N/A b N/A N/A nisignal _standardize a detrend True normalize False N/A N/A N/A N/A np testing assert_almost_equal b N/A N/A np zeros N/A b shape N/A length_1_signal N/A N/A np atleast_2d N/A N/A np linspace 0 2.0 n_features N/A N/A N/A N/A np testing assert_array_equal length_1_signal N/A N/A nisignal _standardize length_1_signal normalize True N/A test_detrend N/A N/A N/A N/A N/A Test custom detrend implementation. N/A point_number 703 N/A features 17 N/A N/A signals _ _ N/A generate_signals n_features features length point_number same_variance True N/A trends N/A generate_trends n_features features length point_number N/A x N/A N/A signals trends 1 N/A original N/A N/A x copy N/A detrended N/A N/A nisignal _detrend x inplace False type constant N/A N/A assert_true N/A N/A N/A N/A abs N/A N/A detrended mean axis 0 max N/A 15.0 N/A N/A N/A np finfo N/A np float eps N/A detrended N/A N/A nisignal _detrend x inplace False N/A detrended_scipy N/A N/A N/A scipy signal detrend x axis 0 N/A N/A N/A N/A np testing assert_almost_equal original x decimal 14 N/A N/A assert_true N/A N/A N/A N/A abs N/A N/A detrended mean axis 0 max N/A 15.0 N/A N/A N/A np finfo N/A np float eps N/A N/A N/A N/A np testing assert_almost_equal detrended_scipy detrended decimal 14 N/A N/A N/A N/A np testing assert_almost_equal detrended signals decimal 14 N/A N/A N/A nisignal _detrend x inplace True N/A N/A assert_true N/A N/A N/A N/A abs N/A N/A x mean axis 0 max N/A 15.0 N/A N/A N/A np finfo N/A np float eps N/A N/A N/A N/A np testing assert_almost_equal detrended_scipy detrended decimal 14 N/A N/A N/A N/A np testing assert_almost_equal x signals decimal 14 N/A length_1_signal N/A x N/A 0 N/A length_1_signal N/A length_1_signal N/A N/A N/A np newaxis N/A N/A N/A N/A N/A np testing assert_array_equal length_1_signal N/A N/A nisignal _detrend length_1_signal N/A detrended N/A N/A nisignal _detrend N/A N/A x astype N/A np int64 inplace True type constant N/A N/A assert_less N/A N/A N/A abs N/A N/A detrended mean axis 0 max N/A 20.0 N/A N/A N/A np finfo N/A np float eps N/A test_mean_of_squares N/A N/A N/A N/A N/A Test _mean_of_squares. N/A n_samples 11 N/A n_features 501 N/A N/A signals _ _ N/A generate_signals n_features n_features length n_samples same_variance True N/A var1 N/A N/A np copy signals N/A var1 2 N/A var1 N/A N/A var1 mean axis 0 N/A var2 N/A N/A nisignal _mean_of_squares signals N/A N/A N/A N/A np testing assert_almost_equal var1 var2 N/A test_clean_detrending N/A N/A N/A N/A N/A n_samples 21 N/A n_features 501 N/A N/A signals _ _ N/A generate_signals n_features n_features length n_samples N/A trends N/A generate_trends n_features n_features length n_samples N/A x N/A signals trends N/A x_detrended N/A N/A nisignal clean x standardize False detrend True low_pass None high_pass None N/A N/A N/A N/A np testing assert_almost_equal x_detrended signals decimal 13 N/A x_undetrended N/A N/A nisignal clean x standardize False detrend False low_pass None high_pass None N/A N/A assert_false N/A N/A N/A N/A abs N/A x_undetrended signals max 0.06 N/A test_clean_frequencies N/A N/A N/A N/A N/A sx1 N/A N/A np sin N/A N/A np linspace 0 100 2000 N/A sx2 N/A N/A np sin N/A N/A np linspace 0 100 2000 N/A sx N/A N/A N/A np vstack N/A sx1 sx2 T N/A N/A assert_true N/A N/A N/A N/A clean sx standardize False high_pass 0.002 low_pass None max 0.1 N/A N/A assert_true N/A N/A N/A N/A clean sx standardize False high_pass 0.2 low_pass None max 0.01 N/A N/A assert_true N/A N/A N/A N/A clean sx standardize False low_pass 0.01 max 0.9 N/A N/A assert_raises ValueError clean sx low_pass 0.4 high_pass 0.5 N/A test_clean_confounds N/A N/A N/A N/A N/A N/A signals noises confounds N/A generate_signals n_features 41 n_confounds 5 length 45 N/A eps N/A N/A N/A np finfo N/A np float eps N/A noises1 N/A N/A noises copy N/A cleaned_signals N/A N/A nisignal clean noises confounds confounds detrend True standardize False N/A N/A assert_true N/A N/A N/A N/A abs cleaned_signals max N/A 100.0 eps N/A N/A N/A N/A np testing assert_almost_equal noises noises1 decimal 12 N/A cleaned_signals N/A N/A nisignal clean N/A signals noises confounds confounds detrend False standardize True N/A N/A assert_true N/A N/A N/A N/A abs N/A N/A np dot N/A confounds T cleaned_signals max N/A 1000.0 eps N/A confounds1 N/A N/A np hstack N/A N/A N/A np ones N/A 45 1 confounds N/A cleaned_signals1 N/A N/A nisignal clean N/A signals noises confounds confounds1 detrend False standardize True N/A N/A N/A N/A np testing assert_almost_equal cleaned_signals1 cleaned_signals N/A temp N/A confounds T N/A temp N/A N/A np arange N/A N/A confounds shape N/A 0 N/A cleaned_signals N/A N/A nisignal clean N/A signals noises confounds confounds detrend False standardize False N/A coeffs N/A N/A np polyfit N/A N/A np arange N/A N/A cleaned_signals shape N/A 0 cleaned_signals 1 N/A N/A assert_true N/A N/A N/A N/A abs coeffs 0.001 any N/A cleaned_signals N/A N/A nisignal clean N/A signals noises confounds confounds detrend True standardize False N/A coeffs N/A N/A np polyfit N/A N/A np arange N/A N/A cleaned_signals shape N/A 0 cleaned_signals 1 N/A N/A assert_true N/A N/A N/A N/A abs coeffs N/A 150.0 eps all N/A input_signals N/A 10 signals N/A cleaned_signals N/A N/A nisignal clean input_signals detrend False standardize False N/A N/A N/A N/A np testing assert_almost_equal cleaned_signals input_signals N/A cleaned_signals N/A N/A nisignal clean input_signals detrend False standardize True N/A N/A N/A N/A np testing assert_almost_equal N/A N/A cleaned_signals var axis 0 N/A N/A np ones N/A N/A cleaned_signals shape N/A 1 N/A current_dir N/A N/A N/A N/A os path split __file__ N/A 0 N/A N/A signals _ confounds N/A generate_signals n_features 41 n_confounds 3 length 20 N/A filename1 N/A N/A N/A os path join current_dir data spm_confounds.txt N/A filename2 N/A N/A N/A os path join current_dir data confounds_with_header.csv N/A N/A N/A nisignal clean signals detrend False standardize False confounds filename1 N/A N/A N/A nisignal clean signals detrend False standardize False confounds filename2 N/A N/A N/A nisignal clean signals detrend False standardize False confounds N/A confounds N/A N/A N/A 1 N/A N/A N/A nisignal clean signals detrend False standardize False confounds N/A filename1 N/A confounds N/A N/A N/A 0 2 filename2 N/A confounds N/A N/A N/A 2 N/A N/A assert_raises TypeError N/A nisignal clean signals confounds 1 N/A N/A assert_raises ValueError N/A nisignal clean signals confounds N/A N/A np zeros 2 N/A N/A assert_raises ValueError N/A nisignal clean signals confounds N/A N/A np zeros N/A 2 2 N/A N/A assert_raises ValueError N/A nisignal clean signals confounds N/A N/A np zeros N/A 2 3 4 N/A N/A assert_raises ValueError N/A nisignal clean N/A signals N/A N/A -1 N/A confounds filename1 N/A N/A assert_raises TypeError N/A nisignal clean signals confounds N/A None N/A N/A N/A N/A np testing assert_almost_equal N/A N/A N/A N/A nisignal clean N/A N/A np ones N/A 20 2 standardize False confounds N/A N/A np ones 20 detrend False mean N/A N/A np zeros N/A 20 2 N/A test_high_variance_confounds N/A N/A N/A N/A N/A n_features 1001 N/A length 20 N/A n_confounds 5 N/A N/A seriesC _ _ N/A generate_signals n_features n_features length length order C N/A N/A seriesF _ _ N/A generate_signals n_features n_features length length order F N/A N/A N/A N/A np testing assert_almost_equal seriesC seriesF decimal 13 N/A outC N/A N/A nisignal high_variance_confounds seriesC n_confounds n_confounds detrend False N/A outF N/A N/A nisignal high_variance_confounds seriesF n_confounds n_confounds detrend False N/A N/A N/A N/A np testing assert_almost_equal outC outF decimal 13 N/A seriesG N/A 2 seriesC N/A outG N/A N/A nisignal high_variance_confounds seriesG n_confounds n_confounds detrend False N/A N/A N/A N/A np testing assert_almost_equal outC outG decimal 13 N/A N/A N/A outG shape N/A length n_confounds N/A seriesG seriesC N/A outG N/A N/A nisignal high_variance_confounds seriesG percentile 1.0 n_confounds n_confounds detrend False N/A N/A assert_raises AssertionError N/A N/A np testing assert_almost_equal outC outG decimal 13 N/A N/A N/A outG shape N/A length n_confounds N/A out N/A N/A nisignal high_variance_confounds seriesG n_confounds 7 detrend False N/A N/A N/A out shape N/A length 7 N/A seriesG seriesC N/A trends N/A generate_trends n_features n_features length length N/A seriesGt N/A seriesG trends N/A outG N/A N/A nisignal high_variance_confounds seriesG detrend False n_confounds n_confounds N/A outGt N/A N/A nisignal high_variance_confounds seriesGt detrend True n_confounds n_confounds N/A N/A N/A N/A np testing assert_almost_equal N/A N/A np abs N/A N/A N/A outG T dot outG N/A N/A np identity N/A N/A outG shape N/A 1 decimal 13 N/A N/A N/A N/A np testing assert_almost_equal N/A N/A np min N/A N/A np abs N/A N/A np dstack N/A N/A outG outGt N/A outG outGt axis 2 N/A N/A np zeros N/A outG shape N/A