-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add checks for observability and grid plot #22
base: main
Are you sure you want to change the base?
Conversation
f079573
to
b1a066f
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
6b2bcbc
to
5caccd8
Compare
|
||
def check_observability( | ||
constraints, observer, target_source, time_range, time_grid_resolution | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docs for this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ax=None, | ||
savefig=True, | ||
output_path=None, | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
logger.info("Observation starts at %s", start_datetime) | ||
logger.info("Observation ends at %s", end_datetime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that sometimes you use f-strings and here the simple format. I would use f-strings everywhere if possible, you can force a certain format also for f-strings if needed (I guess here you need it to print the Time object as string representation, but I would assume it should work also with f-strings).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason is this
https://realpython.com/python-f-strings/#lazy-evaluation-in-logging
I tried the example notebook for a few different settings, to check that e.g. for the Crab I get 0 hours if I put a very limited zenith range below its culmination zenith. As additional comments:
|
Fix bug in observability module fix formatting issue when definining AtNightConstraint
Update call to check_observability Fix call to observation datetime from main.py Update call to source_detection in main.py
to account for leap years in functions which depend on year length
- add observability heatmap - fixed docstrings - improved label appearance in observability grid
- call observability heatmap - call observability grid only if within a day
5caccd8
to
754b6cf
Compare
done
done Thanks! Let me know if there is something else missing or not working! |
This PR also closes #9 unless something else comes up before final approval. |
Closes #16 .
Also adds preliminary checks if the source is ever observable and which months are best to observe it.
Also adds plots like these
this one only if selected time range is not more than 1 day