ExperimentBasic

ccpnmr.analysis.core.ExperimentBasic.calcContourLevels(baseLevel, numberLevels, levelChanger, changeMode='multiply')

Calculate the contour levels given baseLevel, numberLevels, levelChanger, changeMode

Input

Nmr.DataSource, Float, Int, Float, Word (multiply or add)

Output

The contour levels as a list

ccpnmr.analysis.core.ExperimentBasic.changeSpectrumNContours(spectrum, delta)

Change the number of contour levels of a spectrum by a given delta

Input

Nmr.DataSource, Int

Output

None

ccpnmr.analysis.core.ExperimentBasic.findSpectrumDimsByIsotope(dataSource, isotopeCode)

Give dimension numbers of a spectrum that pertain to a given Isotope

Input

Nmr.DataSource, Word (Nmr.ExpDimRef.isotopeCode)

Output

List of Ints

ccpnmr.analysis.core.ExperimentBasic.getAcqExpDim(experiment)

ExpDim that corresponds to acquisition dimension. NB uses heuristics

Input

NmrExpPrototype.Experiment

Output

NmrExpPrototype.ExpDim

ccpnmr.analysis.core.ExperimentBasic.getAcqRefExpDimRef(refExperiment)

RefExpDimRef that corresponds to acquisition dimension

Input

NmrExpPrototype.RefExperiment

Output

NmrExpPrototype.RefExpDimRef

ccpnmr.analysis.core.ExperimentBasic.getDataDimIsotopes(dataDim)

Get the shift measurement isotopes for a spectrum data dim

Input

Nmr.FreqDataDim

Output

Set of Words (Nmr.ExpDimRef.isotopeCodes)

ccpnmr.analysis.core.ExperimentBasic.getDataDimRefFullRange(dataDimRef)

Get the full range of freq values for a data dimension reference taking into account spectral width and min/max unaliased freqs

Input

ccp.nmr.Nmr.DataDimRef

Output

2-List of Floats (min, max)

ccpnmr.analysis.core.ExperimentBasic.getDataSlice(dataSource, position, sliceDim, unit='point', diagonalExclusion=0, normalise=True)

Get the 1D slice for the dataSource for a position which is fixed in all dimensions but sliceDim. Assumes that all dimenions are freqDataDim. position is of size dataSource.numDim. sliceDim is 1-based, not 0-based. The slice is returned as a Python list.

Input

Nmr.DataSource, tuple/list of Float, Int

Output

list of Float

ccpnmr.analysis.core.ExperimentBasic.getDiagonalBondedDataDims(spectrum)

Get tuples of spectrum data dimensions that have digaonal positions and are also in one bond connections

Input

Nmr.DataSource

Output

List of 2-List of Nmr.DataDims

ccpnmr.analysis.core.ExperimentBasic.getEquivalentDataDims(spectrum)

Get pairs of spectrum data dimensions that are equivalent in terms of isotope type

Input

Nmr.DataSource

Output

List of 2-List of Nmr.DataDims

ccpnmr.analysis.core.ExperimentBasic.getExperimentSampledDim(experiment)

Get the first sampled data dimension for an experiment

Input

ccp.nmr.Nmr.Experiment

Output

List of ccp.nmr.Nmr.SampledDataDim

ccpnmr.analysis.core.ExperimentBasic.getExperimentSpectra(experiment, minNumDim=1)

Gives the spectra for a given NMR experiment with a minimum number of dimensions .. describe:: Input

Nmr.Experiment, Integer

Output

List of Nmr.DataSources

ccpnmr.analysis.core.ExperimentBasic.getFilteredRefExperiments(experiment, category=None)

Get the possible reference NMR experiments for an experiment, given the prototypes available within its project, the category and external name settings and the nuclei on the axes. Optional argument to specify the category of possible experiments (‘use external’, ‘through-bond’, ‘through-space’, ‘quantification’,

‘other’).
Input

Nmr.Experiment, NmrExpPrototype.NmrExpPrototype.ExpCategory

Output

List of NmrExpPrototype.RefExperiments

ccpnmr.analysis.core.ExperimentBasic.getIndirectDataDims(dataSource)

Get the data dims of a spectrum that represent indirect (e.g. relayed NOESY) magnetisation transfers.

Input

Nmr.DataSource

Output

Set of 2-List of Nmr.FreqDataDims

ccpnmr.analysis.core.ExperimentBasic.getIndirectThroughSpaceIsotopes(experiment)

For a given experiment find the pairs of isotopes present along onbond transfers connected via a relayed (indirect) through space transfer. Returns pairs of isotopes, direct and indirect, for each experimental dimension. An isotope may be None if one side of the through space transfer is observed in experiment, e.g. H_hC.NOESY.

Input

Nmr.Experiment

Output

Dict of Nmr.ExpDimRef:(ChemElement.Isotope, ChemElement.Isotope)

ccpnmr.analysis.core.ExperimentBasic.getIsSpectrumBigEndian(spectrum)

Get whether spectrum’s data file is big endian.

Input

Spectrum

Output

None if no dataStore or not BlockedBinaryMatrix, True if big endian, False if little endian

ccpnmr.analysis.core.ExperimentBasic.getMinMaxValues(dataSource)

Get the min and max values of a dataSource. Not recommended unless 1D or 2D because slow.

Input

Nmr.DataSource

Output

(Float, Float)

ccpnmr.analysis.core.ExperimentBasic.getNdSpectra(project, n)

Give all NMR spectra in a given project that have n dimensions

Input

Project, Int

Output

List of Nmr.DataSources

ccpnmr.analysis.core.ExperimentBasic.getNoesyPeakLists(project, guessUntyped=True)

Get the NOE peak lists from a project. Option to include possible peak lists that are untyped

Input

Implementation.MemopsRoot, Boolean

Output

List of Nmr.Peaks

ccpnmr.analysis.core.ExperimentBasic.getNoiseEstimate(dataSource, nsamples=1000, nsubsets=10, fraction=0.10000000000000001)

Estimate the noise level for a spectrum by choosing a random nsamples points and finding subsets with the lowest standars devation/

Input

Nmr.DataSource, Int, Int, Float

Output

Float

ccpnmr.analysis.core.ExperimentBasic.getOnebondDataDims(spectrum)

Get pairs of spectrum data dimensions that are connected by onebond transfers

Input

Nmr.DataSource

Output

List of 2-List of Nmr.DataDims

ccpnmr.analysis.core.ExperimentBasic.getOnebondExpDimRefs(experiment)

Get pairs of experiment dimensions that are connected by onebond transfers

Input

Nmr.Experiment

Output

List of 2-List of Nmr.ExpDimRefs

ccpnmr.analysis.core.ExperimentBasic.getPossibleRefExperiments(experiment, category=None)

Get the possible reference NMR experiments for an experiment, given the prototypes available within its project, the category and external name settings. Optional argument to specify the category of possible experiments (‘use external’, ‘through-bond’, ‘through-space’, ‘quantification’,

‘other’).
Input

Nmr.Experiment, NmrExpPrototype.NmrExpPrototype.ExpCategory

Output

Iterator of NmrExpPrototype.RefExperiments

ccpnmr.analysis.core.ExperimentBasic.getPrimaryDataDimRef(freqDataDim)

get dataDimRef child with lowest expDimRef.serial

Input

freqDataDim

Output

dataDimRef or None

ccpnmr.analysis.core.ExperimentBasic.getPrimaryExpDimRef(expDim)

get expDimRef child with lowest expDimRef.serial

Input

expDim

Output

expDimRef or None

ccpnmr.analysis.core.ExperimentBasic.getRandomSubset(data, fraction)

Function used by getNoiseEstimate()

Input
Output
ccpnmr.analysis.core.ExperimentBasic.getRefExperimentCategories(refExperiment)

Get a set of categories (as strings) that a reference experiment belongs to

Input

ccp.nmr.NmrExpPrototype.RefExperiment

Output

Set of Lines

ccpnmr.analysis.core.ExperimentBasic.getRefExperiments(experiment)

Wrapper to getFilteredRefExperiments - set category from 1) experiment.category (temporary) attribute (if present) 2) experiment.refExperiment category (if present) and pass call on to getFilteredRefExperiments

Input

Nmr.Experiment

Output

List of NmrExpPrototype.RefExperiments

ccpnmr.analysis.core.ExperimentBasic.getSampledDimExperiments(nmrProject)

Get a list of experiments in an NMR project that have sammpled data dims

Input

ccp.nmr.Nmr.NmrProject

Output

List of ccp.nmr.Nmr.Experiments

ccpnmr.analysis.core.ExperimentBasic.getSeqAssignRefExperiments(project)

Get reference amide experiments which may be used for protein sequence assignment. Gives a set of amide experiment types and a subset of through CO specific experiment types.

Input

Implementation.MemopsRoot

Output

List of NmrExpPrototype.RefExperiments, List of NmrExpPrototype.RefExperiments

ccpnmr.analysis.core.ExperimentBasic.getSpectra(project, minNumDim=1)

Give all processed spectra in a project with a minimum number of dimensions

Input

Project, Int

Output

List of Nmr.DataSources

ccpnmr.analysis.core.ExperimentBasic.getSpectraByType(project, experimentType)

Give NMR spectra of a given class in a project as identified by isotope-dimension mapping This funtion is just a temporary kludge prior to proper implementation on spectra types

Input

Project, String

Output

List of Nmr.DataSources

ccpnmr.analysis.core.ExperimentBasic.getSpectrumIsotopes(dataSource)

Give isotopes pertianing to the dimensions of a given NMR spectrum

Input

Nmr.DataSource

Output

List of Words (Nmr.ExpDimRef.IsotopeCodes)

ccpnmr.analysis.core.ExperimentBasic.getSpectrumNoise(dataSource)

Get the noise level for a spectrum. If the noise level is not already set it will be set at an estimated value.

Input

Nmr.DataSource

Output

Float

ccpnmr.analysis.core.ExperimentBasic.getThroughSpaceDataDims(dataSource)

Get the data dims of a spectrum that represent through-space magnetisation transfers.

Input

Nmr.DataSource

Output

2-List of Nmr.FreqDataDims

ccpnmr.analysis.core.ExperimentBasic.getThroughSpacePeakLists(project, excludeSimulated=True)

Get the peak lists that have a through-space magnetisation ransfer, from a given project.

Input

Implementation.MemopsRoot, Boolean

Output

List of Nmr.Peaks

ccpnmr.analysis.core.ExperimentBasic.initExpBoundResonances(experiment)

Refresh the covalently bound status for any resonances connected via peaks in a given experiment.

Input

Nmr.Experiment

Output

None

ccpnmr.analysis.core.ExperimentBasic.initExpTransfers(experiment, overwrite=True)

Set up the ExpTransfers for an experiment using available refExperiment information. Boolean option to remove any existing transfers.

Input

Nmr.Experiment

Output

List of Nmr.ExpTransfers

ccpnmr.analysis.core.ExperimentBasic.isDataBigEndian(fileName, numberType='float', fileHeaderSize=0, nbytes=4, nwords=1000, threshold=1000000000.0, fraction=0.01, fractionNonzero=0.10000000000000001)

Determine (approximately) whether data file is big endian.

Input

fileName and optionally numberType (‘float’ or ‘int’), fileHeaderSize, nbytes (bytes per word), nwords (number of words to check), threshold (above which value considered incorrect byte ordering), fraction (fraction of values checked which must have incorrect byte ordering, if considered swapped) fractionNonzero (fraction of values checked which must be nonzero to be considered ok)

Output

True if big endian or if cannot determine, False if little endian

ccpnmr.analysis.core.ExperimentBasic.isReferencingIncorrect(spectrum, fixErrors=False, printChecks=True)

Check if referencing is consistent and/or fitw IUPAC referencing ratios

ccpnmr.analysis.core.ExperimentBasic.isShapeSpectrum(spectrum)

Determine if spectrum is a Shape spectrum, possibly during set-up

Input

Spectrum

Output

Boolean

ccpnmr.analysis.core.ExperimentBasic.isSpectrum(dataSource, minNumDim=1)

Determines if a spectrum is valid for display, i.e. processed and has the min required number of dimensions

Input

Nmr.DataSource, Int

Output

Boolean

ccpnmr.analysis.core.ExperimentBasic.isSpectrumBigEndian(spectrum)

Determine (approximately) whether spectrum’s data file is big endian according to actual data.

Input

Spectrum

Output

None if cannot determine, True if big endian, False if little endian

ccpnmr.analysis.core.ExperimentBasic.newShiftList(project, unit='ppm')

Make a new ShiftList for a project with an optionally specified unit (default ppm).

Input

Project, String (Nmr.ShiftList.unit)

Output

Nmr.ShiftList

ccpnmr.analysis.core.ExperimentBasic.ppmDataDimBoundedRegion(region, dataDim)

Truncate a region for a data dimension at its ppm bounds.

Input

List of Floats (region), Nmr.DataDim

Output

List of Floats (region)

ccpnmr.analysis.core.ExperimentBasic.ptsDataDimBoundedRegion(region, dataDim)

Truncate a region for a data dimension at its data points bounds.

Input

List of Floats (region), Nmr.DataDim

Output

List of Floats (region)

ccpnmr.analysis.core.ExperimentBasic.setAllIsotopeCodes(experiment)

set all ExpDimRef.isotopeCodes in experiment, from sf values Selects isotopes so that sf ratios match isotope gyromagmetic ratios Unknown and inconsistent isotopes efault to 1H

Input

ccp/nmr.Nmr.Experiment

Output

None

ccpnmr.analysis.core.ExperimentBasic.setExperimentShiftList(experiment, shiftList)

Set the shift list for a given experiment. Updates the shift values from the appropriate shift lists/

Input

Nmr.NmrExperiment, Nmr.ShiftList

Output

None

ccpnmr.analysis.core.ExperimentBasic.setIsSpectrumBigEndian(spectrum, isBigEndian)

Set whether spectrum’s data file is big endian.

Input

Spectrum, Boolean

Output

None

ccpnmr.analysis.core.ExperimentBasic.setRefExperiment(experiment, refExperiment)

Sets the reference experiment for an existing experiment and tries to map the ExpDims to RefExpDims appropriately.

Input

Nmr.Experiment, NmrExpPrototype.RefExperiment

Output

None

Previous topic

DataAnalysisBasic

Next topic

MarkBasic

This Page