pyspecdata.axis_manipulation package¶
Submodules¶
pyspecdata.axis_manipulation.inhomog_coords module¶
- pyspecdata.axis_manipulation.inhomog_coords.inhomog_coords(self, direct_dim, indirect_dim, tolerance=1e-05, method='linear', plot_name=None, fl=None, debug_kwargs={})¶
Apply the “inhomogeneity transform,” which rotates the data by \(45^{\circ}\), and then mirrors the portion with \(t_2<0\) in order to transform from a \((t_1,t_2)\) coordinate system to a \((t_{inh},t_{homog})\) coordinate system.
- Parameters:
direct_dim (str) – Label of the direct dimension (typically \(t_2\))
indirect_dim (str) – Label of the indirect dimension (typically \(t_1\))
method ('linear', 'fourier') – The interpolation method used to rotate the data and to mirror the data. Note currently, both use a fourier-based mirroring method.
plot_name (str) – the base name for the plots that are generated
fl (figlist_var) –
debug_kwargs (dict) –
with keys:
- correct_overlap:
if False, doesn’t correct for the overlap error that occurs during mirroring
pyspecdata.axis_manipulation.register_axis module¶
- pyspecdata.axis_manipulation.register_axis.register_axis(self, arg, nearest=None)¶
Interpolate the data so that the given axes are in register with a set of specified values. Does not change the spacing of the axis labels.
It finds the axis label position that is closest to the values given in arg, then interpolates (Fourier/sinc method) the data onto a new, slightly shifted, axis that passes exactly through the value given. To do this, it uses
.ft_clear_startpoints()
and uses.set_ft_prop()
to override the “not aliased” flag.- Parameters:
arg (dict (key,value = str,double)) – A list of the dimensions that you want to place in register, and the values you want them registered to.
nearest (bool, optional) – Passed through to ft_clear_startpoints
pyspecdata.axis_manipulation.secsy module¶
- pyspecdata.axis_manipulation.secsy.secsy_transform(self, direct_dim, indirect_dim, has_indirect=True, method='fourier', truncate=True)¶
Shift the time-domain data backwards by the echo time.
As opposed to
secsy_transform_manual
, this calls on onskew
, rather than directly manipulating the phase of the function, which can lead to aliasing.- Parameters:
has_indirect (bool) –
(This option is largely specific to data loaded by
acert_hdf5
)Does the data actually have an indirect dimension? If not, assume that there is a constant echo time, that can be retrieved with
.get_prop('te')
.truncate (bool) – If this is set, register_axis <pyspecdata.axis_manipulation.register_axis> to \(t_{direct}=0\), and then throw out the data for which \(t_{direct}<0\).
method (str) – The shear method (linear or fourier).
- pyspecdata.axis_manipulation.secsy.secsy_transform_manual(self, direct_dim, indirect_dim, has_indirect=True, truncate=False)¶
Shift the time-domain data backwards by the echo time. As opposed to
secsy_transform
, this directlly manipulates the phase of the function, rather than calling onskew
.- Parameters:
has_indirect (bool) –
(This option is largely specific to data loaded by
acert_hdf5
)Does the data actually have an indirect dimension? If not, assume that there is a constant echo time, that can be retrieved with
.get_prop('te')
.truncate (bool) – If this is set, register_axis <pyspecdata.axis_manipulation.register_axis> to \(t_{direct}=0\), and then throw out the data for which \(t_{direct}<0\).
pyspecdata.axis_manipulation.shear module¶
- pyspecdata.axis_manipulation.shear.linear_shear(self, along_axis, propto_axis, shear_amnt, zero_fill=True)¶
the linear shear – see self.shear for documentation
Module contents¶
Provides methods that change the position of the data w.r.t. the axis labels.
- pyspecdata.axis_manipulation.inhomog_coords(self, direct_dim, indirect_dim, tolerance=1e-05, method='linear', plot_name=None, fl=None, debug_kwargs={})¶
Apply the “inhomogeneity transform,” which rotates the data by \(45^{\circ}\), and then mirrors the portion with \(t_2<0\) in order to transform from a \((t_1,t_2)\) coordinate system to a \((t_{inh},t_{homog})\) coordinate system.
- Parameters:
direct_dim (str) – Label of the direct dimension (typically \(t_2\))
indirect_dim (str) – Label of the indirect dimension (typically \(t_1\))
method ('linear', 'fourier') – The interpolation method used to rotate the data and to mirror the data. Note currently, both use a fourier-based mirroring method.
plot_name (str) – the base name for the plots that are generated
fl (figlist_var) –
debug_kwargs (dict) –
with keys:
- correct_overlap:
if False, doesn’t correct for the overlap error that occurs during mirroring
- pyspecdata.axis_manipulation.linear_shear(self, along_axis, propto_axis, shear_amnt, zero_fill=True)¶
the linear shear – see self.shear for documentation
- pyspecdata.axis_manipulation.register_axis(self, arg, nearest=None)¶
Interpolate the data so that the given axes are in register with a set of specified values. Does not change the spacing of the axis labels.
It finds the axis label position that is closest to the values given in arg, then interpolates (Fourier/sinc method) the data onto a new, slightly shifted, axis that passes exactly through the value given. To do this, it uses
.ft_clear_startpoints()
and uses.set_ft_prop()
to override the “not aliased” flag.- Parameters:
arg (dict (key,value = str,double)) – A list of the dimensions that you want to place in register, and the values you want them registered to.
nearest (bool, optional) – Passed through to ft_clear_startpoints
- pyspecdata.axis_manipulation.secsy_transform(self, direct_dim, indirect_dim, has_indirect=True, method='fourier', truncate=True)¶
Shift the time-domain data backwards by the echo time.
As opposed to
secsy_transform_manual
, this calls on onskew
, rather than directly manipulating the phase of the function, which can lead to aliasing.- Parameters:
has_indirect (bool) –
(This option is largely specific to data loaded by
acert_hdf5
)Does the data actually have an indirect dimension? If not, assume that there is a constant echo time, that can be retrieved with
.get_prop('te')
.truncate (bool) – If this is set, register_axis <pyspecdata.axis_manipulation.register_axis> to \(t_{direct}=0\), and then throw out the data for which \(t_{direct}<0\).
method (str) – The shear method (linear or fourier).
- pyspecdata.axis_manipulation.secsy_transform_manual(self, direct_dim, indirect_dim, has_indirect=True, truncate=False)¶
Shift the time-domain data backwards by the echo time. As opposed to
secsy_transform
, this directlly manipulates the phase of the function, rather than calling onskew
.- Parameters:
has_indirect (bool) –
(This option is largely specific to data loaded by
acert_hdf5
)Does the data actually have an indirect dimension? If not, assume that there is a constant echo time, that can be retrieved with
.get_prop('te')
.truncate (bool) – If this is set, register_axis <pyspecdata.axis_manipulation.register_axis> to \(t_{direct}=0\), and then throw out the data for which \(t_{direct}<0\).