Line-of-Sight and Field-of-View Control#

This example demonstrates the two complementary APIs for aiming and framing the observer’s camera in helioprojective coordinates:

  • observer_los_view — sets the field of view as explicit angular extents \((x_0, x_1, y_0, y_1)\) in degrees, measured from Sun-center along the observer’s line of sight.

  • observer_fov_view — sets the (square) field of view by specifying the minimum impact radius \(r_{\min}\) (in \(R_\odot\)) that any line of sight must clear.

Both properties require observer_position to be set first, because the focal-point calculation depends on the observer distance.

import numpy as np
from pyvisual import Plot3d

LOS View — Asymmetric Field of View#

observer_los_view accepts a 4-tuple (x0, x1, y0, y1) of helioprojective angular extents in degrees. Here the observer sits at \(r = 50\,R_\odot\) on the equatorial plane and looks back at the Sun with a wide horizontal sweep (\(-15°\) to \(+15°\)) and a narrower vertical window (\(-8°\) to \(+8°\)), placing the viewport aspect ratio at \(30/16 \approx 1.875\).

The focal point is automatically computed from the center of the angular range via the Thomson sphere, so the camera always aims along the correct helioprojective direction.

plotter = Plot3d()
plotter.add_sun()
plotter.add_shell(inner_radius=2.0, outer_radius=2.0, opacity=0.15, color='cyan')
plotter.add_shell(inner_radius=6.0, outer_radius=6.0, opacity=0.10, color='orange')
plotter.observer_position = 50, np.pi / 2, 0
plotter.observer_los_view = -15, 15, -8, 8
plotter.show()
p03 los and fov views

LOS View — Off-Center Pointing#

Shifting the angular range off-center moves the focal point away from Sun-center. Here the horizontal window is displaced by \(+5°\) (x0 = -5, x1 = +15) so that the camera is biased to the east limb of the Sun. The vertical extent remains symmetric.

plotter = Plot3d()
plotter.add_sun()
plotter.add_shell(inner_radius=2.0, outer_radius=2.0, opacity=0.15, color='cyan')
plotter.observer_position = 50, np.pi / 2, 0
plotter.observer_los_view = -5, 15, -8, 8
plotter.show()
p03 los and fov views

FOV View — Impact-Parameter Framing#

observer_fov_view is a higher-level alternative. Instead of raw angles, you supply a single scalar \(r_{\min}\).

The result is a square viewport whose edge lines of sight just graze the sphere of radius \(r_{\min}\) around Sun-center. Setting \(r_{\min} = 1\,R_\odot\) frames the entire solar disc with minimal margin; larger values show the extended corona.

plotter = Plot3d()
plotter.add_sun()
plotter.add_shell(inner_radius=2.5, outer_radius=2.5, opacity=0.15, color='cyan')
plotter.observer_position = 50, np.pi / 2, 0
plotter.observer_fov_view = 4
plotter.show()
p03 los and fov views

Comparing Impact Radii#

The same observer position is used at three different impact radii to illustrate how a smaller \(r_{\min}\) zooms in on the solar disc while a larger one opens the view out to the extended corona.

Note

The observer distance is fixed at \(50\,R_\odot\) throughout. Changing \(r_{\min}\) only rescales the angular FOV; it does not move the camera.

for rmin in (1.5, 4.0, 10.0):
    plotter = Plot3d()
    plotter.add_sun()
    plotter.add_shell(inner_radius=rmin, outer_radius=rmin, opacity=0.2, color='yellow')
    plotter.observer_position = 50, np.pi / 2, 0
    plotter.observer_fov_view = rmin
    plotter.show()
p03 los and fov views
p03 los and fov views
p03 los and fov views

Total running time of the script: (0 minutes 8.375 seconds)

Gallery generated by Sphinx-Gallery