Main Entry-Point¶
nmrPype’s entry-point for command-line usage
Command-line Functions¶
- nmrPype.pype.fileInput(df: DataFrame, input: str | bytes | TextIOWrapper | BufferedReader) int ¶
nmrPype’s default file input handler when run in command-line mode
- Parameters:
data (DataFrame) – DataFrame object to put input data to
input (InputStream) –
str: reading file name
io.TextIOWrapper: read from standard input
io.BufferedReader: read from standard input buffer
- Returns:
Integer exit code (e.g. 0 success 1 fail)
- Return type:
int
- nmrPype.pype.fileOutput(data: DataFrame, args: Namespace) int ¶
nmrPype’s default file output handler when run by command-line mode
- Parameters:
data (DataFrame) – DataFrame object reading from to send out to putput
args (argparse.Namespace) –
Namespace object obtained from command-line args, output and overwrite attributes used
- args.outputOutputStream
str: output file name
io.BufferedWriter: write to standard output buffer
args.overwrite : bool
- Returns:
Integer exit code (e.g. 0 success 1 fail)
- Return type:
int
- nmrPype.pype.function(data: DataFrame, args: Namespace) int ¶
Handling of the user’s input function within command-line mode. Calls necessary function and passes parameters from the command line.
- Parameters:
data (DataFrame) – Inputted NMR Data in which the function will process
args (argparse.Namespace) –
Namespace object obtained from command-line args. Used for obtaining function and the required/optional arguments matching the function
args.fc : str
- Returns:
Integer exit code (e.g. 0 success 1 fail)
- Return type:
int
- nmrPype.pype.headerModify(data: DataFrame, param: str, value: float) int ¶
Updates the header based on parameters and value. Calls the DataFrame’s internal setParam function to extrapolate access.
- Parameters:
data (DataFrame) – Target NMR data which will have its header modified
param (str) – Header value to modify
value (float) – New header value to set in the NMR data
- nmrPype.pype.main() int ¶
Starting-point for the command-line mode of NMRPype.
- Returns:
Integer exit code (e.g. 0 success 1 fail)
- Return type:
int