Skip to content

Commit dafa5e8

Browse files
committed
[ENH] Wrap spm 25.02 with new headers
1 parent b78c742 commit dafa5e8

3,983 files changed

Lines changed: 91625 additions & 90736 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

spm/__compat/__init__.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
from mpython import (
2+
MatlabClass,
3+
MatlabFunction,
4+
Cell,
5+
Struct,
6+
Array,
7+
SparseArray,
8+
)
9+
from ._runtime import Runtime
10+
from ._version import __version__
11+
112
from .loadxml import loadxml
213
from .savexml import savexml
314
from .spm_add import spm_add
@@ -20,6 +31,7 @@
2031
from .spm_tbx_config2cfg import spm_tbx_config2cfg
2132

2233

34+
2335
__all__ = [
2436
"loadxml",
2537
"savexml",
@@ -40,5 +52,5 @@
4052
"spm_read_hdr",
4153
"spm_resss",
4254
"spm_spm_ui",
43-
"spm_tbx_config2cfg",
55+
"spm_tbx_config2cfg"
4456
]

spm/__compat/loadxml.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
from mpython import Runtime
1+
from spm._runtime import Runtime
22

33

44
def loadxml(*args, **kwargs):
55
"""
6-
LOADXML Load workspace variables from disk (XML file).
7-
LOADXML FILENAME retrieves all variables from a file given a full
8-
pathname or a MATLABPATH relative partial pathname (see PARTIALPATH).
9-
If FILENAME has no extension LOAD looks for FILENAME and FILENAME.xml
10-
and treats it as an XML file.
11-
12-
LOAD, by itself, uses the XML file named 'matlab.xml'. It is an error
13-
if 'matlab.xml' is not found.
14-
15-
LOAD FILENAME X loads only X.
16-
LOAD FILENAME X Y Z ... loads just the specified variables. The
17-
wildcard '*' loads variables that match a pattern.
18-
Requested variables from FILENAME are created in the workspace.
19-
20-
S = LOAD(...) returns the contents of FILENAME in variable S. S is
21-
a struct containing fields matching the variables retrieved.
22-
23-
Use the functional form of LOAD, such as LOAD('filename'), when the
24-
file name is stored in a string, when an output argument is requested,
25-
or if FILENAME contains spaces.
26-
27-
See also LOAD, XML2MAT, XMLTREE.
28-
6+
LOADXML Load workspace variables from disk (XML file).
7+
LOADXML FILENAME retrieves all variables from a file given a full
8+
pathname or a MATLABPATH relative partial pathname (see PARTIALPATH).
9+
If FILENAME has no extension LOAD looks for FILENAME and FILENAME.xml
10+
and treats it as an XML file.
11+
12+
LOAD, by itself, uses the XML file named 'matlab.xml'. It is an error
13+
if 'matlab.xml' is not found.
14+
15+
LOAD FILENAME X loads only X.
16+
LOAD FILENAME X Y Z ... loads just the specified variables. The
17+
wildcard '*' loads variables that match a pattern.
18+
Requested variables from FILENAME are created in the workspace.
19+
20+
S = LOAD(...) returns the contents of FILENAME in variable S. S is
21+
a struct containing fields matching the variables retrieved.
22+
23+
Use the functional form of LOAD, such as LOAD('filename'), when the
24+
file name is stored in a string, when an output argument is requested,
25+
or if FILENAME contains spaces.
26+
27+
See also LOAD, XML2MAT, XMLTREE.
28+
2929
3030
[Matlab code]( https://github.com/spm/spm/blob/main/compat/loadxml.m )
3131

spm/__compat/savexml.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
from mpython import Runtime
1+
from spm._runtime import Runtime
22

33

44
def savexml(*args, **kwargs):
55
"""
6-
SAVEXML Save workspace variables to disk in XML.
7-
SAVEXML FILENAME saves all workspace variables to the XML-file
8-
named FILENAME.xml. The data may be retrieved with LOADXML. if
9-
FILENAME has no extension, .xml is assumed.
10-
11-
SAVE, by itself, creates the XML-file named 'matlab.xml'. It is
12-
an error if 'matlab.xml' is not writable.
13-
14-
SAVE FILENAME X saves only X.
15-
SAVE FILENAME X Y Z saves X, Y, and Z. The wildcard '*' can be
16-
used to save only those variables that match a pattern.
17-
18-
SAVE ... -APPEND adds the variables to an existing file.
19-
20-
Use the functional form of SAVE, such as SAVE(filename','var1','var2'),
21-
when the filename or variable names are stored in strings.
22-
23-
See also SAVE, MAT2XML, XMLTREE.
24-
6+
SAVEXML Save workspace variables to disk in XML.
7+
SAVEXML FILENAME saves all workspace variables to the XML-file
8+
named FILENAME.xml. The data may be retrieved with LOADXML. if
9+
FILENAME has no extension, .xml is assumed.
10+
11+
SAVE, by itself, creates the XML-file named 'matlab.xml'. It is
12+
an error if 'matlab.xml' is not writable.
13+
14+
SAVE FILENAME X saves only X.
15+
SAVE FILENAME X Y Z saves X, Y, and Z. The wildcard '*' can be
16+
used to save only those variables that match a pattern.
17+
18+
SAVE ... -APPEND adds the variables to an existing file.
19+
20+
Use the functional form of SAVE, such as SAVE(filename','var1','var2'),
21+
when the filename or variable names are stored in strings.
22+
23+
See also SAVE, MAT2XML, XMLTREE.
24+
2525
2626
[Matlab code]( https://github.com/spm/spm/blob/main/compat/savexml.m )
2727

spm/__compat/spm_add.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
from mpython import Runtime
1+
from spm._runtime import Runtime
22

33

44
def spm_add(*args, **kwargs):
55
"""
6-
Add a series of images - a compiled routine
7-
FORMAT s = spm_add(VI,VO)
8-
VI - Vector of mapped volumes (from spm_map or spm_vol).
9-
VO - Description of output volume that gets passed to
10-
spm_write_plane.m
11-
flags - Flags can be:
12-
'm' - masks the mean to zero or NaN wherever
13-
a zero occurs in the input images.
14-
s - Scalefactor for output image.
15-
__________________________________________________________________________
16-
17-
spm_add computes a sum of a set of image volumes to produce an
18-
integral image that is written to a named file (VI.fname).
19-
20-
A mean can be effected by modifying the scalefactors (and offsets) of
21-
VI (see spm_mean_ui for an example). A weighted sum can be effected by
22-
using different weightings for image scalefactors.
23-
__________________________________________________________________________
24-
6+
Add a series of images - a compiled routine
7+
FORMAT s = spm_add(VI,VO)
8+
VI - Vector of mapped volumes (from spm_map or spm_vol).
9+
VO - Description of output volume that gets passed to
10+
spm_write_plane.m
11+
flags - Flags can be:
12+
'm' - masks the mean to zero or NaN wherever
13+
a zero occurs in the input images.
14+
s - Scalefactor for output image.
15+
__________________________________________________________________________
16+
17+
spm_add computes a sum of a set of image volumes to produce an
18+
integral image that is written to a named file (VI.fname).
19+
20+
A mean can be effected by modifying the scalefactors (and offsets) of
21+
VI (see spm_mean_ui for an example). A weighted sum can be effected by
22+
using different weightings for image scalefactors.
23+
__________________________________________________________________________
24+
2525
2626
[Matlab code]( https://github.com/spm/spm/blob/main/compat/spm_add.m )
2727

0 commit comments

Comments
 (0)