wolfhece.lagrangian.emitter

Author: HECE - University of Liege, Pierre Archambeau Date: 2024

Copyright (c) 2024 University of Liege. All rights reserved.

This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited.

Module Contents

class wolfhece.lagrangian.emitter.Clock_Emitter(times: list[float] | numpy.ndarray = None)[source]
is_active(t: float) bool[source]

Check if the emitter is active at time t.

serialize() dict[source]

Serialize the object.

deserialize(data: dict) Clock_Emitter[source]

Deserialize the object.

to_str() list[str][source]

Return a list of string representing the time intervals.

from_str(times: list[str]) None[source]

Set the time intervals from a list of string.

class wolfhece.lagrangian.emitter.Emitter(area: shapely.geometry.Polygon | shapely.geometry.LineString | numpy.ndarray | list[int] | tuple[int] = None, how_many: int = 0, every_seconds: float = 0.0, clock: Clock_Emitter = None, header: tuple[float] = (0.0, 0.0, 1.0, 1.0))[source]
property bounds: tuple[float][source]

Return the bounds of the emitter.

reset() None[source]

Reset the emitter.

check() tuple[bool, str][source]

Check if the emitter is valid.

set_clock(times: list[float] | numpy.ndarray) None[source]

Set the clock of the emitter.

serialize() dict[source]

Serialize the object.

deserialize(data: dict) None[source]

Deserialize the object.

save(f: str) str[source]

Save the emitter to file.

load(f: str) Emitter[source]

Load the emitter from file.

_emit() tuple[numpy.ndarray][source]

Emit particles.

emit(t: float) tuple[numpy.ndarray][source]

Emit particles at the given time.