arguslib.misc package¶
Submodules¶
arguslib.misc.geo module¶
- arguslib.misc.geo.haversine(lon1, lat1, lon2, lat2)[source]¶
Computes the Haversine distance between two points in km. This version is vectorized to handle numpy arrays.
- arguslib.misc.geo.bearing(lon1, lat1, lon2, lat2)[source]¶
Calculates the bearing between two points NOTE: switched lon/lat order to match TASIC code
All arguments in degrees
arguslib.misc.interpolation module¶
- arguslib.misc.interpolation.interpolate_to_intersection(offsets, coords_to_interpolate, data_to_interpolate)[source]¶
Finds where a path crosses a plane (where offset is zero) and linearly interpolates associated coordinate and data values at that point.
- Parameters:
offsets (
ndarray) – An array of distances from the intersection plane. The function looks for sign changes in this array.coords_to_interpolate (
Dict[str,ndarray]) – A dictionary of coordinate arrays (e.g., {‘x’: xs, ‘y’: ys}) that define the path’s position in some space.data_to_interpolate (
Dict[str,ndarray]) – A dictionary of other data arrays (e.g., {‘time’: times}) associated with the path.
- Return type:
List[Dict[str,Any]]- Returns:
A list of dictionaries, where each dictionary represents one intersection and contains the interpolated values for all provided coordinates and data.
arguslib.misc.met module¶
arguslib.misc.plotting module¶
- class arguslib.misc.plotting.TimestampedFigure(*args, **kwargs)[source]¶
Bases:
Figure- set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, canvas=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, constrained_layout=<UNSET>, constrained_layout_pads=<UNSET>, dpi=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, figheight=<UNSET>, figwidth=<UNSET>, frameon=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, layout_engine=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, size_inches=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, tight_layout=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)¶
Set multiple properties at once.
Supported properties are
- Properties:
agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image alpha: scalar or None animated: bool canvas: FigureCanvas clip_box: ~matplotlib.transforms.BboxBase or None clip_on: bool clip_path: Patch or (Path, Transform) or None constrained_layout: unknown constrained_layout_pads: unknown dpi: float edgecolor: :mpltype:`color` facecolor: :mpltype:`color` figheight: float figure: unknown figwidth: float frameon: bool gid: str in_layout: bool label: object layout_engine: {‘constrained’, ‘compressed’, ‘tight’, ‘none’, .LayoutEngine, None} linewidth: number mouseover: bool path_effects: list of .AbstractPathEffect picker: None or bool or float or callable rasterized: bool size_inches: (float, float) or float sketch_params: (scale: float, length: float, randomness: float) snap: bool or None tight_layout: unknown transform: ~matplotlib.transforms.Transform url: str visible: bool zorder: float
- arguslib.misc.plotting.plot_range_rings(plotting_instrument, center_instrument, dt, ranges=[10, 20, 30], alt=10, ax=None, **kwargs)[source]¶
Plots range rings on a plottable instrument’s axes.
Each ring is plotted in a separate call to ensure they are not connected.
- Parameters:
plotting_instrument (PlottableInstrument) – The instrument to plot on (e.g., MapInstrument, Camera).
center_instrument (Instrument) – The instrument providing the center position for the rings.
dt (datetime) – The datetime for the plot.
ranges (list) – List of ranges in km.
alt (float) – Altitude for the ring positions.
ax (Axes) – The axes to plot on.
**kwargs – Keyword arguments for plotting.
- arguslib.misc.plotting.plot_beam(plotting_instrument, radar, elev_azi, dt=None, ax=None, markers=False, **kwargs)[source]¶
arguslib.misc.thermo module¶
arguslib.misc.times module¶
- arguslib.misc.times.convert_to_london_naive(dt)[source]¶
Converts a datetime object to a naive datetime in the ‘Europe/London’ timezone.
- Parameters:
dt (
datetime) – The input datetime object. If naive, it’s assumed to be in UTC. If aware, it’s converted from its current timezone.- Return type:
datetime- Returns:
A naive datetime object representing the equivalent time in London.