PeakBasic

ccpnmr.analysis.core.PeakBasic.addPeak(peakList, position, tile=None, parent=None, doFit=True)

Add a peak to a peak list at a position in a specified GUI tile location

Input
Nmr.PeakList, List of Floats (Nmr.PeakDim.positions),
List of Ints (Nmr.PeakDim.numAliasing), Tkinter.widget (GUI parent)
Output

Nmr.Peak

ccpnmr.analysis.core.PeakBasic.addPeakToSelected(peak, parent=None)

Add a peak to the GUI current peak selection

Input

Nmr.Peak, Tkinter.widget .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.aliasedPeakDimPosition(peakDim)

Give the aliased points position of a given peak dimension

Input

Nmr.PeakDim .. describe:: Output

Float (Nmr.PeakDim.position points)

ccpnmr.analysis.core.PeakBasic.arePeaksAssignedSame(peakA, peakB)

Determine whether peaks carry the same resonance assignments. PeakDimContrib order unimportant. If one peak has a lower dimensionality than the other then the best overlapping mapping of dims is considered: e.g. 3D and 2D NOESY peaks have same asignment if common 1H dims carry same resonances. Reciprocal peaks; e.g. with resonances (r1, r2) and (r2, r1) respectively on their dims, are considered to be assigned the same.

Input

Nmr.Peak, Nmr.Peak

Output

Boolean

ccpnmr.analysis.core.PeakBasic.checkContourRegion(peak)

Ensure the contours of a peaks spectrum extend to cover the input peak’s position.

Input

Nmr.Peak .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.copyPeakList(peakList, destPeakList, progressBar=None, rePick=False, peaks=None)

Copies peaks from one peak list to another if appropriate, i.e dimension isotopes match Has the option to re-pick peaks, rather than doing a straight copy, NB this routine will not handle subpeaks correctly. Optional argument to copy only a subset of peaks from the source peak list.

Input

Nmr.PeakList, Nmr.PeakList, ProgressBar, Boolean, List of Nmr.Peaks

Output

None

ccpnmr.analysis.core.PeakBasic.copyPeakListNew(peakList, destDataSource, peakListParams=None)

Copies an entire peak list to another (or the same) DataSource) There are no appropriateness tests (so far) NB this routine will handle subpeaks correctly NB spectra must have same referencing otherwise peak points will not make sense

Input

Nmr.PeakList, Nmr.DataSource, dictionary peakListParams is a dictionary of parameters that will be passed to the copy of the peaklist (for e.g. changing its name)

Output

Nmr.PeakList (new peak list)

ccpnmr.analysis.core.PeakBasic.deletePeak(peaks)

Delete given peaks with a warning

Input

List of Nmr.Peaks .. describe:: Output

Boolean (success)

ccpnmr.analysis.core.PeakBasic.doPeaksOverlap(peakA, peakB)
Determine if two peaks overlap accordint to their data dim
assignment tolerance.
Input

Nmr.Peak, Nmr.Peak .. describe:: Output

Boolean

ccpnmr.analysis.core.PeakBasic.findClosePeaks(peak, peakList, tolerances=None, pickNewPeaks=False, considerAliased=False, dimMapping=None, noiseThreshold=None)

Find peaks in a peak list within position tolerances of the input peak. Default tolerances are the assignment tolerances for each dimension The peak dimension distances are weighted according to the tolerances. Option to pick new peaks if no existing peaks are found. Option to look for peaks at aliased positions. Optional dict can be passed in to say how peak dims map together (list indices start at 0, key is for input peak). New peaks will not be picked below the noiseThreshold.

Input

Nmr.Peak, Nmr.PeakList, List of Floats, Boolean, Boolean, Boolean

Output

List of Nmr.Peaks

ccpnmr.analysis.core.PeakBasic.findDataDimRegions(dataDim, region, axisUnit, thickness)

Define a region of a data dimension in terms of a given axis unit with extra thickness if required

Input

Nmr.FreqDataDim, List of List of Floats (min,max poitions), Word (ShiftList.unit), List of Floats .. describe:: Output

List of Tuple of Floats min,max poitions), Float (min value), Float (max value)

ccpnmr.analysis.core.PeakBasic.findMatchingPeaks(peakList, peakDim)

Find peaks within a peak list that are within the data dim assignment tolerance

Input

Nmr.PeakList, Nmr.PeakDim .. describe:: Output

List of Nmr.Peaks

ccpnmr.analysis.core.PeakBasic.findNumAliasing(dataDimRef, p)

Find the number if aliased spectral widths at a given point for a reference data dimension

Input

Nmr.DataDimRef, Float .. describe:: Output

Int (number of aliasings)

ccpnmr.analysis.core.PeakBasic.findPeakBoxValues(peak)

Estimates the value of a peak’s box width

Input

Nmr.Peak .. describe:: Output

List of List of Floats (min,max points positions for dim), List of Floats (Nmr.PeakDim.BoxWidth in points), List of Floats (centre position)

ccpnmr.analysis.core.PeakBasic.findPeakVolume(peak, volumeMethod=None)

Finds the volume of a peak using the volume method passed in, or if not set then the one stored in application specific data.

Input

Nmr.Peak .. describe:: Output

Float

ccpnmr.analysis.core.PeakBasic.findPeaks(peakList, region, parent=None, thickness=None, excludedRegions=None, intensityThreshold=None)

Pick new peaks in a given region (units: ppm) of a peak list. Thickness (units: points) can be specified for orthogonal dimensions to include extra planes (must be of length ndim). ExcludedRegions (units: points) can be specified to exclude a list of regions. Each list is an ndim list of 2-tuples, with each 2-tuple the (min, max) of that dimension. Peaks are added to the GUI current selection.

Input

Nmr.PeakList, List of List of Floats (min,max positions) in ppm, ‘w’idget, List of Floats, List of List of 2-tuples of Floats in points

Output

List of Nmr.Peaks

ccpnmr.analysis.core.PeakBasic.findPositionMatches(peaks, dimDict, peakLists=None, matchTolerance=None, separateSpinSystems=False)

Search the target peaklist or the peak lists of the input peaks for other groups of peaks which have matches to the positions of the input peaks in the given dimension. The search dimension is given but the input dictionary, keyed by peak list. Returns a ranked list of group positions in order of strength of match. Option to pass in a tolerance for the match dimension. Option to separate groups according to spinSystem assignment.

Input

List of Nmr.Peaks, Dict of (NmrPeakList:Int) Int, Nmr.PeakLists, Float, Boolean

Output

Tuple of (Float, List of Floats (positions), List of Nmr.Peaks)

ccpnmr.analysis.core.PeakBasic.findSameAssignmentPeaks(peak, peakList=None, onlyFullyAssigned=True)

Find a peak in a peak list (or all peak lists if none is specified) with the same assignment as the input peak, if it exists. Option to specifiy that the funtion only works for fully assigned peaks.

Input

Nmr.Peak, Nmr.PeakList

Output

List of Nmr.Peaks

ccpnmr.analysis.core.PeakBasic.findShiftDistPeakMatches(peak, peakList, threshold, scaleFactorDict=None, considerAliased=True, dimMapping=None)
Find peaks within a given shift distance threshold of a peak and
rank them by distance. A different threshold is uesd for each peak dim accoding to a dictonary of scale factors keyed by isotope. Option to specify dim mapping for source to target dims (starts at 0)
Input
Nmr.Peak, Nmr.PeakList, Floats (threshold),
Dict of ExpdimRef.isotopeCode:Float, Dict of Int:Int
Output

List of 2-Lists [Float, Nmr.Peak] - (distance, peak)

ccpnmr.analysis.core.PeakBasic.findSymmetryPeaks(peak, tolerances=None, peakLists=None)
Find the symmetry related transpose peaks (e.g. NOE return)
within tolerances given an input peak. Option to search a given set of peak lists the default is otherwise the input peaks list.
Input

List of Nmr.Peak .. describe:: Output

List of Nmr.Peaks

ccpnmr.analysis.core.PeakBasic.fitPeaks(peaks, fitMethod)

Fit peaks using the specified fitMethod. Input: peaks, all assumed to be from the same peakList.

fitMethod (String)

Output: None

ccpnmr.analysis.core.PeakBasic.getAliasedPeakDimPositions(peakDim, shiftRanges)
Give all the aliased/unaliased positions of a peakDim either in a
specified shift range or the full range for the dimension type. Units for the shift ranges are ppm. Note this function uses the actual spectrum locations, rather than coupling center. Use the AssignmentBasic version to consider the center of multiplets.
Input

Nmr.PeakDim, List of (Tuples of Floats (MinShift,MaxShift) ) .. describe:: Output

List of Floats (Nmr.PeakDim.positions)

ccpnmr.analysis.core.PeakBasic.getClosestPeak(peak, peaks, tolerances, dimMapping=None)

Find the closest peak to the input peak from a list of peaks. The peak dimensions are weighted according to input tolerances. Optional dict can be passed in to say how peak dims map together (list indices start at 0).

Input

Nmr.Peak, List of Nmr.Peaks, List of Floats, Dict of Int:Int

Output

Nmr.Peak

ccpnmr.analysis.core.PeakBasic.getDataDimMapping(dataSource, targetDataSource)
Get a mapping of the mapping of the dimensions of one
spectrum onto another, where they match.
Input

Nmr.DataSource, Nmr.DataSource .. describe:: Output

Dict of Int:Int (DataDim.dim:DataDim.dim)

ccpnmr.analysis.core.PeakBasic.getDataDimRefMapping(dataSource, targetDataSource)
Get a mapping of the dataDimRefs for a data source to the equivalent
dataDimRefs in a target data source. Assumes spectra with same types and number of dims.
Input

Nmr.DataSource, Nmr.DataSource .. describe:: Output

Dict of Nmr.DataDimRef:Nmr.DataDimRef

ccpnmr.analysis.core.PeakBasic.getDiagonalExclusion(dataDim1, dataDim2, exclusion)

Get the diagonal exclusion for (dataDim1, dataDim2)

Input

Nmr.AbstractDataDim, Nmr.AbstractDataDim .. describe:: Output

The diagonal exclusion as a 5-tuple:
(dim1, dim2, dim1 scale, dim2 scale, dim1 to dim2 translation)
ccpnmr.analysis.core.PeakBasic.getDiagonalExclusions(spectrum)

Get the diagonal exclusions for a given spectrum (used in C world).

Input

Nmr.DataSource .. describe:: Output

List of diagonal exclusions, each is a 5-tuple:
(dim1, dim2, dim1 scale, dim2 scale, dim1 to dim2 translation)
ccpnmr.analysis.core.PeakBasic.getExclusionInfo(dataDim)

Get the exclusion information for dataDim

Input

Nmr.AbstractDataDim .. describe:: Output

The exclusion information as a 2-tuple:
(scale, translation)
ccpnmr.analysis.core.PeakBasic.getIsotopeWeightedTolerances(peak, tolerance, scaleFactorDict=None)
Weight a shift distance tolerance according to the isotopes
that correspond to a peak dimension, with the option to pass in the isotope scale factors. Also returns scale factors used for each dimension.
Input

Nmr.Peak, Float (tolerance), Dict of Resonance.isotopeCode:Float (isotope: scale factor) .. describe:: Output

List of Floats (tolerences), List of Floats (scale factors)

ccpnmr.analysis.core.PeakBasic.getPeakAnnotation(peak, noPeakAnnotationChar='', noPeakDimAnnotationChar='', joinChar='', doPeakDims=True)

Get annotation text for the peak.

Input

ccp.nmr.Nmr.Peak, String, String, String

Output

String

ccpnmr.analysis.core.PeakBasic.getPeakDimPosition(peakDim, toUnit='point')

Give the position of peak dimension in specified units

Input

Nmr.PeakDim, Word (ShiftList.unit) .. describe:: Output

Float

ccpnmr.analysis.core.PeakBasic.getPeakDimPpm(peakDim)

Often depricated given peakDim.value Get the position of a peak dimension in PPM

Input

Nmr.PeakDim .. describe:: Output

Float (ppm)

ccpnmr.analysis.core.PeakBasic.getPeakHeight(peak)

Gives a peak’s height

Input

Nmr.Peak .. describe:: Output

Float (Nmr.PeakIntensity.value)

ccpnmr.analysis.core.PeakBasic.getPeakIntensity(peak, intensityType)

Gives a peak’s intensity value according to the input intensity type

Input

Nmr.Peak .. describe:: Output

Float (Nmr.PeakIntensity.value)

ccpnmr.analysis.core.PeakBasic.getPeakMatchRegion(peak, tolerances, considerAliased=False)
Get a region (list of min max bound for each dimension) around a
peak position with bounds set by input tolerances. The region will be twice the tolerance width and centered on the peakDim position. Option to also consider aliased/unaliased positions
Input

Nmr.Peak, List of Floats (tolerances for each Nmr.PeakDim), Boolean .. describe:: Output

List of List of (Float, Float)

ccpnmr.analysis.core.PeakBasic.getPeakVolume(peak)

Gives a peak’s volume

Input

Nmr.Peak .. describe:: Output

Float (Nmr.PeakIntensity.value)

ccpnmr.analysis.core.PeakBasic.getPeaksOverlapScore(peakA, peakB, tolerances=None, considerAliased=False, dimMapping=None)
Get a score for how well overlapped two peaks are. Scores for each peak dimension are normalised with respect to
input dimension tolerances (often DataDim assignment tolerance) Default tolerances are the assignment tolerances for each dimension Option to score peaks when there may be an aliasing mismatch. Optional dict can be passed in to say how peak dims map together (list indices start at 0).
Input

Nmr.Peak, Nmr.Peak, List of Floats (tolerances for each Nmr.PeakDim), Boolean, Dict of Int:Int .. describe:: Output

Float

ccpnmr.analysis.core.PeakBasic.getSpinSystemLinksLabel(peak)

Makes a setring describing the spin system connectivities of a peak.

Input

Nmr.Peak .. describe:: Output

Line

ccpnmr.analysis.core.PeakBasic.isPeakInRegion(peak, region, acceptAlias=True)

Determine whether a peak is within a given region optionally considering aliasing

Input

Nmr.Peak, List of List of Floats (min,max poitions), Boolean .. describe:: Output

Boolean

ccpnmr.analysis.core.PeakBasic.makeIntermediatePeak(peaks)
Make a peak which is intermediate in position to
the input peaks
Input

List of Nmr.Peaks

Output

Nmr.Peak

ccpnmr.analysis.core.PeakBasic.makePeakAnnotation(peak)
Sets the annotation for a peak that indicates peak molSystem, merit and details
(not the annotation of peakDims)
Input

Nmr.Peak .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.makePeakListFromShifts(spectrum, useUnassigned=True, progressBar=None, shiftList=None, molSystem=None, bondLimit=6, residueLimit=1, labelling=None, labellingThreshold=0.10000000000000001)

Make an arteficial peak list using shift intersections from a shift list Boolean option to consider only shifts with atom assigned resonances. Option to filter on a specific molSystem. Option to limit through-space transfers to a limited number of bonds and a given residue range. Optional labelling scheme/mixture and threshold to filter according to isotopomers.

Input

Nmr.DataSource, Boolean, memops.gui.ProgressBar, Nmr.ShiftList MolSystem.MolSystem, Int, 2-Tuple of Ints, ChemComLabel.LabelingScheme or True (automatic from experiment MolLabel), Float

Output

None

ccpnmr.analysis.core.PeakBasic.makeTransposePeakList(peakList)
Make a transpose peak list, where equivalent dimension positions are swapped,
using peak positions form an existing peak list. The new peak list is created in the same spectrum as the input. Assignments will be copied, and this will not affect the shift values.
Input

ccp.nmr.Nmr.PeakList .. describe:: Output

ccp.nmr.Nmr.PeakList

ccpnmr.analysis.core.PeakBasic.mergePeaks(peaks)

Merge two peaks together. * Function needs work/checking * Not really used in Analysis currently

Input

List of Nmr.Peaks .. describe:: Output

Nmr.Peak

ccpnmr.analysis.core.PeakBasic.movePeak(peak, posn)

Move a peak to a given position. Automatically calculates any peak aliasing

Input

Nmr.Peak, List of Floats (Nmr.PeakDim.postion in points) .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.pickPeak(peakList, position, unit='point', doFit=True, figOfMerit=1.0)

Pick a peak at a given position in given units in a peak list.

Input

Nmr.PeakList, List of Floats (Nmr.PeakDim.positions), Word (Nmr.ShiftList.unit), Boolean .. describe:: Output

Nmr.Peak

ccpnmr.analysis.core.PeakBasic.propagatePeakUnaliasing(refPeak, peaks)
Gives the same positional unaliasing (as the input reference peak)
to a group of peaks.
Input

Nmr.Peak, List of Nmr.Peaks .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.refreshPeakAnnotations(project)

Refreshes all of the peak and peakDim annotations for all peaks in a project

Input

Project .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.removePeakFromSelected(peak, parent=None)

Remove a peak to the GUI current peak selection

Input

Nmr.Peak, Tkinter.widget .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.removePeaksAssignment(peaks)

Clear all peak dimension contribs for a list of peaks

Input

List of Nmr.Peaks .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.searchPeaks(peakLists, region, parent=None, thickness=None)

Find existing peaks within a given region of a peak list. Add peaks to the current GUI selection. Thickness (units: points) can be specified for orthogonal dimensions to include extra planes (must be of length ndim or is ignored for a given peakList).

Input

Nmr.PeakList, List of List of Floats (min,max positions), ‘w’idget, List of Floats

Output

List of Nmr.Peaks

ccpnmr.analysis.core.PeakBasic.setManualPeakIntensity(peak, value, intensityType='height')

Manually define a peaks volume/height

Input

Nmr.Peak, Float (Nmr.PeakIntensity.value), String (Nmr.PeakIntensity.intensityType) .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.setPeakDimNumAliasing(peakDim, numAliasing, doWarning=True)
Set the number of peakDim aliasings to set a peakDim position and
put it at its non-folded, correct ppm
Input

Nmr.PeakDim, Integer (peakDim.numAliasing) .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.setPeakPosition(peak, position, tile)

Define the position of a peak and its aliasing tile

Input

Nmr.Peak, List of Floats (Nmr.PeakDim.position), List of Ints (Nmr.PeakDim.numAliasing) .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.setupPeak(peak, doFit=True)

Initialise reference data dimensions, peak position and intensities for a new peak.

Input

Nmr.Peak (new) .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.setupPeakCoupling(peak)

Setup the underlying real peakDim positional values for MQ spectra etc.

Input

Nmr.Peak

Output

None

ccpnmr.analysis.core.PeakBasic.setupPeakDataDimRef(peak)

Gives a peak a default data dim reference if it has none

Input

Nmr.Peak .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.setupPeakFit(peak, fitMethod=None)

Fit a newly created Nmr.Peak to a position in the spectral data specified by its dataSource

Input

Nmr.Peak (new) Optionally String describing the fitMethod

Output

None

ccpnmr.analysis.core.PeakBasic.setupPeakHeight(peak)

Determine a peaks height from the spectral data specified by its dataSource

Input

Nmr.Peak .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.setupPeakLinewidth(peak)

Fit linewidth of Nmr.Peak

Input

Nmr.Peak .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.setupPeakVolume(peak, volumeMethod=None)

Determine a peaks volume from the spectral data specified by its dataSource

Input

Nmr.Peak .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.snapPeak(peak, doFit=True)
Snap peak to the local maximum
(optionally do a fit for the center point)
Input

List of Nmr.Peaks, Boolean .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.snapPeaks(peaks, doFit=True)
Snap peaks to the local maximum
(optionally do a fit for the center point)
Input

List of Nmr.Peaks, Boolean .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.structurePredictNoePeakList(structure, spectrum, distThreshold=5.0, progressBar=None, labelling=None, labellingThreshold=0.10000000000000001, model=None, minHeight=None, shiftList=None)

Predict the positions of NOESY peaks given a shift list and a structure ensemble. Produces a peak list which peaks that would represent distances less than a given threshold. Optional labelling scheme/mixture to filter according to isotopomers. Optional structure model to use in ensemble, otherwise all models are used - in this case the average distance must be bwlow threshold. Option to specify a minumum hight value so that peaks are not picked below a threshold.

Input

MolStructure.StructureEnsemble, Nmr.DataSource, Float, ProgressBar (Tk widget), ChemCompLabel.LabelingScheme or rue (automatic from experiment MolLabel), Float, MolStructure.Model, Float

Output

Nmr.PeakList

ccpnmr.analysis.core.PeakBasic.translateSpectrumUsingPeaks(referencePeak, translatePeak, dimMapping)
Translate spectrum referencing using a translatePeak from that
spectrum and a referencePeak from another spectrum. Use a dimMapping to specify what dimensions in the translate spectrum are mapped to what dimensions in the reference spectrum, and only these dimensions are translated.
Input

ccp.nmr.Nmr.Peak, ccp.nmr.Nmr.Peak, dict: int->int .. describe:: Output

None

ccpnmr.analysis.core.PeakBasic.uniteResonancePeakPositions(peak)

Coordinate all peaks in the peak list of the input peak so that all peak dimensions that are assigned to the same resonances as the input peak have the same peak dimension position.

Input

ccp.nmr.Nmr.Peak .. describe:: Output

ccp.nmr.Nmr.Peaks

Previous topic

MoleculeBasic

Next topic

PrintBasic

This Page