spm-python 25.1a1.dev1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spm/__init__.py +828 -0
- spm/__wrapper__.py +343 -0
- spm/_spm/_spm.ctf +0 -0
- spm/file_array.py +529 -0
- spm/gifti.py +570 -0
- spm/meeg.py +1198 -0
- spm/nifti.py +412 -0
- spm/slover.py +597 -0
- spm/spm.py +63 -0
- spm/spm_ADEM.py +57 -0
- spm/spm_ADEM_M_set.py +53 -0
- spm/spm_ADEM_diff.py +27 -0
- spm/spm_ADEM_set.py +20 -0
- spm/spm_ADEM_update.py +25 -0
- spm/spm_ALAP.py +159 -0
- spm/spm_A_reduce.py +26 -0
- spm/spm_BIDS.py +29 -0
- spm/spm_BMS.py +43 -0
- spm/spm_BMS_F.py +28 -0
- spm/spm_BMS_F_smpl.py +21 -0
- spm/spm_BMS_bor.py +28 -0
- spm/spm_BMS_gibbs.py +29 -0
- spm/spm_Bcdf.py +56 -0
- spm/spm_Bpdf.py +56 -0
- spm/spm_Ce.py +34 -0
- spm/spm_DEM.py +100 -0
- spm/spm_DEM_F.py +22 -0
- spm/spm_DEM_M_set.py +58 -0
- spm/spm_DEM_R.py +28 -0
- spm/spm_DEM_diff.py +27 -0
- spm/spm_DEM_embed.py +23 -0
- spm/spm_DEM_eval.py +48 -0
- spm/spm_DEM_eval_diff.py +27 -0
- spm/spm_DEM_generate.py +36 -0
- spm/spm_DEM_int.py +27 -0
- spm/spm_DEM_qH.py +25 -0
- spm/spm_DEM_qP.py +20 -0
- spm/spm_DEM_qU.py +23 -0
- spm/spm_DEM_set.py +20 -0
- spm/spm_DEM_z.py +24 -0
- spm/spm_DFP.py +87 -0
- spm/spm_DFP_plot.py +19 -0
- spm/spm_DesMtx.py +213 -0
- spm/spm_DesRep.py +128 -0
- spm/spm_DisplayTimeSeries.py +67 -0
- spm/spm_Dpdf.py +32 -0
- spm/spm_ECdensity.py +18 -0
- spm/spm_FcUtil.py +136 -0
- spm/spm_Fcdf.py +72 -0
- spm/spm_Fpdf.py +65 -0
- spm/spm_GDEM.py +117 -0
- spm/spm_Gcdf.py +71 -0
- spm/spm_Gpdf.py +63 -0
- spm/spm_Icdf.py +78 -0
- spm/spm_Ipdf.py +76 -0
- spm/spm_KL_cat.py +23 -0
- spm/spm_KL_dir.py +26 -0
- spm/spm_LAP.py +99 -0
- spm/spm_LAPF.py +77 -0
- spm/spm_LAPS.py +77 -0
- spm/spm_LAP_F.py +24 -0
- spm/spm_LAP_eval.py +26 -0
- spm/spm_LAP_iS.py +21 -0
- spm/spm_LAP_pg.py +19 -0
- spm/spm_LAP_ph.py +19 -0
- spm/spm_Laplace.py +32 -0
- spm/spm_MB_col.py +16 -0
- spm/spm_MDP_MI.py +26 -0
- spm/spm_MDP_da.py +18 -0
- spm/spm_MH.py +28 -0
- spm/spm_MH_reml.py +28 -0
- spm/spm_MH_reml_likelihood.py +20 -0
- spm/spm_Markov_blanket.py +30 -0
- spm/spm_Menu.py +24 -0
- spm/spm_NESS_F.py +35 -0
- spm/spm_NESS_ds.py +35 -0
- spm/spm_NESS_gen.py +48 -0
- spm/spm_NESS_gen_lap.py +44 -0
- spm/spm_Ncdf.py +61 -0
- spm/spm_Ncdf_jdw.py +32 -0
- spm/spm_Npdf.py +52 -0
- spm/spm_P.py +41 -0
- spm/spm_PEB.py +68 -0
- spm/spm_P_Bonf.py +35 -0
- spm/spm_P_FDR.py +87 -0
- spm/spm_P_RF.py +59 -0
- spm/spm_P_clusterFDR.py +26 -0
- spm/spm_P_peakFDR.py +38 -0
- spm/spm_Pcdf.py +69 -0
- spm/spm_Pec_resels.py +21 -0
- spm/spm_Ppdf.py +63 -0
- spm/spm_Q.py +31 -0
- spm/spm_Q_perm.py +15 -0
- spm/spm_ROI.py +30 -0
- spm/spm_SpUtil.py +266 -0
- spm/spm_Tcdf.py +71 -0
- spm/spm_Tpdf.py +56 -0
- spm/spm_VBX.py +45 -0
- spm/spm_VOI.py +63 -0
- spm/spm_Volt_W.py +17 -0
- spm/spm_Volterra.py +33 -0
- spm/spm_Welcome.py +16 -0
- spm/spm_XYZreg.py +177 -0
- spm/spm_XYZreg_Ex2.py +44 -0
- spm/spm_Xcdf.py +60 -0
- spm/spm_Xpdf.py +57 -0
- spm/spm_affine_priors.py +17 -0
- spm/spm_ancova.py +35 -0
- spm/spm_api_bmc.py +25 -0
- spm/spm_ar_reml.py +30 -0
- spm/spm_argmax.py +26 -0
- spm/spm_atlas.py +27 -0
- spm/spm_authors.py +17 -0
- spm/spm_axis.py +13 -0
- spm/spm_barh.py +18 -0
- spm/spm_bayes2_logbf.py +20 -0
- spm/spm_beta_compare.py +27 -0
- spm/spm_betaln.py +24 -0
- spm/spm_bilinear.py +36 -0
- spm/spm_bilinear_condition.py +16 -0
- spm/spm_bireduce.py +46 -0
- spm/spm_bms_against_null.py +20 -0
- spm/spm_bms_anova.py +31 -0
- spm/spm_bms_anova_img.py +21 -0
- spm/spm_bms_compare_groups.py +26 -0
- spm/spm_bms_display.py +22 -0
- spm/spm_bms_display_ROI.py +20 -0
- spm/spm_bms_display_vox.py +18 -0
- spm/spm_bms_partition.py +22 -0
- spm/spm_bms_test_null.py +20 -0
- spm/spm_bms_ttest.py +31 -0
- spm/spm_browser.py +21 -0
- spm/spm_bsplinc.py +43 -0
- spm/spm_bsplins.py +49 -0
- spm/spm_bwlabel.py +30 -0
- spm/spm_cat.py +31 -0
- spm/spm_cat_struct.py +15 -0
- spm/spm_cell_swap.py +16 -0
- spm/spm_changepath.py +28 -0
- spm/spm_check_filename.py +17 -0
- spm/spm_check_installation.py +26 -0
- spm/spm_check_orientations.py +22 -0
- spm/spm_check_registration.py +22 -0
- spm/spm_check_results.py +19 -0
- spm/spm_check_version.py +75 -0
- spm/spm_circularGraph.py +23 -0
- spm/spm_clf.py +27 -0
- spm/spm_cli.py +14 -0
- spm/spm_clusters.py +25 -0
- spm/spm_colourmap.py +46 -0
- spm/spm_combinations.py +18 -0
- spm/spm_compact_svd.py +18 -0
- spm/spm_compare_families.py +54 -0
- spm/spm_cond_units.py +17 -0
- spm/spm_conman.py +247 -0
- spm/spm_contrasts.py +21 -0
- spm/spm_conv.py +25 -0
- spm/spm_conv_full.py +24 -0
- spm/spm_conv_vol.py +41 -0
- spm/spm_convmtx.py +27 -0
- spm/spm_copy.py +25 -0
- spm/spm_coreg.py +57 -0
- spm/spm_cov2corr.py +15 -0
- spm/spm_create_vol.py +16 -0
- spm/spm_cross.py +23 -0
- spm/spm_csd_fmri_gu.py +21 -0
- spm/spm_csd_fmri_mar.py +34 -0
- spm/spm_csd_fmri_mtf.py +36 -0
- spm/spm_cva.py +77 -0
- spm/spm_cva_ui.py +92 -0
- spm/spm_dartel_integrate.py +30 -0
- spm/spm_data_hdr_read.py +18 -0
- spm/spm_data_hdr_write.py +16 -0
- spm/spm_data_id.py +17 -0
- spm/spm_data_read.py +32 -0
- spm/spm_data_write.py +22 -0
- spm/spm_dcm_HMM.py +58 -0
- spm/spm_dcm_HMM_plot.py +30 -0
- spm/spm_dcm_J.py +78 -0
- spm/spm_dcm_KL.py +21 -0
- spm/spm_dcm_U.py +33 -0
- spm/spm_dcm_average.py +42 -0
- spm/spm_dcm_bdc.py +55 -0
- spm/spm_dcm_bma.py +98 -0
- spm/spm_dcm_bma_results.py +17 -0
- spm/spm_dcm_bmc.py +45 -0
- spm/spm_dcm_bmc_peb.py +80 -0
- spm/spm_dcm_bmr.py +49 -0
- spm/spm_dcm_bmr_all.py +78 -0
- spm/spm_dcm_bpa.py +53 -0
- spm/spm_dcm_check_stability.py +23 -0
- spm/spm_dcm_compare.py +17 -0
- spm/spm_dcm_connectivity_ui.py +26 -0
- spm/spm_dcm_contrasts.py +20 -0
- spm/spm_dcm_create.py +33 -0
- spm/spm_dcm_csd_Q.py +43 -0
- spm/spm_dcm_delay.py +38 -0
- spm/spm_dcm_diagnose.py +44 -0
- spm/spm_dcm_display.py +20 -0
- spm/spm_dcm_estimate.py +65 -0
- spm/spm_dcm_evidence.py +26 -0
- spm/spm_dcm_fit.py +29 -0
- spm/spm_dcm_fmri_check.py +57 -0
- spm/spm_dcm_fmri_csd.py +50 -0
- spm/spm_dcm_fmri_csd_DEM.py +50 -0
- spm/spm_dcm_fmri_csd_data.py +25 -0
- spm/spm_dcm_fmri_csd_gen.py +21 -0
- spm/spm_dcm_fmri_csd_results.py +31 -0
- spm/spm_dcm_fmri_graph_gen.py +19 -0
- spm/spm_dcm_fmri_image.py +17 -0
- spm/spm_dcm_fmri_mar.py +47 -0
- spm/spm_dcm_fmri_mode.py +23 -0
- spm/spm_dcm_fmri_mode_gen.py +23 -0
- spm/spm_dcm_fmri_nmm.py +61 -0
- spm/spm_dcm_fmri_priors.py +38 -0
- spm/spm_dcm_generate.py +32 -0
- spm/spm_dcm_graph.py +18 -0
- spm/spm_dcm_graph_functional.py +21 -0
- spm/spm_dcm_identify.py +18 -0
- spm/spm_dcm_load.py +23 -0
- spm/spm_dcm_loo.py +43 -0
- spm/spm_dcm_mdp.py +44 -0
- spm/spm_dcm_mtf.py +35 -0
- spm/spm_dcm_optimise.py +36 -0
- spm/spm_dcm_peb.py +108 -0
- spm/spm_dcm_peb_bmc.py +108 -0
- spm/spm_dcm_peb_bmc_fam.py +50 -0
- spm/spm_dcm_peb_con.py +53 -0
- spm/spm_dcm_peb_fit.py +82 -0
- spm/spm_dcm_peb_full.py +83 -0
- spm/spm_dcm_peb_review.py +20 -0
- spm/spm_dcm_peb_rnd.py +51 -0
- spm/spm_dcm_peb_rnd_search.py +51 -0
- spm/spm_dcm_peb_test.py +56 -0
- spm/spm_dcm_peb_to_gcm.py +61 -0
- spm/spm_dcm_post_hoc.py +85 -0
- spm/spm_dcm_post_hoc_old.py +79 -0
- spm/spm_dcm_ppd.py +48 -0
- spm/spm_dcm_reduce.py +15 -0
- spm/spm_dcm_review.py +29 -0
- spm/spm_dcm_search.py +44 -0
- spm/spm_dcm_sessions.py +36 -0
- spm/spm_dcm_simulate.py +42 -0
- spm/spm_dcm_sparse.py +51 -0
- spm/spm_dcm_sparse_priors.py +23 -0
- spm/spm_dcm_specify.py +107 -0
- spm/spm_dcm_specify_ui.py +40 -0
- spm/spm_dcm_ui.py +77 -0
- spm/spm_dcm_voi.py +25 -0
- spm/spm_dctmtx.py +39 -0
- spm/spm_ddiff.py +38 -0
- spm/spm_deface.py +21 -0
- spm/spm_defaults.py +33 -0
- spm/spm_deformations.py +21 -0
- spm/spm_dem2dcm.py +29 -0
- spm/spm_design_contrasts.py +29 -0
- spm/spm_design_factorial.py +23 -0
- spm/spm_design_flexible.py +23 -0
- spm/spm_design_within_subject.py +21 -0
- spm/spm_detrend.py +23 -0
- spm/spm_dftmtx.py +25 -0
- spm/spm_diag.py +17 -0
- spm/spm_diag_array.py +17 -0
- spm/spm_dicom_convert.py +46 -0
- spm/spm_dicom_essentials.py +21 -0
- spm/spm_dicom_header.py +35 -0
- spm/spm_dicom_headers.py +25 -0
- spm/spm_dicom_metadata.py +24 -0
- spm/spm_dicom_text_to_dict.py +30 -0
- spm/spm_diff.py +38 -0
- spm/spm_diff_dx.py +23 -0
- spm/spm_diffeo.py +464 -0
- spm/spm_dilate.py +40 -0
- spm/spm_dir_MI.py +24 -0
- spm/spm_dir_norm.py +19 -0
- spm/spm_dir_sort.py +21 -0
- spm/spm_dirichlet_exceedance.py +32 -0
- spm/spm_dot.py +32 -0
- spm/spm_dwtmtx.py +24 -0
- spm/spm_dx.py +57 -0
- spm/spm_dx_eig.py +57 -0
- spm/spm_ecat2nifti.py +19 -0
- spm/spm_eeg_artefact.py +50 -0
- spm/spm_eeg_artefact_events.py +27 -0
- spm/spm_eeg_artefact_eyeblink.py +28 -0
- spm/spm_eeg_artefact_flat.py +27 -0
- spm/spm_eeg_artefact_heartbeat.py +29 -0
- spm/spm_eeg_artefact_jump.py +27 -0
- spm/spm_eeg_artefact_nans.py +27 -0
- spm/spm_eeg_artefact_peak2peak.py +27 -0
- spm/spm_eeg_artefact_saccade.py +33 -0
- spm/spm_eeg_artefact_threshchan.py +27 -0
- spm/spm_eeg_artefact_zscore.py +27 -0
- spm/spm_eeg_artefact_zscorediff.py +27 -0
- spm/spm_eeg_assemble_priors.py +19 -0
- spm/spm_eeg_average.py +29 -0
- spm/spm_eeg_average_TF.py +30 -0
- spm/spm_eeg_avgfreq.py +24 -0
- spm/spm_eeg_avgtime.py +26 -0
- spm/spm_eeg_bc.py +30 -0
- spm/spm_eeg_cfc.py +30 -0
- spm/spm_eeg_collapse_timefreq.py +24 -0
- spm/spm_eeg_combineplanar.py +31 -0
- spm/spm_eeg_contrast.py +37 -0
- spm/spm_eeg_convert.py +59 -0
- spm/spm_eeg_convert2images.py +43 -0
- spm/spm_eeg_convert_ui.py +17 -0
- spm/spm_eeg_copy.py +22 -0
- spm/spm_eeg_correct_sensor_data.py +28 -0
- spm/spm_eeg_crop.py +26 -0
- spm/spm_eeg_definetrial.py +32 -0
- spm/spm_eeg_dipoles_ui.py +15 -0
- spm/spm_eeg_displayECD.py +30 -0
- spm/spm_eeg_display_tf.py +17 -0
- spm/spm_eeg_downsample.py +30 -0
- spm/spm_eeg_epochs.py +59 -0
- spm/spm_eeg_filter.py +35 -0
- spm/spm_eeg_firstlevel.py +21 -0
- spm/spm_eeg_fixpnt.py +15 -0
- spm/spm_eeg_ft2spm.py +15 -0
- spm/spm_eeg_fuse.py +25 -0
- spm/spm_eeg_grandmean.py +36 -0
- spm/spm_eeg_history.py +32 -0
- spm/spm_eeg_inv_Mesh2Voxels.py +38 -0
- spm/spm_eeg_inv_check.py +23 -0
- spm/spm_eeg_inv_checkdatareg.py +17 -0
- spm/spm_eeg_inv_checkforward.py +15 -0
- spm/spm_eeg_inv_checkmeshes.py +21 -0
- spm/spm_eeg_inv_custom_ui.py +31 -0
- spm/spm_eeg_inv_datareg.py +43 -0
- spm/spm_eeg_inv_datareg_ui.py +22 -0
- spm/spm_eeg_inv_extract.py +25 -0
- spm/spm_eeg_inv_extract_ui.py +19 -0
- spm/spm_eeg_inv_fmripriors.py +40 -0
- spm/spm_eeg_inv_forward.py +22 -0
- spm/spm_eeg_inv_forward_ui.py +23 -0
- spm/spm_eeg_inv_get_vol_sens.py +23 -0
- spm/spm_eeg_inv_group.py +38 -0
- spm/spm_eeg_inv_headcoordinates.py +24 -0
- spm/spm_eeg_inv_icp.py +41 -0
- spm/spm_eeg_inv_imag_api.py +17 -0
- spm/spm_eeg_inv_image_display.py +18 -0
- spm/spm_eeg_inv_mesh.py +23 -0
- spm/spm_eeg_inv_mesh_spherify.py +28 -0
- spm/spm_eeg_inv_mesh_ui.py +26 -0
- spm/spm_eeg_inv_prep_modes_xval.py +35 -0
- spm/spm_eeg_inv_results.py +24 -0
- spm/spm_eeg_inv_results_display.py +15 -0
- spm/spm_eeg_inv_results_ui.py +19 -0
- spm/spm_eeg_inv_rigidreg.py +22 -0
- spm/spm_eeg_inv_spatnorm.py +23 -0
- spm/spm_eeg_inv_transform_mesh.py +18 -0
- spm/spm_eeg_inv_transform_points.py +15 -0
- spm/spm_eeg_inv_vb_ecd_gui.py +49 -0
- spm/spm_eeg_inv_vbecd.py +41 -0
- spm/spm_eeg_inv_vbecd_disp.py +22 -0
- spm/spm_eeg_inv_vbecd_getLF.py +28 -0
- spm/spm_eeg_inv_vbecd_gui.py +18 -0
- spm/spm_eeg_inv_vbecd_mom.py +40 -0
- spm/spm_eeg_inv_visu3D_api.py +20 -0
- spm/spm_eeg_invert.py +132 -0
- spm/spm_eeg_invert_EBoptimise.py +31 -0
- spm/spm_eeg_invert_bma.py +20 -0
- spm/spm_eeg_invert_classic.py +73 -0
- spm/spm_eeg_invert_classic_mix.py +28 -0
- spm/spm_eeg_invert_classic_volumetric.py +78 -0
- spm/spm_eeg_invert_display.py +22 -0
- spm/spm_eeg_invert_prepro.py +35 -0
- spm/spm_eeg_invert_setuppatches.py +28 -0
- spm/spm_eeg_invert_ui.py +26 -0
- spm/spm_eeg_invertiter.py +23 -0
- spm/spm_eeg_lapmtx.py +20 -0
- spm/spm_eeg_layout3D.py +16 -0
- spm/spm_eeg_lgainmat.py +19 -0
- spm/spm_eeg_load.py +22 -0
- spm/spm_eeg_locate_channels.py +29 -0
- spm/spm_eeg_mask.py +22 -0
- spm/spm_eeg_mask2channels.py +22 -0
- spm/spm_eeg_merge.py +68 -0
- spm/spm_eeg_meshnative2mni.py +19 -0
- spm/spm_eeg_modality_ui.py +24 -0
- spm/spm_eeg_montage.py +62 -0
- spm/spm_eeg_montage_ui.py +22 -0
- spm/spm_eeg_morlet.py +36 -0
- spm/spm_eeg_planarchannelset.py +18 -0
- spm/spm_eeg_plotScalpData.py +30 -0
- spm/spm_eeg_prep.py +27 -0
- spm/spm_eeg_prep_ui.py +16 -0
- spm/spm_eeg_project3D.py +16 -0
- spm/spm_eeg_read_bsa.py +18 -0
- spm/spm_eeg_reduce.py +35 -0
- spm/spm_eeg_reduce_cva.py +26 -0
- spm/spm_eeg_reduce_imagcsd.py +27 -0
- spm/spm_eeg_reduce_pca.py +26 -0
- spm/spm_eeg_reduce_pca_adapt.py +26 -0
- spm/spm_eeg_reduce_whiten.py +26 -0
- spm/spm_eeg_regressors.py +28 -0
- spm/spm_eeg_regressors_chandata.py +25 -0
- spm/spm_eeg_regressors_movement_ctf.py +25 -0
- spm/spm_eeg_regressors_tfphase.py +25 -0
- spm/spm_eeg_regressors_tfpower.py +25 -0
- spm/spm_eeg_remove_bad_trials.py +27 -0
- spm/spm_eeg_render.py +43 -0
- spm/spm_eeg_review.py +21 -0
- spm/spm_eeg_review_callbacks.py +14 -0
- spm/spm_eeg_review_switchDisplay.py +14 -0
- spm/spm_eeg_review_uis.py +14 -0
- spm/spm_eeg_robust_averaget.py +19 -0
- spm/spm_eeg_select_event_ui.py +15 -0
- spm/spm_eeg_simulate.py +29 -0
- spm/spm_eeg_simulate_frominv.py +22 -0
- spm/spm_eeg_smoothmesh_mm.py +18 -0
- spm/spm_eeg_spatial_confounds.py +21 -0
- spm/spm_eeg_specest_hilbert.py +33 -0
- spm/spm_eeg_specest_morlet.py +34 -0
- spm/spm_eeg_specest_mtmconvol.py +36 -0
- spm/spm_eeg_specest_mtmfft.py +33 -0
- spm/spm_eeg_spmft_chan_dictionary.py +15 -0
- spm/spm_eeg_tf.py +54 -0
- spm/spm_eeg_tf_rescale.py +37 -0
- spm/spm_eeg_wrap_dipfit_vbecd.py +24 -0
- spm/spm_eeg_wrap_momfit_vbecd.py +25 -0
- spm/spm_ekf.py +35 -0
- spm/spm_en.py +21 -0
- spm/spm_epharm.py +24 -0
- spm/spm_erode.py +40 -0
- spm/spm_est_V.py +19 -0
- spm/spm_est_non_sphericity.py +40 -0
- spm/spm_est_smoothness.py +63 -0
- spm/spm_existfile.py +24 -0
- spm/spm_expm.py +23 -0
- spm/spm_extract_files.py +16 -0
- spm/spm_extrapolate_def.py +21 -0
- spm/spm_fMRI_design.py +176 -0
- spm/spm_field.py +136 -0
- spm/spm_fieldindices.py +25 -0
- spm/spm_figure.py +55 -0
- spm/spm_file.py +64 -0
- spm/spm_file_ext.py +23 -0
- spm/spm_file_merge.py +28 -0
- spm/spm_file_split.py +19 -0
- spm/spm_fileparts.py +21 -0
- spm/spm_filter.py +36 -0
- spm/spm_find_pC.py +30 -0
- spm/spm_flip_analyze_images.py +19 -0
- spm/spm_fmin.py +34 -0
- spm/spm_fmri_concatenate.py +32 -0
- spm/spm_fmri_spm_ui.py +182 -0
- spm/spm_fn_reml.py +32 -0
- spm/spm_fp.py +35 -0
- spm/spm_fp_display_density.py +21 -0
- spm/spm_fp_display_nullclines.py +20 -0
- spm/spm_fp_fmin.py +25 -0
- spm/spm_fp_fun.py +25 -0
- spm/spm_fs_fmri_csd.py +23 -0
- spm/spm_funcheck.py +18 -0
- spm/spm_funfun.py +21 -0
- spm/spm_fx_fmri.py +44 -0
- spm/spm_fx_fmri_linear.py +40 -0
- spm/spm_fx_hdm.py +37 -0
- spm/spm_fx_lz.py +18 -0
- spm/spm_fx_poly.py +20 -0
- spm/spm_gamrnd.py +29 -0
- spm/spm_gen_fmri.py +40 -0
- spm/spm_getSPM.py +192 -0
- spm/spm_get_anatomical_layout.py +90 -0
- spm/spm_get_bbox.py +23 -0
- spm/spm_get_bf.py +39 -0
- spm/spm_get_closest_affine.py +34 -0
- spm/spm_get_data.py +23 -0
- spm/spm_get_dataset.py +19 -0
- spm/spm_get_defaults.py +29 -0
- spm/spm_get_lm.py +31 -0
- spm/spm_get_matdim.py +30 -0
- spm/spm_get_ons.py +48 -0
- spm/spm_get_space.py +18 -0
- spm/spm_get_vc.py +37 -0
- spm/spm_get_volumes.py +17 -0
- spm/spm_glass.py +31 -0
- spm/spm_global.py +24 -0
- spm/spm_gn_fmin.py +26 -0
- spm/spm_graph.py +34 -0
- spm/spm_graph_ui.py +78 -0
- spm/spm_grid.py +21 -0
- spm/spm_gx_fmri.py +25 -0
- spm/spm_gx_fmri_linear.py +25 -0
- spm/spm_gx_hdm.py +24 -0
- spm/spm_gx_state_fmri.py +26 -0
- spm/spm_hanning.py +17 -0
- spm/spm_hdm_priors.py +34 -0
- spm/spm_hdm_ui.py +25 -0
- spm/spm_help.py +66 -0
- spm/spm_hilbert.py +18 -0
- spm/spm_hist.py +17 -0
- spm/spm_hist2.py +29 -0
- spm/spm_hist_smooth.py +17 -0
- spm/spm_hrf.py +42 -0
- spm/spm_image.py +58 -0
- spm/spm_imatrix.py +20 -0
- spm/spm_imcalc.py +92 -0
- spm/spm_ind2sub.py +31 -0
- spm/spm_inline2func.py +15 -0
- spm/spm_input.py +181 -0
- spm/spm_int.py +65 -0
- spm/spm_int_B.py +69 -0
- spm/spm_int_D.py +67 -0
- spm/spm_int_E.py +68 -0
- spm/spm_int_J.py +71 -0
- spm/spm_int_L.py +70 -0
- spm/spm_int_ode.py +70 -0
- spm/spm_int_sde.py +71 -0
- spm/spm_interp.py +17 -0
- spm/spm_inv.py +22 -0
- spm/spm_invBcdf.py +60 -0
- spm/spm_invFcdf.py +71 -0
- spm/spm_invGcdf.py +64 -0
- spm/spm_invIcdf.py +57 -0
- spm/spm_invNcdf.py +72 -0
- spm/spm_invPcdf.py +56 -0
- spm/spm_invTcdf.py +74 -0
- spm/spm_invXcdf.py +56 -0
- spm/spm_inv_phi.py +17 -0
- spm/spm_inv_spd.py +20 -0
- spm/spm_ipharm.py +24 -0
- spm/spm_iwft.py +19 -0
- spm/spm_jobman.py +66 -0
- spm/spm_jsonread.py +28 -0
- spm/spm_jsonwrite.py +34 -0
- spm/spm_kernels.py +44 -0
- spm/spm_kl_dirichlet.py +23 -0
- spm/spm_kl_gamma.py +20 -0
- spm/spm_kl_normal.py +22 -0
- spm/spm_kl_normald.py +24 -0
- spm/spm_kl_wishart.py +21 -0
- spm/spm_kron.py +27 -0
- spm/spm_krutil.py +57 -0
- spm/spm_large_dcm_reduce.py +27 -0
- spm/spm_length.py +23 -0
- spm/spm_lg_gamma.py +23 -0
- spm/spm_list.py +124 -0
- spm/spm_load.py +21 -0
- spm/spm_load_priors8.py +22 -0
- spm/spm_log.py +15 -0
- spm/spm_log_evidence.py +39 -0
- spm/spm_log_evidence_reduce.py +34 -0
- spm/spm_logdet.py +20 -0
- spm/spm_lorenz_k.py +20 -0
- spm/spm_lotka_volterra.py +28 -0
- spm/spm_maff8.py +30 -0
- spm/spm_make_contrasts.py +36 -0
- spm/spm_marginal.py +20 -0
- spm/spm_mask.py +31 -0
- spm/spm_match_str.py +21 -0
- spm/spm_matrix.py +54 -0
- spm/spm_max.py +33 -0
- spm/spm_mb_ui.py +135 -0
- spm/spm_meanby.py +28 -0
- spm/spm_mesh.py +17 -0
- spm/spm_mesh_adjacency.py +18 -0
- spm/spm_mesh_area.py +25 -0
- spm/spm_mesh_borders.py +19 -0
- spm/spm_mesh_bounding_volume.py +22 -0
- spm/spm_mesh_calc.py +23 -0
- spm/spm_mesh_clusters.py +20 -0
- spm/spm_mesh_contour.py +35 -0
- spm/spm_mesh_cube.py +20 -0
- spm/spm_mesh_curvature.py +18 -0
- spm/spm_mesh_detect.py +17 -0
- spm/spm_mesh_dist.py +26 -0
- spm/spm_mesh_distmtx.py +21 -0
- spm/spm_mesh_edges.py +20 -0
- spm/spm_mesh_euler.py +26 -0
- spm/spm_mesh_geodesic.py +34 -0
- spm/spm_mesh_get_lm.py +20 -0
- spm/spm_mesh_inflate.py +20 -0
- spm/spm_mesh_inside.py +41 -0
- spm/spm_mesh_isoline.py +38 -0
- spm/spm_mesh_isosurface.py +23 -0
- spm/spm_mesh_join.py +21 -0
- spm/spm_mesh_label.py +22 -0
- spm/spm_mesh_laplacian.py +23 -0
- spm/spm_mesh_mass_matrix.py +17 -0
- spm/spm_mesh_max.py +27 -0
- spm/spm_mesh_neighbours.py +21 -0
- spm/spm_mesh_normals.py +20 -0
- spm/spm_mesh_polyhedron.py +22 -0
- spm/spm_mesh_project.py +26 -0
- spm/spm_mesh_ray_intersect.py +40 -0
- spm/spm_mesh_ray_triangle.py +32 -0
- spm/spm_mesh_reduce.py +35 -0
- spm/spm_mesh_refine.py +25 -0
- spm/spm_mesh_render.py +49 -0
- spm/spm_mesh_resels.py +31 -0
- spm/spm_mesh_sdf.py +43 -0
- spm/spm_mesh_select.py +20 -0
- spm/spm_mesh_smooth.py +22 -0
- spm/spm_mesh_sphere.py +22 -0
- spm/spm_mesh_split.py +20 -0
- spm/spm_mesh_to_grid.py +20 -0
- spm/spm_mesh_transform.py +18 -0
- spm/spm_mesh_utils.py +26 -0
- spm/spm_mesh_volume.py +18 -0
- spm/spm_mesh_voxelise.py +30 -0
- spm/spm_mfx.py +88 -0
- spm/spm_minmax.py +23 -0
- spm/spm_mip.py +46 -0
- spm/spm_mip_ui.py +79 -0
- spm/spm_mkdir.py +19 -0
- spm/spm_mldivide.py +25 -0
- spm/spm_mnc2nifti.py +26 -0
- spm/spm_morlet.py +25 -0
- spm/spm_morlet_conv.py +26 -0
- spm/spm_mrdivide.py +25 -0
- spm/spm_mrf.py +54 -0
- spm/spm_mtx_cos.py +19 -0
- spm/spm_multrnd.py +20 -0
- spm/spm_mvNpdf.py +34 -0
- spm/spm_mvb.py +79 -0
- spm/spm_mvb_G.py +48 -0
- spm/spm_mvb_R2.py +18 -0
- spm/spm_mvb_U.py +29 -0
- spm/spm_mvb_bmc.py +20 -0
- spm/spm_mvb_cvk.py +26 -0
- spm/spm_mvb_cvk2.py +27 -0
- spm/spm_mvb_cvk_display.py +16 -0
- spm/spm_mvb_display.py +16 -0
- spm/spm_mvb_estimate.py +77 -0
- spm/spm_mvb_p.py +25 -0
- spm/spm_mvb_ui.py +87 -0
- spm/spm_nCr.py +70 -0
- spm/spm_ncFcdf.py +22 -0
- spm/spm_ncFpdf.py +27 -0
- spm/spm_ncTcdf.py +26 -0
- spm/spm_ncTpdf.py +27 -0
- spm/spm_ndgrid.py +21 -0
- spm/spm_ness.py +43 -0
- spm/spm_ness_GN.py +37 -0
- spm/spm_ness_J.py +15 -0
- spm/spm_ness_Lap.py +37 -0
- spm/spm_ness_N2Sp.py +18 -0
- spm/spm_ness_Sp2N.py +22 -0
- spm/spm_ness_Sp2p.py +21 -0
- spm/spm_ness_U.py +39 -0
- spm/spm_ness_cond.py +25 -0
- spm/spm_ness_flows.py +21 -0
- spm/spm_ness_hd.py +37 -0
- spm/spm_ness_m2S.py +20 -0
- spm/spm_ness_p2Sp.py +21 -0
- spm/spm_nlsi.py +99 -0
- spm/spm_nlsi_AI.py +94 -0
- spm/spm_nlsi_GN.py +106 -0
- spm/spm_nlsi_GN_H.py +69 -0
- spm/spm_nlsi_LS.py +95 -0
- spm/spm_nlsi_N.py +94 -0
- spm/spm_nlsi_Newton.py +56 -0
- spm/spm_non_sphericity.py +67 -0
- spm/spm_normrnd.py +21 -0
- spm/spm_opm_amm.py +28 -0
- spm/spm_orientations.py +57 -0
- spm/spm_orth.py +25 -0
- spm/spm_orthpoly.py +21 -0
- spm/spm_orthviews.py +161 -0
- spm/spm_padarray.py +24 -0
- spm/spm_parrec2nifti.py +21 -0
- spm/spm_pca_get_transforms.py +12 -0
- spm/spm_pca_project_velocity.py +18 -0
- spm/spm_pca_sample_brains.py +24 -0
- spm/spm_pca_sample_deformation.py +17 -0
- spm/spm_pca_transform_mesh.py +23 -0
- spm/spm_pca_transform_volume.py +20 -0
- spm/spm_pca_warps.py +26 -0
- spm/spm_peb_ppi.py +57 -0
- spm/spm_percentile.py +26 -0
- spm/spm_perm_mtx.py +20 -0
- spm/spm_permute_kron.py +18 -0
- spm/spm_pf.py +37 -0
- spm/spm_phase_shuffle.py +17 -0
- spm/spm_phi.py +17 -0
- spm/spm_phi_dot.py +16 -0
- spm/spm_pinv.py +19 -0
- spm/spm_platform.py +51 -0
- spm/spm_plot_ci.py +37 -0
- spm/spm_plot_convergence.py +22 -0
- spm/spm_polymtx.py +29 -0
- spm/spm_powell.py +28 -0
- spm/spm_preproc.py +27 -0
- spm/spm_preproc8.py +82 -0
- spm/spm_preproc_run.py +38 -0
- spm/spm_preproc_write8.py +15 -0
- spm/spm_print.py +22 -0
- spm/spm_progress_bar.py +30 -0
- spm/spm_project.py +31 -0
- spm/spm_psi.py +21 -0
- spm/spm_rand_mar.py +20 -0
- spm/spm_rand_power_law.py +24 -0
- spm/spm_read_netcdf.py +19 -0
- spm/spm_read_vols.py +25 -0
- spm/spm_realign.py +96 -0
- spm/spm_regions.py +60 -0
- spm/spm_reml.py +47 -0
- spm/spm_reml_A.py +45 -0
- spm/spm_reml_ancova.py +41 -0
- spm/spm_reml_sc.py +54 -0
- spm/spm_render.py +43 -0
- spm/spm_render_vol.py +39 -0
- spm/spm_reorder_contrasts.py +19 -0
- spm/spm_resels.py +35 -0
- spm/spm_resels_vol.py +31 -0
- spm/spm_reslice.py +69 -0
- spm/spm_results_nidm.py +33 -0
- spm/spm_results_ui.py +134 -0
- spm/spm_rmpath.py +27 -0
- spm/spm_robust_average.py +20 -0
- spm/spm_robust_glm.py +28 -0
- spm/spm_s2csd.py +20 -0
- spm/spm_sample_priors8.py +25 -0
- spm/spm_sample_vol.py +38 -0
- spm/spm_save.py +18 -0
- spm/spm_sde_dx.py +39 -0
- spm/spm_sdot.py +26 -0
- spm/spm_searchlight.py +44 -0
- spm/spm_sections.py +24 -0
- spm/spm_select.py +71 -0
- spm/spm_sepmul3d.py +27 -0
- spm/spm_shp_get_model.py +21 -0
- spm/spm_shp_get_transforms.py +32 -0
- spm/spm_shp_install.py +16 -0
- spm/spm_shp_project_velocity.py +24 -0
- spm/spm_shp_sample_brains.py +43 -0
- spm/spm_shp_sample_deformation.py +27 -0
- spm/spm_shp_transform_mesh.py +30 -0
- spm/spm_shp_transform_volume.py +26 -0
- spm/spm_shp_warps.py +27 -0
- spm/spm_sixel.py +27 -0
- spm/spm_slice_timing.py +99 -0
- spm/spm_slice_vol.py +35 -0
- spm/spm_slm.py +24 -0
- spm/spm_smohist.py +27 -0
- spm/spm_smooth.py +32 -0
- spm/spm_smoothkern.py +35 -0
- spm/spm_smoothto8bit.py +19 -0
- spm/spm_softmax.py +23 -0
- spm/spm_soreduce.py +42 -0
- spm/spm_sp.py +189 -0
- spm/spm_sp_reml.py +44 -0
- spm/spm_sparse_regression.py +33 -0
- spm/spm_speye.py +20 -0
- spm/spm_spm.py +278 -0
- spm/spm_spm_Bayes.py +75 -0
- spm/spm_spm_Bayes_CY.py +23 -0
- spm/spm_spm_Bayes_specify.py +30 -0
- spm/spm_sptop.py +30 -0
- spm/spm_spy.py +18 -0
- spm/spm_sqrtm.py +19 -0
- spm/spm_squeeze.py +15 -0
- spm/spm_ssm2s.py +24 -0
- spm/spm_standalone.py +21 -0
- spm/spm_str_manip.py +58 -0
- spm/spm_subfun.py +20 -0
- spm/spm_sum.py +17 -0
- spm/spm_summarise.py +35 -0
- spm/spm_surf.py +63 -0
- spm/spm_svd.py +22 -0
- spm/spm_swarp.py +24 -0
- spm/spm_t2z.py +63 -0
- spm/spm_tests.py +26 -0
- spm/spm_timeseries_resample.py +23 -0
- spm/spm_trace.py +17 -0
- spm/spm_transverse.py +45 -0
- spm/spm_type.py +34 -0
- spm/spm_u.py +29 -0
- spm/spm_uc.py +33 -0
- spm/spm_uc_Bonf.py +32 -0
- spm/spm_uc_FDR.py +89 -0
- spm/spm_uc_RF.py +32 -0
- spm/spm_uc_clusterFDR.py +47 -0
- spm/spm_uc_peakFDR.py +45 -0
- spm/spm_uitab.py +35 -0
- spm/spm_uncat.py +21 -0
- spm/spm_unlink.py +17 -0
- spm/spm_unvec.py +22 -0
- spm/spm_update.py +31 -0
- spm/spm_uw_apply.py +128 -0
- spm/spm_uw_estimate.py +90 -0
- spm/spm_uw_get_image_def.py +46 -0
- spm/spm_uw_show.py +20 -0
- spm/spm_vb_F.py +25 -0
- spm/spm_vb_Fn.py +27 -0
- spm/spm_vb_a.py +18 -0
- spm/spm_vb_adjacency.py +22 -0
- spm/spm_vb_alpha.py +18 -0
- spm/spm_vb_beta.py +18 -0
- spm/spm_vb_contrasts.py +23 -0
- spm/spm_vb_edgeweights.py +20 -0
- spm/spm_vb_gamma.py +18 -0
- spm/spm_vb_get_Ab.py +24 -0
- spm/spm_vb_get_Gn.py +19 -0
- spm/spm_vb_get_R.py +19 -0
- spm/spm_vb_glmar.py +85 -0
- spm/spm_vb_graphcut.py +35 -0
- spm/spm_vb_incidence.py +23 -0
- spm/spm_vb_init_block.py +18 -0
- spm/spm_vb_lambda.py +18 -0
- spm/spm_vb_logbf.py +20 -0
- spm/spm_vb_models.py +22 -0
- spm/spm_vb_neighbors.py +27 -0
- spm/spm_vb_ppm_anova.py +39 -0
- spm/spm_vb_regionF.py +34 -0
- spm/spm_vb_robust.py +26 -0
- spm/spm_vb_roi_anova.py +28 -0
- spm/spm_vb_roi_basis.py +57 -0
- spm/spm_vb_set_priors.py +41 -0
- spm/spm_vb_spatial_precision.py +22 -0
- spm/spm_vb_taylor_R.py +20 -0
- spm/spm_vb_w.py +18 -0
- spm/spm_vec.py +23 -0
- spm/spm_vecfun.py +20 -0
- spm/spm_vol.py +41 -0
- spm/spm_vol_nifti.py +19 -0
- spm/spm_voronoi.py +29 -0
- spm/spm_wft.py +19 -0
- spm/spm_write_filtered.py +34 -0
- spm/spm_write_plane.py +24 -0
- spm/spm_write_residuals.py +20 -0
- spm/spm_write_vol.py +22 -0
- spm/spm_z2p.py +26 -0
- spm/spm_zeros.py +16 -0
- spm/xmltree.py +619 -0
- spm_python-25.1a1.dev1.dist-info/AUTHORS.txt +53 -0
- spm_python-25.1a1.dev1.dist-info/LICENCE +339 -0
- spm_python-25.1a1.dev1.dist-info/METADATA +151 -0
- spm_python-25.1a1.dev1.dist-info/RECORD +834 -0
- spm_python-25.1a1.dev1.dist-info/WHEEL +5 -0
- spm_python-25.1a1.dev1.dist-info/top_level.txt +1 -0
spm/spm_DesMtx.py
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_DesMtx(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Design matrix construction from factor level and covariate vectors
|
|
7
|
+
FORMAT [X,Pnames] = spm_DesMtx(<FCLevels-Constraint-FCnames> list)
|
|
8
|
+
FORMAT [X,Pnames,Index,idx,jdx,kdx] = spm_DesMtx(FCLevels,Constraint,FCnames)
|
|
9
|
+
|
|
10
|
+
<FCLevels-Constraints-FCnames>
|
|
11
|
+
- set of arguments specifying a portion of design matrix (see below)
|
|
12
|
+
- FCnames parameter, or Constraint and FCnames parameters, are optional
|
|
13
|
+
- a list of multiple <FCLevels-Constraint-FCnames> triples can be
|
|
14
|
+
specified, where FCnames or Constraint-FCnames may be omitted
|
|
15
|
+
within any triple. The program then works recursively.
|
|
16
|
+
|
|
17
|
+
X - design matrix
|
|
18
|
+
Pnames - parameter names as (constructed from FCnames) - a cellstr
|
|
19
|
+
Index - integer index of factor levels
|
|
20
|
+
- only returned when computing a single design matrix partition
|
|
21
|
+
|
|
22
|
+
idx,jdx,kdx - reference vectors mapping I & Index (described below)
|
|
23
|
+
- only returned when computing a single design matrix partition
|
|
24
|
+
for unconstrained factor effects ('-' or '~')
|
|
25
|
+
|
|
26
|
+
----------------
|
|
27
|
+
|
|
28
|
+
FORMAT [nX,nPnames] = spm_DesMtx('sca',X1,Pnames1,X2,Pnames2,...)
|
|
29
|
+
Produces a scaled design matrix nX with max(abs(nX(:))<=1, suitable
|
|
30
|
+
for imaging with: image((nX+1)*32)
|
|
31
|
+
X1,X2,... - Design matrix partitions
|
|
32
|
+
Pnames1, Pnames2,... - Corresponding parameter name string mtx/cellstr (opt)
|
|
33
|
+
nX - Scaled design matrix
|
|
34
|
+
nPnames - Concatenated parameter names for columns of nX
|
|
35
|
+
|
|
36
|
+
__________________________________________________________________________
|
|
37
|
+
|
|
38
|
+
Returns design matrix corresponding to given vectors containing
|
|
39
|
+
levels of a factor; two way interactions; covariates (n vectors);
|
|
40
|
+
ready-made sections of design matrix; and factor by covariate
|
|
41
|
+
interactions.
|
|
42
|
+
|
|
43
|
+
The specification for the design matrix is passed in sets of arguments,
|
|
44
|
+
each set corresponding to a particular Factor/Covariate/&c., specifying
|
|
45
|
+
a section of the design matrix. The set of arguments consists of the
|
|
46
|
+
FCLevels matrix (Factor/Covariate levels), an optional constraint string,
|
|
47
|
+
and an optional (string) name matrix containing the names of the
|
|
48
|
+
Factor/Covariate/&c.
|
|
49
|
+
|
|
50
|
+
MAIN EFFECTS: For a main effect, or single factor, the FCLevels
|
|
51
|
+
matrix is an integer vector whose values represent the levels of the
|
|
52
|
+
factor. The integer factor levels need not be positive, nor in
|
|
53
|
+
order. In the '~' constraint types (below), a factor level of zero
|
|
54
|
+
is ignored (treated as no effect), and no corresponding column of
|
|
55
|
+
design matrix is created. Effects for the factor levels are entered
|
|
56
|
+
into the design matrix *in increasing order* of the factor levels.
|
|
57
|
+
Check Pnames to find out which columns correspond to which levels of
|
|
58
|
+
the factor.
|
|
59
|
+
|
|
60
|
+
TWO WAY INTERACTIONS: For a two way interaction effect between two
|
|
61
|
+
factors, the FCLevels matrix is an nx2 integer matrix whose columns
|
|
62
|
+
indicate the levels of the two factors. An effect is included for
|
|
63
|
+
each unique combination of the levels of the two factors. Again,
|
|
64
|
+
factor levels must be integer, though not necessarily positive.
|
|
65
|
+
Zero levels are ignored in the '~' constraint types described below.
|
|
66
|
+
|
|
67
|
+
CONSTRAINTS: Each FactorLevels vector/matrix may be followed by an
|
|
68
|
+
(optional) ConstraintString.
|
|
69
|
+
|
|
70
|
+
ConstraintStrings for main effects are:
|
|
71
|
+
'-' - No Constraint
|
|
72
|
+
'~' - Ignore zero level of factor
|
|
73
|
+
(I.e. cornerPoint constraint on zero level,
|
|
74
|
+
(same as '.0', except zero level is always ignored,
|
|
75
|
+
(even if factor only has zero level, in which case
|
|
76
|
+
(an empty DesMtx results and a warning is given
|
|
77
|
+
'+0' - sum-to-zero constraint
|
|
78
|
+
'+0m' - Implicit sum-to-zero constraint
|
|
79
|
+
'.' - CornerPoint constraint
|
|
80
|
+
'.0' - CornerPoint constraint applied to zero factor level
|
|
81
|
+
(warns if there is no zero factor level)
|
|
82
|
+
Constraints for two way interaction effects are
|
|
83
|
+
'-' - No Constraints
|
|
84
|
+
'~' - Ignore zero level of any factor
|
|
85
|
+
(I.e. cornerPoint constraint on zero level,
|
|
86
|
+
(same as '.ij0', except zero levels are always ignored
|
|
87
|
+
'+i0','+j0','+ij0' - sum-to-zero constraints
|
|
88
|
+
'.i', '.j', '.ij' - CornerPoint constraints
|
|
89
|
+
'.i0','.j0','.ij0' - CornerPoint constraints applied to zero factor level
|
|
90
|
+
(warns if there is no zero factor level)
|
|
91
|
+
'+i0m', '+j0m' - Implicit sum-to-zero constraints
|
|
92
|
+
|
|
93
|
+
With the exception of the "ignore zero" '~' constraint, constraints
|
|
94
|
+
are only applied if there are sufficient factor levels. CornerPoint
|
|
95
|
+
and explicit sum-to-zero Constraints are applied to the last level of
|
|
96
|
+
the factor.
|
|
97
|
+
|
|
98
|
+
The implicit sum-to-zero constraints "mean correct" appropriate rows
|
|
99
|
+
of the relevant design matrix block. For a main effect, constraint
|
|
100
|
+
'+0m' "mean corrects" the main effect block across columns,
|
|
101
|
+
corresponding to factor effects B_i, where B_i = B'_i - mean(B'_i) :
|
|
102
|
+
The B'_i are the fitted parameters, effectively *relative* factor
|
|
103
|
+
parameters, relative to their mean. This leads to a rank deficient
|
|
104
|
+
design matrix block. If Matlab's pinv, which implements a
|
|
105
|
+
Moore-Penrose pseudoinverse, is used to solve the least squares
|
|
106
|
+
problem, then the solution with smallest L2 norm is found, which has
|
|
107
|
+
mean(B'_i)=0 provided the remainder of the design is unique (design
|
|
108
|
+
matrix blocks of full rank). In this case therefore the B_i are
|
|
109
|
+
identically the B'_i - the mean correction imposes the constraint.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
COVARIATES: The FCLevels matrix here is an nxc matrix whose columns
|
|
113
|
+
contain the covariate values. An effect is included for each covariate.
|
|
114
|
+
Covariates are identified by ConstraintString 'C'.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
PRE-SPECIFIED DESIGN BLOCKS: ConstraintString 'X' identifies a
|
|
118
|
+
ready-made bit of design matrix - the effect is the same as 'C'.
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
FACTOR BY COVARIATE INTERACTIONS: are identified by ConstraintString
|
|
122
|
+
'FxC'. The last column is understood to contain the covariate. Other
|
|
123
|
+
columns are taken to contain integer FactorLevels vectors. The
|
|
124
|
+
(unconstrained) interaction of the factors is interacted with the
|
|
125
|
+
covariate. Zero factor levels are ignored if ConstraintString '~FxC'
|
|
126
|
+
is used.
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
NAMES: Each Factor/Covariate can be 'named', by passing a name
|
|
130
|
+
string. Pass a string matrix, or cell array (vector) of strings,
|
|
131
|
+
with rows (cells) naming the factors/covariates in the respective
|
|
132
|
+
columns of the FCLevels matrix. These names default to <Fac>, <Cov>,
|
|
133
|
+
<Fac1>, <Fac2> &c., and are used in the construction of the Pnames
|
|
134
|
+
parameter names.
|
|
135
|
+
E.g. for an interaction, spm_DesMtx([F1,F2],'+ij0',['subj';'cond'])
|
|
136
|
+
giving parameter names such as subj*cond_{1,2} etc...
|
|
137
|
+
|
|
138
|
+
Pnames returns a string matrix whose successive rows describe the
|
|
139
|
+
effects parameterised in the corresponding columns of the design
|
|
140
|
+
matrix. `Fac1*Fac2_{2,3}' would refer to the parameter for the
|
|
141
|
+
interaction of the two factors Fac1 & Fac2, at the 2nd level of the
|
|
142
|
+
former and the 3rd level of the latter. Other forms are
|
|
143
|
+
- Simple main effect (level 1) : <Fac>_{1}
|
|
144
|
+
- Three way interaction (level 1,2,3) : <Fac1>*<Fac2>*<Fac3>_{1,2,3}
|
|
145
|
+
- Two way factor interaction by covariate interaction :
|
|
146
|
+
: <Cov>@<Fac1>*<Fac2>_{1,1}
|
|
147
|
+
- Column 3 of prespecified DesMtx block (if unnamed)
|
|
148
|
+
: <X> [1]
|
|
149
|
+
The special characters `_*()[]{}' are recognised by the scaling
|
|
150
|
+
function (spm_DesMtx('sca',...), and should therefore be avoided
|
|
151
|
+
when naming effects and covariates.
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
INDEX: An Integer Index matrix is returned if only a single block of
|
|
155
|
+
design matrix is being computed (single set of parameters). It
|
|
156
|
+
indexes the actual order of the effect levels in the design matrix block.
|
|
157
|
+
(Factor levels are introduced in order, regardless of order of
|
|
158
|
+
appearance in the factor index matrices, so that the parameters
|
|
159
|
+
vector has a sensible order.) This is used to aid recursion.
|
|
160
|
+
|
|
161
|
+
Similarly idx,jdx & kdx are indexes returned for a single block of
|
|
162
|
+
design matrix consisting of unconstrained factor effects ('-' or '~').
|
|
163
|
+
These indexes map I and Index (in a similar fashion to the `unique`
|
|
164
|
+
function) as follows:
|
|
165
|
+
- idx & jdx are such that I = Index(:,jdx)' and Index = I(idx,:)'
|
|
166
|
+
where vector I is given as a column vector
|
|
167
|
+
- If the "ignore zeros" constraint '~' is used, then kdx indexes the
|
|
168
|
+
non-zero (combinations) of factor levels, such that
|
|
169
|
+
I(kdx,:) = Index(:,jdx)' and Index == I(kdx(idx),:)'
|
|
170
|
+
|
|
171
|
+
----------------
|
|
172
|
+
|
|
173
|
+
The design matrix scaling feature is designed to return a scaled
|
|
174
|
+
version of a design matrix, with values in [-1,1], suitable for
|
|
175
|
+
visualisation. Special care is taken to apply the same normalisation
|
|
176
|
+
to blocks of design matrix reflecting a single effect, to preserve
|
|
177
|
+
appropriate relationships between columns. Identification of effects
|
|
178
|
+
corresponding to columns of design matrix portions is via the parameter
|
|
179
|
+
names matrices. The design matrix may be passed in any number of
|
|
180
|
+
parts, provided the corresponding parameter names are given. It is
|
|
181
|
+
assumed that the block representing an effect is contained within a
|
|
182
|
+
single partition. Partitions supplied without corresponding parameter
|
|
183
|
+
names are scaled on a column by column basis, the parameters labelled as
|
|
184
|
+
<UnSpec> in the returned nPnames matrix.
|
|
185
|
+
|
|
186
|
+
Effects are identified using the special characters `_*()[]{}' used in
|
|
187
|
+
parameter naming as follows: (here ? is a wildcard)
|
|
188
|
+
- ?(?) - general block (column normalised)
|
|
189
|
+
- ?[?] - specific block (block normalised)
|
|
190
|
+
- ?_{?} - main effect or interaction of main effects
|
|
191
|
+
- ?@?_{?} - factor by covariate interaction
|
|
192
|
+
Blocks are identified by looking for runs of parameters of the same type
|
|
193
|
+
with the same names: E.g. a block of main effects for factor 'Fac1'
|
|
194
|
+
would have names like Fac1_{?}.
|
|
195
|
+
|
|
196
|
+
Scaling is as follows:
|
|
197
|
+
* fMRI blocks are scaled around zero to lie in [-1,1]
|
|
198
|
+
* No scaling is carried out if max(abs(tX(:))) is in [.4,1]
|
|
199
|
+
This protects dummy variables from normalisation, even if
|
|
200
|
+
using implicit sum-to-zero constraints.
|
|
201
|
+
* If the block has a single value, it's replaced by 1's
|
|
202
|
+
* FxC blocks are normalised so the covariate values cover [-1,1]
|
|
203
|
+
but leaving zeros as zero.
|
|
204
|
+
* Otherwise, block is scaled to cover [-1,1].
|
|
205
|
+
|
|
206
|
+
__________________________________________________________________________
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_DesMtx.m )
|
|
210
|
+
|
|
211
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
212
|
+
"""
|
|
213
|
+
return Runtime.call("spm_DesMtx", *args, **kwargs)
|
spm/spm_DesRep.py
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_DesRep(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Design reporting utilities
|
|
7
|
+
FORMAT varargout = spm_DesRep(action,varargin)
|
|
8
|
+
|
|
9
|
+
spm_DesRep (design reporting) is a suite of utility functions for various
|
|
10
|
+
graphical reports on a given experimental design, embodied in the design
|
|
11
|
+
matrix structure and other associated data structures.
|
|
12
|
+
For detailed programmers comments, see format specifications in main body
|
|
13
|
+
of code.
|
|
14
|
+
|
|
15
|
+
----------------
|
|
16
|
+
|
|
17
|
+
By default, spm_DesRep prompts for selection of a SPM.mat file.
|
|
18
|
+
|
|
19
|
+
Given details of a design spm_DesRep sets up a "Design" menu in the
|
|
20
|
+
SPM 'Interactive' window. The menu options launch various graphical
|
|
21
|
+
summaries of the current SPM design in the SPM 'Graphics' window.
|
|
22
|
+
|
|
23
|
+
* Design Matrix - Displays graphical summary of the design matrix
|
|
24
|
+
|
|
25
|
+
The design is labelled with the corresponding parameter and
|
|
26
|
+
file names, and is displayed as an image scaled (using
|
|
27
|
+
spm_DesMtx('sca',...) such that zero is mid-grey, -1 is black, and +1
|
|
28
|
+
is white. Covariates exceeding this randge are scaled to fit.
|
|
29
|
+
|
|
30
|
+
The design matrix is "surfable": Clicking (and holding or dragging)
|
|
31
|
+
around the design matrix image reports the corresponding value of the
|
|
32
|
+
design matrix ('normal' click - "left" mouse button usually), the
|
|
33
|
+
image filename ('extend' mouse click - "middle" mouse), or parameter
|
|
34
|
+
name ('alt' click - "right" mouse). Double clicking the design matrix
|
|
35
|
+
image extracts the design matrix into the base MATLAB workspace.
|
|
36
|
+
|
|
37
|
+
Under the design matrix the parameter estimability is displayed as a
|
|
38
|
+
1xp matrix of grey and white squares. Parameters that are not
|
|
39
|
+
uniquely specified by the model are shown with a grey patch. Surfing
|
|
40
|
+
the estimability image reports the parameter names and their
|
|
41
|
+
estimability. Double clicking extracts the estimability vector into
|
|
42
|
+
the base MATLAB workspace.
|
|
43
|
+
|
|
44
|
+
* Design orthogonality - Displays orthogonality matrix for this design
|
|
45
|
+
|
|
46
|
+
The design matrix is displayed as in "Design Matrix" view above,
|
|
47
|
+
labelled with the parameter names.
|
|
48
|
+
|
|
49
|
+
Under the design matrix the design orthogonality matrix is
|
|
50
|
+
displayed. For each pair of columns of the design matrix, the
|
|
51
|
+
orthogonality matrix depicts the magnitude of the cosine of the
|
|
52
|
+
angle between them, with the range 0 to 1 mapped to white to
|
|
53
|
+
black. Orthogonal vectors (shown in white), have cosine of zero.
|
|
54
|
+
Colinear vectors (shown in black), have cosine of 1 or -1.
|
|
55
|
+
|
|
56
|
+
The cosine of the angle between two vectors a & b is obtained by
|
|
57
|
+
dividing the dot product of the two vectors by the product of
|
|
58
|
+
their lengths:
|
|
59
|
+
|
|
60
|
+
a'*b
|
|
61
|
+
------------------------
|
|
62
|
+
sqrt(sum(a.^2)*sum(b.^2)
|
|
63
|
+
|
|
64
|
+
If (and only if) both vectors have zero mean, i.e.
|
|
65
|
+
sum(a)==sum(b)==0, then the cosine of the angle between the
|
|
66
|
+
vectors is the same as the correlation between the two variates.
|
|
67
|
+
|
|
68
|
+
The design orthogonality matrix is "surfable": Clicking (and
|
|
69
|
+
holding or dragging) the cursor around the design orthogonality
|
|
70
|
+
image reports the orthogonality of the corresponding pair of
|
|
71
|
+
columns. Double clicking on the orthogonality matrix extracts
|
|
72
|
+
the contrast orthogonality matrix into the base MATLAB
|
|
73
|
+
workspace.
|
|
74
|
+
|
|
75
|
+
* Explore design - Sub-menu's for detailed design exploration.
|
|
76
|
+
|
|
77
|
+
If this is an fMRI design, then the session & trial/condition
|
|
78
|
+
structure of the design is reflected in the sub-menu structure.
|
|
79
|
+
Selecting a given session, and then trial/condition within the
|
|
80
|
+
session, launches a comprehensive display of the parameters of
|
|
81
|
+
that design.
|
|
82
|
+
|
|
83
|
+
If not an fMRI design, then the Explore sub-menu has two options:
|
|
84
|
+
"Files and factors" & "Covariates".
|
|
85
|
+
|
|
86
|
+
* Explore: Files and factors - Multi-page listing of filenames,
|
|
87
|
+
factor indices and covariates.
|
|
88
|
+
|
|
89
|
+
The covariates printed are the raw covariates as entered into
|
|
90
|
+
SPM, with the exception of the global value, which is printed
|
|
91
|
+
after any grand mean scaling.
|
|
92
|
+
|
|
93
|
+
* Explore: Covariates - Plots of the covariates, showing how they are
|
|
94
|
+
included into the model.
|
|
95
|
+
|
|
96
|
+
Covariates are plotted, one per page, overlaid on the design
|
|
97
|
+
matrix. The description strings in the xC covariate structure
|
|
98
|
+
array are displayed. The corresponding design matrix column(s)
|
|
99
|
+
is(are) highlighted.
|
|
100
|
+
|
|
101
|
+
* Clear - clears Graphics window, re-instating Results section MIP
|
|
102
|
+
& design matrix graphics (if in the results section).
|
|
103
|
+
* Help - displays this text!
|
|
104
|
+
|
|
105
|
+
----------------
|
|
106
|
+
|
|
107
|
+
spm_DesRep also handles "surfing" of contrast depictions, which are
|
|
108
|
+
bar-graphs for T-contrasts and images for F-contrasts. Clicking
|
|
109
|
+
('normal' click - "left" mouse button usually) with the on the bars
|
|
110
|
+
of the bar-graphs, or anywhere in an image, and dragging, dynamically
|
|
111
|
+
reports the contrast weight depicted under the cursor. The format of
|
|
112
|
+
the report string is:
|
|
113
|
+
#{T/F}: <name> (ij) = <weight>
|
|
114
|
+
...where # is the contrast number, T/F indicates the type of contrast,
|
|
115
|
+
<name> the name given to the contrast, ij the index into the contrast
|
|
116
|
+
vector/matrix weight under the cursor, and <weight> the corresponding
|
|
117
|
+
contrast weight.
|
|
118
|
+
|
|
119
|
+
Double clicking on a contrast depiction extracts the contrast weights
|
|
120
|
+
into the base workspace.
|
|
121
|
+
__________________________________________________________________________
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_DesRep.m )
|
|
125
|
+
|
|
126
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
127
|
+
"""
|
|
128
|
+
return Runtime.call("spm_DesRep", *args, **kwargs)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_DisplayTimeSeries(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Build a GUI for 'smart' time series display
|
|
7
|
+
FORMAT [ud] = spm_DisplayTimeSeries(y,options)
|
|
8
|
+
IN:
|
|
9
|
+
- y: the txn data, where t is the number of time sample, and p the
|
|
10
|
+
number of 'channels'
|
|
11
|
+
- options: a structure (default is empty), which allows to adapt this
|
|
12
|
+
function to specific needs. Optional fields are:
|
|
13
|
+
.hp: the handle of the parent figure/object. This is used to
|
|
14
|
+
include the time series display in a panel/figure. By default, a
|
|
15
|
+
new figure will be created.
|
|
16
|
+
.Fsample: the sample rate of the data (in Hz)
|
|
17
|
+
.events: a nex1 structure vector containing the time indices of the
|
|
18
|
+
events and their type (if any). Default is empty. Basic structure
|
|
19
|
+
contains fields .time and .type (see below).
|
|
20
|
+
.M: a pxn matrix premultiplied to the data when plotted (default is
|
|
21
|
+
1).
|
|
22
|
+
.bad a px1 binary vector containing the good/bad status of the
|
|
23
|
+
channels. Default is zeros(p,1).
|
|
24
|
+
.transpose: a binary variable that transposes the data (useful for
|
|
25
|
+
file_array display). Using options.transpose = 1 is similar to do
|
|
26
|
+
something similar to plot(y'). Default is 0.
|
|
27
|
+
.minY: the min value of the plotted data (used to define the main
|
|
28
|
+
axes limit). Default is calculated according to the offset.
|
|
29
|
+
.maxY: the max value of the plotted data (used to define the main
|
|
30
|
+
axes limit). Default is calculated according to the offset.
|
|
31
|
+
.minSizeWindow: minimum size of the plotted window (in number of
|
|
32
|
+
time samples). {min([200,0.5*size(y,1)]}
|
|
33
|
+
.maxSizeWindow: maximum size of the plotted window (in number of
|
|
34
|
+
time samples). {min([5000,size(y,1)])}
|
|
35
|
+
.ds: an integer giving the number of displayed time samples when
|
|
36
|
+
dynamically moving the display time window. Default is 1e4. If you
|
|
37
|
+
set it to Inf, no downsampling is applied.
|
|
38
|
+
.callback: a string or function handle which is evaluated after
|
|
39
|
+
each release of the mouse button (when moving the patch or clicking
|
|
40
|
+
on the slider). Default is empty.
|
|
41
|
+
.tag: a string used to tag both axes
|
|
42
|
+
.pos1: a 4x1 vector containing the position of the main display
|
|
43
|
+
axes {[0.13 0.3 0.775 0.655]}
|
|
44
|
+
.pos2: a 4x1 vector containing the position of the global power
|
|
45
|
+
display axes {[0.13 0.05 0.775 0.15]}
|
|
46
|
+
.pos3: a 4x1 vector containing the position of the temporal slider
|
|
47
|
+
{[0.13 0.01 0.775 0.02]}
|
|
48
|
+
.itw: a vector containing the indices of data time samples
|
|
49
|
+
initially displayed in the main axes {1:minSizeWindow}
|
|
50
|
+
.ytick: the 'ytick' property of the main axes
|
|
51
|
+
.yticklabel: the 'yticklabel' property of the main axes
|
|
52
|
+
.offset: a px1 vector containing the vertical offset that has to be
|
|
53
|
+
added to each of the plotted time series
|
|
54
|
+
!! .ytick, .yticklabel and .offset can be used to display labelled
|
|
55
|
+
time series one above each other !!
|
|
56
|
+
OUT:
|
|
57
|
+
- ud: a structure containing all relevant information about the
|
|
58
|
+
graphical objects created for the GUI. This is useful for manipulating
|
|
59
|
+
the figure later on (see below).
|
|
60
|
+
__________________________________________________________________________
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_DisplayTimeSeries.m )
|
|
64
|
+
|
|
65
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
66
|
+
"""
|
|
67
|
+
return Runtime.call("spm_DisplayTimeSeries", *args, **kwargs)
|
spm/spm_Dpdf.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_Dpdf(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Probability Density Function (PDF) of Dirichlet distribution
|
|
7
|
+
FORMAT f = spm_Dpdf(x,a)
|
|
8
|
+
|
|
9
|
+
x - Dirichlet variate
|
|
10
|
+
a - Dirichlet parameters (a>0)
|
|
11
|
+
f - PDF of Dirichlet-distribution at point x
|
|
12
|
+
__________________________________________________________________________
|
|
13
|
+
|
|
14
|
+
spm_Dpdf implements the Probability Density Function for Dirichlet
|
|
15
|
+
distribution.
|
|
16
|
+
|
|
17
|
+
Definition:
|
|
18
|
+
--------------------------------------------------------------------------
|
|
19
|
+
See http://en.wikipedia.org/wiki/Dirichlet_distribution
|
|
20
|
+
|
|
21
|
+
Algorithm:
|
|
22
|
+
--------------------------------------------------------------------------
|
|
23
|
+
Direct computation using logs and MATLAB's implementation of the log of
|
|
24
|
+
the gamma function (gammaln).
|
|
25
|
+
__________________________________________________________________________
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_Dpdf.m )
|
|
29
|
+
|
|
30
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
31
|
+
"""
|
|
32
|
+
return Runtime.call("spm_Dpdf", *args, **kwargs)
|
spm/spm_ECdensity.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_ECdensity(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Return the Euler characteristic (EC) density
|
|
7
|
+
FORMAT function [EC] = spm_ECdensity(STAT,t,df)
|
|
8
|
+
__________________________________________________________________________
|
|
9
|
+
|
|
10
|
+
Reference : Worsley KJ et al (1996), Hum Brain Mapp. 4:58-73
|
|
11
|
+
__________________________________________________________________________
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_ECdensity.m )
|
|
15
|
+
|
|
16
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
17
|
+
"""
|
|
18
|
+
return Runtime.call("spm_ECdensity", *args, **kwargs)
|
spm/spm_FcUtil.py
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_FcUtil(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Contrast utilities
|
|
7
|
+
FORMAT varargout = spm_FcUtil(action,varargin)
|
|
8
|
+
_______________________________________________________________________
|
|
9
|
+
|
|
10
|
+
spm_FcUtil is a multi-function function containing various utilities
|
|
11
|
+
for contrast construction and manipulation. In general, it accepts
|
|
12
|
+
design matrices as plain matrices or as space structures setup by
|
|
13
|
+
spm_sp (that is preferable in general).
|
|
14
|
+
|
|
15
|
+
The use of spm_FcUtil should help with robustness issues and
|
|
16
|
+
maintainability of SPM. % Note that when space structures are passed
|
|
17
|
+
as arguments is is assumed that their basic fields are filled in.
|
|
18
|
+
See spm_sp for details of (design) space structures and their
|
|
19
|
+
manipulation.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
======================================================================
|
|
23
|
+
case 'fconfields' %- fields of F contrast
|
|
24
|
+
Fc = spm_FcUtil('FconFields')
|
|
25
|
+
|
|
26
|
+
- simply returns the fields of a contrast structure.
|
|
27
|
+
|
|
28
|
+
=======================================================================
|
|
29
|
+
case 'set' %- Create an F contrast
|
|
30
|
+
Fc = spm_FcUtil('Set',name, STAT, set_action, value, sX)
|
|
31
|
+
|
|
32
|
+
- Set will fill in the contrast structure, in particular
|
|
33
|
+
- c (in the contrast space), X1o (the space actually tested) and
|
|
34
|
+
- X0 (the space left untested), such that space([X1o X0]) == sX.
|
|
35
|
+
- STAT is either 'F' or 'T';
|
|
36
|
+
- name is a string describing the contrast.
|
|
37
|
+
|
|
38
|
+
- There are three ways to set a contrast :
|
|
39
|
+
- set_action is 'c','c+' : value can then be zeros.
|
|
40
|
+
- dimensions are in X',
|
|
41
|
+
- f c+ is used, value is projected onto sX';
|
|
42
|
+
- iX0 is set to 'c' or 'c+';
|
|
43
|
+
- set_action is 'iX0' : defines the indices of the columns
|
|
44
|
+
- that will not be tested. Can be empty.
|
|
45
|
+
- set_action is 'X0' : defines the space that will remain
|
|
46
|
+
- unchanged. The orthogonal complement is
|
|
47
|
+
- tested; iX0 is set to 'X0';
|
|
48
|
+
-
|
|
49
|
+
=======================================================================
|
|
50
|
+
case 'isfcon' %- Is it an F contrast ?
|
|
51
|
+
b = spm_FcUtil('IsFcon',Fc)
|
|
52
|
+
|
|
53
|
+
=======================================================================
|
|
54
|
+
case 'fconedf' %- F contrast edf
|
|
55
|
+
[edf_tsp edf_Xsp] = spm_FcUtil('FconEdf', Fc, sX [, V])
|
|
56
|
+
|
|
57
|
+
- compute the effective degrees of freedom of the numerator edf_tsp
|
|
58
|
+
- and (optionally) the denominator edf_Xsp of the contrast.
|
|
59
|
+
|
|
60
|
+
=======================================================================
|
|
61
|
+
case 'hsqr' %-Extra sum of squares sqr matrix for beta's from contrast
|
|
62
|
+
hsqr = spm_FcUtil('Hsqr',Fc, sX)
|
|
63
|
+
|
|
64
|
+
- This computes the matrix hsqr such that a the numerator of an F test
|
|
65
|
+
- will be beta'*hsqr'*hsqr*beta
|
|
66
|
+
|
|
67
|
+
=======================================================================
|
|
68
|
+
case 'h' %-Extra sum of squares matrix for beta's from contrast
|
|
69
|
+
H = spm_FcUtil('H',Fc, sX)
|
|
70
|
+
|
|
71
|
+
- This computes the matrix H such that a the numerator of an F test
|
|
72
|
+
- will be beta'*H*beta
|
|
73
|
+
-
|
|
74
|
+
=======================================================================
|
|
75
|
+
case 'yc' %- Fitted data corrected for confounds defined by Fc
|
|
76
|
+
Yc = spm_FcUtil('Yc',Fc, sX, b)
|
|
77
|
+
|
|
78
|
+
- Input : b : the betas
|
|
79
|
+
- Returns the corrected data Yc for given contrast. Y = Yc + Y0 + error
|
|
80
|
+
|
|
81
|
+
=======================================================================
|
|
82
|
+
case 'y0' %- Confounds data defined by Fc
|
|
83
|
+
Y0 = spm_FcUtil('Y0',Fc, sX, b)
|
|
84
|
+
|
|
85
|
+
- Input : b : the betas
|
|
86
|
+
- Returns the confound data Y0 for a given contrast. Y = Yc + Y0 + error
|
|
87
|
+
|
|
88
|
+
=======================================================================
|
|
89
|
+
case {'|_'} %- Fc orthogonalisation
|
|
90
|
+
Fc = spm_FcUtil('|_',Fc1, sX, Fc2)
|
|
91
|
+
|
|
92
|
+
- Orthogonolise a (list of) contrasts Fc1 wrt a (list of) contrast Fc2
|
|
93
|
+
- such that the space these contrasts test are orthogonal.
|
|
94
|
+
- If contrasts are not estimable contrasts, works with the estimable
|
|
95
|
+
- part. In any case, returns estimable contrasts.
|
|
96
|
+
|
|
97
|
+
=======================================================================
|
|
98
|
+
case {'|_?'} %- Are contrasts orthogonals
|
|
99
|
+
b = spm_FcUtil('|_?',Fc1, sX [, Fc2])
|
|
100
|
+
|
|
101
|
+
- Tests whether a (list of) contrast is orthogonal. Works with the
|
|
102
|
+
- estimable part if they are not estimable. With only one argument,
|
|
103
|
+
- tests whether the list is made of orthogonal contrasts. With Fc2
|
|
104
|
+
- provided, tests whether the two (list of) contrast are orthogonal.
|
|
105
|
+
|
|
106
|
+
=======================================================================
|
|
107
|
+
case 'in' %- Fc1 is in list of contrasts Fc2
|
|
108
|
+
[iFc2 iFc1] = spm_FcUtil('In', Fc1, sX, Fc2)
|
|
109
|
+
|
|
110
|
+
- Tests whether a (list of) contrast Fc1 is in a list of contrast Fc2.
|
|
111
|
+
- returns the indices iFc2 where element of Fc1 have been found
|
|
112
|
+
- in Fc2 and the indices iFc1 of the element of Fc1 found in Fc2.
|
|
113
|
+
- These indices are not necessarily unique.
|
|
114
|
+
|
|
115
|
+
=======================================================================
|
|
116
|
+
case '~unique' %- Fc list unique
|
|
117
|
+
idx = spm_FcUtil('~unique', Fc, sX)
|
|
118
|
+
|
|
119
|
+
- returns indices ofredundant contrasts in Fc
|
|
120
|
+
- such that Fc(idx) = [] makes Fc unique.
|
|
121
|
+
|
|
122
|
+
=======================================================================
|
|
123
|
+
case {'0|[]','[]|0'} %- Fc is null or empty
|
|
124
|
+
b = spm_FcUtil('0|[]', Fc, sX)
|
|
125
|
+
|
|
126
|
+
- NB : for the "null" part, checks if the contrast is in the null space
|
|
127
|
+
- of sX (completely non estimable !)
|
|
128
|
+
=======================================================================
|
|
129
|
+
_______________________________________________________________________
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_FcUtil.m )
|
|
133
|
+
|
|
134
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
135
|
+
"""
|
|
136
|
+
return Runtime.call("spm_FcUtil", *args, **kwargs)
|