Skip to content

Commit 7935953

Browse files
committed
add Network.remove_models
1 parent 169e402 commit 7935953

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

disstans/network.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,25 @@ def add_local_models(self,
760760
model_description=model_description,
761761
model=mdl)
762762

763+
def remove_models(self, ts_description: str, *mdls_to_remove: str) -> None:
764+
"""
765+
Convenience function that scans all stations for models of given names
766+
associated with a specific timeseries and removes them (together with fits).
767+
768+
Parameters
769+
----------
770+
ts_description
771+
Timeseries
772+
*mdls_to_remove
773+
Pass all models to remove as function arguments.
774+
775+
See Also
776+
--------
777+
disstans.station.Station.remove_local_models : Station-specific equivalent
778+
"""
779+
for station in self:
780+
station.remove_local_models(ts_description, mdls_to_remove)
781+
763782
def remove_timeseries(self, *ts_to_remove: str) -> None:
764783
"""
765784
Convenience function that scans all stations for timeseries of given names

0 commit comments

Comments
 (0)