DataAnalysisBasic

class ccpnmr.analysis.core.DataAnalysisBasic.DataFitting(refObject=None, objects=None, fitFunction=1, noiseLevel=1.0, dataX=None, dataY=None, guiParent=None, errorsX=None, errorsY=None, fitErrorFunction='covariance')

Object to store data prior to the fitting of a function and hold the data relating to the fit afterwards

delete()

Delete the FittedData and clean up

fit()

Calculate the fit given the specified input data. Returns True if fit went ok, False otherwise

resetAll()

Reset all attributes, i.e. including input data, to blank or null values

resetFit()

Reset the ouput fit attributes to blank or null values

ccpnmr.analysis.core.DataAnalysisBasic.calcT2List(t1List, t1rhoList, spinLock)

Make a new T2 list based on a T1 list and a T1rho list

Input

Nmr.T1List, Nmr.T1rhoList, float

Output

Nmr.T2List

ccpnmr.analysis.core.DataAnalysisBasic.functionFitData(dataFitting, numIterations=1000)

Tries to fit a function (type of which is specified by method) to X and Y values. Noise level can be added to estimate the error rate for the overall fit. A separate error is given for the fit parameters, i.e. for rate constants.

Input

ccpnmr.analysis.dataFitting object (non CCPN API), Float

Output

ccpnmr.analysis.dataFitting object (non CCPN API)

ccpnmr.analysis.core.DataAnalysisBasic.getClosestPeak(peak, peaks, tolerances)

Legacy code copy only. Function now in PeakBasic.

Input

Nmr.Peak, List of Nmr.Peaks, List of Floats

Output

Nmr.Peak

ccpnmr.analysis.core.DataAnalysisBasic.getExperimentConditionSet(experiment)

Get or make a new SampleConditionSet for an NMR experiment

Input

Nmr.Experiment

Output

Nmr.SampleConditionSet

ccpnmr.analysis.core.DataAnalysisBasic.getFitMethodInfo()
Get the data: equation name, number of parameters, formatted formula string
from a numbered fitting function & which patameter, if any, is a “rate”.
Input

Integer

Output

List of Tuple(String, Int, Tuple(String, Tuple(Ints)) )

ccpnmr.analysis.core.DataAnalysisBasic.getNmrExpSeriesSampleConditions(nmrExpSeries)

Get the Sample conditions that relate to an NmrExpSeries

Input

Nmr.NmrExpSeries

Output

Dict of SampleCondition Type : List of Nmr.SampleConditions

ccpnmr.analysis.core.DataAnalysisBasic.getOverlapScore(peakA, peakB, tolerances)

Legacy code copy only. Function now in PeakBasic.

Input

Nmr.Peak, Nmr.Peak, List of Floats (tolerances for each Nmr.PeakDim)

Output

Float

ccpnmr.analysis.core.DataAnalysisBasic.getPeakMatchRegion(peak, tolerances)

Legacy code copy only. Function now in PeakBasic.

Input

Nmr.Peak, List of Floats (tolerances for each Nmr.PeakDim)

Output

List or (Float, Float)

ccpnmr.analysis.core.DataAnalysisBasic.getPeakSampledDimIntensities(peaks, experiment, intensityType='volume')

Get the intensities (of specified type) of the input peaks and list them with their corresponding sampled condition values. E.g. List peak intensities with the sampled T1/T2 time. Often used to generate graphs. Note the input experiment must have a sampled data dim.

Input

List of Nmr.Peaks, Nmr.Experiment, String (Nmr.PeakIntensity.intensityType)

Output

Tuple of (List of Floats (Nmr.PeakIntensity.value), List of Floats (Nmr.ExpSeriesCondition.value))

ccpnmr.analysis.core.DataAnalysisBasic.getPeakSeriesIntensities(peaks, expSeries, intensityType='volume', sampleConditionType='delay time')
Get the intensities (of specified type) of the input peaks and list them with their corresponding
NMR experiment series condition values. E.g. List peak intensities with the pH of their experiment. Often used to generate graphs. If an experiment, rather than an NmrExpSeries is passed in the experiment has a sampled data dim.
Input

List of Nmr.Peaks, Nmr.NmrExpSeries, String (Nmr.PeakIntensity.intensityType), String

Output

Tuple of (List of Floats (Nmr.PeakIntensity.value), List of Floats (Nmr.ExpSeriesCondition.value))

ccpnmr.analysis.core.DataAnalysisBasic.isResidueInRange(residue, residueRanges, dataDim)

Determine if a residue is in a residue range

Input
Nmr.Residue, List of (Nmr.DataDim, Nmr.Chain, Integer
(Nmr.Residue.seqCode - first), Integer (Nmr.Residue.seqCode - last)), Nmr.DataDim
Output

Boolean

ccpnmr.analysis.core.DataAnalysisBasic.makeDataList(name, unit, values, errors=None, peaks=None, peakDims=None, measurements=None)
Makes an NMR data list e.g. to record chemical shift changes during a titration.
Assumes for the moment that one derivation gives one datum.
Input
Word, Word, List of Floats, List of Floats, List of List of Nmr.Peaks
List of List of Nmr.PeakDims, List of List of Nmr.AstractMeasuremenrs
Output

Nmr.DataList

ccpnmr.analysis.core.DataAnalysisBasic.makeRatesList(rateType, experimentOrSeries, specificType, peakGroups, values, errors=None)

Makes an NMR rates list of a specified type (T1, T2 etc) with input values. If an experiment is passed in, rather than a series, the experiment has a sampled dimension

Input

String (‘T1’,’T2’,’H/D exchange’ or ‘H/D protection’), Nmr.NmrExpSeries or Nmr.Experiment, String (Nmr.Measurement.coherenceType/protectionType) List of List of Nmr.Peaks (rate series), List of Floats (Nmr.AbstractMeasurement.values), List of Floats (Nmr.AbstractMeasurement.errors)

Output

Nmr.AbstractMeasurementList (depends on rateType)

ccpnmr.analysis.core.DataAnalysisBasic.matchHnoePeaks(assignPeakList, refPeakList, satPeakList, tolerancesA, tolerancesB, pickNewPeaks=True, doAssignments=False)
Match reference and saturation peak list peaks to an assigned (potentially) peak list
using input toleranes. Used to calaulate the NOE from peak intensity ratios.
Input

Nmr.PeakList, Nmr.PeakList, Nmr.PeakList, List of Floats, List of Floats

Output

List of (Nmr.Peak, Nmr.Peak)

ccpnmr.analysis.core.DataAnalysisBasic.matchSampledExperimentPeaks(refPeakList, experiment, tolerances, pickPeaks=True, pickNonMaxima=False, doAssign=True, progressBar=None, noiseThreshold=None)

Matches the peaks of the experiment (with a sampled dimension) to a reference peak list according to the input tolerances. Generates a list of peaks that are grouped together by having overlapping positions. Useful precursor for determining rates form the peak intensities of groups. Optional arguments to specify whether new peaks can be picked, whether at non-maximal contours and whether to assign matched peaks - all relative to the reference peak list. A progress bar popup can be passed in. Peaks will not be searched for below the noiseThreshold, but may be picked at the ref position.

Input

Nmr.PeakList, Nmr.Experiment, List of Floats (tolerances), Boolean, Boolean, Boolean, Boolean

Output

List of List of Nmr.Peaks

ccpnmr.analysis.core.DataAnalysisBasic.matchSeriesPeaks(refPeakList, expSeries, tolerances, pickPeaks=True, pickNonMaxima=False, doAssign=True, progressBar=None, noiseThreshold=None)

Matches the peaks of the experiments in an NMR experiment series to a reference peak list according to the input tolerances. Generates a list of peaks that are grouped together by having overlapping positions. Useful precursor for determining rates from the peak intensities of groups. Optional arguments to specify whether new peaks can be picked, whether at non-maximal contours and whether to assign matched peaks - all relative to the reference peak list. A progress bar popup can be passed in.

Input

Nmr.PeakList, Nmr.NmrExpSeries, List of Floats (tolerances), Boolean, Boolean, Boolean

Output

List of List of Nmr.Peaks

ccpnmr.analysis.core.DataAnalysisBasic.pairHnHaPeaks(peakList, residueRanges=None)
Generates pairs of Hn and Ha peaks from a peak list
which may be restricted to optional residue ranges.
Input
Nmr.PeakList. List of (Nmr.DataDim, Nmr.Chain,
Integer (Nmr.Residue.seqCode - first)
Output

List of (Nmr.Peak, Nmr.Peak)

Previous topic

CouplingBasic

Next topic

ExperimentBasic

This Page