def __init__(self, *args, **kwargs): wrap = kwargs.pop('wrap_longitude', True) BaseCoordinateFrame.__init__(self, *args, **kwargs) if wrap and isinstance(self._data, (UnitSphericalRepresentation, SphericalRepresentation)): self._data.lon.wrap_angle = self._default_wrap_angle
def __init__(self, *args, **kwargs): wrap = kwargs.pop('wrap_longitude', True) BaseCoordinateFrame.__init__(self, *args, **kwargs) if wrap and isinstance(self._data, (UnitSphericalRepresentation, SphericalRepresentation)): self._data.lon.wrap_angle = 180*u.deg
def __init__(self, *args, **kwargs): _rep_kwarg = kwargs.get('representation', None) BaseCoordinateFrame.__init__(self, *args, **kwargs) # Convert from Spherical to SphericalWrap180 # If representation was explicitly passed, do not change the rep. if not _rep_kwarg: # The base __init__ will make this a UnitSphericalRepresentation # This makes it Wrap180 instead if isinstance(self._data, UnitSphericalRepresentation): self._data = UnitSphericalWrap180Representation( lat=self._data.lat, lon=self._data.lon) self.representation = UnitSphericalWrap180Representation # Make a Spherical Wrap180 instead elif isinstance(self._data, SphericalRepresentation): self._data = SphericalWrap180Representation( lat=self._data.lat, lon=self._data.lon, distance=self._data.distance) self.representation = SphericalWrap180Representation
def __init__(self, *args, **kwargs): _rep_kwarg = kwargs.get('representation', None) BaseCoordinateFrame.__init__(self, *args, **kwargs) # Convert from Spherical to SphericalWrap180 # If representation was explicitly passed, do not change the rep. if not _rep_kwarg: # The base __init__ will make this a UnitSphericalRepresentation # This makes it Wrap180 instead if isinstance(self._data, UnitSphericalRepresentation): self._data = UnitSphericalWrap180Representation( lat=self._data.lat, lon=self._data.lon) self.representation = UnitSphericalWrap180Representation # Make a Spherical Wrap180 instead elif isinstance(self._data, SphericalRepresentation): self._data = SphericalWrap180Representation( lat=self._data.lat, lon=self._data.lon, distance=self._data.distance) self.representation = SphericalWrap180Representation