stilt.read_receptors#

stilt.read_receptors(path)[source]#

Read receptors from a CSV file.

The file needs columns for time, longitude, latitude, and altitude. Each row is one PointReceptor, unless an r_idx column groups rows into one receptor. A group of two rows at the same location becomes a ColumnReceptor and 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 columns are kept in each receptor’s attrs. For a group, they come from its first row.

Parameters:

path (Union[str, Path, IO[str]]) – CSV file path or open text stream.

Returns:

In file order.

Return type:

list[stilt.receptor.Receptor]

Raises:

ValueError – If a required column is missing, or the rows of one group differ in time or altitude reference.