Excreta module#
Functions to compute the amount of excreta (urine or feces) generated by a human population over a certain amount of time.
Content#
|
|
|
Mass of feces generated by a given population over a certain duration from the |
|
Amount of urine generated by a given population over a certain duration from the |
Details#
- class orgmatt.excreta.Quantity(value: MagnitudeT, units: UnitLike | None = None)[source]#
- class orgmatt.excreta.Quantity(value: str, units: UnitLike | None = None)
- class orgmatt.excreta.Quantity(value: Sequence[ScalarT], units: UnitLike | None = None)
- class orgmatt.excreta.Quantity(value: PlainQuantity[Any], units: UnitLike | None = None)
- orgmatt.excreta.feces_from_population(pop: float | ndarray[Any, dtype[floating | int64]], duration: Quantity, wet: bool = True, ci: int = 0, q: list[float] | ndarray[Any, dtype[floating | int64]] | None = None, **kwargs) Quantity [source]#
Mass of feces generated by a given population over a certain duration from the
excretions.csv
database.- Parameters:
pop (float or list-like object) – Number of inhabitants.
duration (float [time]) – Time interval over which the nitrogen is excreted.
wet (bool (optional, default: True)) – Whether to compute the mass of wet feces (default) or dry solids.
ci (int (optional, default: 0)) – Confidence interval (CI). If non-zero, the function will also return the low and high expected values corresponding to that CI.
q (array-like of floats (optional: default: None)) – Percentiles to compute (supersedes ci)..
- Returns:
feces – Mass of excreted feces if ci is 0. If q is provided, returns the values associated to each percentile in q for each entry in pop; otherwise, if ci > 0, one (low, mean, high) result per pop entry, giving the masses expected for the requested confidence interval. The dimension D is either 3, len(q), (len(pop), 3), or (len(pop), len(q)) depending on ci and q.
- Return type:
float or array of dimension D [mass]
- orgmatt.excreta.urine_from_population(pop: float | ndarray[Any, dtype[floating | int64]], duration: Quantity, ci: int = 0, q: list[float] | ndarray[Any, dtype[floating | int64]] | None = None, **kwargs) Quantity [source]#
Amount of urine generated by a given population over a certain duration from the
excretions.csv
database.- Parameters:
pop (float or array-like object) – Number of inhabitants.
duration (float [time]) – Time interval over which the nitrogen is excreted.
ci (int (optional, default: 0)) – Confidence interval (CI). If non-zero, the function will also return the low and high expected values corresponding to that CI.
q (array-like of floats (optional: default: None)) – Percentiles to compute (supersedes ci)..
**kwargs (arguments to use a subset of the database) – Additional arguments can be use to restrict the results to a subset of the full database. E.g. one can add region=”Europe” to use only values obtained from studies in European countries.
- Returns:
urine – Volume of excreted urine if q is None or ci is 0. If q is provided, returns the values associated to each percentile in q for each entry in pop; otherwise, if ci > 0, one (low, mean, high) result per pop entry, giving the volumes expected for the requested confidence interval. The dimension D is either 3, len(q), (len(pop), 3), or (len(pop), len(q)) depending on ci and q.
- Return type:
float or array of dimension D [length]**3