GESeries.MRSSeries
GESeries.MRSSeries(DATA_FOLDER, SERIES_ID)
A single-voxel MRS series: FIDs, spectra, averaging, and fitting.
Attributes¶
| Name | Description |
|---|
averages | |
avg_fid | The FID averaged across all averages. |
avg_spec | The spectrum averaged across all averages. |
fids | The FIDs from RawMRISeries, with the id coordinate renamed to averages. |
npts | |
ppm | |
spec | |
Methods¶
GESeries.MRSSeries.average_fids(group_size=8)
Average FIDs by grouping consecutive acquisitions.
Parameters¶
| Name | Type | Description | Default |
|---|
| group_size | int | Number of consecutive FIDs to average together. Defaults to 8. | 8 |
Returns¶
| Name | Type | Description |
|---|
| xarray.DataArray | Averaged FIDs, shape (n_groups, n_timepoints). |
GESeries.MRSSeries.average_fids_by_duration(group_duration=10)
Average FIDs by grouping acquisitions within a time duration.
Parameters¶
| Name | Type | Description | Default |
|---|
| group_duration | int | Duration in seconds for each group. Defaults to 10. | 10 |
Returns¶
| Name | Type | Description |
|---|
| xarray.DataArray | Averaged FIDs grouped by duration. |
GESeries.MRSSeries.average_spectra(group_size=8)
Average spectra by grouping consecutive acquisitions.
Parameters¶
| Name | Type | Description | Default |
|---|
| group_size | int | Number of consecutive FIDs to average together. Defaults to 8. | 8 |
Returns¶
| Name | Type | Description |
|---|
| xarray.DataArray | Averaged spectra, shape (n_groups, n_points). |
GESeries.MRSSeries.average_spectra_by_duration(group_duration=10)
Average spectra by grouping acquisitions within a time duration.
Parameters¶
| Name | Type | Description | Default |
|---|
| group_duration | int | Duration in seconds for each group. Defaults to 10. | 10 |
Returns¶
| Name | Type | Description |
|---|
| xarray.DataArray | Averaged spectra grouped by duration. |
GESeries.MRSSeries.fit_average_fid(
init_params,
fit_params=None,
normalisation_factor=None,
filter_by_ppm=None,
)
Fit the averaged FID (avg_fid) with AMARES, normalizing it first.
GESeries.MRSSeries.group_size_by_duration(group_duration)
Calculate number of consecutive FIDs to average for a target duration.
Parameters¶
| Name | Type | Description | Default |
|---|
| group_duration | float | Target duration in seconds for each group. | required |
Returns¶
| Name | Type | Description |
|---|
| int | Number of consecutive FIDs to average together. |
GESeries.MRSSeries.limit_spec_to_ppm_range(ppm_min=-2, ppm_max=6)
Return the spectra limited to the chemical_shift range [ppm_min, ppm_max].
GESeries.MRSSeries.phase_avg_spec(
zero_order=0.0,
first_order=0.0,
autophase=False,
ppm_min=-np.inf,
ppm_max=np.inf,
)
Phase (or autophase) the average spectrum, limited to a ppm range.