Instruments¶
All sensor classes live under the hyplan.instruments subpackage and are
re-exported from the top-level hyplan namespace for convenience.
Base class¶
Line scanners¶
- class LineScanner[source]¶
Bases:
SensorA pushbroom or whiskbroom line scanning imager.
Line scanners capture one cross-track line of pixels per frame, building up an image as the aircraft moves along-track.
- Parameters:
name (str) – Sensor name.
fov (float) – Total cross-track field of view in degrees.
across_track_pixels (int) – Number of pixels across the swath.
frame_rate (Quantity) – Frame acquisition rate in Hz.
cross_track_tilt (float) – Cross-track tilt angle in degrees (rotation about the along-track axis). Positive = starboard (right of track), negative = port (left of track). Default 0.0 (nadir-looking).
- swath_offset_angles()[source]¶
Cross-track viewing angles for each swath edge, measured from nadir.
Accounts for
cross_track_tilt(rotation about the along-track axis). Negative = port (left of track), positive = starboard (right of track).- Return type:
- Returns:
Tuple of (port_edge_angle, starboard_edge_angle) in degrees.
Examples
Nadir sensor, 30° half-angle:
(-30.0, 30.0)Same sensor with 10° starboard tilt:(-20.0, 40.0)
- swath_width(altitude_agl)[source]¶
Calculate swath width for a given altitude above ground level (AGL).
Accounts for
cross_track_tilt— when the sensor is tilted off-nadir the swath is asymmetric and its total width changes.- Parameters:
altitude_agl (Quantity) – Altitude above ground level.
- Returns:
Swath width in meters.
- Return type:
Quantity
- ground_sample_distance(altitude_agl, mode='nadir')[source]¶
Calculate the ground sample distance (GSD) for a given altitude above ground level (AGL).
- altitude_agl_for_ground_sample_distance(gsd, mode='nadir')[source]¶
Calculate the required altitude AGL (Above Ground Level) for a given ground sample distance (GSD).
- critical_ground_speed(altitude_agl, along_track_sampling=1.0)[source]¶
Calculate the maximum allowable aircraft ground speed (m/s) to maintain proper along-track sampling.
- Parameters:
altitude_agl (Quantity) – Altitude above ground level in meters.
along_track_sampling (float) – The oversampling factor (default = 1.0).
- Returns:
Maximum allowable ground speed in meters per second.
- Return type:
Quantity
- class AVIRISClassic¶
Bases:
LineScannerAVIRIS Classic (34.0° FOV, 677 pixels, 12.0 Hz).
- __init__()¶
- class AVIRISNextGen¶
Bases:
LineScannerAVIRIS Next Gen (36.0° FOV, 600 pixels, 100.0 Hz).
- __init__()¶
- class AVIRIS3¶
Bases:
LineScannerAVIRIS 3 (39.6° FOV, 1234 pixels, 216.0 Hz).
- __init__()¶
- class AVIRIS5¶
Bases:
LineScannerAVIRIS 5 (40.2° FOV, 1239 pixels, 148.0 Hz).
- __init__()¶
- class HyTES¶
Bases:
LineScannerHyTES (50.0° FOV, 512 pixels, 36.0 Hz).
- __init__()¶
- class PRISM¶
Bases:
LineScannerPRISM (30.7° FOV, 608 pixels, 176.0 Hz).
- __init__()¶
- class MASTER¶
Bases:
LineScannerMASTER (85.92° FOV, 716 pixels, 25.0 Hz).
- __init__()¶
- class GLiHT_VNIR¶
Bases:
LineScannerG-LiHT VNIR (64.0° FOV, 1600 pixels, 250.0 Hz).
- __init__()¶
- class GLiHT_Thermal¶
Bases:
LineScannerG-LiHT Thermal (42.6° FOV, 640 pixels, 50.0 Hz).
- __init__()¶
- class GLiHT_SIF¶
Bases:
LineScannerG-LiHT SIF (23.5° FOV, 1600 pixels, 37.6 Hz).
- __init__()¶
- class GCAS_UV_Vis¶
Bases:
LineScannerGCAS UV-Vis Spectrometer (45.0° FOV, 1024 pixels, 12.0 Hz).
- __init__()¶
- class GCAS_VNIR¶
Bases:
LineScannerGCAS Visible Near-Infrared (VNIR) Spectrometer (70.0° FOV, 1024 pixels, 12.0 Hz).
- __init__()¶
- class eMAS¶
Bases:
LineScannereMAS (85.92° FOV, 716 pixels, 6.25 Hz).
- __init__()¶
- class PICARD¶
Bases:
LineScannerPICARD (50.0° FOV, 412 pixels, 100.0 Hz).
- __init__()¶
LVIS lidar¶
- class LVISLens[source]¶
Bases:
objectLVIS lens option defined by its beam divergence.
- class LVIS[source]¶
Bases:
SensorLVIS full-waveform airborne scanning lidar.
Provides the standard Sensor interface (half_angle, swath_width) so that LVIS works with generate_swath_polygon, generate_flight_lines, and other HyPlan tools. The swath_width returned is the geometric maximum; use effective_swath_width to account for contiguous-coverage constraints.
All altitude parameters expect AGL (above ground level).
- Parameters:
rep_rate (
Quantity) – Laser pulse repetition rate (Hz). Default 4000 Hz.lens (
object) – Lens option — LVISLens instance, key from LVIS_LENSES (“narrow”, “medium”, “wide”), or None for wide (default).scan_half_angle_deg (
float) – Half-scan angle in degrees. Controls the geometric maximum swath via2 * altitude * tan(angle). Default ≈5.71° corresponds to max swath = 0.2 * altitude.
- __init__(rep_rate=<Quantity(4000, 'hertz')>, lens=None, scan_half_angle_deg=np.float64(5.710593137499643))[source]¶
- swath_offset_angles()[source]¶
Cross-track viewing angles for each swath edge (nadir-looking).
- Return type:
- Returns:
Tuple of (port_edge_angle, starboard_edge_angle) in degrees.
- swath_width(altitude_agl)[source]¶
Maximum swath width set by the scanner geometry.
This is the geometric limit: 2 * altitude_agl * tan(half_angle). Equivalent to 0.2 * altitude_agl.
Used by generate_swath_polygon and generate_flight_lines for swath polygon generation and line spacing.
- equivalent_fov(altitude_agl, speed)[source]¶
Equivalent field of view in degrees after contiguous-coverage limits.
When the laser footprint can fill the full scanner swath, this equals the geometric max FOV. When coverage is sampling-limited, the equivalent FOV narrows:
2 * atan(effective_swath / (2 * altitude)).
- footprint_diameter(altitude_agl)[source]¶
Laser footprint diameter on the ground for the configured lens.
footprint = tan(divergence_mrad / 1000) * altitude_agl
- coverage_rate(altitude_agl, speed)[source]¶
Area coverage rate at maximum swath.
coverage_rate = speed * max_swath
- footprint_for_max_swath(altitude_agl, speed)[source]¶
Minimum footprint diameter needed to fill the max swath contiguously.
footprint = sqrt(speed * max_swath / rep_rate)
- effective_swath_width(altitude_agl, speed)[source]¶
Achievable swath width accounting for contiguous coverage.
The effective swath is the minimum of: - the scanner’s max swath (geometric limit), and - footprint^2 * rep_rate / speed (contiguous-coverage limit)
When the footprint is too small relative to the flight speed, shots cannot tile the full max swath without gaps, and the effective swath narrows.
- is_contiguous(altitude_agl, speed)[source]¶
Check whether the current configuration fills the max swath.
Returns True if the footprint is large enough to tile the full scanner swath at the given speed.
- along_track_spacing(speed)[source]¶
Along-track distance between consecutive laser shots.
along_track_spacing = speed / rep_rate
- is_along_track_contiguous(altitude_agl, speed)[source]¶
Check whether consecutive shots overlap along-track.
Returns True if the along-track spacing is less than or equal to the footprint diameter.
- point_density(altitude_agl, speed)[source]¶
Laser shot density within the effective swath.
point_density = rep_rate / (speed * effective_swath)
This is the primary planning metric for LVIS survey design.
- solve_for_speed(target_density, altitude_agl)[source]¶
Compute the maximum aircraft speed for a target point density.
Inverts
point_density = rep_rate / (speed * effective_swath)accounting for the coupling between speed and effective swath.Two regimes apply:
Geometry-limited (effective swath = max swath):
density = rep_rate / (speed * max_swath), sospeed = rep_rate / (density * max_swath).Sampling-limited (effective swath < max swath):
density = 1 / fp^2, independent of speed. In this regime the density is always at least the target (since 1/fp^2 >= target_density), so faster speeds are feasible — the effective swath narrows but density within it stays constant.
The returned speed is the maximum speed at which
point_density >= target_density.- Parameters:
- Return type:
- Returns:
Maximum speed that achieves at least the target density.
- Raises:
HyPlanValueError – If the target density exceeds 1/fp^2 (impossible at this altitude/lens regardless of speed).
- solve_for_altitude(target_density, speed)[source]¶
Compute the maximum altitude for a target point density.
Inverts the density equation, accounting for the dependence of both footprint and max swath on altitude.
In the geometry-limited regime (where effective swath = max swath):
density = rep_rate / (speed * 2 * altitude * tan(half_angle))
So:
altitude = rep_rate / (speed * density * 2 * tan(half_angle))
- summary(altitude_agl, speed)[source]¶
Compute all LVIS coverage parameters for a given flight configuration.
- footprint_on_terrain(lat, lon, altitude_msl, heading, scan_angle_deg=0.0, dem_file=None)[source]¶
Compute laser footprint on terrain at a single scan position.
Uses
ray_terrain_intersection()to find the ground point, then computes slant range, surface incidence angle, and the resulting footprint ellipse.- Parameters:
lat (
float) – Aircraft latitude (degrees).lon (
float) – Aircraft longitude (degrees).altitude_msl (
float) – Aircraft altitude MSL (meters).heading (
float) – Aircraft heading (degrees true, clockwise from north).scan_angle_deg (
float) – Scan angle from nadir (degrees). Positive = starboard, negative = port. Default 0 (nadir).dem_file (
Optional[str]) – Path to DEM file. Auto-downloaded if None.
- Return type:
- Returns:
Dict with ground position, slant range, incidence angle, footprint ellipse dimensions, and flat-earth comparison.
- effective_swath_on_terrain(lat, lon, altitude_msl, heading, speed, dem_file=None, n_scan_positions=21)[source]¶
Compute effective swath across the scan, accounting for terrain.
Discretises the scan into n_scan_positions angles from port to starboard and evaluates the terrain-aware footprint at each. Returns per-position metrics and the overall effective swath.
- Parameters:
lat (
float) – Aircraft latitude (degrees).lon (
float) – Aircraft longitude (degrees).altitude_msl (
float) – Aircraft altitude MSL (meters).heading (
float) – Aircraft heading (degrees true).speed (
Quantity) – Aircraft ground speed.dem_file (
Optional[str]) – Path to DEM file. Auto-downloaded if None.n_scan_positions (
int) – Number of scan positions across the swath.
- Return type:
- Returns:
Dict with per-position arrays and aggregate metrics.
- terrain_summary(lat, lon, altitude_msl, heading, speed, dem_file=None)[source]¶
Coverage summary with terrain correction at a specific position.
Combines the flat-earth
summary()output with terrain-aware metrics fromeffective_swath_on_terrain().- Parameters:
lat (
float) – Aircraft latitude (degrees).lon (
float) – Aircraft longitude (degrees).altitude_msl (
float) – Aircraft altitude MSL (meters).heading (
float) – Aircraft heading (degrees true).speed (
Quantity) – Aircraft ground speed.dem_file (
Optional[str]) – Path to DEM file. Auto-downloaded if None.
- Return type:
- Returns:
Dict with all keys from
summary()plus terrain-specific keys prefixed withterrain_.
- LVIS_LENS_NARROW¶
LVIS lens option defined by its beam divergence.
- LVIS_LENS_MEDIUM¶
LVIS lens option defined by its beam divergence.
- LVIS_LENS_WIDE¶
LVIS lens option defined by its beam divergence.
The three pre-configured lens instances are also exposed via the
LVIS_LENSES mapping (keys "narrow", "medium", "wide")
for parameterising tests or campaigns by lens name.
Profiling lidars¶
Nadir-pointing single-beam atmospheric profilers (no cross-track swath):
ProfilingLidar base class plus three
pre-configured instruments — HSRL2,
HALO, and CPL.
Detailed signatures and references are documented on the dedicated
Profiling Lidars page.
Doppler wind lidar¶
AerosolWindProfiler is a dual-line-of-sight
profiler for vector wind retrieval. Detailed signature and planning
helpers are documented on the dedicated AWP Profiling page.
Radar¶
- class SidelookingRadar[source]¶
Bases:
SensorRepresents a side-looking Synthetic Aperture Radar (SAR).
Models the slant-range geometry where the swath is offset from nadir, defined by near-range and far-range incidence angles. Supports stripmap SAR instruments like UAVSAR.
The swath lies entirely on one side of the flight track (typically left).
- __init__(name, frequency, bandwidth, near_range_angle, far_range_angle, azimuth_resolution, polarization, look_direction='left', peak_power=None, antenna_length=None)[source]¶
- property half_angle: float¶
Effective half-angle for swath calculations.
For a side-looking radar this is the angular extent from the swath center to either edge, i.e. half the angular swath width.
- swath_width(altitude_agl)[source]¶
Ground swath width for a given altitude AGL.
Computed from the difference in ground range at near and far incidence angles.
- ground_range_resolution(altitude_agl, incidence_angle=None)[source]¶
Ground-range resolution at a given incidence angle.
ground_range_res = slant_range_res / sin(incidence_angle)
- ground_sample_distance(altitude_agl)[source]¶
Ground sample distance at near range, center, and far range.
- slant_range(altitude_agl, incidence_angle=None)[source]¶
Slant range distance to target at given incidence angle.
- swath_offset_angles()[source]¶
Return the (port_angle, starboard_angle) for swath polygon generation.
For a left-looking radar, the swath is on the left (port) side. For a right-looking radar, the swath is on the right (starboard) side.
- Return type:
- Returns:
Tuple of (near_side_angle, far_side_angle) where the sign convention matches swath.py: port = left of track, starboard = right of track.
- class UAVSAR_Lband[source]¶
Bases:
SidelookingRadarNASA/JPL UAVSAR L-band fully polarimetric SAR.
Platform: Gulfstream III (C-20A) Typical altitude: ~12,500 m (41,000 ft)
- class UAVSAR_Pband[source]¶
Bases:
SidelookingRadarNASA/JPL UAVSAR P-band SAR (AirMOSS configuration).
Platform: Gulfstream III (C-20A) Typical altitude: ~12,500 m (41,000 ft)
- class UAVSAR_Kaband[source]¶
Bases:
SidelookingRadarNASA/JPL GLISTIN-A Ka-band single-pass cross-track interferometric SAR.
Platform: Gulfstream III (C-20A) Typical altitude: ~12,500 m (41,000 ft)
- class RadarExclusionConflict[source]¶
Bases:
objectA detected conflict between a UAVSAR swath and an FAA L-Band radar exclusion zone.
- Variables:
radar_name – Name of the FAA radar site.
swath_index – Index of the conflicting swath in the input list.
intersection – Shapely geometry of the overlap between the swath and exclusion zone.
exclusion_zone – Shapely Polygon of the full exclusion zone boundary.
- check_lband_radar_exclusions(swath_polygons, geojson=None)[source]¶
Check UAVSAR swath polygons against FAA L-Band radar exclusion zones.
UAVSAR L-Band swaths must remain outside a 10 nautical mile radius of each FAA long-range L-Band radar site. The exclusion zone polygons are pre-computed 10 NMI circles stored in a GeoJSON FeatureCollection.
- Parameters:
swath_polygons (
Union[Polygon,List[Polygon]]) – A single Shapely Polygon or a list of Shapely Polygons representing UAVSAR swath footprints (e.g. fromgenerate_swath_polygon()).geojson (
Union[str,dict,None]) –Exclusion zone data. One of:
None— load the bundledhyplan/data/faa_lband_radar_exclusion_zones.geojsonfile.str— path to a GeoJSON FeatureCollection file on disk.dict— an already-parsed GeoJSON FeatureCollection.
- Return type:
- Returns:
List of
RadarExclusionConflict, one for each swath/zone pair that intersects. An empty list means no conflicts.- Raises:
FileNotFoundError – If geojson is
Noneand the bundled data file does not exist, or if a path string is given that does not exist.HyPlanValueError – If the GeoJSON is not a valid FeatureCollection.
Frame camera¶
- class FrameCamera[source]¶
Bases:
SensorA frame (area-array) camera sensor.
Unlike line scanners, frame cameras capture a full 2D image per frame. The footprint is determined by both horizontal and vertical fields of view.
- Parameters:
name (str) – Sensor name.
sensor_width (Quantity) – Physical sensor width in mm.
sensor_height (Quantity) – Physical sensor height in mm.
focal_length (Quantity) – Lens focal length in mm.
resolution_x (int) – Number of pixels across-track (horizontal).
resolution_y (int) – Number of pixels along-track (vertical).
frame_rate (Quantity) – Frame acquisition rate in Hz.
f_speed (float) – Lens f-number (focal length / aperture diameter).
- __init__(name, sensor_width, sensor_height, focal_length, resolution_x, resolution_y, frame_rate, f_speed, tilt_angle=0.0, tilt_direction=0.0)[source]¶
- ground_sample_distance(altitude_agl)[source]¶
Calculate the ground sample distance (GSD) for a given altitude AGL.
For nadir cameras, returns
x(across-track) andy(along-track) GSD. For tilted cameras, additionally returnsy_nearandy_farshowing GSD variation across the frame.- Parameters:
altitude_agl (Quantity) – Altitude above ground level in meters.
- Returns:
Ground sample distances in meters.
- Return type:
Dict[str, Quantity]
- altitude_agl_for_ground_sample_distance(gsd_x, gsd_y)[source]¶
Calculate the required altitude AGL for a given ground sample distance (GSD) at nadir.
- Parameters:
gsd_x (Quantity) – Desired ground sample distance in meters along the x-axis (across-track).
gsd_y (Quantity) – Desired ground sample distance in meters along the y-axis (along-track).
- Returns:
The required altitude AGL in meters.
- Return type:
Quantity
- footprint_at(altitude_agl)[source]¶
Calculate the footprint dimensions (m) for a given altitude AGL.
For nadir cameras (
tilt_angle == 0), returnswidthandheight. For tilted cameras, additionally returnsheight_nearandheight_far(distances from the principal point to the near/far edges along the tilt axis).
- swath_width(altitude_agl)[source]¶
Across-track swath width at a given altitude AGL.
This is the
widthcomponent offootprint_at(), provided for API compatibility withLineScannerandflight_box.box_around_center_line().
- image_scale(altitude_agl)[source]¶
Image scale denominator (1:N) at a given altitude AGL.
- Parameters:
altitude_agl (
Quantity) – Altitude above ground level.- Returns:
- Return type:
Scale denominator N such that the image scale is 1
- focal_length_for_gsd(altitude_agl, target_gsd)[source]¶
Required focal length for a target GSD at a given altitude.
Useful for zoom lenses where the focal length can be adjusted.
- trigger_distance(altitude_agl, overlap_pct=80.0)[source]¶
Along-track distance between camera exposures from overlap percentage.
- trigger_interval(altitude_agl, ground_speed, overlap_pct=80.0)[source]¶
Time between camera triggers for a given speed and overlap.
- coverage_buffer(altitude_agl, overlap_pct=80.0, n_frames=4)[source]¶
Extra distance beyond AOI boundary to ensure full edge coverage.
Camera triggering should begin this distance before the AOI entry and continue this distance past the AOI exit.
- critical_ground_speed(altitude_agl)[source]¶
Calculate the maximum ground speed (m/s) to maintain proper along-track sampling.
- Parameters:
altitude_agl (Quantity) – Altitude above ground level in meters.
- Returns:
Maximum allowable ground speed in meters per second.
- Return type:
Quantity
- base_height_ratio(altitude_agl, overlap_pct=80.0)[source]¶
Base-to-height ratio for stereo photogrammetry.
B/H is the ratio of the baseline (distance between successive exposure centres) to the flying height. Larger values give better vertical accuracy but more occlusion.
- vertical_accuracy(altitude_agl, overlap_pct=80.0, sigma_parallax=0.5)[source]¶
Estimated vertical accuracy from stereo overlap.
Uses the photogrammetric relation
σ_z = (H / B) × σ_p × GSD_ywhereσ_pis the parallax measurement error in pixels.
- range_accuracy(altitude_agl, baseline, sigma_q=None)[source]¶
Stereo range accuracy using the range-error formula.
σ_R = R² × σ_q / Bwhere R is the slant range from the camera to the ground, B is the baseline, and σ_q is the angular measurement uncertainty in radians. This is the model used in Donnellan et al. (2025) for QUAKES-I.- Parameters:
- Return type:
- Returns:
Range accuracy (σ_R) in meters.
- ground_footprint(altitude_agl, cross_track_offset=0.0, *, edge_points=10, lat=None, lon=None, altitude_msl=None, heading=0.0, dem_file=None)[source]¶
Project the sensor perimeter onto the ground as a Shapely Polygon.
Points are distributed along each sensor edge (controlled by edge_points) so the polygon faithfully represents footprint curvature, especially over terrain.
Operates in two modes:
Flat-ground mode (default): When
lat,lon, andaltitude_mslare all None. Returns a 3-D Shapely Polygon with coordinates(x_cross, y_along, 0)in meters, origin at the nadir point.Terrain mode: When
lat,lon, andaltitude_mslare provided. Rays are intersected with the DEM viaray_terrain_intersection(). Returns a 3-D Shapely Polygon with coordinates(lon, lat, elevation). The altitude_agl parameter is ignored in this mode.- Parameters:
altitude_agl (
Quantity) – Altitude above ground level (used in flat mode).cross_track_offset (
float) – Additional cross-track angular offset in degrees (e.g. for cameras in a multi-camera rig).edge_points (
int) – Number of points per sensor edge (default 10). Use 2 for a simple 4-corner quadrilateral.lat (
float|None) – Camera latitude in degrees (terrain mode).lon (
float|None) – Camera longitude in degrees (terrain mode).altitude_msl (
float|None) – Camera altitude MSL in meters (terrain mode).heading (
float) – Aircraft heading in degrees from north (terrain mode).dem_file (
str|None) – Path to DEM file. If None and terrain mode is active, a DEM is downloaded automatically.
- Return type:
- Returns:
A
shapely.geometry.Polygonwith 3-D coordinates.
- ground_footprint_corners(*args, **kwargs)[source]¶
Deprecated — use
ground_footprint()instead.
- static footprint_corners(lat, lon, altitude_msl, fov_x, fov_y, dem_file, tilt_angle=0.0, tilt_direction=0.0, heading=0.0)[source]¶
Calculate terrain-intersected footprint corners.
Deprecated since version Use: the instance method
ground_footprint()withlat,lon, andaltitude_mslkeyword arguments instead. It uses the camera’s own FOV and tilt parameters automatically.
- class MultiCameraRig[source]¶
Bases:
SensorA rig of multiple
FrameCamerainstances with known orientations.Each camera carries its own
tilt_angleandtilt_direction. The rig stores optional lateral/longitudinal offsets for each camera.- Parameters:
name (
str) – Rig name.cameras (
List[Dict]) – List of dicts, each with keys:"camera"(FrameCamera),"label"(str),"dx"(Quantity, lateral offset, default 0 m),"dy"(Quantity, longitudinal offset, default 0 m).
- ground_footprint(altitude_agl, *, edge_points=10, lat=None, lon=None, altitude_msl=None, heading=0.0, dem_file=None)[source]¶
Project each camera’s sensor perimeter onto the ground.
Uses each camera’s tilt geometry and the
dxcross-track angular offset stored in the rig layout.
- ground_footprint_corners(*args, **kwargs)[source]¶
Deprecated — use
ground_footprint()instead.
- stereo_pairs()[source]¶
Find camera pairs with opposing tilt directions (~180° apart).
Returns a list of (forward_entry, aft_entry) tuples.
- composite_base_height_ratio(altitude_agl)[source]¶
B/H ratio for each stereo pair.
For convergent stereo,
B/H = tan(θ_fwd) + tan(θ_aft)where θ is the tilt angle of each camera.
- line_spacing(altitude_agl, sidelap_pct=60.0)[source]¶
Flight line spacing from sidelap and combined swath width.
- classmethod quakes_i()[source]¶
Create a QUAKES-I multi-camera rig.
Based on Donnellan et al. (2025), Earth and Space Science. The camera hardware is the same regardless of aircraft platform (Gulfstream V at 12.5 km / 250 m/s, or King Air at 6 km / 125 m/s). The platform choice only affects operational parameters like the altitude passed to
swath_width()etc.- Return type:
- Returns:
A
MultiCameraRigwith 8 cameras (4 forward + 4 aft).
Factory function¶
- create_sensor(sensor_type)[source]¶
Factory function to create and return an instance of a sensor.
- Parameters:
sensor_type (str) – The name of the sensor class to instantiate. Must be one of the keys in SENSOR_REGISTRY.
- Returns:
An instance of the requested sensor type.
- Return type:
- Raises:
HyPlanValueError – If the specified sensor_type is not found in SENSOR_REGISTRY.