Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hatyan/astrog.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,8 @@ def astrab(date,dT_fortran=False,lon=5.3876,lat=52.1562):

if (date<dt.datetime(1900,1,1)).any() or (date>dt.datetime(2091,1,1)).any():
# converted from Exception to warning in https://github.com/Deltares/hatyan/issues/420
logger.warning(f'Requested time out of range (1900-2091): {date}')
logger.warning('Requested time(s) outside of historic range (1900-2091), '
f'requested range: {date.min()} to {date.max()}')

# constants - general
EPOCH = dt.datetime(1899, 12, 31, 12, 0, 0) # 1900.0 # -12h shift because julian date 0 is at noon?
Expand Down
2 changes: 1 addition & 1 deletion tests/test_astrog.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def test_astrog_astrab_outofbounds(caplog):
# converted exception to warning in https://github.com/Deltares/hatyan/issues/420
timeInput = dt.datetime(1890,1,1)
_ = hatyan.astrog.astrab(timeInput,hatyan.astrog.dT(timeInput,dT_fortran=True))
assert "equested time out of range (1900-2091)" in caplog.text
assert "Requested time(s) outside of historic range (1900-2091)" in caplog.text


@pytest.mark.systemtest
Expand Down
Loading