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 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Binoculars |
A new instance of a Binoculars optic |
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
Focal length (mm) of the eyepiece
magnification
property
Magnification calculated from the telescope's focal length and eyepiece focal length
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
Focal length (mm) of the eyepiece
magnification
property
Magnification calculated from the telescope's focal length and eyepiece focal length
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
Focal length (mm) of the eyepiece
magnification
property
Magnification calculated from the telescope's focal length and eyepiece focal length
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
Focal length (mm) of the camera's lens
rotation
class-attribute
instance-attribute
Angle (degrees) to rotate the camera