Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
f84e0a07
Commit
f84e0a07
authored
5 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
SSB-47
: Fix range
parent
e63dd339
No related branches found
No related tags found
1 merge request
!44
Merge back holography to master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CAL/CalibrationCommon/lib/utils.py
+3
-3
3 additions, 3 deletions
CAL/CalibrationCommon/lib/utils.py
with
3 additions
and
3 deletions
CAL/CalibrationCommon/lib/utils.py
+
3
−
3
View file @
f84e0a07
...
...
@@ -16,9 +16,9 @@ def is_observation_in_range(start, end, from_datetime, to_datetime):
:return: true if the observation is contained in the range false otherwise
:raises: ValueError if start > end
"""
if
start
<
=
end
:
start_in_range
=
from_datetime
<
start
<
to_datetime
end_in_range
=
from_datetime
<
end
<
to_datetime
if
start
<
end
:
start_in_range
=
from_datetime
<
=
start
<
to_datetime
end_in_range
=
from_datetime
<
end
<
=
to_datetime
else
:
raise
ValueError
(
'
start datetime is greater then end datetime
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment