Example #1
0
 def newEngValInOpticalUnits(self):
     """Returns a new EngVal converting me to the 'optical' units if possible.
     For example a value in b'.1IN" will be converted to b'FEET'."""
     myUnits = Units.opticalUnits(self.uom)
     if myUnits == self.uom:
         return EngVal(self.value, self.uom)
     return EngVal(Units.convert(self.value, self.uom, myUnits), myUnits)
Example #2
0
 def xAxisSpacingOptical(self):
     """The numerical value of the X axis frame spacing. This is is the
     extreme range of X axis values divided by the number of frames - 1."""
     return Units.convert(self._rle.frameSpacing(), self._rle.xAxisUnits,
                          Units.opticalUnits(self._rle.xAxisUnits)
                          #self._dfsr.ebs.opticalLogScale
                          )
Example #3
0
 def xAxisLastValOptical(self):
     """The numerical value of the X axis of the last frame in 'optical' units."""
     return Units.convert(
         self._rle.xAxisLastFrame(),
         self._rle.xAxisUnits,
         Units.opticalUnits(self._rle.xAxisUnits)
         #self._dfsr.ebs.opticalLogScale
     )
Example #4
0
 def xAxisUnitsOptical(self):
     """Returns the actual units to 'optical' i.e. user friendly units.
     For example if the Xaxis was in b'.1IN' the 'optical' units would be b'FEET"."""
     return Units.opticalUnits(self._rle.xAxisUnits)
Example #5
0
 def _makeEngValOptical(self, theEv):
     """Converts an EngVal to 'optical' units e.g. b'.1IN' goes to b'FEET'."""
     return theEv.newEngValInUnits(Units.opticalUnits(theEv.uom))