stilt.model#
Stochastic Time-Inverted Lagrangian Transport (STILT) Model.
A python implementation of the [R-STILT](jmineau/stilt) model framework.
> Inspired by uataq/air-tracker-stiltctl
Functions
|
Initialize STILT project |
Classes
|
|
|
- stilt.model.stilt_init(project, branch=None, repo=None)[source]#
Initialize STILT project
Python implementation of Rscript -e “uataq::stilt_init(‘project’)”
- class stilt.model.SimulationCollection(sims=None)[source]#
- COLUMNS = ['id', 'location_id', 'status', 'r_time', 'r_long', 'r_lati', 'r_zagl', 't_start', 't_end', 'path', 'simulation']#
- __init__(sims=None)[source]#
Initialize SimulationCollection.
- Parameters:
sims (list[Simulation]) – List of Simulation objects to add to the collection. If None, an empty collection is created.
- classmethod from_paths(paths)[source]#
Create SimulationCollection from a list of simulation paths.
- property df: DataFrame#
Get the underlying DataFrame.
- Returns:
DataFrame containing simulation metadata.
- Return type:
pd.DataFrame
- __getitem__(key)[source]#
Get a Simulation object by its ID.
- Parameters:
key (str) – Simulation ID.
- Returns:
Simulation object corresponding to the given ID.
- Return type:
- __setitem__(key, value)[source]#
Set a Simulation object by its ID.
- Parameters:
key (str) – Simulation ID.
value (Simulation) – Simulation object to set.
- Return type:
- __iter__()[source]#
Iterate over Simulations in the collection.
- Returns:
Iterator over Simulation objects.
- Return type:
Iterator[Simulation]
- __len__()[source]#
Get the number of Simulations in the collection.
- Returns:
Number of Simulations in the collection.
- Return type:
- load_trajectories()[source]#
Load trajectories for all simulations in the collection.
- Returns:
The trajectories are loaded into the ‘simulation’ column of the DataFrame.
- Return type:
None
- classmethod merge(collections)[source]#
Merge multiple SimulationCollections into one.
- Parameters:
collections (list[SimulationCollection]) – List of SimulationCollections to merge.
- Returns:
Merged SimulationCollection.
- Return type:
- get_missing(in_receptors, include_failed=False)[source]#
Find simulations in csv that are missing from simulation collection.
- plot_availability(ax=None, **kwargs)[source]#
Plot availability of simulations over time.
- Parameters:
ax (plt.Axes, optional) – Matplotlib Axes to plot on. If None, a new figure and axes are created.
**kwargs (dict) – Additional keyword arguments for the scatter plot.
- Returns:
Matplotlib Axes with the plot.
- Return type:
plt.Axes