hscmap.camera module

class hscmap.camera.Camera(_w)[source]

Bases: object

This class represents the camera of the viewer. An instance of this class can be obtained by hscmap.window.Window.camera.

Parameters:

_w (Window) –

jump_to(ra, dec, *, fov=None, duration=0.2, non_block=False, easing=None)[source]

Jump to the specified position.

Parameters:
  • ra (float) – Right ascension. The unit is specified at the constructor of the hscmap.window.Window.

  • dec (float) – Declination.

  • fov (float | None) – Field of view.

  • duration – Duration of the jump. The unit is seconds.

  • non_block – If True, the function returns immediately after the jump command is sent.

  • easing (Literal['fastStart2', 'fastStart4', 'linear', 'slowStart2', 'slowStart4', 'slowStartStop2', 'slowStartStop4'] | None) – Easing function of the jump.

Return type:

None

m31_position = (10.68470833, 41.26916667)
window.jump_to(*m31_position, fov=2)
property params: CameraParams

The parameters of the camera.

property center: Tuple[float, float]

The center of the camera. You can also set the center by assigning a tuple of (ra, dec). Units are specified at the constructor of the hscmap.window.Window.

window.camera.center = (10.68470833, 41.26916667)
property fov: float

The field of view of the camera. You can also set the field of view by assigning a float. The unit is specified at the constructor of the hscmap.window.Window.

window.camera.fov = 2