spike.v1 package

Submodules

spike.v1.Bruker module

spike.v1.Generic module

This library implement the standard functions needed for NMR processing. Most of theese functions require that the NPK mathematical kernel is loaded.

spike.v1.Generic.CosyToInadequate()[source]

shearing operation that transform a “cosy” symmetry type experiment to a “Inadequate” one

spike.v1.Generic.CosyToSecsy()[source]

shearing operation that transform a “cosy” symmetry type experiment to a “secsy” one

class spike.v1.Generic.Generic_Tests(methodName='runTest')[source]

Bases: unittest.case.TestCase

announce()[source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_load()[source]
spike.v1.Generic.InadequateToCosy()[source]

shearing operation that transform a “Inadequate” symmetry type experiment to a “cosy” one

spike.v1.Generic.JResTilt()[source]

tilt operation that transform a JRes experiment to a symmetric one

spike.v1.Generic.NPKtempfile(ext='.npktmp')[source]

Standard tempfile module is VERY buggy in jython, the secure mkstemp is missing, and the basic system call needed to implement it are lacking. This is an attempt to make a “slightly” better tempfile than the jython built-in one.

This seems to be enough to change it from really annoying to bearly noticiable…

spike.v1.Generic.SecsyToCosy()[source]

shearing operation that transform a “secsy” symmetry type experiment to a “cosy” one

spike.v1.Generic.Symmetrize2D(type='Cosy', algorithm='mean')[source]

realize the symmetrization of the current 2D available types are : Inadequate,Cosy, JRes available algorithm are : mean (X+Y)/2 , smallest value min(X,Y),

and continuous (XY^2+YX^2)/(X^2 + Y^2) (not for JRes)

spike.v1.Generic.SymmetrizeCosy(algorithm='mean')[source]

realize the symmetrization of COSY 2D available algorithm are : mean (X+Y)/2 , smallest value min(X,Y), continuous (XY^2+YX^2)/(X^2 + Y^2)

spike.v1.Generic.SymmetrizeInadequate(algorithm='mean')[source]

realize the symmetrization of INADEQUATE 2D available algorithm are : mean (X+Y)/2 , smallest value min(X,Y), continuous (XY^2+YX^2)/(X^2 + Y^2)

spike.v1.Generic.SymmetrizeJRes(algorithm='mean')[source]

realize the symmetrization of JRes 2D available algorithm are : mean (X+Y)/2 , smallest value min(X,Y)

spike.v1.Generic.add_files(list_of_files, list_of_coefficients=[])[source]

add a list of files weighted by the given coefficients

if coefficients are lacking, no weighting is made

spike.v1.Generic.ap2d(apfunc, axis='F2')[source]

a 2D automatic phaser

axis is : F1, F2 or F12 will peak pick the 2D, and apply the chose algo on sums of rows and columns

MAD nov 2006

spike.v1.Generic.aparm()[source]

computes phase correction form a reconstruction of the beginning of the FID

spike.v1.Generic.apmin2d(axis='F2')[source]

a 2D version of apmin()

axis is : F1, F2 or F12 will peak pick the 2D, and apply apmin on sums of rows and columns

see also : apsl()

MAD-VC july 2005

spike.v1.Generic.apmin_original()[source]

automatic 1D phase correction phase by minimizing the negative wing of the spectrum

MAD, oct 2006

apmin moved to Kore

spike.v1.Generic.apodise(apod, axis='F1')[source]

apod is the function to be applied, it is a python callable sequence which realise the apodisation e.g. “sin(0)” “expbroad(10)” “sqsin(0);expbroad(3)” etc… (note the ; to separate several simple apodisations)

spike.v1.Generic.apodise_f(apod, axis='F1')[source]

apod is the function to be applied, it is a python callable sequence which realise the apodisation e.g. “sin(0)” “expbroad(10)” “sqsin(0),expbroad(3)” etc… (note the , to separate several simple apodisations)

M-A D. march 2006

spike.v1.Generic.apodise_p(apod, axis='F1')[source]
spike.v1.Generic.apsl()[source]
APSL method

A.Heuer J.Magn.Reson. 91 p241 (1991)

uses the data buffer

you may want to adapt :

s_wdth : ration of line width to spectral width used for computing phases p_wdth : ration of line width to spectral width used for broadening for peak picking npk : minimum number of peaks needed for phasing nfrst : the number of peaks used for first approx

see also : apsl2d() apsl_cp()

MAD-VC, july 2005

spike.v1.Generic.apsl2d(axis='F2')[source]

a 2D version of apsl()

axis is : F1, F2 or F12 will peak pick the 2D, and apply apsl on sums of rows and columns

see also : apsl()

MAD-VC july 2005

spike.v1.Generic.apsl_cp(pki, sz)[source]

computes the phase of the peak centered on i, using +/-sz points the phase of the peak is returned between -180 and 180 i has to be odd ! used by apsl to compute an automatic phase correction of a 1D spectrum

see also : apsl()

MAD-VC, july 2005

spike.v1.Generic.auditinitial(auditfilename='audit_trail.html', title='NPK Processing', append=1)[source]

initialize the audit trail file

auditfilename is the name of the audit file if the file does not exist it is created and initialized, if append ==1 and if the file exists, content will be added to it, this is the default behaviour

spike.v1.Generic.audittrail(auditfile, phtx, *argl)[source]

management of the audit trail.

first argument determines action : open close phase text arguments depends on the action

audittrail(open, “title in audit file”)

opens the audit trail - use the argument as title

audittrail(close)

closes the audit trail

audittrail(phase, “title of phase”)

start a new phase, creates a new heading in the audit trail

audittrail(text, “text to write in audit trail”, parameter_name, parameter_value, …)

writes in the audit trail

if text is available on several arguments, several lines are displayed, in this case, the first arguments is the text/title, and the following arguments are by pair, with parameter_name parameter_value if phase mode <P> lines are added if text mode a <li> list is built

spike.v1.Generic.autocalib(mode='IUPAC')[source]

on a 2D experiment, assuming the F2 axis is 1H try to detect spin nature from frequency, and apply the unified scale as proposed by IUPAC-2001

Harris et al. NMR Nomenclature: Nuclear Spin Properties and Conventions for Chemical Shifts—IUPAC Recommendations. Journal of Magnetic Resonance (2002) vol. 156 (2) pp. 323-326

WARNING, a different setting for biomolecules was proposed in a IUPAC/IUB recommendation in 1998

Markley et al. Recommendations for the presentation of NMR structures of proteins and nucleic acids. Journal of Molecular Biology (1998) vol. 280 (5) pp. 933-952

This previous recommendation was only mentionning 2D 13C, 15N and 31P, but was using different references

Usage is to use 1998 recommendation for proteins and nucleic acids. these are enforced when mode = “IUB” or “biomolecule” this makes +2.6645 ppm shift in 13C. this makes a +380.4434 ppm shift in 15N.

Returns the name of the defined nucleus in F1, “15N” “13C” “31P” or “None” if nothing was done

spike.v1.Generic.autocalib_old()[source]

on a 2D experiment, assuming the F2 axis is 1H try to detect spin nature from frequency, and apply the unified scale as proposed by IUPAC-2001 WARNING, proteins tend to use DSS reference, where IUPAC imposes TMS this makes +2.66 ppm shift in 13C. IDEM, for 15N proteins tend to use NH3 reference, where IUPAC imposes MeNO3 this makes a +385.50 ppm shift in 15N.

spike.v1.Generic.bcorr_offset(spec_n=30, axis='F1')[source]

correct for an offset of the spectrum, computed from an empty region of the spectrum

spec_n is the argument to spec_noise() axis is the axis to process when in nD

spike.v1.Generic.bcorr_quest(p=4, axis='F1')[source]

apply the QUEST baseline correction, based on the Linear Prediction reconstruction on the beginning of the FID.

p is the number of point to reconstruct axis is the axis to process when in nD

works on complex as well as real datasets.

from

MAGMA. 2004 May;16(6):284-96. 2004 Time-domain quantitation of 1H short echo-time signals: background accommodation. Ratiney H, Coenradie Y, Cavassila S, van Ormondt D, Graveron-Demilly D.

spike.v1.Generic.bucket(start=0.5, end=9.5, bsize=0.04, file='bucket.cvs')[source]

This tool permits to realize a bucket integration from the current 1D data-set. You will have to determine (all spectral values are in ppm)

  • start, end : the starting and ending points of the integration zone in the spectrum

  • bsize : the size of the bucket

  • file :the filename to which the result is written

the “set to current window” button defines the starting and ending points of the integration zone from the current zoom window the “record” button permits to memorize the current parameters, which will be reused for the bucket integration. the “details” button displays the number and the size of the buckets currently defined. a non-integer size means that the integration will be performed on a varying number of data points

in order to insure a constant integration width in ppm. However, the integration intensity is not modified by the integration width.

For a better bucket integration, you should be careful that :
  • the bucket size is not too small, size is better than number !

  • the baseline correction has been carefully done

  • the spectral window is correctly determined to encompass the meaningfull spectral zone.

%programer%

see also : int1d integrate.g

%author% MA Delsuc %version% 5.2005

spike.v1.Generic.build_dict(default_list, p_in_arg={})[source]

build the default parameter dictionary

used in standard actions, returns a dictionary built from the default parmaters (see do_default.py and Param/*) and the additional parameters defined in the optionnal p_in_arg overwrite the default values

wrapper around the NPKParam class

spike.v1.Generic.burg2d(axis='F1', nsz=None)[source]

apply burg extension to all columns (or rows) of current 2D axis is either “F1” or “F2” nsz is extended size, default (None) implies doubling of the size

spike.v1.Generic.burg2d_back(axis, nsz)[source]
spike.v1.Generic.burg2d_mirror(axis, n, bsz)[source]
spike.v1.Generic.burg_back(nsz)[source]
spike.v1.Generic.burg_mirror(n, bsz)[source]
spike.v1.Generic.causal_corr(delay)[source]

remove the effect of a time shift on the spectrum due to digital filtering (Bruker)

spike.v1.Generic.causalize(delay)[source]

remove the effect of a time shift on the FID due to digital filtering (Bruker)

brings back the beginning of the FID at the first data point shorten the FID length respectively

spike.v1.Generic.change_key_dict(patternOut, patternIn, p_in_arg)[source]

goes though the given dictionnay (which remains unchanged) and changes in keys the pattern “patternIn” to “patternOut” and returns the modified dictionnary

typically used in 3D processing :

change_key_dict(‘f2’, ‘f3’, change_key_dict(‘f1’, ‘f2’, p_in)) # in THAT order !

substitutes F2 (of the 3D) by F1 (of the 2D plane) substitutes F3 (of the 3D) by F2 (of the 2D plane)

spike.v1.Generic.config_get(config, section, option, default=None, raw=0, vars=None)[source]

read a value from the configuration, with a default value

spike.v1.Generic.config_getboolean(config, section, option, default='OFF', raw=0, vars=<built-in function vars>)[source]

read a boolean value from the configuration, with a default value

spike.v1.Generic.config_getfloat(config, section, option, default=0.0, raw=0, vars=None)[source]

read a float value from the configuration, with a default value

spike.v1.Generic.config_getint(config, section, option, default=0, raw=0, vars=None)[source]

read a int value from the configuration, with a default value

spike.v1.Generic.conv_n_p()[source]

realizes the preparation of 2D FID acquired in n+p mode (echo / anti echo

spike.v1.Generic.dc_offset(zone)[source]

corrects each FID of a dataset for constant offset, estimated on the last % of the fid

zone has a value between 0 and 1; 1 means the whole data set, 0.1 means the last 10%

spike.v1.Generic.derivative(n, sm)[source]

@sig public void derivative( int n, int sm )

spike.v1.Generic.dict_dump(dict, fname)[source]

dump the content of a dictionary as a property list file

one entry per line with the following syntax : entry=value

spike.v1.Generic.dict_load(fname)[source]

load a property list file as a dictionary

one entry per line with the following syntax : entry=value

keys are set to lowercase

spike.v1.Generic.dict_out(dict, title='')[source]

dump the content of a dictionary as a property list file

one entry per line with the following syntax : entry=value

spike.v1.Generic.expbroad(lb, axis='F1')[source]

apply a lb exponential broadening along given axis

spike.v1.Generic.filec_status()[source]

dumps the detailled header of a joined cache file used mostly for debugging

spike.v1.Generic.flat_solvent(param, delay=0.0)[source]

reduces the solvent signal supposed to be at the carrier frequency to be applied on the time domain, before Fourier transform

actually performs a “baseline” fit type of processing on the FID, real and imaginary parts are handled independantly param is either

polynomial moving_average polynomial+moving_average moving_average+polynomial

and determines the fitting algo used.

delays is the timezeo delay offset (not implemented yet)

spike.v1.Generic.ft_n_p(axis='F1')[source]

F1-Fourier transform for N+P (echo/antiecho) 2D

spike.v1.Generic.ft_phase_modu(axis='F1')[source]

F1-Fourier transform for phase-modulated 2D

spike.v1.Generic.ft_seq()[source]

performs the fourier transform of a data-set acquired on a Bruker in simultaneous mode Processing is performed only along the F2 (F3) axis if in 2D (3D)

(Bruker QSIM mode)

see also : ft_seq() ft_sh() ft_tppi() ft_sh_tppi() ft_phase_modu() ft_n_p()

MAD-VC July 2005

spike.v1.Generic.ft_sh(axis='F1')[source]

States-Haberkorn F1 Fourier transform

spike.v1.Generic.ft_sh_tppi(axis='F1')[source]

States-Haberkorn / TPPI F1 Fourier Transform

spike.v1.Generic.ft_sim()[source]

performs the fourier transform of a data-set acquired on a Bruker in simultaneous mode Processing is performed only along the F2 (F3) axis if in 2D (3D)

(Bruker QSIM mode)

see also : ft_seq() ft_sh() ft_tppi() ft_sh_tppi() ft_phase_modu() ft_n_p()

MAD-VC July 2005

spike.v1.Generic.ft_tppi(axis='F1')[source]

TPPI F1 Fourier transform

spike.v1.Generic.gaussbroad(lb, axis='F1')[source]

apply a lb gaussian broadening along given axis

spike.v1.Generic.gaussenh(gg, ll, axis='F1')[source]

apply a lb gaussian enhancement along given axis

spike.v1.Generic.get_itype(dim=0)[source]

analyze the complex state of the data buffer dim is either 0 (current dim); 1 2 or 3 returns either (t) (t1,t2) (t1,t2,t3) where tx is 0 if real and 1 if complex

spike.v1.Generic.get_npk_path()[source]
spike.v1.Generic.get_saved_state(dd)[source]

recover saved current working data-buffer

spike.v1.Generic.hanning(axis='F1')[source]

hanning apodisation

spike.v1.Generic.hilbert(axis='F1')[source]

convert a real data set to a complex dataset by using the Hilbert transform

the number of data point is doubled, thus hilbert();real() is (nearly) a null operation

axis can be F1 F2 or F12

in dim(1) no axis is needed does not work in dim(3) yet

minimal error checking, done mostly by the FT operations.

Note that a small apodisation is done on the Fourier transform to reduce truncation artifacts you might want to remove this in certain cases, for instance if you plan to have several hilbert() applied to the same data in sequence.

see also : tocomplex() invhilbert()

spike.v1.Generic.invhilbert(axis='F1')[source]

convert a complex data set to a real dataset by using the Hilbert transform

the number of data point is unchanged, thus the final real dataset is zerofilled once compared to the initial

invhilbert() is nearly equivalent to having zerofillied once before FT, but processing time is faster.

despite the name, not quite the inverse of hilbert() !

axis can be F1 F2 or F12

in dim(1) no axis is needed does not work in dim(3) yet

minimal error checking, done mostly by the FT operations.

see also : tocomplex() hilbert()

spike.v1.Generic.key_is_not_false(dict, key)[source]

used to check keys in processing parameter files

will return true if dict[key] exists and is true or doest not exist will return false if dict[key] is defined false

spike.v1.Generic.key_is_true(dict, key)[source]

used to check keys in processing parameter files

will return true if dict[key] exists and is true will return false otherwise (does not exist or is false)

spike.v1.Generic.left_shift(shift_size, axis='F1')[source]

shifts the FID to the left by dropping data points MAD-VC January 2007

spike.v1.Generic.load(filename)[source]

load in 1D memory a simple 1D series skip # and ; comments

spike.v1.Generic.local_proj(axis='F1', algo='M', f1_left=0, f2_left=0, f1_right=0, f2_right=0)[source]

realize a local projection of the 2D data-set axis : “F1” - “F2” : the axis along which the projection is performed algo : “M” - “S” ; Mean or Skyline f1_left, f2_left, f1_right, f2_right : the coordinates of the local projection

O (default) means that the complete data-set will be used, thus: f1_left=1 f2_left=1 f1_right=get_si1_2D(), f2_right=get_si2_2D()

thus : local_proj(“F1”,”M”) is equivalent to proj(“F1”,”M”)

WARNING - local_proj(“F1”) will create a F2 1D.

spike.v1.Generic.local_proj_3d(axis='F1', algo='M', f1_left=0, f2_left=0, f3_left=0, f1_right=0, f2_right=0, f3_right=0)[source]

realize a local projection of the 3D data-set axis : “F1” - “F2” - “F3”: the axis along which the projection is performed algo : “M” - “S” ; Mean or Skyline f1_left, f2_left, f3_lest, f1_right, f2_right, f3_left : the coordinates of the local projection

O (default) means that the complete data-set will be used, thus: f1_left=1 f2_left=1 f3_left=1 f1_right=get_si1_3D(), f2_right=get_si2_3D() f3_right=get_si3_3D()

spike.v1.Generic.neg_wing()[source]

measure negative wing power

spike.v1.Generic.peak1d_integ(index, factor=0.1, thresh=0, slope=0.001)[source]

compute the integration zone around a given 1D peak

returns (left,right) as the integration zones left and right are determined as the points were either

value gets below thresh (default value 0)

determines an absolute stop point

value gets below top_of_peak*factor (default value 0.1 = 10%)

determines a relative stop point

value > lower_point_so_far and abs(value-previous)>top_of_peak*slope (default value 0.001 = 0.1%)

allows going up as much as slope*top

warning, definitions are different from the integ kernel command

spike.v1.Generic.phase_pivot(p0, p1, pivot=0.5)[source]

three parameter phasing routine pivot = 0 is on left side pivot = 1 is on right side all intermidoate values are possible returns actual (P0, P1)

spike.v1.Generic.pkfilter(mode='add', tol=10)[source]

peak filtering

first try…

spike.v1.Generic.pksym_p(mode='add', tol=10)[source]

peak symmetrisation algorithm

first try…

spike.v1.Generic.pkwrite_p(filepeak)[source]

write the content of the peak table in the kernel to a peak file

the file is formated as a property list coordinates are in index, widths are in Hz, phases in degrees. format is not fully compatible with the format used in Gifa 5, as the coordinates are ouput in index it will write the 1D, 2D or 3D peak table, depending on get_dim()

spike.v1.Generic.plane_size(axis='F1')[source]

returns (si1,si2) the size of the plane orthogonal to axis from the joined dataset

spike.v1.Generic.proc3d(sourcefile, destinationfile, plane_to_process, commands, context)[source]

this macro processes a 3D file using the cache system (join, getc, putc) it permits to handle very large files, which would not fit into memory.

sourcefile : is the initial data-set destinationfile : is the result of the process plane_to_process : either F1, F2 or F3 (NOT F12 or F123)

F1 means : planes perpendicular to F1, thus the planes containing the F2 and F3 axes.

commands : a string holding the commands to be applied to each plane in 2D notation context : a dictionary containing the variables needed to execute commands,

i.e. exec(commands,context) will actually be used usually built from globals() and locals()

the commands are the regular commands you would used to process a 2D data-set. when called without parameters, ‘commands’ can be several line long, as typed when proc3d is called with parameters on the line, then ‘commands’ should be a single command line within quotes.

e.g. proc3(ser_file, F1_proc, “F1”, ‘sin(0.2,”f12”); ft_sim(); phase(30,-40,f2); real(“f12”); ft_tppi()’)

# process axes f3 and f2 as 2D

proc3(F1_proc, full_proc, “F2”, ‘sin(0.2,”f1”); ft_tppi(); real(“f1”); bcorr(3,”f1”)’)

# process axis f1

would process a whole 3D in 2 steps.

spike.v1.Generic.right_shift(shift_size, axis='F1')[source]

shifts the FID to the right by adding null data points at the begining of the FID MAD-VC January 2007

spike.v1.Generic.save_state(dd)[source]

save current working data-buffer

kind of wrapper over put(“data”) save on temp file if necessary * NOT FINISHED yet, do no use *

spike.v1.Generic.set_itype(type)[source]

set the complex state of the data buffer dim is either 1 2 or 3 type is either (t) (t1,t2) (t1,t2,t3) where tx is 0 if real and 1 if complex

spike.v1.Generic.shear(slope, pivot)[source]

shearing of a given NMR 2D experiment realized by a frequency shift of all the F1 spectra pivot is the position of the invariant column (0 is left, 1 is right)

spike.v1.Generic.signal_noise(left=1, right=1, n=10)[source]

estimate the signal to noise of a given 1D data-set

It does this by find the most intense peak and dividing it by the noise level

left , right define the zone in which the signal/noise is to be computed both value default to 1, right=1 means the right most point. n is the number of pieces on which the noise is computed.

spike.v1.Generic.spec_noise(n=10)[source]

estimate of noise in the data-set

estimates the noise in the data set by choping into n parts, and keeping the smallest one in the same time evaluates the offset on the dataset on the same part used for noise determination

sets the value in get_noise and get_shift

spike.v1.Generic.spectral_zone(left, right, axis='F1', left_unit='ppm', right_unit='ppm')[source]

extract one spectral zone of the spectrum left float

the left border of the extract zone, in unit

left_unit enum ppm hz index

the unit in which spec_zone_left is given

right float

the right border of the extract zone, in unit

right_unit enum ppm hz index

the unit in which spec_zone_right is given

axis enum F1 F2 F3

if in 2D or 3D, the axis along the extract is to be done, ignored if in 1D

returns [left,right]

the left and right coordinates of the extracted spectral zone in index

spike.v1.Generic.tilt(slope, pivot)[source]

tilt of a 2D experiment realized by a frequency shift of all the F2 spectra pivot is the position of the invariant row (0 is bottom, 1 is top)

spike.v1.Generic.tocomplex(axis='F1')[source]

tocomplex – make dataset complex

spike.v1.Generic.toreal(axis='F1')[source]

toreal – make dataset real

spike.v1.Generic.writet(filename)[source]

writes the 1D memory as a simple 1D series skip # and ; comments

spike.v1.GenericDosy module

spike.v1.GenericMaxEnt module

spike.v1.Kore module

Kore.py

Created by Marie-Aude Coutouly on 2010-03-26.

class spike.v1.Kore.Kore(debug=0)[source]

Bases: object

addbase(constant)[source]

Removes a constant to the data. The default value is the value of SHIFT (computed by EVALN).

see also : bcorr evaln shift

adddata(debug=False)[source]

Add the contents of the DATA buffer to the current data-set. Equivalent to ADD but in-memory.

addnoise(noise, seed=0)[source]

add to the current data-set (1D, 2D, 3D) a white-gaussian, characterized by its level noise, and the random generator seed.

apmin()[source]
bcorr(mode, *arg)[source]

Apply a baseline correction Computes and applies a base-line correction to the current data set. mode describe the algorithm used:

  • 1 is linear correction

  • 2 is cubic spline correction.

  • 3 is polynomial (and related) correction NOT IMPLEMENTED YET !

if mode == 1 or 2

then in 1D *arg is radius, list_of_points

or in 2D *arg is radius, axis, list_of_points

axis in 2D is either f1 or f2 (dimension in which correction is applied). radius is the radius around which each pivot point is averaged.

list_of_points is then the list of the pivot points used for the

base-line correction. Linear correction can use 1 or more pivot points. 1 point corresponds to correction of a continuous level. Spline corrections needs at least 3 points. In any case maximum is 100 pivot points.

bcorrp0()[source]
bcorrp1()[source]
bruker_corr()[source]
check1D()[source]

true for a 1D

check2D()[source]

true for a 2D

check3D()[source]

true for a 3D

checknD(n)[source]
chsize(*args)[source]

Change size of data, zero-fill or truncate. DO NOT change the value of OFFSET and SPECW, so EXTRACT should always be preferred on spectra (unless you know exactly what your are doing).

see also : extract modifysize

col(i)[source]
com_max()[source]
dfactor(value)[source]
diag(direc='F12')[source]
dim(d)[source]

Declaration of the ._current buffer

dmax(value)[source]

Determines the fastest decaying component during Laplace analysis Given in arbitrary unit, use DFACTOR to relate to actual values.

see also : dmin dfactor laplace tlaplace invlap invtlap

sets the final value for the laplace transform

dmin(value)[source]

Determines the fastest decaying component during Laplace analysis Given in arbitrary unit, use DFACTOR to relate to actual values.

see also : dmin dfactor laplace tlaplace invlap invtlap

sets the final value for the laplace transform

em(axis=0, lb=1.0)[source]
escale(value=1.0)[source]

The Entropy expression during Maximum Entropy run is computed as follow :

A = Escale * Sum(F(i)) P(i) = F(i)/A S = -Sum( log(P(i)) * P(i) )

Escale should be set to 1.0 for normal operation

see also : maxent

evaln(a, b, c=- 1, d=- 1)[source]

evaluates the noise level as well as the overall offset of the data,over a area of the data. The results are stored in the NOISE and SHIFT contexts This command is called automatically whenever a data set is read. The command will prompt for the last selected region with the POINT command

in 2D, a,b,c,d is llf1, llf2, ur1, ur2

exchdata()[source]

Exchange the contents of the DATA buffer with the current data-set.

see also : adddata multdata maxdata mindata add mult put

extract(*args)[source]
fill(value)[source]
freq(*args)[source]

The context FREQ holds the basic frequency of the spectrometer (in MHz). freq_H1 is meant to be the basic frequency of the spectrometer (1H freq) and is not used in the program. freq2 (and freq1 in 2D) are the freq associated to each dimension (different if in heteronuclear mode). Values are in MHz.

see also : specw offset

freq1d(freq_h1, freq1)[source]
freq2d(freq_h1, freq1, freq2)[source]
freq3d(freq_h1, freq1, freq2, freq3)[source]
ft(axis='F1')[source]

Performs in-place complex Fourier Transform on the current data-set; Data-set must be Complex.

All FT commands work in 1D, 2D or 3D

<ul> <li> in 1D axis, is not needed <li> in 2D axis, is F1, F2 or F12 <li> in 3D axis, is F1, F2, F3, F12, F13, F23 or F123 </ul>

Here is a complete overview of FT routines : C stands for Complex, R stands for Real <pre>

FIDs Spectra C —FT—> C C <–IFT— C R –RFT–> C R <–IRFT– C C -FTBIS-> R C <-IFTBIS- R R Does not exist R

</pre>

ftbis(axis='F1')[source]

Data-set must be Complex.

get(buffer_name)[source]
if parameter == “DATA”:

self._datab = self._current.copy()

Moves the content of another buffer, back to the current buffer with buffer_name equal to: “data”: get the content of the data buffer “linefit”: get the simulated spectrum obtained form the current peak table “window”: get actual window used to compute the chisquare “filter”: get filter used for deconvolution “residue”: get residue of the spectrum after a maxent run “tab”: get the tab buffer used for tabulated fit see also : put apply

get_Kore_1D()[source]

return a working copy of the 1D Kore internal buffer

get_Kore_2D()[source]

return a working copy of the 2D Kore internal buffer

get_Kore_3D()[source]

return a working copy of the 3D Kore internal buffer

get_col()[source]
get_debug()[source]
get_dfactor()[source]
get_dim()[source]
get_dmax()[source]
get_dmin()[source]
get_freq()[source]
get_freq_1_2d()[source]
get_freq_1_3d()[source]
get_freq_1d()[source]
get_freq_2_2d()[source]
get_freq_2_3d()[source]
get_freq_3_3d()[source]
get_itype_1d()[source]
get_itype_2d()[source]
get_itype_3d()[source]
get_noise()[source]
get_npk1d()[source]
get_npk2d()[source]
get_npk3d()[source]
get_offset_1_2d()[source]
get_offset_1_3d()[source]
get_offset_1d()[source]
get_offset_2_2d()[source]
get_offset_2_3d()[source]
get_offset_3_3d()[source]
get_ph0()[source]
get_ph1()[source]
get_row()[source]
get_shift()[source]
get_si1_1d()[source]
get_si1_2d()[source]
get_si1_3d()[source]
get_si2_2d()[source]
get_si2_3d()[source]
get_si3_3d()[source]
get_si_tab()[source]
get_specw_1_2d()[source]
get_specw_1_3d()[source]
get_specw_1d()[source]
get_specw_2_2d()[source]
get_specw_2_3d()[source]
get_specw_3_3d()[source]
get_version()[source]
geta_max(index)[source]
geta_pk1d_a(i)[source]
geta_pk1d_a_err(i)[source]
geta_pk1d_f(i)[source]
geta_pk1d_f_err(i)[source]
geta_pk1d_p(i)[source]
geta_pk1d_t(i)[source]
geta_pk1d_w(i)[source]
geta_pk1d_w_err(i)[source]
geta_pk2d_a(i)[source]
geta_pk2d_a_err(i)[source]
geta_pk2d_f1f(i)[source]
geta_pk2d_f1f_err(i)[source]
geta_pk2d_f1w(i)[source]
geta_pk2d_f1w_err(i)[source]
geta_pk2d_f2f(i)[source]
geta_pk2d_f2f_err(i)[source]
geta_pk2d_f2w(i)[source]
geta_pk2d_f2w_err(i)[source]
geta_pk3d_a(i)[source]
geta_pk3d_f1f(i)[source]
geta_pk3d_f1w(i)[source]
geta_pk3d_f2f(i)[source]
geta_pk3d_f2w(i)[source]
geta_pk3d_f3f(i)[source]
geta_pk3d_f3w(i)[source]
htoi(index, dim, axis)[source]
htop(index, dim, axis)[source]
ift(axis='F1')[source]

Performs in-place inverse complex Fourier Transform on the current data-set; Data-set must be Complex.

iftbis(axis='F1')[source]

Data-set must be Real.

invf(axis='F1')[source]

Process data-sets by multiplying by -1 1 point every 2 points. Equivalent to taking the conjugated on complex data-sets, or hyperconjugated on hypercomplex data-sets. If applied on a complex FID, inverses the final spectrum obtained after Fourier transform.

see also : revf itype ft reverse

irft(axis='F1')[source]

Perform real-to-complex Fourier Transform on data

itoh(index, dim, axis)[source]
itop(index, dim, axis)[source]
itype(value)[source]
join(file_name)

write( file_name )

Writes the current data set to a file in standard format. same as writec

see also : read

lb(value)[source]
maxdata()[source]

Compare the content of the current buffer with the content of the DATA buffer, and leave in memory the largest of the 2 values. Usefull for projections or symetrisation macros.

see also : mindata exchdata adddata multdata sym put

mindata()[source]

Compare the content of the current buffer with the content of the DATA buffer, and leave in memory the smallest of the 2 values. Usefull for projections or symetrisation macros.

see also : maxdata exchdata adddata multdata sym put

minimax(mini, maxi)[source]
minus()[source]
modifysize(si1, si2)[source]

modifysize( si1, si2, si3 )

Permits to modify the leading sizes of a 2D or a 3D data-set, provided the product of the sizes : si1*si2{*si3} is equal to the product of the old ones.

Does not actually modify the data.

see also : chsize

modulus()[source]
mult(constant)[source]
mult1d(axis=0)[source]

multiply the current 2D or 3D with the contents of the 1d buffer considered as a f1(i)f2(j) concatenated buffer

see also : multdata add adddata filter

multdata()[source]

Multiplies point by point, the content of the current working buffer with the content of the DATA buffer. Permits to realize convolution product. Works in 1D, 2D, in real, complex and hypercomplex modes.

see also : ADDDATA MINDATA MAXDATA EXCHDATA MULT PUT

noise(value)[source]

Contains the level of noise in the data-set. When loading data (1 or 2D) the noise level is evaluated automatically from the last 10th of the data. Can also be set with EVALN. Used by INTEG and by Maximum Entropy run.

offset(*args)[source]

Permits to specify the offset of the right-most (upper right most in 2D) point of the data set. The value for offset are changed by @extract see also : specw

offset1d(off1)[source]
offset2d(off1, off2)[source]
offset3d(off1, off2, off3)[source]
one()[source]
peak(pkradius=0)[source]
phase(ph0, ph1, axis=1)[source]
pkclear()[source]
plane(axis, i)[source]

Extract the nth 1D row (along F2 axis) from the 2D data-set, and put it in the 1D buffer. The row will be available as a 1D data set when going from 2D to 1D

plus()[source]
power2(i)[source]

Compute the power of 2 that is under or equal to i

proj(axis, projtype)[source]
ptoh(index, dim, axis)[source]
ptoi(index, dim, axis)[source]
put(parameter)[source]

put(parameter, n)

Moves the content of the current buffer to an other buffer With parameter equal to:

xx* DATA
load the data to be used for MaxEnt processing or

as a off-hand place for processing

in 1D only FILTER load the filter used for Deconvolution. If NCHANNEL is

greater than 1, then which channel you want to put. eg. PUT FILTER 3. PUT FILTER 0 will consider the current data set as the multichannel filter, and will load the whole filter. Useful when associated with GET FILTER to store filters as files.

WINDOW load the window to be used for MaxEnt processing TAB load the TAB buffer, used for tabulated fit.

in 2D only ROW n load the 1D buffer in the ROW n COL n load the 1D buffer in the COL n

in 3D only PLANE Fx n load the 2D buffer in the plane Fx n

see also : GET SHOW APPLY

read(file_name)[source]

Reads the file as the new data set in standard format . Same as readc

see also : write

real(axis='F1')[source]
report()[source]

print a summary of the internal state of the kernel

reverse(axis='F1')[source]
revf(axis='F1')[source]

Processes FID data-sets by multiplying by -1 2 points out of 4. Permits to preprocess Bruker FIDs in Dim 2 (Bruker trick) before RFT, or permits to bring back zero frequency in the center for some other data formats

rft(axis='F1')[source]

Perform real-to-complex Fourier Transform on data

row(i)[source]

Extract the nth 1D row (along F2 axis) from the 2D data-set, and put it in the 1D buffer. The row will be available as a 1D data set when going from 2D to 1D

set_Kore_1D(npkdata)[source]

uses npkdata as the 1D Kore buffer

set_Kore_2D(npkdata)[source]

uses npkdata as the 1D Kore buffer

set_Kore_3D(npkdata)[source]

uses npkdata as the 3D Kore buffer

set_task(task)[source]
setval(*args)[source]

Will set the value of the data point to x. The number of coordinates of the point depends of dim. In dim 2 or 3, coordinates are F1 F2 or F1 F2 F3. Can be usefully used when associated to the functions valnd() to change data point value.

setval1d(i, x)[source]
setval2d(i, j, x)[source]
setval3d(i, j, k, x)[source]
shift(value)[source]

This context holds the systematic baseline shift of the current data-set, computed automatically by EVALN. Used by INTEG. see also : evaln noise addbase

sin(maxi, axis=1)[source]
specw(*args)[source]

Permits to enter the value for the spectral width of the current data-set. One parameter will be needed for each dimension of the data-set.

When reading a file the spectral width is set to 2000 * 3.1416 if no parameter block is available.

The value for spectral width are changed by EXTRACT

see also : offset extract

specw1d(x)[source]
specw2d(x, y)[source]
specw3d(x, y, z)[source]
sqsin(maxi, axis=1)[source]
status()[source]

print a summary of the internal state of the kernel

tm(tm1, tm2, axis=0)[source]
val1d(i)[source]
val2d(i, j)[source]
val3d(i, j, k, x)[source]
vert(i, j)[source]

In 3D mode, extract a column orthogonal to the last displayed plane. The column is taken at coordinates i and j in this plane.

see also : plane col row dim

window({axis}, x, y)[source]

Define the window (with the starting point and the ending point) on which data is actually used for the iteration. Data outside this window(displayed as 0 during the interactive input) are just ignored for the processing. Window can be entered several time, the result being cumulative.

see also : window_reset window_mode put apply

window_reset({axis})[source]

Resets the window to 1.0

see also : window window_mode

write(file_name)[source]

Writes the current data set to a file in standard format. same as writec

see also : read

writec(file_name)

write( file_name )

Writes the current data set to a file in standard format. same as writec

see also : read

zero()[source]
zoom(*args)[source]
spike.v1.Kore.addbase(constant)

Removes a constant to the data. The default value is the value of SHIFT (computed by EVALN).

see also : bcorr evaln shift

spike.v1.Kore.adddata(debug=False)

Add the contents of the DATA buffer to the current data-set. Equivalent to ADD but in-memory.

spike.v1.Kore.addnoise(noise, seed=0)

add to the current data-set (1D, 2D, 3D) a white-gaussian, characterized by its level noise, and the random generator seed.

spike.v1.Kore.apmin()
spike.v1.Kore.bcorr(mode, *arg)

Apply a baseline correction Computes and applies a base-line correction to the current data set. mode describe the algorithm used:

  • 1 is linear correction

  • 2 is cubic spline correction.

  • 3 is polynomial (and related) correction NOT IMPLEMENTED YET !

if mode == 1 or 2

then in 1D *arg is radius, list_of_points

or in 2D *arg is radius, axis, list_of_points

axis in 2D is either f1 or f2 (dimension in which correction is applied). radius is the radius around which each pivot point is averaged.

list_of_points is then the list of the pivot points used for the

base-line correction. Linear correction can use 1 or more pivot points. 1 point corresponds to correction of a continuous level. Spline corrections needs at least 3 points. In any case maximum is 100 pivot points.

spike.v1.Kore.bcorrp0()
spike.v1.Kore.bcorrp1()
spike.v1.Kore.bruker_corr()
spike.v1.Kore.check1D()

true for a 1D

spike.v1.Kore.check2D()

true for a 2D

spike.v1.Kore.check3D()

true for a 3D

spike.v1.Kore.checknD(n)
spike.v1.Kore.chsize(*args)

Change size of data, zero-fill or truncate. DO NOT change the value of OFFSET and SPECW, so EXTRACT should always be preferred on spectra (unless you know exactly what your are doing).

see also : extract modifysize

spike.v1.Kore.col(i)
spike.v1.Kore.com_addbase(constant)

Removes a constant to the data. The default value is the value of SHIFT (computed by EVALN).

see also : bcorr evaln shift

spike.v1.Kore.com_adddata(debug=False)

Add the contents of the DATA buffer to the current data-set. Equivalent to ADD but in-memory.

spike.v1.Kore.com_addnoise(noise, seed=0)

add to the current data-set (1D, 2D, 3D) a white-gaussian, characterized by its level noise, and the random generator seed.

spike.v1.Kore.com_apmin()
spike.v1.Kore.com_bcorr(mode, *arg)

Apply a baseline correction Computes and applies a base-line correction to the current data set. mode describe the algorithm used:

  • 1 is linear correction

  • 2 is cubic spline correction.

  • 3 is polynomial (and related) correction NOT IMPLEMENTED YET !

if mode == 1 or 2

then in 1D *arg is radius, list_of_points

or in 2D *arg is radius, axis, list_of_points

axis in 2D is either f1 or f2 (dimension in which correction is applied). radius is the radius around which each pivot point is averaged.

list_of_points is then the list of the pivot points used for the

base-line correction. Linear correction can use 1 or more pivot points. 1 point corresponds to correction of a continuous level. Spline corrections needs at least 3 points. In any case maximum is 100 pivot points.

spike.v1.Kore.com_bcorrp0()
spike.v1.Kore.com_bcorrp1()
spike.v1.Kore.com_bruker_corr()
spike.v1.Kore.com_check1D()

true for a 1D

spike.v1.Kore.com_check2D()

true for a 2D

spike.v1.Kore.com_check3D()

true for a 3D

spike.v1.Kore.com_checknD(n)
spike.v1.Kore.com_chsize(*args)

Change size of data, zero-fill or truncate. DO NOT change the value of OFFSET and SPECW, so EXTRACT should always be preferred on spectra (unless you know exactly what your are doing).

see also : extract modifysize

spike.v1.Kore.com_col(i)
spike.v1.Kore.com_com_max()
spike.v1.Kore.com_dfactor(value)
spike.v1.Kore.com_diag(direc='F12')
spike.v1.Kore.com_dim(d)

Declaration of the ._current buffer

spike.v1.Kore.com_dmax(value)

Determines the fastest decaying component during Laplace analysis Given in arbitrary unit, use DFACTOR to relate to actual values.

see also : dmin dfactor laplace tlaplace invlap invtlap

sets the final value for the laplace transform

spike.v1.Kore.com_dmin(value)

Determines the fastest decaying component during Laplace analysis Given in arbitrary unit, use DFACTOR to relate to actual values.

see also : dmin dfactor laplace tlaplace invlap invtlap

sets the final value for the laplace transform

spike.v1.Kore.com_em(axis=0, lb=1.0)
spike.v1.Kore.com_escale(value=1.0)

The Entropy expression during Maximum Entropy run is computed as follow :

A = Escale * Sum(F(i)) P(i) = F(i)/A S = -Sum( log(P(i)) * P(i) )

Escale should be set to 1.0 for normal operation

see also : maxent

spike.v1.Kore.com_evaln(a, b, c=- 1, d=- 1)

evaluates the noise level as well as the overall offset of the data,over a area of the data. The results are stored in the NOISE and SHIFT contexts This command is called automatically whenever a data set is read. The command will prompt for the last selected region with the POINT command

in 2D, a,b,c,d is llf1, llf2, ur1, ur2

spike.v1.Kore.com_exchdata()

Exchange the contents of the DATA buffer with the current data-set.

see also : adddata multdata maxdata mindata add mult put

spike.v1.Kore.com_extract(*args)
spike.v1.Kore.com_fill(value)
spike.v1.Kore.com_freq(*args)

The context FREQ holds the basic frequency of the spectrometer (in MHz). freq_H1 is meant to be the basic frequency of the spectrometer (1H freq) and is not used in the program. freq2 (and freq1 in 2D) are the freq associated to each dimension (different if in heteronuclear mode). Values are in MHz.

see also : specw offset

spike.v1.Kore.com_freq1d(freq_h1, freq1)
spike.v1.Kore.com_freq2d(freq_h1, freq1, freq2)
spike.v1.Kore.com_freq3d(freq_h1, freq1, freq2, freq3)
spike.v1.Kore.com_ft(axis='F1')

Performs in-place complex Fourier Transform on the current data-set; Data-set must be Complex.

All FT commands work in 1D, 2D or 3D

<ul> <li> in 1D axis, is not needed <li> in 2D axis, is F1, F2 or F12 <li> in 3D axis, is F1, F2, F3, F12, F13, F23 or F123 </ul>

Here is a complete overview of FT routines : C stands for Complex, R stands for Real <pre>

FIDs Spectra C —FT—> C C <–IFT— C R –RFT–> C R <–IRFT– C C -FTBIS-> R C <-IFTBIS- R R Does not exist R

</pre>

spike.v1.Kore.com_ftbis(axis='F1')

Data-set must be Complex.

spike.v1.Kore.com_get(buffer_name)

get(buffer_name)

if parameter == “DATA”:

self._datab = self._current.copy()

Moves the content of another buffer, back to the current buffer with buffer_name equal to: “data”: get the content of the data buffer “linefit”: get the simulated spectrum obtained form the current peak table “window”: get actual window used to compute the chisquare “filter”: get filter used for deconvolution “residue”: get residue of the spectrum after a maxent run “tab”: get the tab buffer used for tabulated fit see also : put apply

spike.v1.Kore.com_get_Kore_1D()

return a working copy of the 1D Kore internal buffer

spike.v1.Kore.com_get_Kore_2D()

return a working copy of the 2D Kore internal buffer

spike.v1.Kore.com_get_Kore_3D()

return a working copy of the 3D Kore internal buffer

spike.v1.Kore.com_get_col()
spike.v1.Kore.com_get_debug()
spike.v1.Kore.com_get_dfactor()
spike.v1.Kore.com_get_dim()
spike.v1.Kore.com_get_dmax()
spike.v1.Kore.com_get_dmin()
spike.v1.Kore.com_get_freq()
spike.v1.Kore.com_get_freq_1_2d()
spike.v1.Kore.com_get_freq_1_3d()
spike.v1.Kore.com_get_freq_1d()
spike.v1.Kore.com_get_freq_2_2d()
spike.v1.Kore.com_get_freq_2_3d()
spike.v1.Kore.com_get_freq_3_3d()
spike.v1.Kore.com_get_itype_1d()
spike.v1.Kore.com_get_itype_2d()
spike.v1.Kore.com_get_itype_3d()
spike.v1.Kore.com_get_noise()
spike.v1.Kore.com_get_npk1d()
spike.v1.Kore.com_get_npk2d()
spike.v1.Kore.com_get_npk3d()
spike.v1.Kore.com_get_offset_1_2d()
spike.v1.Kore.com_get_offset_1_3d()
spike.v1.Kore.com_get_offset_1d()
spike.v1.Kore.com_get_offset_2_2d()
spike.v1.Kore.com_get_offset_2_3d()
spike.v1.Kore.com_get_offset_3_3d()
spike.v1.Kore.com_get_ph0()
spike.v1.Kore.com_get_ph1()
spike.v1.Kore.com_get_row()
spike.v1.Kore.com_get_shift()
spike.v1.Kore.com_get_si1_1d()
spike.v1.Kore.com_get_si1_2d()
spike.v1.Kore.com_get_si1_3d()
spike.v1.Kore.com_get_si2_2d()
spike.v1.Kore.com_get_si2_3d()
spike.v1.Kore.com_get_si3_3d()
spike.v1.Kore.com_get_si_tab()
spike.v1.Kore.com_get_specw_1_2d()
spike.v1.Kore.com_get_specw_1_3d()
spike.v1.Kore.com_get_specw_1d()
spike.v1.Kore.com_get_specw_2_2d()
spike.v1.Kore.com_get_specw_2_3d()
spike.v1.Kore.com_get_specw_3_3d()
spike.v1.Kore.com_get_version()
spike.v1.Kore.com_geta_max(index)
spike.v1.Kore.com_geta_pk1d_a(i)
spike.v1.Kore.com_geta_pk1d_a_err(i)
spike.v1.Kore.com_geta_pk1d_f(i)
spike.v1.Kore.com_geta_pk1d_f_err(i)
spike.v1.Kore.com_geta_pk1d_p(i)
spike.v1.Kore.com_geta_pk1d_t(i)
spike.v1.Kore.com_geta_pk1d_w(i)
spike.v1.Kore.com_geta_pk1d_w_err(i)
spike.v1.Kore.com_geta_pk2d_a(i)
spike.v1.Kore.com_geta_pk2d_a_err(i)
spike.v1.Kore.com_geta_pk2d_f1f(i)
spike.v1.Kore.com_geta_pk2d_f1f_err(i)
spike.v1.Kore.com_geta_pk2d_f1w(i)
spike.v1.Kore.com_geta_pk2d_f1w_err(i)
spike.v1.Kore.com_geta_pk2d_f2f(i)
spike.v1.Kore.com_geta_pk2d_f2f_err(i)
spike.v1.Kore.com_geta_pk2d_f2w(i)
spike.v1.Kore.com_geta_pk2d_f2w_err(i)
spike.v1.Kore.com_geta_pk3d_a(i)
spike.v1.Kore.com_geta_pk3d_f1f(i)
spike.v1.Kore.com_geta_pk3d_f1w(i)
spike.v1.Kore.com_geta_pk3d_f2f(i)
spike.v1.Kore.com_geta_pk3d_f2w(i)
spike.v1.Kore.com_geta_pk3d_f3f(i)
spike.v1.Kore.com_geta_pk3d_f3w(i)
spike.v1.Kore.com_htoi(index, dim, axis)
spike.v1.Kore.com_htop(index, dim, axis)
spike.v1.Kore.com_ift(axis='F1')

Performs in-place inverse complex Fourier Transform on the current data-set; Data-set must be Complex.

spike.v1.Kore.com_iftbis(axis='F1')

Data-set must be Real.

spike.v1.Kore.com_invf(axis='F1')

Process data-sets by multiplying by -1 1 point every 2 points. Equivalent to taking the conjugated on complex data-sets, or hyperconjugated on hypercomplex data-sets. If applied on a complex FID, inverses the final spectrum obtained after Fourier transform.

see also : revf itype ft reverse

spike.v1.Kore.com_irft(axis='F1')

Perform real-to-complex Fourier Transform on data

spike.v1.Kore.com_itoh(index, dim, axis)
spike.v1.Kore.com_itop(index, dim, axis)
spike.v1.Kore.com_itype(value)
spike.v1.Kore.com_join(file_name)

write( file_name )

Writes the current data set to a file in standard format. same as writec

see also : read

spike.v1.Kore.com_lb(value)
spike.v1.Kore.com_max()
spike.v1.Kore.com_maxdata()

Compare the content of the current buffer with the content of the DATA buffer, and leave in memory the largest of the 2 values. Usefull for projections or symetrisation macros.

see also : mindata exchdata adddata multdata sym put

spike.v1.Kore.com_mindata()

Compare the content of the current buffer with the content of the DATA buffer, and leave in memory the smallest of the 2 values. Usefull for projections or symetrisation macros.

see also : maxdata exchdata adddata multdata sym put

spike.v1.Kore.com_minimax(mini, maxi)
spike.v1.Kore.com_minus()
spike.v1.Kore.com_modifysize(si1, si2=- 1, si3=- 1)

modifysize( si1, si2 ) modifysize( si1, si2, si3 )

Permits to modify the leading sizes of a 2D or a 3D data-set, provided the product of the sizes : si1*si2{*si3} is equal to the product of the old ones.

Does not actually modify the data.

see also : chsize

spike.v1.Kore.com_modulus()
spike.v1.Kore.com_mult(constant)
spike.v1.Kore.com_mult1d(axis=0)

multiply the current 2D or 3D with the contents of the 1d buffer considered as a f1(i)f2(j) concatenated buffer

see also : multdata add adddata filter

spike.v1.Kore.com_multdata()

Multiplies point by point, the content of the current working buffer with the content of the DATA buffer. Permits to realize convolution product. Works in 1D, 2D, in real, complex and hypercomplex modes.

see also : ADDDATA MINDATA MAXDATA EXCHDATA MULT PUT

spike.v1.Kore.com_noise(value)

Contains the level of noise in the data-set. When loading data (1 or 2D) the noise level is evaluated automatically from the last 10th of the data. Can also be set with EVALN. Used by INTEG and by Maximum Entropy run.

spike.v1.Kore.com_offset(*args)

Permits to specify the offset of the right-most (upper right most in 2D) point of the data set. The value for offset are changed by @extract see also : specw

spike.v1.Kore.com_offset1d(off1)
spike.v1.Kore.com_offset2d(off1, off2)
spike.v1.Kore.com_offset3d(off1, off2, off3)
spike.v1.Kore.com_one()
spike.v1.Kore.com_peak(pkradius=0)
spike.v1.Kore.com_phase(ph0, ph1, axis=1)
spike.v1.Kore.com_pkclear()
spike.v1.Kore.com_plane(axis, i)

Extract the nth 1D row (along F2 axis) from the 2D data-set, and put it in the 1D buffer. The row will be available as a 1D data set when going from 2D to 1D

spike.v1.Kore.com_plus()
spike.v1.Kore.com_power2(i)

Compute the power of 2 that is under or equal to i

spike.v1.Kore.com_proj(axis, projtype)
spike.v1.Kore.com_ptoh(index, dim, axis)
spike.v1.Kore.com_ptoi(index, dim, axis)
spike.v1.Kore.com_put(parameter, n=0)

put(parameter) put(parameter, n)

Moves the content of the current buffer to an other buffer With parameter equal to:

xx* DATA
load the data to be used for MaxEnt processing or

as a off-hand place for processing

in 1D only FILTER load the filter used for Deconvolution. If NCHANNEL is

greater than 1, then which channel you want to put. eg. PUT FILTER 3. PUT FILTER 0 will consider the current data set as the multichannel filter, and will load the whole filter. Useful when associated with GET FILTER to store filters as files.

WINDOW load the window to be used for MaxEnt processing TAB load the TAB buffer, used for tabulated fit.

in 2D only ROW n load the 1D buffer in the ROW n COL n load the 1D buffer in the COL n

in 3D only PLANE Fx n load the 2D buffer in the plane Fx n

see also : GET SHOW APPLY

spike.v1.Kore.com_read(file_name)

read( file_name )

Reads the file as the new data set in standard format . Same as readc

see also : write

spike.v1.Kore.com_real(axis='F1')
spike.v1.Kore.com_report()

print a summary of the internal state of the kernel

spike.v1.Kore.com_reverse(axis='F1')
spike.v1.Kore.com_revf(axis='F1')

Processes FID data-sets by multiplying by -1 2 points out of 4. Permits to preprocess Bruker FIDs in Dim 2 (Bruker trick) before RFT, or permits to bring back zero frequency in the center for some other data formats

spike.v1.Kore.com_rft(axis='F1')

Perform real-to-complex Fourier Transform on data

spike.v1.Kore.com_row(i)

Extract the nth 1D row (along F2 axis) from the 2D data-set, and put it in the 1D buffer. The row will be available as a 1D data set when going from 2D to 1D

spike.v1.Kore.com_set_Kore_1D(npkdata)

uses npkdata as the 1D Kore buffer

spike.v1.Kore.com_set_Kore_2D(npkdata)

uses npkdata as the 1D Kore buffer

spike.v1.Kore.com_set_Kore_3D(npkdata)

uses npkdata as the 3D Kore buffer

spike.v1.Kore.com_set_task(task)
spike.v1.Kore.com_setval(*args)

Will set the value of the data point to x. The number of coordinates of the point depends of dim. In dim 2 or 3, coordinates are F1 F2 or F1 F2 F3. Can be usefully used when associated to the functions valnd() to change data point value.

spike.v1.Kore.com_setval1d(i, x)
spike.v1.Kore.com_setval2d(i, j, x)
spike.v1.Kore.com_setval3d(i, j, k, x)
spike.v1.Kore.com_shift(value)

This context holds the systematic baseline shift of the current data-set, computed automatically by EVALN. Used by INTEG. see also : evaln noise addbase

spike.v1.Kore.com_sin(maxi, axis=1)
spike.v1.Kore.com_specw(*args)

Permits to enter the value for the spectral width of the current data-set. One parameter will be needed for each dimension of the data-set.

When reading a file the spectral width is set to 2000 * 3.1416 if no parameter block is available.

The value for spectral width are changed by EXTRACT

see also : offset extract

spike.v1.Kore.com_specw1d(x)
spike.v1.Kore.com_specw2d(x, y)
spike.v1.Kore.com_specw3d(x, y, z)
spike.v1.Kore.com_sqsin(maxi, axis=1)
spike.v1.Kore.com_status()

print a summary of the internal state of the kernel

spike.v1.Kore.com_tm(tm1, tm2, axis=0)
spike.v1.Kore.com_val1d(i)
spike.v1.Kore.com_val2d(i, j)
spike.v1.Kore.com_val3d(i, j, k, x)
spike.v1.Kore.com_vert(i, j)

In 3D mode, extract a column orthogonal to the last displayed plane. The column is taken at coordinates i and j in this plane.

see also : plane col row dim

spike.v1.Kore.com_window()

window( {axis}, x, y)

Define the window (with the starting point and the ending point) on which data is actually used for the iteration. Data outside this window(displayed as 0 during the interactive input) are just ignored for the processing. Window can be entered several time, the result being cumulative.

see also : window_reset window_mode put apply

spike.v1.Kore.com_window_reset()

window_reset( {axis})

Resets the window to 1.0

see also : window window_mode

spike.v1.Kore.com_write(file_name)

write( file_name )

Writes the current data set to a file in standard format. same as writec

see also : read

spike.v1.Kore.com_writec(file_name)

write( file_name )

Writes the current data set to a file in standard format. same as writec

see also : read

spike.v1.Kore.com_zero()
spike.v1.Kore.com_zoom(*args)
spike.v1.Kore.compatibility(context)[source]

inject Kore definition into context given by the caller

spike.v1.Kore.dfactor(value)
spike.v1.Kore.diag(direc='F12')
spike.v1.Kore.dim(d)

Declaration of the ._current buffer

spike.v1.Kore.dmax(value)

Determines the fastest decaying component during Laplace analysis Given in arbitrary unit, use DFACTOR to relate to actual values.

see also : dmin dfactor laplace tlaplace invlap invtlap

sets the final value for the laplace transform

spike.v1.Kore.dmin(value)

Determines the fastest decaying component during Laplace analysis Given in arbitrary unit, use DFACTOR to relate to actual values.

see also : dmin dfactor laplace tlaplace invlap invtlap

sets the final value for the laplace transform

spike.v1.Kore.em(axis=0, lb=1.0)
spike.v1.Kore.escale(value=1.0)

The Entropy expression during Maximum Entropy run is computed as follow :

A = Escale * Sum(F(i)) P(i) = F(i)/A S = -Sum( log(P(i)) * P(i) )

Escale should be set to 1.0 for normal operation

see also : maxent

spike.v1.Kore.evaln(a, b, c=- 1, d=- 1)

evaluates the noise level as well as the overall offset of the data,over a area of the data. The results are stored in the NOISE and SHIFT contexts This command is called automatically whenever a data set is read. The command will prompt for the last selected region with the POINT command

in 2D, a,b,c,d is llf1, llf2, ur1, ur2

spike.v1.Kore.exchdata()

Exchange the contents of the DATA buffer with the current data-set.

see also : adddata multdata maxdata mindata add mult put

spike.v1.Kore.extract(*args)
spike.v1.Kore.fill(value)
spike.v1.Kore.freq(*args)

The context FREQ holds the basic frequency of the spectrometer (in MHz). freq_H1 is meant to be the basic frequency of the spectrometer (1H freq) and is not used in the program. freq2 (and freq1 in 2D) are the freq associated to each dimension (different if in heteronuclear mode). Values are in MHz.

see also : specw offset

spike.v1.Kore.freq1d(freq_h1, freq1)
spike.v1.Kore.freq2d(freq_h1, freq1, freq2)
spike.v1.Kore.freq3d(freq_h1, freq1, freq2, freq3)
spike.v1.Kore.ft(axis='F1')

Performs in-place complex Fourier Transform on the current data-set; Data-set must be Complex.

All FT commands work in 1D, 2D or 3D

<ul> <li> in 1D axis, is not needed <li> in 2D axis, is F1, F2 or F12 <li> in 3D axis, is F1, F2, F3, F12, F13, F23 or F123 </ul>

Here is a complete overview of FT routines : C stands for Complex, R stands for Real <pre>

FIDs Spectra C —FT—> C C <–IFT— C R –RFT–> C R <–IRFT– C C -FTBIS-> R C <-IFTBIS- R R Does not exist R

</pre>

spike.v1.Kore.ftbis(axis='F1')

Data-set must be Complex.

spike.v1.Kore.get(buffer_name)
if parameter == “DATA”:

self._datab = self._current.copy()

Moves the content of another buffer, back to the current buffer with buffer_name equal to: “data”: get the content of the data buffer “linefit”: get the simulated spectrum obtained form the current peak table “window”: get actual window used to compute the chisquare “filter”: get filter used for deconvolution “residue”: get residue of the spectrum after a maxent run “tab”: get the tab buffer used for tabulated fit see also : put apply

spike.v1.Kore.get_Kore_1D()

return a working copy of the 1D Kore internal buffer

spike.v1.Kore.get_Kore_2D()

return a working copy of the 2D Kore internal buffer

spike.v1.Kore.get_Kore_3D()

return a working copy of the 3D Kore internal buffer

spike.v1.Kore.get_col()
spike.v1.Kore.get_debug()
spike.v1.Kore.get_dfactor()
spike.v1.Kore.get_dim()
spike.v1.Kore.get_dmax()
spike.v1.Kore.get_dmin()
spike.v1.Kore.get_freq()
spike.v1.Kore.get_freq_1_2d()
spike.v1.Kore.get_freq_1_3d()
spike.v1.Kore.get_freq_1d()
spike.v1.Kore.get_freq_2_2d()
spike.v1.Kore.get_freq_2_3d()
spike.v1.Kore.get_freq_3_3d()
spike.v1.Kore.get_itype_1d()
spike.v1.Kore.get_itype_2d()
spike.v1.Kore.get_itype_3d()
spike.v1.Kore.get_noise()
spike.v1.Kore.get_npk1d()
spike.v1.Kore.get_npk2d()
spike.v1.Kore.get_npk3d()
spike.v1.Kore.get_offset_1_2d()
spike.v1.Kore.get_offset_1_3d()
spike.v1.Kore.get_offset_1d()
spike.v1.Kore.get_offset_2_2d()
spike.v1.Kore.get_offset_2_3d()
spike.v1.Kore.get_offset_3_3d()
spike.v1.Kore.get_ph0()
spike.v1.Kore.get_ph1()
spike.v1.Kore.get_row()
spike.v1.Kore.get_shift()
spike.v1.Kore.get_si1_1d()
spike.v1.Kore.get_si1_2d()
spike.v1.Kore.get_si1_3d()
spike.v1.Kore.get_si2_2d()
spike.v1.Kore.get_si2_3d()
spike.v1.Kore.get_si3_3d()
spike.v1.Kore.get_si_tab()
spike.v1.Kore.get_specw_1_2d()
spike.v1.Kore.get_specw_1_3d()
spike.v1.Kore.get_specw_1d()
spike.v1.Kore.get_specw_2_2d()
spike.v1.Kore.get_specw_2_3d()
spike.v1.Kore.get_specw_3_3d()
spike.v1.Kore.get_version()
spike.v1.Kore.geta_max(index)
spike.v1.Kore.geta_pk1d_a(i)
spike.v1.Kore.geta_pk1d_a_err(i)
spike.v1.Kore.geta_pk1d_f(i)
spike.v1.Kore.geta_pk1d_f_err(i)
spike.v1.Kore.geta_pk1d_p(i)
spike.v1.Kore.geta_pk1d_t(i)
spike.v1.Kore.geta_pk1d_w(i)
spike.v1.Kore.geta_pk1d_w_err(i)
spike.v1.Kore.geta_pk2d_a(i)
spike.v1.Kore.geta_pk2d_a_err(i)
spike.v1.Kore.geta_pk2d_f1f(i)
spike.v1.Kore.geta_pk2d_f1f_err(i)
spike.v1.Kore.geta_pk2d_f1w(i)
spike.v1.Kore.geta_pk2d_f1w_err(i)
spike.v1.Kore.geta_pk2d_f2f(i)
spike.v1.Kore.geta_pk2d_f2f_err(i)
spike.v1.Kore.geta_pk2d_f2w(i)
spike.v1.Kore.geta_pk2d_f2w_err(i)
spike.v1.Kore.geta_pk3d_a(i)
spike.v1.Kore.geta_pk3d_f1f(i)
spike.v1.Kore.geta_pk3d_f1w(i)
spike.v1.Kore.geta_pk3d_f2f(i)
spike.v1.Kore.geta_pk3d_f2w(i)
spike.v1.Kore.geta_pk3d_f3f(i)
spike.v1.Kore.geta_pk3d_f3w(i)
spike.v1.Kore.htoi(index, dim, axis)
spike.v1.Kore.htop(index, dim, axis)
spike.v1.Kore.ift(axis='F1')

Performs in-place inverse complex Fourier Transform on the current data-set; Data-set must be Complex.

spike.v1.Kore.iftbis(axis='F1')

Data-set must be Real.

spike.v1.Kore.invf(axis='F1')

Process data-sets by multiplying by -1 1 point every 2 points. Equivalent to taking the conjugated on complex data-sets, or hyperconjugated on hypercomplex data-sets. If applied on a complex FID, inverses the final spectrum obtained after Fourier transform.

see also : revf itype ft reverse

spike.v1.Kore.irft(axis='F1')

Perform real-to-complex Fourier Transform on data

spike.v1.Kore.itoh(index, dim, axis)
spike.v1.Kore.itop(index, dim, axis)
spike.v1.Kore.itype(value)
spike.v1.Kore.join(file_name)

write( file_name )

Writes the current data set to a file in standard format. same as writec

see also : read

spike.v1.Kore.lb(value)
spike.v1.Kore.maxdata()

Compare the content of the current buffer with the content of the DATA buffer, and leave in memory the largest of the 2 values. Usefull for projections or symetrisation macros.

see also : mindata exchdata adddata multdata sym put

spike.v1.Kore.mindata()

Compare the content of the current buffer with the content of the DATA buffer, and leave in memory the smallest of the 2 values. Usefull for projections or symetrisation macros.

see also : maxdata exchdata adddata multdata sym put

spike.v1.Kore.minimax(mini, maxi)
spike.v1.Kore.minus()
spike.v1.Kore.modifysize(si1, si2)

modifysize( si1, si2, si3 )

Permits to modify the leading sizes of a 2D or a 3D data-set, provided the product of the sizes : si1*si2{*si3} is equal to the product of the old ones.

Does not actually modify the data.

see also : chsize

spike.v1.Kore.modulus()
spike.v1.Kore.mult(constant)
spike.v1.Kore.mult1d(axis=0)

multiply the current 2D or 3D with the contents of the 1d buffer considered as a f1(i)f2(j) concatenated buffer

see also : multdata add adddata filter

spike.v1.Kore.multdata()

Multiplies point by point, the content of the current working buffer with the content of the DATA buffer. Permits to realize convolution product. Works in 1D, 2D, in real, complex and hypercomplex modes.

see also : ADDDATA MINDATA MAXDATA EXCHDATA MULT PUT

spike.v1.Kore.noise(value)

Contains the level of noise in the data-set. When loading data (1 or 2D) the noise level is evaluated automatically from the last 10th of the data. Can also be set with EVALN. Used by INTEG and by Maximum Entropy run.

spike.v1.Kore.offset(*args)

Permits to specify the offset of the right-most (upper right most in 2D) point of the data set. The value for offset are changed by @extract see also : specw

spike.v1.Kore.offset1d(off1)
spike.v1.Kore.offset2d(off1, off2)
spike.v1.Kore.offset3d(off1, off2, off3)
spike.v1.Kore.one()
spike.v1.Kore.peak(pkradius=0)
spike.v1.Kore.phase(ph0, ph1, axis=1)
spike.v1.Kore.pkclear()
spike.v1.Kore.plane(axis, i)

Extract the nth 1D row (along F2 axis) from the 2D data-set, and put it in the 1D buffer. The row will be available as a 1D data set when going from 2D to 1D

spike.v1.Kore.plus()
spike.v1.Kore.power2(i)

Compute the power of 2 that is under or equal to i

spike.v1.Kore.proj(axis, projtype)
spike.v1.Kore.ptoh(index, dim, axis)
spike.v1.Kore.ptoi(index, dim, axis)
spike.v1.Kore.put(parameter)

put(parameter, n)

Moves the content of the current buffer to an other buffer With parameter equal to:

xx* DATA
load the data to be used for MaxEnt processing or

as a off-hand place for processing

in 1D only FILTER load the filter used for Deconvolution. If NCHANNEL is

greater than 1, then which channel you want to put. eg. PUT FILTER 3. PUT FILTER 0 will consider the current data set as the multichannel filter, and will load the whole filter. Useful when associated with GET FILTER to store filters as files.

WINDOW load the window to be used for MaxEnt processing TAB load the TAB buffer, used for tabulated fit.

in 2D only ROW n load the 1D buffer in the ROW n COL n load the 1D buffer in the COL n

in 3D only PLANE Fx n load the 2D buffer in the plane Fx n

see also : GET SHOW APPLY

spike.v1.Kore.read(file_name)

Reads the file as the new data set in standard format . Same as readc

see also : write

spike.v1.Kore.real(axis='F1')
spike.v1.Kore.report()

print a summary of the internal state of the kernel

spike.v1.Kore.reverse(axis='F1')
spike.v1.Kore.revf(axis='F1')

Processes FID data-sets by multiplying by -1 2 points out of 4. Permits to preprocess Bruker FIDs in Dim 2 (Bruker trick) before RFT, or permits to bring back zero frequency in the center for some other data formats

spike.v1.Kore.rft(axis='F1')

Perform real-to-complex Fourier Transform on data

spike.v1.Kore.row(i)

Extract the nth 1D row (along F2 axis) from the 2D data-set, and put it in the 1D buffer. The row will be available as a 1D data set when going from 2D to 1D

spike.v1.Kore.set_Kore_1D(npkdata)

uses npkdata as the 1D Kore buffer

spike.v1.Kore.set_Kore_2D(npkdata)

uses npkdata as the 1D Kore buffer

spike.v1.Kore.set_Kore_3D(npkdata)

uses npkdata as the 3D Kore buffer

spike.v1.Kore.set_task(task)
spike.v1.Kore.setval(*args)

Will set the value of the data point to x. The number of coordinates of the point depends of dim. In dim 2 or 3, coordinates are F1 F2 or F1 F2 F3. Can be usefully used when associated to the functions valnd() to change data point value.

spike.v1.Kore.setval1d(i, x)
spike.v1.Kore.setval2d(i, j, x)
spike.v1.Kore.setval3d(i, j, k, x)
spike.v1.Kore.shift(value)

This context holds the systematic baseline shift of the current data-set, computed automatically by EVALN. Used by INTEG. see also : evaln noise addbase

spike.v1.Kore.sin(maxi, axis=1)
spike.v1.Kore.specw(*args)

Permits to enter the value for the spectral width of the current data-set. One parameter will be needed for each dimension of the data-set.

When reading a file the spectral width is set to 2000 * 3.1416 if no parameter block is available.

The value for spectral width are changed by EXTRACT

see also : offset extract

spike.v1.Kore.specw1d(x)
spike.v1.Kore.specw2d(x, y)
spike.v1.Kore.specw3d(x, y, z)
spike.v1.Kore.sqsin(maxi, axis=1)
spike.v1.Kore.status()

print a summary of the internal state of the kernel

spike.v1.Kore.tm(tm1, tm2, axis=0)
spike.v1.Kore.val1d(i)
spike.v1.Kore.val2d(i, j)
spike.v1.Kore.val3d(i, j, k, x)
spike.v1.Kore.vert(i, j)

In 3D mode, extract a column orthogonal to the last displayed plane. The column is taken at coordinates i and j in this plane.

see also : plane col row dim

spike.v1.Kore.window({axis}, x, y)

Define the window (with the starting point and the ending point) on which data is actually used for the iteration. Data outside this window(displayed as 0 during the interactive input) are just ignored for the processing. Window can be entered several time, the result being cumulative.

see also : window_reset window_mode put apply

spike.v1.Kore.window_reset({axis})

Resets the window to 1.0

see also : window window_mode

spike.v1.Kore.write(file_name)

Writes the current data set to a file in standard format. same as writec

see also : read

spike.v1.Kore.writec(file_name)

write( file_name )

Writes the current data set to a file in standard format. same as writec

see also : read

spike.v1.Kore.zero()
spike.v1.Kore.zoom(*args)

spike.v1.Launch module

spike.v1.NPKv1 module

spike.v1.Nucleus module

Values (tentatively) from ROBIN K. HARRIS, EDWIN D. BECKER, SONIA M. CABRAL DE MENEZES, ROBIN GOODFELLOW, AND PIERRE GRANGER “NMR NOMENCLATURE.NUCLEAR SPIN PROPERTIES AND CONVENTIONS FOR CHEMICAL SHIFTS (IUPAC Recommendations 2001)” Pure Appl.Chem., Vol.73, No.11, pp.1795-1818, 2001.

spike.v1.Nucleus.freq(spin='1H', H_freq=100.0, mode='standard')[source]

returns the frequency of the given spin, in a field were the proton 1H is at frequencey H_freq values if mode is “standard” or “IUPAC”, (default) the standard values are used if mode is “biomolecule” or “IUPAB” values are taken from previous paper

Markley et al. Recommendations for the presentation of NMR structures of proteins and nucleic acids. Journal of Molecular Biology (1998) vol. 280 (5) pp. 933-952 This previous recommendation was only mentionning 2D 13C, 15N and 31P, but was using different references They are given in table 4 of 2001 paper

Usage is to use 1998 recommendation (mode = “biomolecule”) for proteins and nucleic acids.

this makes +2.6645 ppm shift in 13C. this makes a +380.4434 ppm shift in 15N.

spike.v1.Nucleus.freqB(spin='1H', Bo=14.092)[source]

returns the frequency in MHz of the given spin, in a field of intensity Bo Tesla

spike.v1.Nucleus.receptivity(spinans, spinref='1H')[source]

returns the receptivity of a given spin, relative to spinref

spike.v1.Nucleus.report(H_freq=600.0)[source]

report the spin table at a given field

spike.v1.Param module

This class extend the standard dictionnary behaviour. It is used to read and store all the parameters used by the NPK program.

  • it adds the possibility to load from files and dump/store to files the content of the dictionnary the file will be of the form : key=value, with one entry per line

  • when extracted from the dictionnnary, values are interpreted in several manner

    o 1K is replaced by 1024 and all multiples (4k; 24k; etc…) o 1M is replaced by 1024*1024 and all multiples (4M; 24M; etc…) o all arithmetic is evaluated : math.pi/2, 0.1*get_si1_2d(), etc…

class spike.v1.Param.NPKParam(dict_=())[source]

Bases: collections.UserDict

NPKParam class handles the parameter set used by NPK

build_default(default_list)[source]

build the default parameter dictionary

used in standard actions, returns a dictionary built from the default parmaters (see do_default.py and Param/*) and the additional parameters defined in the optionnal p_in_arg overwrite the default values

change_key(patternOut, patternIn)[source]

goes though the given dictionnay (which remains unchanged) and changes in keys the pattern “patternIn” to “patternOut” and returns the modified dictionnary

typically used in 3D processing :

p_in.change_key(‘f1’, ‘f2’).change_key(‘f2’, ‘f3’)

substitutes F2 (of the 3D) by F1 (of the 2D plane) substitutes F3 (of the 3D) by F2 (of the 2D plane)

dump(fname)[source]

dump the content of the Parameter dictionnary as a property list file entries are not evaluated

one entry per line with the following syntax : entry=value

load(fname)[source]

load a property list file as a dictionary

one entry per line with the following syntax : entry=value

keys are set to lowercase

raw(key)[source]

acces to the raw data present in the dictionnary, necessary in certain cases

store(fname)[source]

write the content of the Parameter dictionnary as a property list file equivalent to dump, BUT entries are evaluated

one entry per line with the following syntax : entry=value

spike.v1.Param.NPKevaluate(val)[source]
  • val is interpreted in several manner

    o 1K is replaced by 1024 and all multiples (4k; 24k; etc…) o 1M is replaced by 1024*1024 and all multiples (4M; 24M; etc…) o all arithmetic is evaluated : math.pi/2, 0.1*get_si1_2d(), etc…

spike.v1.Param.parse(line)[source]

spike.v1.Process1D module

This module contains all the routines needed to process 1D NMR spectra

The following functions realize a set of operations, needed for NMR 1D processing, You will find operation for FT analysis, MaxEnt Analysis, Inverse Fourier, etc..

Processing are divided in pre - FT - Post phases. For instance a typical 1D procesing, would be

pre() ft() post()

but other combinations are possible.

Most functions take the following arguments : arguments : audit

the opened audit file, if empty or set to none, audit will go to the stdout

filein the file name of the input file,

will loaded before operation, if name is “memory”, then processing takes place on the current 2D kernel buffer

fileout the file name of the input file, can be “memory”

will written after operation, if name is “memory”, then processing results is left in 2D kernel buffer

p_in the dictionary containing all the processing parameters

most entries are optionnal as entries are protected with try / except

f_in the dictionary containing all the details on the spectrum “filein” f_out details on the spectrum “fileout” will be put in this dictionary location the directory where the output files will be written

spike.v1.Process1D.FT1D(audit, p_in_arg, f_in, f_out, inputfilename, outputfilename)[source]

FT processing of a 1D FID

based on pre_ft_1d() ft_1d() post_ft_1d()

spike.v1.Process1D.MaxEnt1D(audit, p_in_arg, f_in, f_out, inputfilename, outputfilename)[source]

MaxEnt processing of a 1D FID

based on pre_ft_1d() maxent_1d() post_maxent_1d()

spike.v1.Process1D.ft_1d(audit, filein, fileout, p_in, f_in, f_out)[source]

This macro realizes the FT operation on a 1D FID

  • truncate : truncates the FID by removing the last points

  • lp_extend : extend FID with a Linear Prediction algorithm

  • apodize : standard apodisation by a window

  • fourier_transform : performs the Fourier transform

  • causal_corr : performs causal correction of the spectrum if not done on the FID

  • reverse : reverses the spectral axis after FT

%F1-input-domain% time %F1-output-domain% frequency %dimensionality% 1

%author% Marc-Andre Delsuc %version% 6.0

spike.v1.Process1D.ift_1d(audit, filein, filout, p_in, f_in, f_out)[source]

This macro Computes the Inverse Fourier transform of a 1D spectrum

  • apodize : standard apodisation

  • inverseFourier : performs the inverse Fourier transform

  • reverse : reverses the spectral axis after FT

%F1-input-domain% frequency %F1-output-domain% time %dimensionality% 1

%author% Marc-Andre Delsuc %version% 6.0

spike.v1.Process1D.integ_1d(audit, filein, integratout, p_in, f_in, f_out)[source]

This macro Computes integrales of a 1D spectrum - integral : omputes integral positions from peaks

%F1-input-domain% frequency %F1-output-domain% frequency %dimensionality% 1

%author% Marc-Andre Delsuc %version% 6.0

spike.v1.Process1D.maxent_1d(audit, filein, fileout, p_in, f_in, f_out)[source]

This macro realizes the MaxEnt analysis of a 1D FID - freq_massage : computes a temporary Fourier transform - truncate : truncates the FID by removing the last points - preconvoluate :apply a preconvolution before analysis, this may help stability of the algorithm and enhance noise rejection - partialsampling : set-up for processing data partially sampled in the time domain - deconvoluate : apply a deconvolution during analysis, - maxent : apply MaxEnt analysis,

%F1-input-domain% frequency %F1-output-domain% frequency %dimensionality% 1

%author% Marc-Andre Delsuc %version% 6.0

spike.v1.Process1D.post_ft_1d(audit, filein, fileout, p_in, f_in, f_out)[source]

This macro realizes the Post processing of a 1D spectrum

  • modulus : takes the complex modulus of the spectrum

  • phase : applies a phase correction to the spectrum

  • autophase : automatically computes the phase correction of the spectrum

  • invHilbert : apply an inverse Hilbert transform

  • calibration : calibrate the ppm scale on the spectrum

  • spectral_zone : extract one spectral zone of the spectrum

  • baseline_correction : applies a baseline correction to the spectrum

  • smoothing : apply a smoothing filter to the data-set

  • median : apply a median filter to the data-set

  • derivative : compute the nth derivative of the data-set

  • spec_noise : evaluate noise, estimated by finding an empty zone

%F1-input-domain% frequency %F1-output-domain% frequency %dimensionality% 1

%author% Marc-Andre Delsuc %version% 6.0

spike.v1.Process1D.post_maxent_1d(audit, filein, fileout, p_in, f_in, f_out)[source]

post processing of a 1D spectrum processed by MaxEnt

spike.v1.Process1D.pp_1d(audit, filein, filepeak, p_in, f_in, f_out)[source]

This macro realizes the peak picking of a 1D spectrum - spec_noise : evaluate noise, estimated by finding an empty zone - prefilter : smooths the spectrum before peak-picking, modification is not stored permanently - restrict : restricts the peak picking to a certain spectral zone - peakpick : do the peak picking, by detecting local extrema - aggregate : sorts peak list to aggregate peaks close from each other

%F1-input-domain% frequency %F1-output-domain% frequency %dimensionality% 1

%author% Marc-Andre Delsuc %version% 6.0

spike.v1.Process1D.pre_ft_1d(audit, filein, fileout, p_in, f_in, f_out)[source]

This macro realizes the pre FT operation on a 1D FID

  • fid_noise : evaluate of noise and offset levels in FID

  • dc_offset : corrects for constant offset in FID

  • causalize : changes DSP processed FID (Bruker) to causal FID’s by Hilbert transform

  • flatten_solvent : removes solvent signal by FID analysis

  • left_shift : drops first points of the FID

  • right_shift : adds empty points on the beginning of the FID

  • back_extend : reconstructs missing points in the beginning of the FID by LP analysis

%F1-input-domain% time %F1-output-domain% time %dimensionality% 1

%author% Marc-Andre Delsuc %version% 6.0

spike.v1.Process1D.write_file_1d(audit, fileout)[source]

write a 1D file and update the audittrail

spike.v1.Process2D module

spike.v1.Process3D module

spike.v1.ProcessDosy module

spike.v1.mflops module

spike.v1.test module

spike.v1.v1_Tests module

Module contents

The NPK Package