:py:mod:`wolfhece.lagrangian.emitter` ===================================== .. py:module:: wolfhece.lagrangian.emitter .. autoapi-nested-parse:: 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 --------------- .. py:class:: Clock_Emitter(times: Union[list[float], numpy.ndarray] = None) .. py:method:: is_active(t: float) -> bool Check if the emitter is active at time t. .. py:method:: serialize() -> dict Serialize the object. .. py:method:: deserialize(data: dict) -> Clock_Emitter Deserialize the object. .. py:method:: to_str() -> list[str] Return a list of string representing the time intervals. .. py:method:: from_str(times: list[str]) -> None Set the time intervals from a list of string. .. py:class:: Emitter(area: Union[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)) .. py:property:: bounds :type: tuple[float] Return the bounds of the emitter. .. py:method:: reset() -> None Reset the emitter. .. py:method:: check() -> tuple[bool, str] Check if the emitter is valid. .. py:method:: set_clock(times: Union[list[float], numpy.ndarray]) -> None Set the clock of the emitter. .. py:method:: serialize() -> dict Serialize the object. .. py:method:: deserialize(data: dict) -> None Deserialize the object. .. py:method:: save(f: str) -> str Save the emitter to file. .. py:method:: load(f: str) -> Emitter Load the emitter from file. .. py:method:: _emit() -> tuple[numpy.ndarray] Emit particles. .. py:method:: emit(t: float) -> tuple[numpy.ndarray] Emit particles at the given time.