Skip to content

Commit e10b440

Browse files
Increase drifter random offset (#289)
* increase random noise bounds * move test drifters away from domain edge * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent be3948e commit e10b440

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/virtualship/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def _find_files_in_timerange(
569569
return [fname for _, fname in files_with_dates]
570570

571571

572-
def _random_noise(scale: float = 0.01, limit: float = 0.03) -> float:
572+
def _random_noise(scale: float = 0.05, limit: float = 0.1) -> float:
573573
"""Generate a small random noise value for drifter seeding locations."""
574574
value = np.random.normal(loc=0.0, scale=scale)
575575
return np.clip(value, -limit, limit) # ensure noise is within limits

tests/instruments/test_drifter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_simulate_drifters(tmpdir) -> None:
3939
drifters = [
4040
Drifter(
4141
spacetime=Spacetime(
42-
location=Location(latitude=0.05, longitude=0.05),
42+
location=Location(latitude=0.5, longitude=0.5),
4343
time=base_time + datetime.timedelta(days=0),
4444
),
4545
depth=0.0,

0 commit comments

Comments
 (0)