stilt.observations.receptors_from_soundings#
- stilt.observations.receptors_from_soundings(soundings, kind, *, top)[source]#
Return a receptor for each sounding, and their averaging-kernel table.
- Parameters:
soundings (
DataFrame) – A reader’s table (SOUNDING_SCHEMA), screened as you like, such asdf[df.good].kind (
Literal['column','slant']) –columnreleases particles along the vertical from the ground totopmeters above it, at the sounding’s location (ColumnReceptor).slantreleases them at the retrieval’saltitude_levelsbelowsurface_altitude + top, along the line of sight given byzenithandazimuth(slant_points()), above sea level.top (
float) – Height of the receptor’s top above the surface, in meters.
- Return type:
- Returns:
receptors (list of Receptor) – One per sounding, in table order, each with the
sounding_idas an attribute (a column ofreceptors.csv).kernels (pandas.DataFrame or None) – The averaging kernels by receptor (
averaging_kernel_table()), forproject.add_table("kernels", kernels).Nonewhen the soundings have no kernel (GGG.ooffiles).
- Raises:
ValueError – If a slant receptor’s columns (
altitude_levels,zenith,azimuth) are missing. For OCO-2, which gives pressures only, addaltitude_levelsfrompressure_altitudes()first.
Examples
>>> df = read_tropomi_ch4( ... path, lon_range=(-113.5, -110.5), lat_range=(39.5, 42) ... ) >>> receptors, kernels = receptors_from_soundings( ... df[df.good], "slant", top=3000 ... ) >>> project.add_receptors(receptors) >>> project.add_table("kernels", kernels)