Data Model version 2.1.2

Method: setValue


    setter for derived attribute value

guid: www.ccpn.ac.uk_Fogh_2006-08-16-18:20:01_00017
OpType: set
OpSubType: None
isQuery: False
isAbstract: False
Scope: instance_level
Code: dataDimRef = self.dataDimRef

if dataDimRef is None:
  dataDim = self.dataDim
  ll = []
  for ds in dataDim.dimensionScalings:
    sfs = ds.scalingFactors
    if not sfs or 1 in sfs:
      ll.append(ds.expDimRef)
  if len(ll) == 1:
    dataDimRef = ll[0].findFirstDataDimRef(dataDim=dataDim)

  if dataDimRef is None:
    raise ApiError("Peak %s dim %s has no unambiguous dataDimRef" %
     (self.peak.serial, self.dim)
    )
else:
  dataDim = dataDimRef.dataDim

pp = dataDimRef.valueToPoint(value)
# The dataDim below can only be a FreqDataDim, so numPointsOrig is always defined.
(nn, pp) = divmod(pp-1, dataDim.numPointsOrig)

self.numAliasing = int(nn)
self.position = pp + 1.0
  Data Model Version 2.1.2
Go to Top  
  Autogenerated by  PyApiDocGen  revision 1.3   on  Thu Oct 2 16:09:38 2014    from data model package  ccp.api.nmr.Nmr.PeakDim   revision ?  
  Work done by the CCPN team.
www.ccpn.ac.uk