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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_fx_fmri_linear(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
State equation for a dynamic model of fMRI (linear version) responses
|
|
7
|
+
FORMAT [y] = spm_fx_fmri_linear(x,u,P,M)
|
|
8
|
+
x - state vector
|
|
9
|
+
x(:,1) - excitatory neuronal activity ue
|
|
10
|
+
x(:,2) - vascular signal s
|
|
11
|
+
x(:,3) - rCBF ln(f)
|
|
12
|
+
x(:,4) - venous volume ln(v)
|
|
13
|
+
x(:,5) - deoyxHb ln(q)
|
|
14
|
+
[x(:,6) - inhibitory neuronal activity ui]
|
|
15
|
+
|
|
16
|
+
y - dx/dt
|
|
17
|
+
|
|
18
|
+
__________________________________________________________________________
|
|
19
|
+
|
|
20
|
+
References for hemodynamic & neuronal state equations:
|
|
21
|
+
1. Buxton RB, Wong EC & Frank LR. Dynamics of blood flow and oxygenation
|
|
22
|
+
changes during brain activation: The Balloon model. MRM 39:855-864,
|
|
23
|
+
1998.
|
|
24
|
+
2. Friston KJ, Mechelli A, Turner R, Price CJ. Nonlinear responses in
|
|
25
|
+
fMRI: the Balloon model, Volterra kernels, and other hemodynamics.
|
|
26
|
+
Neuroimage 12:466-477, 2000.
|
|
27
|
+
3. Stephan KE, Kasper L, Harrison LM, Daunizeau J, den Ouden HE,
|
|
28
|
+
Breakspear M, Friston KJ. Nonlinear dynamic causal models for fMRI.
|
|
29
|
+
Neuroimage 42:649-662, 2008.
|
|
30
|
+
4. Marreiros AC, Kiebel SJ, Friston KJ. Dynamic causal modelling for
|
|
31
|
+
fMRI: a two-state model.
|
|
32
|
+
Neuroimage. 2008 Jan 1;39(1):269-78.
|
|
33
|
+
__________________________________________________________________________
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_fx_fmri_linear.m )
|
|
37
|
+
|
|
38
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
39
|
+
"""
|
|
40
|
+
return Runtime.call("spm_fx_fmri_linear", *args, **kwargs)
|
spm/spm_fx_hdm.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_fx_hdm(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
State equation for the hemodynamic model
|
|
7
|
+
FORMAT [f] = spm_fx_hdm(x,u,P,M)
|
|
8
|
+
x - state vector
|
|
9
|
+
x(1) - vascular signal s
|
|
10
|
+
x(2) - rCBF log(f)
|
|
11
|
+
x(3) - venous volume log(v)
|
|
12
|
+
x(4) - dHb log(q)
|
|
13
|
+
u - input (neuronal activity) (u)
|
|
14
|
+
P - free parameter vector
|
|
15
|
+
P(1) - signal decay d(ds/dt)/ds)
|
|
16
|
+
P(2) - autoregulation d(ds/dt)/df)
|
|
17
|
+
P(3) - transit time (t0)
|
|
18
|
+
P(4) - exponent for Fout(v) (alpha)
|
|
19
|
+
P(5) - resting oxygen extraction (E0)
|
|
20
|
+
P(6) - ratio of intra- to extra-vascular components (epsilon)
|
|
21
|
+
of the gradient echo signal
|
|
22
|
+
|
|
23
|
+
P(6 + 1:m) - input efficacies d(ds/dt)/du)
|
|
24
|
+
|
|
25
|
+
y - dx/dt
|
|
26
|
+
__________________________________________________________________________
|
|
27
|
+
|
|
28
|
+
Ref Buxton RB, Wong EC & Frank LR. Dynamics of blood flow and oxygenation
|
|
29
|
+
changes during brain activation: The Balloon model. MRM 39:855-864 (1998)
|
|
30
|
+
__________________________________________________________________________
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_fx_hdm.m )
|
|
34
|
+
|
|
35
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
36
|
+
"""
|
|
37
|
+
return Runtime.call("spm_fx_hdm", *args, **kwargs)
|
spm/spm_fx_lz.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_fx_lz(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
flow for Lorenz attractor
|
|
7
|
+
FORMAT [y] = spm_fx_lz(x,u,P)
|
|
8
|
+
x - state
|
|
9
|
+
u - input
|
|
10
|
+
P - parameters
|
|
11
|
+
__________________________________________________________________________
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_fx_lz.m )
|
|
15
|
+
|
|
16
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
17
|
+
"""
|
|
18
|
+
return Runtime.call("spm_fx_lz", *args, **kwargs)
|
spm/spm_fx_poly.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_fx_poly(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Normal (bilinear) form equation of motion
|
|
7
|
+
FORMAT [f] = spm_fx_poly(x,v,P)
|
|
8
|
+
x - state vector
|
|
9
|
+
v - exogenous cause
|
|
10
|
+
P - free parameters
|
|
11
|
+
|
|
12
|
+
f - dx/dt
|
|
13
|
+
__________________________________________________________________________
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_fx_poly.m )
|
|
17
|
+
|
|
18
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
19
|
+
"""
|
|
20
|
+
return Runtime.call("spm_fx_poly", *args, **kwargs)
|
spm/spm_gamrnd.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_gamrnd(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Random arrays from gamma distribution - a compiled routine
|
|
7
|
+
FORMAT r = spm_gamrnd(a,b,m,n,...)
|
|
8
|
+
|
|
9
|
+
a - shape parameter
|
|
10
|
+
b - scale parameter
|
|
11
|
+
m,n,... - dimensions of the output array [optional]
|
|
12
|
+
|
|
13
|
+
r - array of random numbers chosen from the gamma distribution
|
|
14
|
+
__________________________________________________________________________
|
|
15
|
+
|
|
16
|
+
Reference
|
|
17
|
+
|
|
18
|
+
George Marsaglia and Wai Wan Tsang, "A Simple Method for Generating Gamma
|
|
19
|
+
Variables": ACM Transactions on Mathematical Software, Vol. 26, No. 3,
|
|
20
|
+
September 2000, Pages 363-372
|
|
21
|
+
http://portal.acm.org/citation.cfm?id=358414
|
|
22
|
+
__________________________________________________________________________
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_gamrnd.m )
|
|
26
|
+
|
|
27
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
28
|
+
"""
|
|
29
|
+
return Runtime.call("spm_gamrnd", *args, **kwargs)
|
spm/spm_gen_fmri.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_gen_fmri(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Generate a prediction of (multimodal) source activity
|
|
7
|
+
FORMAT [y,lfp,csd,w] = spm_gen_fmri(P,M,U)
|
|
8
|
+
|
|
9
|
+
P - parameters
|
|
10
|
+
M - neural-mass model structure
|
|
11
|
+
U - trial-effects
|
|
12
|
+
U.u - inputs
|
|
13
|
+
U.dt - (micro) time bins for within-trial effects
|
|
14
|
+
|
|
15
|
+
y - BOLD predictions (for every TR)
|
|
16
|
+
lfp - voltages and conductances (for every micotime bin)
|
|
17
|
+
csd - spectral density (for every TR)
|
|
18
|
+
w - frequencies
|
|
19
|
+
|
|
20
|
+
This integration scheme returns a prediction of neuronal responses to
|
|
21
|
+
experimental inputs, in terms of BOLD responses and, if requested, local
|
|
22
|
+
field potentials and spectral density responses in each region or source.
|
|
23
|
+
|
|
24
|
+
The scheme uses a canonical microcircuit nneuron mass model of each
|
|
25
|
+
region to evaluate the new fixed point of neuronal activity every time
|
|
26
|
+
the input changes. This is evaluated in microtime (usually a 16th of the
|
|
27
|
+
TR). These neuronal states are then used to compute the pre-synaptic
|
|
28
|
+
activity of (extrinsic and intrinsic) afferents to each subpopulation to
|
|
29
|
+
furnish a neurovascular signal. The ensuing haemodynamic response is then
|
|
30
|
+
estimated by integrating a haemodynamic model. Neurovascular coupling
|
|
31
|
+
depends upon the mixtures of pre-synaptic activity driving haemodynamic
|
|
32
|
+
model. The associated weights are free parameters.
|
|
33
|
+
__________________________________________________________________________
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_gen_fmri.m )
|
|
37
|
+
|
|
38
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
39
|
+
"""
|
|
40
|
+
return Runtime.call("spm_gen_fmri", *args, **kwargs)
|
spm/spm_getSPM.py
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_getSPM(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Compute a specified and thresholded SPM/PPM following estimation
|
|
7
|
+
FORMAT [SPM,xSPM] = spm_getSPM;
|
|
8
|
+
Query SPM in interactive mode.
|
|
9
|
+
|
|
10
|
+
FORMAT [SPM,xSPM] = spm_getSPM(xSPM);
|
|
11
|
+
Query SPM in batch mode. See below for a description of fields that may
|
|
12
|
+
be present in xSPM input. Values for missing fields will be queried
|
|
13
|
+
interactively.
|
|
14
|
+
|
|
15
|
+
xSPM - structure containing SPM, distribution & filtering details
|
|
16
|
+
.swd - SPM working directory - directory containing current SPM.mat
|
|
17
|
+
.title - title for comparison (string)
|
|
18
|
+
.Z - minimum of Statistics {filtered on u and k}
|
|
19
|
+
.n - conjunction number <= number of contrasts
|
|
20
|
+
.STAT - distribution {Z, T, X, F or P}
|
|
21
|
+
.df - degrees of freedom [df{interest}, df{residual}]
|
|
22
|
+
.STATstr - description string
|
|
23
|
+
.Ic - indices of contrasts (in SPM.xCon)
|
|
24
|
+
.Im - indices of masking contrasts (in xCon)
|
|
25
|
+
.pm - p-value for masking (uncorrected)
|
|
26
|
+
.Ex - flag for exclusive or inclusive masking
|
|
27
|
+
.u - height threshold
|
|
28
|
+
.k - extent threshold {voxels}
|
|
29
|
+
.XYZ - location of voxels {voxel coords}
|
|
30
|
+
.XYZmm - location of voxels {mm}
|
|
31
|
+
.S - search Volume {voxels}
|
|
32
|
+
.R - search Volume {resels}
|
|
33
|
+
.FWHM - smoothness {voxels}
|
|
34
|
+
.M - voxels -> mm matrix
|
|
35
|
+
.iM - mm -> voxels matrix
|
|
36
|
+
.VOX - voxel dimensions {mm} - column vector
|
|
37
|
+
.DIM - image dimensions {voxels} - column vector
|
|
38
|
+
.Vspm - Mapped statistic image(s)
|
|
39
|
+
.Ps - uncorrected P values in searched volume (for voxel FDR)
|
|
40
|
+
.Pp - uncorrected P values of peaks (for peak FDR)
|
|
41
|
+
.Pc - uncorrected P values of cluster extents (for cluster FDR)
|
|
42
|
+
.uc - 0.05 critical thresholds for FWEp, FDRp, FWEc, FDRc
|
|
43
|
+
.thresDesc - description of height threshold (string)
|
|
44
|
+
|
|
45
|
+
Required fields of SPM
|
|
46
|
+
|
|
47
|
+
xVol - structure containing details of volume analysed
|
|
48
|
+
|
|
49
|
+
xX - Design Matrix structure
|
|
50
|
+
- (see spm_spm.m for structure)
|
|
51
|
+
|
|
52
|
+
xCon - Contrast definitions structure array
|
|
53
|
+
- (see also spm_FcUtil.m for structure, rules & handling)
|
|
54
|
+
.name - Contrast name
|
|
55
|
+
.STAT - Statistic indicator character ('T', 'F' or 'P')
|
|
56
|
+
.c - Contrast weights (column vector contrasts)
|
|
57
|
+
.X0 - Reduced design matrix data (spans design space under Ho)
|
|
58
|
+
Stored as coordinates in the orthogonal basis of xX.X from spm_sp
|
|
59
|
+
Extract using X0 = spm_FcUtil('X0',...
|
|
60
|
+
.iX0 - Indicates how contrast was specified:
|
|
61
|
+
If by columns for reduced design matrix then iX0 contains the
|
|
62
|
+
column indices. Otherwise, it's a string containing the
|
|
63
|
+
spm_FcUtil 'Set' action: Usually one of {'c','c+','X0'}
|
|
64
|
+
.X1o - Remaining design space data (X1o is orthogonal to X0)
|
|
65
|
+
Stored as coordinates in the orthogonal basis of xX.X from spm_sp
|
|
66
|
+
Extract using X1o = spm_FcUtil('X1o',...
|
|
67
|
+
.eidf - Effective interest degrees of freedom (numerator df)
|
|
68
|
+
- Or effect-size threshold for Posterior probability
|
|
69
|
+
.Vcon - Name of contrast (for 'T's) or ESS (for 'F's) image
|
|
70
|
+
.Vspm - Name of SPM image
|
|
71
|
+
|
|
72
|
+
Evaluated fields in xSPM (input)
|
|
73
|
+
|
|
74
|
+
xSPM - structure containing SPM, distribution & filtering details
|
|
75
|
+
.swd - SPM working directory - directory containing current SPM.mat
|
|
76
|
+
.title - title for comparison (string)
|
|
77
|
+
.Ic - indices of contrasts (in SPM.xCon)
|
|
78
|
+
.n - conjunction number <= number of contrasts
|
|
79
|
+
.Im - indices of masking contrasts (in xCon)
|
|
80
|
+
.pm - p-value for masking (uncorrected)
|
|
81
|
+
.Ex - flag for exclusive or inclusive masking
|
|
82
|
+
.u - height threshold
|
|
83
|
+
.k - extent threshold {voxels}
|
|
84
|
+
.thresDesc - description of height threshold (string)
|
|
85
|
+
|
|
86
|
+
In addition, the xCon structure is updated. For newly evaluated
|
|
87
|
+
contrasts, SPM images (spmT_????.{img,hdr}) are written, along with
|
|
88
|
+
contrast (con_????.{img,hdr}) images for SPM{T}'s, or Extra
|
|
89
|
+
Sum-of-Squares images (ess_????.{img,hdr}) for SPM{F}'s.
|
|
90
|
+
|
|
91
|
+
The contrast images are the weighted sum of the parameter images,
|
|
92
|
+
where the weights are the contrast weights, and are uniquely
|
|
93
|
+
estimable since contrasts are checked for estimability by the
|
|
94
|
+
contrast manager. These contrast images (for appropriate contrasts)
|
|
95
|
+
are suitable summary images of an effect at this level, and can be
|
|
96
|
+
used as input at a higher level when effecting a random effects
|
|
97
|
+
analysis. (Note that the ess_????.{img,hdr} and
|
|
98
|
+
SPM{T,F}_????.{img,hdr} images are not suitable input for a higher
|
|
99
|
+
level analysis.)
|
|
100
|
+
|
|
101
|
+
__________________________________________________________________________
|
|
102
|
+
|
|
103
|
+
spm_getSPM prompts for an SPM and applies thresholds {u & k}
|
|
104
|
+
to a point list of voxel values (specified with their locations {XYZ})
|
|
105
|
+
This allows the SPM be displayed and characterized in terms of regionally
|
|
106
|
+
significant effects by subsequent routines.
|
|
107
|
+
|
|
108
|
+
For general linear model Y = XB + E with data Y, design matrix X,
|
|
109
|
+
parameter vector B, and (independent) errors E, a contrast c'B of the
|
|
110
|
+
parameters (with contrast weights c) is estimated by c'b, where b are
|
|
111
|
+
the parameter estimates given by b=pinv(X)*Y.
|
|
112
|
+
|
|
113
|
+
Either single contrasts can be examined or conjunctions of different
|
|
114
|
+
contrasts. Contrasts are estimable linear combinations of the
|
|
115
|
+
parameters, and are specified using the SPM contrast manager
|
|
116
|
+
interface [spm_conman.m]. SPMs are generated for the null hypotheses
|
|
117
|
+
that the contrast is zero (or zero vector in the case of
|
|
118
|
+
F-contrasts). See the help for the contrast manager [spm_conman.m]
|
|
119
|
+
for a further details on contrasts and contrast specification.
|
|
120
|
+
|
|
121
|
+
A conjunction assesses the conjoint expression of multiple effects. The
|
|
122
|
+
conjunction SPM is the minimum of the component SPMs defined by the
|
|
123
|
+
multiple contrasts. Inference on the minimum statistics can be
|
|
124
|
+
performed in different ways. Inference on the Conjunction Null (one or
|
|
125
|
+
more of the effects null) is accomplished by assessing the minimum as
|
|
126
|
+
if it were a single statistic; one rejects the conjunction null in
|
|
127
|
+
favor of the alternative that k=nc, that the number of active effects k
|
|
128
|
+
is equal to the number of contrasts nc. No assumptions are needed on
|
|
129
|
+
the dependence between the tests.
|
|
130
|
+
|
|
131
|
+
Another approach is to make inference on the Global Null (all effects
|
|
132
|
+
null). Rejecting the Global Null of no (u=0) effects real implies an
|
|
133
|
+
alternative that k>0, that one or more effects are real. A third
|
|
134
|
+
Intermediate approach, is to use a null hypothesis of no more than u
|
|
135
|
+
effects are real. Rejecting the intermediate null that k<=u implies an
|
|
136
|
+
alternative that k>u, that more than u of the effects are real.
|
|
137
|
+
|
|
138
|
+
The Global and Intermediate nulls use results for minimum fields which
|
|
139
|
+
require the SPMs to be identically distributed and independent. Thus,
|
|
140
|
+
all component SPMs must be either SPM{t}'s, or SPM{F}'s with the same
|
|
141
|
+
degrees of freedom. Independence is roughly guaranteed for large
|
|
142
|
+
degrees of freedom (and independent data) by ensuring that the
|
|
143
|
+
contrasts are "orthogonal". Note that it is *not* the contrast weight
|
|
144
|
+
vectors per se that are required to be orthogonal, but the subspaces of
|
|
145
|
+
the data space implied by the null hypotheses defined by the contrasts
|
|
146
|
+
(c'pinv(X)). Furthermore, this assumes that the errors are
|
|
147
|
+
i.i.d. (i.e. the estimates are maximum likelihood or Gauss-Markov. This
|
|
148
|
+
is the default in spm_spm).
|
|
149
|
+
|
|
150
|
+
To ensure approximate independence of the component SPMs in the case of
|
|
151
|
+
the global or intermediate null, non-orthogonal contrasts are serially
|
|
152
|
+
orthogonalised in the order specified, possibly generating new
|
|
153
|
+
contrasts, such that the second is orthogonal to the first, the third
|
|
154
|
+
to the first two, and so on. Note that significant inference on the
|
|
155
|
+
global null only allows one to conclude that one or more of the effects
|
|
156
|
+
are real. Significant inference on the conjunction null allows one to
|
|
157
|
+
conclude that all of the effects are real.
|
|
158
|
+
|
|
159
|
+
Masking simply eliminates voxels from the current contrast if they
|
|
160
|
+
do not survive an uncorrected p value (based on height) in one or
|
|
161
|
+
more further contrasts. No account is taken of this masking in the
|
|
162
|
+
statistical inference pertaining to the masked contrast.
|
|
163
|
+
|
|
164
|
+
The SPM is subject to thresholding on the basis of height (u) and the
|
|
165
|
+
number of voxels comprising its clusters {k}. The height threshold is
|
|
166
|
+
specified as above in terms of an [un]corrected p value or
|
|
167
|
+
statistic. Clusters can also be thresholded on the basis of their
|
|
168
|
+
spatial extent. If you want to see all voxels simply enter 0. In this
|
|
169
|
+
instance the 'set-level' inference can be considered an 'omnibus test'
|
|
170
|
+
based on the number of clusters that obtain.
|
|
171
|
+
|
|
172
|
+
BAYESIAN INFERENCE AND PPMS - POSTERIOR PROBABILITY MAPS
|
|
173
|
+
|
|
174
|
+
If conditional estimates are available (and your contrast is a T
|
|
175
|
+
contrast) then you are asked whether the inference should be 'Bayesian'
|
|
176
|
+
or 'classical' (using GRF). If you choose Bayesian the contrasts are of
|
|
177
|
+
conditional (i.e. MAP) estimators and the inference image is a
|
|
178
|
+
posterior probability map (PPM). PPMs encode the probability that the
|
|
179
|
+
contrast exceeds a specified threshold. This threshold is stored in
|
|
180
|
+
the xCon.eidf. Subsequent plotting and tables will use the conditional
|
|
181
|
+
estimates and associated posterior or conditional probabilities.
|
|
182
|
+
|
|
183
|
+
see spm_results_ui.m for further details of the SPM results section.
|
|
184
|
+
see also spm_contrasts.m
|
|
185
|
+
__________________________________________________________________________
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_getSPM.m )
|
|
189
|
+
|
|
190
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
191
|
+
"""
|
|
192
|
+
return Runtime.call("spm_getSPM", *args, **kwargs)
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_get_anatomical_layout(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Produce anatomically valid 2D representation of 3D sensor positions
|
|
7
|
+
FORMAT [lay] = spm_get_anatomical_layout(sensor_positions, sensor_labels, head_positions, fiducials, plot_output)
|
|
8
|
+
|
|
9
|
+
Input Parameters:
|
|
10
|
+
sensor_positions: An nx3 matrix representing the 3D Cartesian
|
|
11
|
+
coordinates (x, y, z) of n sensors.
|
|
12
|
+
sensor_labels: An nx1 cell array containing labels for each sensor.
|
|
13
|
+
head_positions: An mx3 matrix representing the coordinates of
|
|
14
|
+
positions on the head.
|
|
15
|
+
fiducials: Struct containing coordinates of fiducials.
|
|
16
|
+
fiducials.NAS = [1 x 3]
|
|
17
|
+
fiducials.LPA = [1 x 3]
|
|
18
|
+
fiducials.RPA = [1 x 3]
|
|
19
|
+
fiducials.INI = [1 x 3] - Optional
|
|
20
|
+
Note, if fiducials.INI is not specified it will be
|
|
21
|
+
estimated.
|
|
22
|
+
plot_output: A logical value indicating whether to generate a
|
|
23
|
+
plot of measurements taken in 3D, as well as the
|
|
24
|
+
output layout.
|
|
25
|
+
|
|
26
|
+
Output:
|
|
27
|
+
lay: A structure representing the anatomical sensor layout in the
|
|
28
|
+
FieldTrip style. It contains the following fields:
|
|
29
|
+
lay.pos: A nx2 matrix representing the 2D coordinates of the
|
|
30
|
+
sensors in the layout. Each column contains the
|
|
31
|
+
[x, y] coordinates of a sensor relative to the
|
|
32
|
+
vertex (Cz).
|
|
33
|
+
lay.label: A cell array containing labels for each sensor.
|
|
34
|
+
lay.outline: A cell array of matrices representing the 2D
|
|
35
|
+
coordinates of the head surface outline, ears and
|
|
36
|
+
nose.
|
|
37
|
+
lay.mask: A cell array containing a matrix of positions which
|
|
38
|
+
draw a convex hull around lay.pos to mask grid
|
|
39
|
+
positions which would otherwise be extrapolated to
|
|
40
|
+
when plotting.
|
|
41
|
+
To allow extrapolation to a full circle, try:
|
|
42
|
+
lay.mask{1} = lay.outline{1}.
|
|
43
|
+
__________________________________________________________________________
|
|
44
|
+
|
|
45
|
+
Further help:
|
|
46
|
+
|
|
47
|
+
spm_get_anatomical_layout is a function that defines the scalp surface
|
|
48
|
+
according to the approximate polar grid used to place electrodes in the
|
|
49
|
+
10-20 system. The method then measures the position of on-scalp sensors
|
|
50
|
+
in relation to this polar grid (angle and eccentricity) and applies this
|
|
51
|
+
to a standard 2D polar grid. For full details see Alexander et al (in
|
|
52
|
+
preparation).
|
|
53
|
+
|
|
54
|
+
The function performs the following steps:
|
|
55
|
+
|
|
56
|
+
Get Anterior-Posterior and Left-Right Vectors:
|
|
57
|
+
Vectors defining the anterior-posterior and left-right directions on
|
|
58
|
+
the head surface are calculated. The vertex (Cz) position on the head
|
|
59
|
+
is then estimated, such that, for measurements taken across the scalp,
|
|
60
|
+
vertex->left, vertex->right are of equal length and vertex->anterior,
|
|
61
|
+
vertex-posterior are of equal lengths.
|
|
62
|
+
|
|
63
|
+
Create the approximate polar grid across the scalp.
|
|
64
|
+
Lines across the scalp are made based on the vectors described above.
|
|
65
|
+
These lines are then shortened according to the 10-20 method to
|
|
66
|
+
produce a grid with Fz, Oz, T3, T4 positions are the periphery. The
|
|
67
|
+
circumference around these points is then defined.
|
|
68
|
+
|
|
69
|
+
Define Sensor Position Relative to Cz:
|
|
70
|
+
Sensor positions are projected onto the scalp surface and their
|
|
71
|
+
position in relation to the vertex and circumference are defined.
|
|
72
|
+
Specifically, the distance from Cz to projected sensor position
|
|
73
|
+
relative to the distance from Cz to the circumference along the same
|
|
74
|
+
axis is taken. The relative distance from the point this axis crosses
|
|
75
|
+
the circumference to the nearest peripheral landmarks (e.g. Fz, T3)
|
|
76
|
+
determines the angle.
|
|
77
|
+
|
|
78
|
+
Define Sensor Position on a 2D Circle:
|
|
79
|
+
Using the eccentricity and angle measurements from the previous step,
|
|
80
|
+
the position of each sensor is reproduced on a 2D polar grid. This is
|
|
81
|
+
then formatted as a FieldTrip style layout structure with a nose,
|
|
82
|
+
ears, outline and mask.
|
|
83
|
+
_________________________________________________________________________
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_get_anatomical_layout.m )
|
|
87
|
+
|
|
88
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
89
|
+
"""
|
|
90
|
+
return Runtime.call("spm_get_anatomical_layout", *args, **kwargs)
|
spm/spm_get_bbox.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_get_bbox(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Compute volume's bounding box, for full field of view or object bounds
|
|
7
|
+
FORMAT [BB,vx] = spm_get_bbox(V, thr)
|
|
8
|
+
V - mapped image volume(s) (from spm_vol) or filename (empty for GUI)
|
|
9
|
+
thr - threshold, such that BB contains voxels with intensities > thr
|
|
10
|
+
or strings 'nz', 'nn', fv', for non-zero, non-NaN, or field of view
|
|
11
|
+
where 'fv' (the default) uses only the image's header information.
|
|
12
|
+
|
|
13
|
+
BB - a [2 x 3] array of the min and max X, Y, and Z coordinates {mm},
|
|
14
|
+
i.e. BB = [minX minY minZ; maxX maxY maxZ].
|
|
15
|
+
vx - a [1 x 3] vector of voxel dimensions {mm}.
|
|
16
|
+
__________________________________________________________________________
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_get_bbox.m )
|
|
20
|
+
|
|
21
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
22
|
+
"""
|
|
23
|
+
return Runtime.call("spm_get_bbox", *args, **kwargs)
|
spm/spm_get_bf.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_get_bf(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Fill in basis function structure
|
|
7
|
+
FORMAT [xBF] = spm_get_bf(xBF)
|
|
8
|
+
|
|
9
|
+
xBF.dt - time bin length {seconds}
|
|
10
|
+
xBF.name - description of basis functions specified
|
|
11
|
+
'hrf'
|
|
12
|
+
'hrf (with time derivative)'
|
|
13
|
+
'hrf (with time and dispersion derivatives)'
|
|
14
|
+
'Fourier set'
|
|
15
|
+
'Fourier set (Hanning)'
|
|
16
|
+
'Gamma functions'
|
|
17
|
+
'Finite Impulse Response'
|
|
18
|
+
'Cosine set'
|
|
19
|
+
(any other specification will default to 'hrf')
|
|
20
|
+
xBF.length - window length (seconds)
|
|
21
|
+
xBF.order - order
|
|
22
|
+
xBF.T - microtime resolution (for 'hrf*')
|
|
23
|
+
|
|
24
|
+
xBF.bf - array of basis functions
|
|
25
|
+
__________________________________________________________________________
|
|
26
|
+
|
|
27
|
+
spm_get_bf prompts for basis functions to model event or epoch-related
|
|
28
|
+
responses. The basis functions returned are unitary and orthonormal
|
|
29
|
+
when defined as a function of peri-stimulus time in time-bins.
|
|
30
|
+
It is at this point that the distinction between event and epoch-related
|
|
31
|
+
responses enters.
|
|
32
|
+
__________________________________________________________________________
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_get_bf.m )
|
|
36
|
+
|
|
37
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
38
|
+
"""
|
|
39
|
+
return Runtime.call("spm_get_bf", *args, **kwargs)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_get_closest_affine(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Determine the affine transform mapping x to y
|
|
7
|
+
FORMAT [M,R] = spm_get_closest_affine(X,Y,W)
|
|
8
|
+
X - n1*n2*n3*3 array of floats representing coordinates.
|
|
9
|
+
Y - n1*n2*n3*3 array of floats representing coordinates.
|
|
10
|
+
W - n1*n2*n3 array of floats representing weights.
|
|
11
|
+
|
|
12
|
+
M - an affine transform
|
|
13
|
+
R - a rigid-body transform
|
|
14
|
+
|
|
15
|
+
The code treats X and Y as reshaped versions (n1*n2*n3) x 3,
|
|
16
|
+
and W as a column vector.
|
|
17
|
+
|
|
18
|
+
It generates XX = [X 1]'*diag(W)*[X 1]
|
|
19
|
+
and XY = [X 1]'*diag(W)*[Y 1]
|
|
20
|
+
|
|
21
|
+
These can then be used to compute an affine transform (M),
|
|
22
|
+
by M = (XX\XY)'
|
|
23
|
+
A weighted procrustes decomposition is also performed,
|
|
24
|
+
so that a rigid-body transform matrix (R) is returned.
|
|
25
|
+
|
|
26
|
+
If W is empty or not passed, then it is assumed to be all ones.
|
|
27
|
+
__________________________________________________________________________
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_get_closest_affine.m )
|
|
31
|
+
|
|
32
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
33
|
+
"""
|
|
34
|
+
return Runtime.call("spm_get_closest_affine", *args, **kwargs)
|
spm/spm_get_data.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_get_data(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Get data from image files at specified locations
|
|
7
|
+
FORMAT [Y] = spm_get_data(V,XYZ,check)
|
|
8
|
+
|
|
9
|
+
V - [1 x n] struct array of file handles (or filename matrix)
|
|
10
|
+
XYZ - [3 x m] or [4 x m] location matrix {voxel}
|
|
11
|
+
check - check validity of input parameters [default: true]
|
|
12
|
+
|
|
13
|
+
Y - [n x m] double values
|
|
14
|
+
|
|
15
|
+
See also spm_sample_vol
|
|
16
|
+
__________________________________________________________________________
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_get_data.m )
|
|
20
|
+
|
|
21
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
22
|
+
"""
|
|
23
|
+
return Runtime.call("spm_get_data", *args, **kwargs)
|
spm/spm_get_dataset.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_get_dataset(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Download a dataset from an online repository
|
|
7
|
+
FORMAT spm_get_dataset(repo, name, outdir)
|
|
8
|
+
repo - name of repository, one of ['spm', 'openfmri']
|
|
9
|
+
name - name of dataset, e.g. 'auditory' or 'ds000117'
|
|
10
|
+
rev - revision of dataset [default: '']
|
|
11
|
+
outdir - output directory [default: pwd]
|
|
12
|
+
__________________________________________________________________________
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_get_dataset.m )
|
|
16
|
+
|
|
17
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
18
|
+
"""
|
|
19
|
+
return Runtime.call("spm_get_dataset", *args, **kwargs, nargout=0)
|
spm/spm_get_defaults.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_get_defaults(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Get/set the defaults values associated with an identifier
|
|
7
|
+
FORMAT defaults = spm_get_defaults
|
|
8
|
+
Return the global "defaults" variable defined in spm_defaults.m.
|
|
9
|
+
|
|
10
|
+
FORMAT defval = spm_get_defaults(defstr)
|
|
11
|
+
Return the defaults value associated with identifier "defstr".
|
|
12
|
+
Currently, this is a '.' subscript reference into the global
|
|
13
|
+
"defaults" variable defined in spm_defaults.m.
|
|
14
|
+
|
|
15
|
+
FORMAT spm_get_defaults(defstr, defval)
|
|
16
|
+
Set the defaults value associated with identifier "defstr" to defval.
|
|
17
|
+
The new defaults value applies immediately to:
|
|
18
|
+
* new modules in batch jobs
|
|
19
|
+
* modules in batch jobs that have not been saved yet
|
|
20
|
+
This value will not be saved for future sessions of SPM. To make
|
|
21
|
+
persistent changes, see help section in spm_defaults.m.
|
|
22
|
+
__________________________________________________________________________
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_get_defaults.m )
|
|
26
|
+
|
|
27
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
28
|
+
"""
|
|
29
|
+
return Runtime.call("spm_get_defaults", *args, **kwargs)
|