Transforms#

Particle transforms scale each particle’s foot before the footprint is made (see Particle Weighting (Transforms)). A transform is any object with an apply(particles, context) method. The built-ins are pydantic models, and their fields are their config.yaml keys.

Interface#

stilt.ParticleTransform

Interface for a transform: any object with apply(particles, context) -> DataFrame.

stilt.TransformContext

Information about the simulation a transform is applied for.

Built-in transforms#

stilt.transforms.AveragingKernel

Transform that weights each particle's foot by an averaging kernel.

stilt.transforms.PressureWeighting

Transform that weights each particle by its share of the column's air mass.

stilt.transforms.FirstOrderLifetime

Transform that decays each particle's foot by exp(-age / lifetime).

Averaging-kernel tables#

stilt.transforms.averaging_kernel_table

Return a table of averaging kernels, one per receptor, for AveragingKernel.

Science helpers#

stilt.transforms.release_coordinate

Return each particle's value of coordinate at release, indexed by indx.

stilt.transforms.particle_pwf

Return each particle's release pressure and pressure weight.

stilt.transforms.ak_weights

Return the averaging kernel at each particle's release coordinate.

Loading and dumping#

stilt.transforms.load_transform

Return the transform for one config entry.

stilt.transforms.dump_transform

Return the config mapping for one transform, the inverse of load_transform().

stilt.transforms.apply_transforms

Apply transforms in order.