T1T2ne_CONFIGURE module

class t1t2ne.scripts.t1t2ne_configure.ConfigureCmd[source]

Bases: BaseCommand

DESCRIPTION: str = 'This command checks if the software is installed on a spectrometer workstation.\nIf it is, it creates a configuration file with the appropriate paths and settings for that system.'
SHORT_HELP: str = 'Configure T1tune for the current system'
static add_arguments(parser)[source]

Aggiunge gli argomenti specifici di questo comando al parser.

static run(args: Namespace) None[source]

Esegue la logica del comando.

t1t2ne.scripts.t1t2ne_configure.config(foundpath, basedir=None, hsqcexpno=None, tractexpno=None)[source]

Configures the script for use on a spectrometer, and is reserved to the NMR superuser. The function prompts the user to input the path to the topspin installation and checks if the user is in the list of NMR superusers. If the user is not a superuser, a PermissionError is raised and the function exits. If the user is a superuser, the function prompts the user to input the path to a standard dataset, the experiment number of the TRACT experiment in the standard dataset, and the experiment number of the HSQC experiment in the standard dataset (used only to suggest a number of scans for the experiments). The function then loads the TRACT experiment from the standard dataset, checks if it is a TRACT experiment, and extracts B0 field strength from the acqus file. Finally, it creates a config file in the curdir folder of topspin with the extracted information and exits.

Parameters:

None

Returns:

The function creates a config file in the curdir folder of topspin with the extracted information and exits.

Return type:

None