Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> from frames import *
- >>> hgic = HelioGraphicStonyhurst(1*u.deg, 1*u.deg)
- ((<Quantity 1.0 deg>, <Quantity 1.0 deg>), {})
- In args section
- ((<Quantity 1.0 deg>, <Quantity 1.0 deg>, <Quantity 695508.0 km>), {})
- >>> hgic # Works fine
- <HelioGraphicStonyhurst Coordinate: hlon=1.0 deg, hlat=1.0 deg, rad=695508.0 km>
- >>> from astropy.coordinates import SkyCoord
- >>> sc = SkyCoord(hgic) # Problems?
- ((), {}) # Why is the args section empty?
- In kwargs section
- ((), {'rad': <Quantity 695508.0 km>}) # In kwargs, the rad quantity is added automatically
- # This can happen only because of the code I added in the constructor.
- # Why is the Heliographic constructor called twice?
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "/home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/coordinates/sky_coordinate.py", line 134, in __init__
- kwargs = self._parse_inputs(args, kwargs)
- File "/home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/coordinates/sky_coordinate.py", line 199, in _parse_inputs
- frame = valid_kwargs['frame'] = _get_frame(args, kwargs)
- File "/home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/coordinates/sky_coordinate.py", line 816, in _get_frame
- frame = frame_cls()
- File "frames.py", line 73, in __init__
- super(HelioGraphicStonyhurst, self).__init__(*args, **kwargs)
- File "/home/pritishc/RestOfFileSystem/Astropy Repo/astropy/astropy/coordinates/baseframe.py", line 437, in __init__
- representation_data = self.representation(**repr_kwargs)
- TypeError: __init__() takes at least 4 arguments (2 given)
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement