For the transposition template, see Transpose Template
Transpose 2D¶
- class nmrPype.fn.TP.Transpose2D(tp_hyper: bool = True, tp_nohyper: bool = False, tp_auto: bool = True, tp_noauto: bool = False, tp_nohdr: bool = False, tp_noord: bool = False, tp_exch: bool = False, tp_minMax: bool = False, mp_enable: bool = False, mp_proc: int = 0, mp_threads: int = 0)¶
Data Function object for 2D transposition operations
- tp_hyperbool
Transpose in hypercomplex transpose mode
- tp_nohyperbool
Suppress hypercomplex mode from occuring
- tp_autobool
Automatically determine transposition mode
- tp_noautobool
Choose transposition mode in command-line
- tp_nohdrbool
Do not update transpose value in header
- tp_noordbool
Do not change header FDORDER1 and 2.
- tp_exchbool
Exchange header parameters for the two dimensions.
- tp_minMaxbool
Update FDMIN and FDMAX.
- tp_axisint
Indirect dimension axis to be swapped with direct dimension
- mp_enablebool
Enable multiprocessing
- mp_procint
Number of processors to utilize for multiprocessing
- mp_threadsint
Number of threads to utilize per process
- static clArgs(subparser, parent_parser)¶
Transpose command-line arguments
Adds Transpose parser to the subparser, with its corresponding default args. Called by
nmrPype.parse.parser()
Note
Command-line arguments function is only called once for all transpose types
- Parameters:
subparser (_SubParsersAction[ArgumentParser]) – Subparser object that will receive function and its arguments
- hyperTP(array: ndarray)¶
Performs a hypercomplex transposition
- Parameters:
array (ndarray) – N-dimensional array to swap first two dimensions
- Returns:
new_array – Transposed array
- Return type:
ndarray
- initialize(data: DataFrame)¶
- Initialization follows the following steps:
Handle function specific arguments
Update any header values before any calculations occur that are independent of the data, such as flags and parameter storage
- Parameters:
data (DataFrame) – Target data frame to initialize
- process(array: ndarray)¶
Process is called by function’s run, returns modified array when completed. Likely attached to multiprocessing for speed
- Parameters:
array (ndarray) – array to process
- Returns:
modified array post-process
- Return type:
ndarray
Transpose 3D¶
- class nmrPype.fn.TP.Transpose3D(tp_noord: bool = False, tp_exch: bool = False, tp_minMax: bool = False, mp_enable: bool = False, mp_proc: int = 0, mp_threads: int = 0)¶
Data Function object for 3D transposition operations
- Parameters:
tp_noord (bool) – Do not change header FDORDER1 and 2.
tp_exch (bool) – Exchange header parameters for the two dimensions.
tp_minMax (bool) – Update FDMIN and FDMAX.
tp_axis (int) – Indirect dimension axis to be swapped with direct dimension
mp_enable (bool) – Enable multiprocessing
mp_proc (int) – Number of processors to utilize for multiprocessing
mp_threads (int) – Number of threads to utilize per process
- TP3D(array: ndarray) ndarray ¶
Performs a hypercomplex transposition on 3D Data
- Parameters:
array (ndarray) – N-dimensional array to swap first and third dimensions
- Returns:
new_array – Transposed array
- Return type:
ndarray
- static clArgs(subparser, parent_parser)¶
Transpose command-line arguments
Adds Transpose parser to the subparser, with its corresponding default args. Called by
nmrPype.parse.parser()
Note
Command-line arguments function is only called once for all transpose types
- Parameters:
subparser (_SubParsersAction[ArgumentParser]) – Subparser object that will receive function and its arguments
- initialize(data: DataFrame)¶
- Initialization follows the following steps:
Handle function specific arguments
Update any header values before any calculations occur that are independent of the data, such as flags and parameter storage
- Parameters:
data (DataFrame) – Target data frame to initialize
- process(array: ndarray)¶
See
nmrPype.fn.function.DataFunction.process()
for documentation
Transpose 4D¶
- class nmrPype.fn.TP.Transpose4D(tp_noord: bool = False, tp_exch: bool = False, tp_minMax: bool = False, mp_enable: bool = False, mp_proc: int = 0, mp_threads: int = 0)¶
Data Function object for 4D transposition operations
- Parameters:
tp_noord (bool) – Do not change header FDORDER1 and 2.
tp_exch (bool) – Exchange header parameters for the two dimensions.
tp_minMax (bool) – Update FDMIN and FDMAX.
tp_axis (int) – Indirect dimension axis to be swapped with direct dimension
mp_enable (bool) – Enable multiprocessing
mp_proc (int) – Number of processors to utilize for multiprocessing
mp_threads (int) – Number of threads to utilize per process
- TP4D(array: ndarray) ndarray ¶
Performs a hypercomplex transposition on 4D Data
- Parameters:
array (ndarray) – N-dimensional array to swap first and fourth dimension
- Returns:
new_array – Transposed array
- Return type:
ndarray
- static clArgs(subparser, parent_parser)¶
Transpose command-line arguments
Adds Transpose parser to the subparser, with its corresponding default args. Called by
nmrPype.parse.parser()
Note
Command-line arguments function is only called once for all transpose types
- Parameters:
subparser (_SubParsersAction[ArgumentParser]) – Subparser object that will receive function and its arguments
- initialize(data: DataFrame)¶
- Initialization follows the following steps:
Handle function specific arguments
Update any header values before any calculations occur that are independent of the data, such as flags and parameter storage
- Parameters:
data (DataFrame) – Target data frame to initialize
- process(array: ndarray)¶
See
nmrPype.fn.function.DataFunction.process()
for documentation