stilt.observations.background#
- stilt.observations.background(particles, field, *, transforms=(), context=None)[source]#
Background mole fraction at the receptor, from the field at the trajectory endpoints.
- Parameters:
particles (
DataFrame) – The simulation’s particle table (sim.trajectories.data).field (
DataArray|Series) – The background field (seeparticle_background()for its layout), or one value per particle that you sampled yourself, as a Series indexed byindx: for example lair’sCarbonTracker.sampleonsim.trajectories.endpoints().transforms (
Sequence[Any]) – The footprint’s particle transforms and the context to apply them with (config.transformsandsim.transform_context(name)), so the background is weighted the way the footprint is and adds to its enhancement. For a tower receptor there is nothing to pass.context (
Optional[TransformContext]) – The footprint’s particle transforms and the context to apply them with (config.transformsandsim.transform_context(name)), so the background is weighted the way the footprint is and adds to its enhancement. For a tower receptor there is nothing to pass.
- Return type:
Background
Notes
Without transforms the value is the plain mean over particles. With pressure weighting the weights sum to the fraction of the column’s air mass the particles cover,
(p_sfc - p_top) / p_sfc, the same fraction the enhancement covers; the part of the column above the receptor top is still yours to add from the same field.