Skip to content
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

Optional altitude #131

Merged
merged 6 commits into from
May 28, 2020
Merged

Optional altitude #131

merged 6 commits into from
May 28, 2020

Conversation

LukasNickel
Copy link
Collaborator

@LukasNickel LukasNickel commented May 27, 2020

Refers to #123

@maxnoe
Copy link
Member

maxnoe commented May 27, 2020

Yes, agreed, providing exactly one of them is better!

@maxnoe
Copy link
Member

maxnoe commented May 27, 2020

Can you resolve the conflicts?

@@ -74,18 +74,23 @@ def main(configuration_path, signal_path, predictions_path, disp_model_path, sig
from ..cta_helpers import horizontal_to_camera_cta_simtel
source_x, source_y = horizontal_to_camera_cta_simtel(
az=df[model_config.source_az_column],
zd=df[model_config.source_zd_column],
zd=df[model_config.source_zd_column] if model_config.source_zd_column
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could do this in the preprocessing.py, add a function that fills the zenith into the dataframe.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.
Was debating that. I really dont know which way I prefer especially with regards to #117.
Both ways feel hacky tbh.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or do it before the if so that the code is not duplicated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean one if clause before the function call instead of two clauses in the function call?
Something like

if not config.zd_column:
    source_zd = 90 - alt
    pointing_zd = 90-pointing_alt
horizontal_to_camera(..., zd, pointing_zd)

Or the other way around for CTA

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my review comment. Now, I came to think more about it, we should just use altitude for CTA (so change the cta function to take altitude) and convert from zenith to altitude if zenith is given for cta (but there should be no real reason for that to happen).

Copy link
Member

@maxnoe maxnoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As CTA uses altitute, I would make sense to convert or just use altitude for CTA (changing the function in cta_helpers to accept altitude.

@maxnoe maxnoe merged commit d1aefbb into master May 28, 2020
@maxnoe maxnoe deleted the optional_altitude branch May 28, 2020 12:12
@LukasNickel LukasNickel mentioned this pull request May 28, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants