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_hilbert.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_hilbert(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Computes analytic signal
|
|
7
|
+
FORMAT [x] = spm_hilbert(xr)
|
|
8
|
+
|
|
9
|
+
Returns analytic signal x = xr + i*xi such that xi is the Hilbert
|
|
10
|
+
transform of real vector xr.
|
|
11
|
+
__________________________________________________________________________
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_hilbert.m )
|
|
15
|
+
|
|
16
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
17
|
+
"""
|
|
18
|
+
return Runtime.call("spm_hilbert", *args, **kwargs)
|
spm/spm_hist.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_hist(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Generate a weighted histogram - a compiled routine
|
|
7
|
+
FORMAT h = spm_hist(ind,val)
|
|
8
|
+
ind - indices (unsigned byte)
|
|
9
|
+
val - weights
|
|
10
|
+
__________________________________________________________________________
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_hist.m )
|
|
14
|
+
|
|
15
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
16
|
+
"""
|
|
17
|
+
return Runtime.call("spm_hist", *args, **kwargs)
|
spm/spm_hist2.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_hist2(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Create 2D scatter-plot of two images after affine transformation
|
|
7
|
+
FORMAT H = spm_hist2(G,F,M,s)
|
|
8
|
+
G - unsigned 8 bit 3D array representing the first volume
|
|
9
|
+
F - unsigned 8 bit 3D array representing the second volume
|
|
10
|
+
M - the affine transformation matrix so that G(x) is plotted
|
|
11
|
+
against F(x)
|
|
12
|
+
s - 3 element vector representing the sampling density (in voxels).
|
|
13
|
+
A value of [1 1 1] means that approximately all voxels are
|
|
14
|
+
sampled, whereas [4 4 4] means that only 1 in 64 voxels are
|
|
15
|
+
sampled.
|
|
16
|
+
|
|
17
|
+
This function is called by spm_coreg for rapidly computing joint
|
|
18
|
+
histograms for mutual information image registration.
|
|
19
|
+
|
|
20
|
+
Note that the function jitters the sampling of the data to reduce
|
|
21
|
+
interpolation artifacts.
|
|
22
|
+
__________________________________________________________________________
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_hist2.m )
|
|
26
|
+
|
|
27
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
28
|
+
"""
|
|
29
|
+
return Runtime.call("spm_hist2", *args, **kwargs)
|
spm/spm_hist_smooth.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_hist_smooth(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Histogram smoothing (graph Laplacian)
|
|
7
|
+
FORMAT x = spm_hist_smooth(x,s)
|
|
8
|
+
x - data vector
|
|
9
|
+
s - smoothing
|
|
10
|
+
__________________________________________________________________________
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_hist_smooth.m )
|
|
14
|
+
|
|
15
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
16
|
+
"""
|
|
17
|
+
return Runtime.call("spm_hist_smooth", *args, **kwargs)
|
spm/spm_hrf.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_hrf(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Haemodynamic response function
|
|
7
|
+
FORMAT [hrf,p] = spm_hrf(RT,p,T)
|
|
8
|
+
RT - scan repeat time
|
|
9
|
+
p - parameters of the response function (two Gamma functions)
|
|
10
|
+
|
|
11
|
+
defaults
|
|
12
|
+
{seconds}
|
|
13
|
+
p(1) - delay of response (relative to onset) 6
|
|
14
|
+
p(2) - delay of undershoot (relative to onset) 16
|
|
15
|
+
p(3) - dispersion of response 1
|
|
16
|
+
p(4) - dispersion of undershoot 1
|
|
17
|
+
p(5) - ratio of response to undershoot 6
|
|
18
|
+
p(6) - onset {seconds} 0
|
|
19
|
+
p(7) - length of kernel {seconds} 32
|
|
20
|
+
|
|
21
|
+
T - microtime resolution [Default: 16]
|
|
22
|
+
|
|
23
|
+
hrf - haemodynamic response function
|
|
24
|
+
p - parameters of the response function
|
|
25
|
+
__________________________________________________________________________
|
|
26
|
+
|
|
27
|
+
The parameters p(1:4) correspond to the shape and scale parameters of two
|
|
28
|
+
probability density functions of the Gamma distribution (see spm_Gpdf.m),
|
|
29
|
+
one corresponding to the main response and the other one to the
|
|
30
|
+
undershoot.
|
|
31
|
+
Note that the mean of the Gamma distribution is shape*scale and its mode
|
|
32
|
+
is (shape-1)*scale. This means that with the default values of the
|
|
33
|
+
parameters the peak of the heamodynamic response function will be around
|
|
34
|
+
5 seconds.
|
|
35
|
+
__________________________________________________________________________
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_hrf.m )
|
|
39
|
+
|
|
40
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
41
|
+
"""
|
|
42
|
+
return Runtime.call("spm_hrf", *args, **kwargs)
|
spm/spm_image.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_image(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Image and header display
|
|
7
|
+
FORMAT spm_image
|
|
8
|
+
FORMAT spm_image('Display',fname)
|
|
9
|
+
__________________________________________________________________________
|
|
10
|
+
|
|
11
|
+
spm_image is an interactive facility that allows orthogonal sections from
|
|
12
|
+
an image volume to be displayed. Clicking the cursor on either of the
|
|
13
|
+
three images moves the point around which the orthogonal sections are
|
|
14
|
+
viewed. The coordinates of the cursor are shown both in voxel
|
|
15
|
+
coordinates and millimeters within some fixed framework. The intensity
|
|
16
|
+
at that point in the image (sampled using the current interpolation
|
|
17
|
+
scheme) is also given. The position of the crosshairs can also be moved
|
|
18
|
+
by specifying the coordinates in millimeters to which they should be
|
|
19
|
+
moved. Clicking on the 'Origin' button will move the cursor back to the
|
|
20
|
+
origin (analogous to setting the crosshair position (in mm) to [0 0 0]).
|
|
21
|
+
|
|
22
|
+
The images can be re-oriented by entering appropriate translations,
|
|
23
|
+
rotations and zooms into the panel on the left. The transformations can
|
|
24
|
+
then be saved by hitting the 'Reorient...' button. The transformations
|
|
25
|
+
that were applied to the image are saved to the header information of the
|
|
26
|
+
selected images. The transformations are considered to be relative to
|
|
27
|
+
any existing transformations that may be stored. Note that the order that
|
|
28
|
+
the transformations are applied in is the same as in spm_matrix.m.
|
|
29
|
+
Clicking on the 'Set Origin' button will apply the appropriate
|
|
30
|
+
translation to the image such that the origin ([0 0 0] (in mm)) will be
|
|
31
|
+
set to the current location of the crosshair. To save the transformation
|
|
32
|
+
you need to click the 'Reorient...' button.
|
|
33
|
+
|
|
34
|
+
The right panel shows miscellaneous information about the image.
|
|
35
|
+
This includes:
|
|
36
|
+
Dimensions - the x, y and z dimensions of the image.
|
|
37
|
+
Datatype - the computer representation of each voxel.
|
|
38
|
+
Intensity - scalefactors and possibly a DC offset.
|
|
39
|
+
Miscellaneous other information about the image.
|
|
40
|
+
Vox size - the distance (in mm) between the centres of
|
|
41
|
+
neighbouring voxels.
|
|
42
|
+
Origin - the voxel at the origin of the coordinate system
|
|
43
|
+
Dir Cos - Direction cosines. This is a widely used representation
|
|
44
|
+
of the orientation of an image.
|
|
45
|
+
|
|
46
|
+
There are also a few options for different resampling modes, zooms etc.
|
|
47
|
+
You can also flip between voxel space or world space. If you are
|
|
48
|
+
re-orienting the images, make sure that world space is specified. SPM{.}
|
|
49
|
+
or images can be superimposed and the intensity windowing can also be
|
|
50
|
+
changed.
|
|
51
|
+
__________________________________________________________________________
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_image.m )
|
|
55
|
+
|
|
56
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
57
|
+
"""
|
|
58
|
+
return Runtime.call("spm_image", *args, **kwargs, nargout=0)
|
spm/spm_imatrix.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_imatrix(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Return the parameters for creating an affine transformation matrix
|
|
7
|
+
FORMAT P = spm_imatrix(M)
|
|
8
|
+
M - Affine transformation matrix
|
|
9
|
+
P - Parameters (see spm_matrix for definitions)
|
|
10
|
+
__________________________________________________________________________
|
|
11
|
+
|
|
12
|
+
See also: spm_matrix.m
|
|
13
|
+
__________________________________________________________________________
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_imatrix.m )
|
|
17
|
+
|
|
18
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
19
|
+
"""
|
|
20
|
+
return Runtime.call("spm_imatrix", *args, **kwargs)
|
spm/spm_imcalc.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_imcalc(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Perform algebraic functions on images
|
|
7
|
+
FORMAT Vo = spm_imcalc(Vi, Vo, f [,flags [,extra_vars...]])
|
|
8
|
+
Vi - struct array (from spm_vol) of images to work on
|
|
9
|
+
or a char array of input image filenames
|
|
10
|
+
Vo (input) - struct array (from spm_vol) containing information on
|
|
11
|
+
output image
|
|
12
|
+
( pinfo field is computed for the resultant image data, )
|
|
13
|
+
( and can be omitted from Vo on input. See spm_vol )
|
|
14
|
+
or output image filename
|
|
15
|
+
f - MATLAB expression to be evaluated
|
|
16
|
+
flags - cell array of flags: {dmtx,mask,interp,dtype,descrip}
|
|
17
|
+
or structure with these fieldnames
|
|
18
|
+
dmtx - read images into data matrix?
|
|
19
|
+
[defaults (missing or empty) to 0 - no]
|
|
20
|
+
mask - implicit zero mask?
|
|
21
|
+
[defaults (missing or empty) to 0 - no]
|
|
22
|
+
( negative value implies NaNs should be zeroed )
|
|
23
|
+
interp - interpolation hold (see spm_slice_vol)
|
|
24
|
+
[defaults (missing or empty) to 0 - nearest neighbour]
|
|
25
|
+
dtype - data type for output image (see spm_type)
|
|
26
|
+
[defaults (missing or empty) to 4 - 16 bit signed shorts]
|
|
27
|
+
descrip - content of the 'descrip' field of the NIfTI header
|
|
28
|
+
[defaults (missing or empty) to 'spm - algebra']
|
|
29
|
+
extra_vars... - additional variables which can be used in expression
|
|
30
|
+
|
|
31
|
+
Vo (output) - spm_vol structure of output image volume after
|
|
32
|
+
modifications for writing
|
|
33
|
+
__________________________________________________________________________
|
|
34
|
+
|
|
35
|
+
spm_imcalc performs user-specified algebraic manipulations on a set of
|
|
36
|
+
images, with the result being written out as an image.
|
|
37
|
+
The images specified in Vi, are referred to as i1, i2, i3,... in the
|
|
38
|
+
expression to be evaluated, unless the dmtx flag is setm in which
|
|
39
|
+
case the images are read into a data matrix X, with images in rows.
|
|
40
|
+
|
|
41
|
+
Computation is plane by plane, so in data-matrix mode, X is a NxK
|
|
42
|
+
matrix, where N is the number of input images [prod(size(Vi))], and K
|
|
43
|
+
is the number of voxels per plane [prod(Vi(1).dim(1:2))].
|
|
44
|
+
|
|
45
|
+
For data types without a representation of NaN, implicit zero masking
|
|
46
|
+
assumes that all zero voxels are to be treated as missing, and treats
|
|
47
|
+
them as NaN. NaN's are written as zero, for data types without a
|
|
48
|
+
representation of NaN.
|
|
49
|
+
|
|
50
|
+
With images of different sizes and orientations, the size and orientation
|
|
51
|
+
of the reference image is used. Reference is the first image, if
|
|
52
|
+
Vo (input) is a filename, otherwise reference is Vo (input). A
|
|
53
|
+
warning is given in this situation. Images are sampled into this
|
|
54
|
+
orientation using the interpolation specified by the interp parameter.
|
|
55
|
+
__________________________________________________________________________
|
|
56
|
+
|
|
57
|
+
Example expressions (f):
|
|
58
|
+
|
|
59
|
+
i) Mean of six images (select six images)
|
|
60
|
+
f = '(i1+i2+i3+i4+i5+i6)/6'
|
|
61
|
+
ii) Make a binary mask image at threshold of 100
|
|
62
|
+
f = 'i1>100'
|
|
63
|
+
iii) Make a mask from one image and apply to another
|
|
64
|
+
f = '(i1>100).*i2'
|
|
65
|
+
(here the first image is used to make the mask, which is applied
|
|
66
|
+
to the second image - note the '.*' operator)
|
|
67
|
+
iv) Sum of n images
|
|
68
|
+
f = 'i1 + i2 + i3 + i4 + i5 + ...'
|
|
69
|
+
v) Sum of n images (when reading data into data-matrix)
|
|
70
|
+
f = 'sum(X)'
|
|
71
|
+
vi) Mean of n images (when reading data into data-matrix)
|
|
72
|
+
f = 'mean(X)'
|
|
73
|
+
__________________________________________________________________________
|
|
74
|
+
|
|
75
|
+
Furthermore, additional variables for use in the computation can be
|
|
76
|
+
passed at the end of the argument list. These should be referred to by
|
|
77
|
+
the names of the arguments passed in the expression to be evaluated.
|
|
78
|
+
E.g. if c is a 1xn vector of weights, then for n images, using the (dmtx)
|
|
79
|
+
data-matrix version, the weighted sum can be computed using:
|
|
80
|
+
Vi = spm_vol(spm_select(inf,'image'));
|
|
81
|
+
Vo = 'output.nii'
|
|
82
|
+
Q = spm_imcalc(Vi,Vo,'c*X',{1},c)
|
|
83
|
+
Here we've pre-specified the expression and passed the vector c as an
|
|
84
|
+
additional variable (you'll be prompted to select the n images).
|
|
85
|
+
__________________________________________________________________________
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_imcalc.m )
|
|
89
|
+
|
|
90
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
91
|
+
"""
|
|
92
|
+
return Runtime.call("spm_imcalc", *args, **kwargs)
|
spm/spm_ind2sub.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_ind2sub(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
IND2SUB Multiple subscripts from linear index.
|
|
7
|
+
IND2SUB is used to determine the equivalent subscript values
|
|
8
|
+
corresponding to a given single index into an array.
|
|
9
|
+
|
|
10
|
+
[I,J] = IND2SUB(SIZ,IND) returns the arrays I and J containing the
|
|
11
|
+
equivalent row and column subscripts corresponding to the index
|
|
12
|
+
matrix IND for a matrix of size SIZ.
|
|
13
|
+
For matrices, [I,J] = IND2SUB(SIZE(A),FIND(A>5)) returns the same
|
|
14
|
+
values as [I,J] = FIND(A>5).
|
|
15
|
+
|
|
16
|
+
[I1,I2,I3,...,In] = IND2SUB(SIZ,IND) returns N subscript arrays
|
|
17
|
+
I1,I2,..,In containing the equivalent N-D array subscripts
|
|
18
|
+
equivalent to IND for an array of size SIZ.
|
|
19
|
+
|
|
20
|
+
Class support for input IND:
|
|
21
|
+
float: double, single
|
|
22
|
+
integer: uint8, int8, uint16, int16, uint32, int32, uint64, int64
|
|
23
|
+
|
|
24
|
+
See also SUB2IND, FIND.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_ind2sub.m )
|
|
28
|
+
|
|
29
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
30
|
+
"""
|
|
31
|
+
return Runtime.call("spm_ind2sub", *args, **kwargs)
|
spm/spm_inline2func.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_inline2func(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Convert an inline object to a function handle
|
|
7
|
+
FORMAT [h] = spm_inline2func(f)
|
|
8
|
+
__________________________________________________________________________
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_inline2func.m )
|
|
12
|
+
|
|
13
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
14
|
+
"""
|
|
15
|
+
return Runtime.call("spm_inline2func", *args, **kwargs)
|
spm/spm_input.py
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_input(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Comprehensive graphical and command line input function
|
|
7
|
+
FORMATs (given in Programmers Help)
|
|
8
|
+
_______________________________________________________________________
|
|
9
|
+
|
|
10
|
+
spm_input handles most forms of interactive user input for SPM.
|
|
11
|
+
(File selection is handled by spm_select.m)
|
|
12
|
+
|
|
13
|
+
There are five types of input: String, Evaluated, Conditions, Buttons
|
|
14
|
+
and Menus: These prompt for string input; string input which is
|
|
15
|
+
evaluated to give a numerical result; selection of one item from a
|
|
16
|
+
set of buttons; selection of an item from a menu.
|
|
17
|
+
|
|
18
|
+
- STRING, EVALUATED & CONDITION input -
|
|
19
|
+
For STRING, EVALUATED and CONDITION input types, a prompt is
|
|
20
|
+
displayed adjacent to an editable text entry widget (with a lilac
|
|
21
|
+
background!). Clicking in the entry widget allows editing, pressing
|
|
22
|
+
<RETURN> or <ENTER> enters the result. You must enter something,
|
|
23
|
+
empty answers are not accepted. A default response may be pre-specified
|
|
24
|
+
in the entry widget, which will then be outlined. Clicking the border
|
|
25
|
+
accepts the default value.
|
|
26
|
+
|
|
27
|
+
Basic editing of the entry widget is supported *without* clicking in
|
|
28
|
+
the widget, provided no other graphics widget has the focus. (If a
|
|
29
|
+
widget has the focus, it is shown highlighted with a thin coloured
|
|
30
|
+
line. Clicking on the window background returns the focus to the
|
|
31
|
+
window, enabling keyboard accelerators.). This enables you to type
|
|
32
|
+
responses to a sequence of questions without having to repeatedly
|
|
33
|
+
click the mouse in the text widgets. Supported are BackSpace and
|
|
34
|
+
Delete, line kill (^U). Other standard ASCII characters are appended
|
|
35
|
+
to the text in the entry widget. Press <RETURN> or <ENTER> to submit
|
|
36
|
+
your response.
|
|
37
|
+
|
|
38
|
+
A ContextMenu is provided (in the figure background) giving access to
|
|
39
|
+
relevant utilities including the facility to load input from a file
|
|
40
|
+
(see spm_load.m and examples given below): Click the right button on
|
|
41
|
+
the figure background.
|
|
42
|
+
|
|
43
|
+
For EVALUATED input, the string submitted is evaluated in the base
|
|
44
|
+
MatLab workspace (see MatLab's `eval` command) to give a numerical
|
|
45
|
+
value. This permits the entry of numerics, matrices, expressions,
|
|
46
|
+
functions or workspace variables. I.e.:
|
|
47
|
+
i) - a number, vector or matrix e.g. "[1 2 3 4]"
|
|
48
|
+
"[1:4]"
|
|
49
|
+
"1:4"
|
|
50
|
+
ii) - an expression e.g. "pi^2"
|
|
51
|
+
"exp(-[1:36]/5.321)"
|
|
52
|
+
iii) - a function (that will be invoked) e.g. "spm_load('tmp.dat')"
|
|
53
|
+
(function must be on MATLABPATH) "input_cov(36,5.321)"
|
|
54
|
+
iv) - a variable from the base workspace
|
|
55
|
+
e.g. "tmp"
|
|
56
|
+
|
|
57
|
+
The last three options provide a great deal of power: spm_load will
|
|
58
|
+
load a matrix from an ASCII data file and return the results. When
|
|
59
|
+
called without an argument, spm_load will pop up a file selection
|
|
60
|
+
dialog. Alternatively, this facility can be gained from the
|
|
61
|
+
ContextMenu. The second example assumes a custom function called
|
|
62
|
+
input_cov has been written which expects two arguments, for example
|
|
63
|
+
the following file saved as input_cov.m somewhere on the MATLABPATH
|
|
64
|
+
(~/matlab, the matlab subdirectory of your home area, and the current
|
|
65
|
+
directory, are on the MATLABPATH by default):
|
|
66
|
+
|
|
67
|
+
function [x] = input_cov(n,decay)
|
|
68
|
+
% data input routine - mono-exponential covariate
|
|
69
|
+
% FORMAT [x] = input_cov(n,decay)
|
|
70
|
+
% n - number of time points
|
|
71
|
+
% decay - decay constant
|
|
72
|
+
x = exp(-[1:n]/decay);
|
|
73
|
+
|
|
74
|
+
Although this example is trivial, specifying large vectors of
|
|
75
|
+
empirical data (e.g. reaction times for 72 scans) is efficient and
|
|
76
|
+
reliable using this device. In the last option, a variable called tmp
|
|
77
|
+
is picked up from the base workspace. To use this method, set the
|
|
78
|
+
variables in the MatLab base workspace before starting an SPM
|
|
79
|
+
procedure (but after starting the SPM interface). E.g.
|
|
80
|
+
>> tmp=exp(-[1:36]/5.321)
|
|
81
|
+
|
|
82
|
+
Occasionally a vector of a specific length will be required: This
|
|
83
|
+
will be indicated in the prompt, which will start with "[#]", where
|
|
84
|
+
# is the length of vector(s) required. (If a matrix is entered then
|
|
85
|
+
at least one dimension should equal #.)
|
|
86
|
+
|
|
87
|
+
Occasionally a specific type of number will be required. This should
|
|
88
|
+
be obvious from the context. If you enter a number of the wrong type,
|
|
89
|
+
you'll be alerted and asked to re-specify. The types are i) Real
|
|
90
|
+
numbers; ii) Integers; iii) Whole numbers [0,1,2,3,...] & iv) Natural
|
|
91
|
+
numbers [1,2,3,...]
|
|
92
|
+
|
|
93
|
+
CONDITIONS type input is for getting indicator vectors. The features
|
|
94
|
+
of evaluated input described above are complimented as follows:
|
|
95
|
+
v) - a compressed list of digits 0-9 e.g. "12121212"
|
|
96
|
+
ii) - a list of indicator characters e.g. "abababab"
|
|
97
|
+
a-z mapped to 1-26 in alphabetical order, *except* r ("rest")
|
|
98
|
+
which is mapped to zero (case insensitive, [A:Z,a:z] only)
|
|
99
|
+
...in addition the response is checked to ensure integer condition indices.
|
|
100
|
+
Occasionally a specific number of conditions will be required: This
|
|
101
|
+
will be indicated in the prompt, which will end with (#), where # is
|
|
102
|
+
the number of conditions required.
|
|
103
|
+
|
|
104
|
+
CONTRAST type input is for getting contrast weight vectors. Enter
|
|
105
|
+
contrasts as row-vectors. Contrast weight vectors will be padded with
|
|
106
|
+
zeros to the correct length, and checked for validity. (Valid
|
|
107
|
+
contrasts are estimable, which are those whose weights vector is in
|
|
108
|
+
the row-space of the design matrix.)
|
|
109
|
+
|
|
110
|
+
Errors in string evaluation for EVALUATED & CONDITION types are
|
|
111
|
+
handled gracefully, the user notified, and prompted to re-enter.
|
|
112
|
+
|
|
113
|
+
- BUTTON input -
|
|
114
|
+
For Button input, the prompt is displayed adjacent to a small row of
|
|
115
|
+
buttons. Press the appropriate button. The default button (if
|
|
116
|
+
available) has a dark outline. Keyboard accelerators are available
|
|
117
|
+
(provided no graphics widget has the focus): <RETURN> or <ENTER>
|
|
118
|
+
selects the default button (if available). Typing the first character
|
|
119
|
+
of the button label (case insensitive) "presses" that button. (If
|
|
120
|
+
these Keys are not unique, then the integer keys 1,2,... "press" the
|
|
121
|
+
appropriate button.)
|
|
122
|
+
|
|
123
|
+
The CommandLine variant presents a simple menu of buttons and prompts
|
|
124
|
+
for a selection. Any default response is indicated, and accepted if
|
|
125
|
+
an empty line is input.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
- MENU input -
|
|
129
|
+
For Menu input, the prompt is displayed in a pull down menu widget.
|
|
130
|
+
Using the mouse, a selection is made by pulling down the widget and
|
|
131
|
+
releasing the mouse on the appropriate response. The default response
|
|
132
|
+
(if set) is marked with an asterisk. Keyboard accelerators are
|
|
133
|
+
available (provided no graphic widget has the focus) as follows: 'f',
|
|
134
|
+
'n' or 'd' move forward to next response down; 'b', 'p' or 'u' move
|
|
135
|
+
backwards to the previous response up the list; the number keys jump
|
|
136
|
+
to the appropriate response number; <RETURN> or <ENTER> slelects the
|
|
137
|
+
currently displayed response. If a default is available, then
|
|
138
|
+
pressing <RETURN> or <ENTER> when the prompt is displayed jumps to
|
|
139
|
+
the default response.
|
|
140
|
+
|
|
141
|
+
The CommandLine variant presents a simple menu and prompts for a selection.
|
|
142
|
+
Any default response is indicated, and accepted if an empty line is
|
|
143
|
+
input.
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
- Combination BUTTON/EDIT input -
|
|
147
|
+
In this usage, you will be presented with a set of buttons and an
|
|
148
|
+
editable text widget. Click one of the buttons to choose that option,
|
|
149
|
+
or type your response in the edit widget. Any default response will
|
|
150
|
+
be shown in the edit widget. The edit widget behaves in the same way
|
|
151
|
+
as with the STRING/EVALUATED input, and expects a single number.
|
|
152
|
+
Keypresses edit the text widget (rather than "press" the buttons)
|
|
153
|
+
(provided no other graphics widget has the focus). A default response
|
|
154
|
+
can be selected with the mouse by clicking the thick border of the
|
|
155
|
+
edit widget.
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
- Command line -
|
|
159
|
+
If YPos is 0 or global CMDLINE is true, then the command line is used.
|
|
160
|
+
Negative YPos overrides CMDLINE, ensuring the GUI is used, at
|
|
161
|
+
YPos=abs(YPos). Similarly relative YPos beginning with '!'
|
|
162
|
+
(E.g.YPos='!+1') ensures the GUI is used.
|
|
163
|
+
|
|
164
|
+
spm_input uses the SPM 'Interactive' window, which is 'Tag'ged
|
|
165
|
+
'Interactive'. If there is no such window, then the current figure is
|
|
166
|
+
used, or an 'Interactive' window created if no windows are open.
|
|
167
|
+
|
|
168
|
+
-----------------------------------------------------------------------
|
|
169
|
+
Programmers help is contained in the main body of spm_input.m
|
|
170
|
+
-----------------------------------------------------------------------
|
|
171
|
+
See : input.m (MatLab Reference Guide)
|
|
172
|
+
See also : spm_select.m (SPM file selector dialog)
|
|
173
|
+
: spm_input.m (Input wrapper function - handles batch mode)
|
|
174
|
+
_______________________________________________________________________
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_input.m )
|
|
178
|
+
|
|
179
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
180
|
+
"""
|
|
181
|
+
return Runtime.call("spm_input", *args, **kwargs)
|
spm/spm_int.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
from spm.__wrapper__ import Runtime
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def spm_int(*args, **kwargs):
|
|
5
|
+
"""
|
|
6
|
+
Integrate a MIMO bilinear system dx/dt = f(x,u) = A*x + B*x*u + Cu + D;
|
|
7
|
+
FORMAT [y] = spm_int(P,M,U)
|
|
8
|
+
P - model parameters
|
|
9
|
+
M - model structure
|
|
10
|
+
M.delays - sampling delays (s); a vector with a delay for each output
|
|
11
|
+
|
|
12
|
+
U - input structure or matrix
|
|
13
|
+
|
|
14
|
+
y - response y = g(x,u,P)
|
|
15
|
+
__________________________________________________________________________
|
|
16
|
+
Integrates the bilinear approximation to the MIMO system described by
|
|
17
|
+
|
|
18
|
+
dx/dt = f(x,u,P) = A*x + u*B*x + C*u + D
|
|
19
|
+
y = g(x,u,P) = L*x;
|
|
20
|
+
|
|
21
|
+
at v = M.ns is the number of samples [default v = size(U.u,1)]
|
|
22
|
+
|
|
23
|
+
spm_int will also handle static observation models by evaluating
|
|
24
|
+
g(x,u,P). It will also handle timing delays if specified in M.delays
|
|
25
|
+
|
|
26
|
+
--------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
SPM solvers or integrators
|
|
29
|
+
|
|
30
|
+
spm_int_ode: uses ode45 (or ode113) which are one and multi-step solvers
|
|
31
|
+
respectively. They can be used for any ODEs, where the Jacobian is
|
|
32
|
+
unknown or difficult to compute; however, they may be slow.
|
|
33
|
+
|
|
34
|
+
spm_int_J: uses an explicit Jacobian-based update scheme that preserves
|
|
35
|
+
nonlinearities in the ODE: dx = (expm(dt*J) - I)*inv(J)*f. If the
|
|
36
|
+
equations of motion return J = df/dx, it will be used; otherwise it is
|
|
37
|
+
evaluated numerically, using spm_diff at each time point. This scheme is
|
|
38
|
+
infallible but potentially slow, if the Jacobian is not available (calls
|
|
39
|
+
spm_dx).
|
|
40
|
+
|
|
41
|
+
spm_int_E: As for spm_int_J but uses the eigensystem of J(x(0)) to eschew
|
|
42
|
+
matrix exponentials and inversion during the integration. It is probably
|
|
43
|
+
the best compromise, if the Jacobian is not available explicitly.
|
|
44
|
+
|
|
45
|
+
spm_int_B: As for spm_int_J but uses a first-order approximation to J
|
|
46
|
+
based on J(x(t)) = J(x(0)) + dJdx*x(t).
|
|
47
|
+
|
|
48
|
+
spm_int_L: As for spm_int_B but uses J(x(0)).
|
|
49
|
+
|
|
50
|
+
spm_int_U: like spm_int_J but only evaluates J when the input changes.
|
|
51
|
+
This can be useful if input changes are sparse (e.g., boxcar functions).
|
|
52
|
+
It is used primarily for integrating EEG models
|
|
53
|
+
|
|
54
|
+
spm_int: Fast integrator that uses a bilinear approximation to the
|
|
55
|
+
Jacobian evaluated using spm_bireduce. This routine will also allow for
|
|
56
|
+
sparse sampling of the solution and delays in observing outputs. It is
|
|
57
|
+
used primarily for integrating fMRI models (see also spm_int_D)
|
|
58
|
+
__________________________________________________________________________
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
[Matlab code]( https://github.com/spm/spm/blob/main/spm_int.m )
|
|
62
|
+
|
|
63
|
+
Copyright (C) 2024-2024 Functional Imaging Laboratory, Department of Imaging Neuroscience, UCL
|
|
64
|
+
"""
|
|
65
|
+
return Runtime.call("spm_int", *args, **kwargs)
|