Skip to content

Access Geometry Plotting

plot_access_polar

plot_access_polar(access_windows, propagator: Union[KeplerianPropagator, SGPPropagator], min_elevation=0.0, num_samples=None, time_step=5.0, elevation_mask=None, backend='matplotlib', width=None, height=None, radial_tick_values=None, radial_tick_labels=None, radial_range=None, radial_tick_offset=8) -> object

Plot access window geometry in polar coordinates (azimuth/elevation).

Polar coordinates: - Radius: 90° - elevation (zenith at center, horizon at edge) - Theta: Azimuth (North at top, clockwise)

Parameters:

Name Type Description Default
access_windows list of dict

List of access window groups, each with: - access_window: AccessWindow object - propagator (Propagator, optional): Propagator for full trajectory - color (str, optional): Line color - line_width (float, optional): Line width - label (str, optional): Legend label

required
propagator Union[KeplerianPropagator, SGPPropagator]

Propagator object for computing interpolated trajectories

required
min_elevation float

Minimum elevation for plot edge (degrees). Default: 0.0

0.0
num_samples int

Number of samples for interpolation. If None, uses time_step.

None
time_step float

Time step for interpolation (seconds). Default: 5.0. Ignored if num_samples is specified.

5.0
elevation_mask float, callable, or array

Elevation mask to visualize. Can be: - float: Constant elevation angle (degrees) - callable: Function taking azimuth (degrees) returning elevation (degrees) - array: Elevation values at each azimuth (evaluated at 360 points around horizon)

None
backend str

'matplotlib' or 'plotly'. Default: 'matplotlib'

'matplotlib'
width int

Figure width in pixels (plotly only). Default: None (responsive)

None
height int

Figure height in pixels (plotly only). Default: None (responsive)

None
radial_tick_values array - like

Custom radial tick positions (in radius units: 90-elevation). Default: [15, 30, 45, 60, 75, 90] (corresponding to elevations 75°, 60°, 45°, 30°, 15°, 0°)

None
radial_tick_labels array - like

Custom labels for radial ticks. Default: ["75°", "60°", "45°", "30°", "15°", "0°"]

None
radial_range tuple

(min, max) range for radial axis. Default: (0, 90) for matplotlib, auto-calculated for plotly to accommodate offset ticks

None
radial_tick_offset float

Offset for radial tick positions in plotly (to avoid overlapping with circle lines). Default: 3. Set to 0 for no offset. Only applies to plotly.

8

Returns:

Type Description
object

Generated figure object

Example
import brahe as bh
import numpy as np

# Setup
eop = bh.FileEOPProvider.from_default_standard(bh.EarthOrientationFileType.STANDARD, True)
bh.set_global_eop_provider(eop)

epoch = bh.Epoch.from_datetime(2024, 1, 1, 0, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, np.radians(97.8), 0.0, 0.0, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)

prop = bh.KeplerianPropagator.from_eci(epoch, state, 60.0).with_name("Satellite")
location = bh.PointLocation(np.radians(40.7128), np.radians(-74.0060), 0.0).with_name("NYC")
constraint = bh.ElevationConstraint(min_elevation_deg=10.0)

# Compute access
windows = bh.location_accesses([location], [prop], epoch, epoch + 86400.0, constraint)

# Plot first access window
fig = bh.plot_access_polar(
    [{"access_window": windows[0], "propagator": prop, "label": "Pass 1"}],
    min_elevation=10.0,
    backend='matplotlib'
)

plot_access_elevation

plot_access_elevation(access_windows, propagator: Union[KeplerianPropagator, SGPPropagator], num_samples=None, time_step=5.0, backend='matplotlib', width=None, height=None) -> object

Plot elevation angle vs time for access windows.

Parameters:

Name Type Description Default
access_windows list of dict

List of access window groups, each with: - access_window: AccessWindow object - propagator (Propagator, optional): Propagator for full trajectory - color (str, optional): Line color - line_width (float, optional): Line width

required
propagator Union[KeplerianPropagator, SGPPropagator]

Propagator object for computing interpolated trajectories

required
num_samples int

Number of samples for interpolation. If None, uses time_step.

None
time_step float

Time step for interpolation (seconds). Default: 5.0. Ignored if num_samples is specified. - label (str, optional): Legend label

5.0
backend str

'matplotlib' or 'plotly'. Default: 'matplotlib'

'matplotlib'
width int

Figure width in pixels (plotly only). Default: 1400

None
height int

Figure height in pixels (plotly only). Default: 700

None

Returns:

Type Description
object

Generated figure object

Example
import brahe as bh
import numpy as np

# Setup (same as polar plot example)
eop = bh.FileEOPProvider.from_default_standard(bh.EarthOrientationFileType.STANDARD, True)
bh.set_global_eop_provider(eop)

epoch = bh.Epoch.from_datetime(2024, 1, 1, 0, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, np.radians(97.8), 0.0, 0.0, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)

prop = bh.KeplerianPropagator.from_eci(epoch, state, 60.0).with_name("Satellite")
location = bh.PointLocation(np.radians(40.7128), np.radians(-74.0060), 0.0).with_name("NYC")
constraint = bh.ElevationConstraint(min_elevation_deg=10.0)

windows = bh.location_accesses([location], [prop], epoch, epoch + 86400.0, constraint)

# Plot elevation profile
fig = bh.plot_access_elevation(
    [{"access_window": w, "propagator": prop, "label": f"Pass {i+1}"} for i, w in enumerate(windows[:3])],
    backend='matplotlib'
)

plot_access_elevation_azimuth

plot_access_elevation_azimuth(access_windows, propagator: Union[KeplerianPropagator, SGPPropagator], num_samples=None, time_step=5.0, elevation_mask=None, backend='matplotlib', width=None, height=None) -> object

Plot elevation vs azimuth for access windows (observed horizon plot).

Shows the satellite's path across the sky as elevation angle vs azimuth angle, providing a "view from the ground" perspective of the satellite's trajectory.

Parameters:

Name Type Description Default
access_windows list of dict

List of access window groups, each with: - access_window: AccessWindow object - propagator (Propagator, optional): Propagator for full trajectory - color (str, optional): Line color - line_width (float, optional): Line width - label (str, optional): Legend label

required
propagator Union[KeplerianPropagator, SGPPropagator]

Propagator object for computing interpolated trajectories

required
num_samples int

Number of samples for interpolation. If None, uses time_step.

None
time_step float

Time step for interpolation (seconds). Default: 5.0. Ignored if num_samples is specified.

5.0
elevation_mask float, callable, or array

Elevation mask to visualize. Can be: - float: Constant elevation angle (degrees) - callable: Function taking azimuth (degrees) returning elevation (degrees) - array: Elevation values at each azimuth (evaluated at 360 points)

None
backend str

'matplotlib' or 'plotly'. Default: 'matplotlib'

'matplotlib'
width int

Figure width in pixels (plotly only). Default: 1400

None
height int

Figure height in pixels (plotly only). Default: 700

None

Returns:

Type Description
object

Generated figure object

Example
import brahe as bh
import numpy as np

# Setup
eop = bh.FileEOPProvider.from_default_standard(bh.EarthOrientationFileType.STANDARD, True)
bh.set_global_eop_provider(eop)

epoch = bh.Epoch.from_datetime(2024, 1, 1, 0, 0, 0.0, 0.0, bh.TimeSystem.UTC)
oe = np.array([bh.R_EARTH + 500e3, 0.01, np.radians(97.8), 0.0, 0.0, 0.0])
state = bh.state_koe_to_eci(oe, bh.AngleFormat.RADIANS)

prop = bh.KeplerianPropagator.from_eci(epoch, state, 60.0).with_name("Satellite")
location = bh.PointLocation(np.radians(40.7128), np.radians(-74.0060), 0.0).with_name("NYC")
constraint = bh.ElevationConstraint(min_elevation_deg=10.0)

windows = bh.location_accesses([location], [prop], epoch, epoch + 86400.0, constraint)

# Sinusoidal elevation mask
mask_fn = lambda az: 15.0 + 10.0 * np.sin(np.radians(2 * az))

# Plot elevation vs azimuth
fig = bh.plot_access_elevation_azimuth(
    [{"access_window": w, "propagator": prop, "label": f"Pass {i+1}"} for i, w in enumerate(windows[:3])],
    elevation_mask=mask_fn,
    backend='matplotlib'
)