Skip to content

Optics

Optics are another set of models you instantiate directly when creating OpticPlots or plotting the field of view of an optic on a map or horizon plot. They define the specific properties of an optic, like binoculars or a telescope.

starplot.models.Binoculars

Creates a new Binoculars optic

Parameters:

Name Type Description Default
magnification

Magnification of the binoculars

required
fov

Apparent field of view (FOV) of the binoculars in degrees. This isn't always easy to find for binoculars, so if you can't find it in your binocular's specs, then try using 60.

required

Returns:

Name Type Description
Binoculars

A new instance of a Binoculars optic

fov instance-attribute

fov: float

Apparent field of view of the binoculars

magnification instance-attribute

magnification: float

Magnification of the binoculars

true_fov property

true_fov: float

True field of view of binoculars

starplot.models.Scope

Creates a new generic Scope optic.

Use this class to create custom scope optics or use it as a generic optic that does NOT apply any transforms to the view.

See subclasses of this optic for more specific use cases:

  • Refractor - automatically inverts the view (i.e. assumes a star diagonal is used)

  • Reflector - automatically rotates the view so it's upside-down

Parameters:

Name Type Description Default
focal_length

Focal length (mm) of the telescope

required
eyepiece_focal_length

Focal length (mm) of the eyepiece

required
eyepiece_fov

Field of view (degrees) of the eyepiece

required

Returns:

Name Type Description
Scope

A new instance of a Scope optic

eyepiece_focal_length instance-attribute

eyepiece_focal_length: float

Focal length (mm) of the eyepiece

eyepiece_fov instance-attribute

eyepiece_fov: float

Field of view (degrees) of the eyepiece

focal_length instance-attribute

focal_length: float

Focal length (mm) of the telescope

magnification property

magnification: float

Magnification calculated from the telescope's focal length and eyepiece focal length

true_fov property

true_fov: float

True field of view of telescope

starplot.models.Refractor

Creates a new Refractor Telescope optic

Warning

This optic assumes a star diagonal is used, so it applies a transform that inverts the image.

If you don't want this transform applied, then use the generic Scope optic instead.

Parameters:

Name Type Description Default
focal_length

Focal length (mm) of the telescope

required
eyepiece_focal_length

Focal length (mm) of the eyepiece

required
eyepiece_fov

Field of view (degrees) of the eyepiece

required

Returns:

Name Type Description
Refractor

A new instance of a Refractor optic

eyepiece_focal_length instance-attribute

eyepiece_focal_length: float

Focal length (mm) of the eyepiece

eyepiece_fov instance-attribute

eyepiece_fov: float

Field of view (degrees) of the eyepiece

focal_length instance-attribute

focal_length: float

Focal length (mm) of the telescope

magnification property

magnification: float

Magnification calculated from the telescope's focal length and eyepiece focal length

true_fov property

true_fov: float

True field of view of telescope

starplot.models.Reflector

Creates a new Reflector Telescope optic

Warning

This optic applies a transform that produces an "upside-down" image.

If you don't want this transform applied, then use the generic Scope optic instead.

Parameters:

Name Type Description Default
focal_length

Focal length (mm) of the telescope

required
eyepiece_focal_length

Focal length (mm) of the eyepiece

required
eyepiece_fov

Field of view (degrees) of the eyepiece

required

Returns:

Name Type Description
Reflector

A new instance of a Reflector optic

eyepiece_focal_length instance-attribute

eyepiece_focal_length: float

Focal length (mm) of the eyepiece

eyepiece_fov instance-attribute

eyepiece_fov: float

Field of view (degrees) of the eyepiece

focal_length instance-attribute

focal_length: float

Focal length (mm) of the telescope

magnification property

magnification: float

Magnification calculated from the telescope's focal length and eyepiece focal length

true_fov property

true_fov: float

True field of view of telescope

starplot.models.Camera

Creates a new Camera optic

Field of view for each dimension is calculated using the following formula:

# d = sensor size (height or width)
# f = focal length of lens

field_of_view = 2 * arctan( d / (2 * f) )

Parameters:

Name Type Description Default
sensor_height

Height of camera sensor (mm)

required
sensor_width

Width of camera sensor (mm)

required
lens_focal_length

Focal length of camera lens (mm)

required
rotation

Angle (degrees) to rotate camera, defaults to 0

required

Returns:

Name Type Description
Camera

A new instance of a Camera optic

lens_focal_length instance-attribute

lens_focal_length: float

Focal length (mm) of the camera's lens

rotation class-attribute instance-attribute

rotation: float = 0

Angle (degrees) to rotate the camera

sensor_height instance-attribute

sensor_height: float

Height (mm) of camera's sensor

sensor_width instance-attribute

sensor_width: float

Width (mm) of camera's sensor