ccpnmodel.ccpncore.lib.spectrum package

Subpackages

Submodules

ccpnmodel.ccpncore.lib.spectrum.BlockData module

Utilities for dealing with blocked data files

ccpnmodel.ccpncore.lib.spectrum.BlockData.determineBlockSizes(npoints, totalBlockSize=4096)[source]

ccpnmodel.ccpncore.lib.spectrum.Integral module

Module Documentation here

class ccpnmodel.ccpncore.lib.spectrum.Integral.Integral(spectrum, points, factor=1.0, peaks=None, slope=1.0, bias=0.0)[source]

Bases: object

addPeak(peak)[source]
calculateBias(values, noise)[source]
calculateIntegralValues(integral, values, bias=0.0, slope=1.0)[source]
calculateRelativeVolume()[source]
calculateVolume()[source]
delete()[source]
deselect()[source]
getIntegralRegions(values, noise, peakPickLevel)[source]
property peak: Tuple[Peak, ...]

- Tuple[ForwardRef(‘Peak’), …], mutable -

property peaks: Tuple[Peak, ...]

- Tuple[ForwardRef(‘Peak’), …], immutable -

removePeak(peak)[source]
select()[source]
setIntegrals(spectrum, values, factor=1.0)[source]
setRelativeVolume(relVol)[source]
setVolume(volume, factor=None)[source]

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype module

Functions for calculating axisCodes for NmrExpPrototypes, adn necessary utilities. For normal cases, use only refExpFimRefCodeMap function, and get axisCodes from refExpDimRefs and the map.

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.ExperimentClassification

alias of ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.ExperimentCharacteristic

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.atomSiteAxisCode(atomSite)[source]

Get axisCode (without number suffixes) from NmrExPrototype.AtomSite

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.experimentSynonymSummary()[source]
  1. set of atomSiteNames appearing

  2. List of dimensionCount, synonym, name, atomNames for refExperiments sorted by name

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.fetchIsotopeRefExperimentMap(project: MemopsRoot) Dict[source]

fetch {tuple(sortedNucleusCodes):RefExperiment} dictionary for project The key is a tuple of element names (‘C, Br, H, D, T, …) or either of J, MQ, ALT, or delay

NB, each list value is sorted ad-hoc to bring the most common experiments to the top. Do NOT sort or reorder the result

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.getExpClassificationDict(nmrProject) dict[source]

Get a dictionary of dictionaries of dimensionCount:sortedNuclei:ExperimentClassification named tuples.

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.getExperimentClassification(refExperiment: RefExperiment) ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.ExperimentCharacteristic[source]

Get ExperimentClassification namedtuple, showing which groups a given RefExperiment falls into

The field names should be self-explanatory, except for ‘isQuantification’ - this covers experiments that are classified as ‘quantification’ in the NmrExpPrototype description, and are not relaxation measurements. In practice these are J-measurement experiments (for now).

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.isotope2Nucleus(isotopeCode)[source]

remove integer prefix from integer+string string

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.rawAxisCode(expMeasurement)[source]

Get raw expMeasurement axisCode (without number suffixes) from NmrExpPrototype.ExpMeasurement

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.refExpDimRefCodeMap(project)[source]

get RefExpDimRef: axisCode map for all NmrExpPrototypes in project

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.resetAllAxisCodes(nmrProject)[source]

Reset all axisCodes (ExpDimRef.name) in project to be unique, match the isotope, and match the standard Prototype where a prototype is known

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.testExpPrototypes(resetCodes=False)[source]

Test functions and make diagnostic output

ccpnmodel.ccpncore.lib.spectrum.NmrExpPrototype.testExperimentFilter(project)[source]

ccpnmodel.ccpncore.lib.spectrum.Peak module

Module Documentation here

ccpnmodel.ccpncore.lib.spectrum.Peak.fitExistingPeaks(peaks: Sequence[ccpnmodel.ccpncore.api.ccp.nmr.Nmr.Peak], fitMethod: Optional[str] = None)[source]

ccpnmodel.ccpncore.lib.spectrum.Spectrum module

Module Documentation here

ccpnmodel.ccpncore.lib.spectrum.Spectrum.createBlockedMatrix(dataUrl: Url, path: str, numPoints: Sequence[int], blockSizes: Sequence[int] = None, isBigEndian: bool = True, numberType: str = 'float', isComplex: bool = None, headerSize: int = 0, blockHeaderSize: int = 0, nByte=4, fileType=None, **additionalParameters) BlockedBinaryMatrix[source]

Create BlockedBinaryMatrix object. Explicit parameters are the most important, additional parameters to BlockedBinaryMatrix are passed in additionalParameters

ccpnmodel.ccpncore.lib.spectrum.Spectrum.dimensionTransferType(dataDims: Sequence[DataDim]) str[source]

Get ExpTransferType connecting two dataDims - uses heuristics