renamed stim and inverse stim map routines for consistent with snrmap method
@@ -10,15 +10,15 @@ Implementation of the STIM map from [PAI19]
| `doi:10.1093/mnras/stz1350 <http://doi.org/10.1093/mnras/stz1350>`_
"""
__author__ = 'Benoit Pairet'
-__all__ = ['compute_stim_map',
- 'compute_inverse_stim_map']
+__all__ = ['stim_map',
+ 'inverse_stim_map']
import numpy as np
from ..preproc import cube_derotate
from ..var import get_circle
-def compute_stim_map(cube_der):
+def stim_map(cube_der):
""" Computes the STIM detection map.
Parameters
@@ -32,6 +32,7 @@ def compute_stim_map(cube_der):
detection_map : 2d ndarray
STIM detection map.
"""
+
t, n, _ = cube_der.shape
mu = np.mean(cube_der, axis=0)
sigma = np.sqrt(np.var(cube_der, axis=0))
@@ -40,7 +41,7 @@ def compute_stim_map(cube_der):
return get_circle(detection_map, int(np.round(n/2.)))
-def compute_inverse_stim_map(cube, angle_list, **rot_options):
+def inverse_stim_map(cube, angle_list, **rot_options):
""" Computes the inverse STIM detection map.
Parameters
@@ -58,10 +59,11 @@ def compute_inverse_stim_map(cube, angle_list, **rot_options):
Returns
-------
- inverse_stim_map : 2d ndarray
+ inv_stim_map : 2d ndarray
Inverse STIM detection map.
"""
+
t, n, _ = cube.shape
cube_inv_der = cube_derotate(cube, -angle_list, **rot_options)
- inverse_stim_map = compute_stim_map(cube_inv_der)
- return inverse_stim_map
\ No newline at end of file
+ inv_stim_map = stim_map(cube_inv_der)
+ return inv_stim_map
\ No newline at end of file
