Statistics¶
simnibs_reader.nifti.stats.compute_stats(values)
¶
Descriptive statistics for a 1-D array of e-field values.
NaN and non-finite values are silently ignored.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
ndarray
|
1-D array (e.g. voxel values inside an ROI). |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Keys: |
Source code in simnibs_reader/nifti/stats.py
simnibs_reader.nifti.stats.compute_ratio(intra_values, extra_values, method='mean')
¶
Compute the intra-ROI / extra-ROI e-field ratio.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
intra_values
|
ndarray
|
1-D arrays of e-field values inside and outside the ROI. |
required |
extra_values
|
ndarray
|
1-D arrays of e-field values inside and outside the ROI. |
required |
method
|
('mean', 'median')
|
Summary statistic used for numerator and denominator. |
"mean"
|
Returns:
| Type | Description |
|---|---|
float
|
Ratio. Returns |