stilt.receptors.receptors_from_frame#

stilt.receptors.receptors_from_frame(frame)[source]#

Check a table with a row per release point and build its receptors.

The table needs time, longitude, latitude, and altitude columns. Each row is one PointReceptor, unless an r_idx column groups rows into one receptor: a group of two rows at one location is a ColumnReceptor, any other group a MultiPointReceptor.

Field

Accepted column names (any case)

time

time

longitude

longitude, long, lon

latitude

latitude, lati, lat

altitude (m)

altitude, zagl, zmsl, z

receptor group

r_idx

altitude reference

altitude_ref, height_ref

Without an altitude_ref column, altitudes are above mean sea level when the column is named zmsl and above ground level otherwise. Any other column becomes a label in each receptor’s attrs. For a group, labels come from its first row.

Returns:

In table order. A receptor listed twice appears once.

Return type:

list[stilt.receptor.Receptor]

Raises:

ValueError – As receptor_rows() raises.

Parameters:

frame (DataFrame)