def convertRefFrame(self, reframe2, reframe, epoch=None): '''Convert this Cartesian point from one to an other reference frame. @param reframe2: Reference frame to convert I{to} (L{RefFrame}). @param reframe: Reference frame to convert I{from} (L{RefFrame}). @keyword epoch: Optional epoch to observe for B{C{reframe}}, a fractional calendar year (C{scalar}). @return: The converted Cartesian point (C{Cartesian}) or this Cartesian point if conversion is C{nil}. @raise TRFError: No conversion available from B{C{reframe}} to B{C{reframe2}}. @raise TypeError: B{C{reframe2}} or B{C{reframe}} not a L{RefFrame} or B{C{epoch}} not C{scalar}. ''' _TypeError(RefFrame, reframe2=reframe2, reframe=reframe) c = self for t in _reframeTransforms( reframe2, reframe, reframe.epoch if epoch is None else _2epoch(epoch)): c = c._applyHelmert(t, False) return c
def epoch(self, epoch): '''Set or clear this point's observed epoch. @param epoch: Observed epoch, a fractional calendar year (C{scalar}) or C{None}. @raise TypeError: The B{C{epoch}} is not C{scalar}. ''' self._epoch = None if epoch is None else _2epoch(epoch)