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

Adding an example notebook no how to convert hex geometry to square and back #767

Merged
merged 4 commits into from
Jul 24, 2018

Conversation

vuillaut
Copy link
Member

@vuillaut vuillaut commented Jul 5, 2018

It was not clear for me at first how to convert back from square to hexagonal geometry using the key (and the hidden buffer).
So I modified a bit the docstring of the conversion function and made an example notebook.

@codecov
Copy link

codecov bot commented Jul 5, 2018

Codecov Report

Merging #767 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #767   +/-   ##
=======================================
  Coverage   70.95%   70.95%           
=======================================
  Files         198      198           
  Lines       10691    10691           
=======================================
  Hits         7586     7586           
  Misses       3105     3105
Impacted Files Coverage Δ
ctapipe/image/geometry_converter_hex.py 55.65% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5849db4...cf4e3a3. Read the comment docs.

@kbruegge
Copy link
Member

kbruegge commented Jul 9, 2018

Nice. I didn't even know this was in there. I don't quite understand why manually indexing the buffer is neccessary in the first place.

@vuillaut
Copy link
Member Author

vuillaut commented Jul 9, 2018

@mackaiver I am not sure to understand why it's done this way either actually... but it is necessary for the user to be able to convert back to hexagonal.
It was implemented by @tino-michael I think.

@tino-michael
Copy link
Contributor

My idea was to give the user a more fine-grained control over the uniqueness of the entries in the buffer (up to not using the buffer at all).
But if you want, by all means, remove the key argument from the function and make it automatically use geom.cam_id.

@kbruegge
Copy link
Member

kbruegge commented Jul 9, 2018

But if you want, by all means, remove the key argument from the function and make it automatically use geom.cam_id.

Yeah guess using geom.cam_id makes sense. 👍

@kosack
Copy link
Contributor

kosack commented Jul 12, 2018

Perhaps a small 2 line example of converting forward and back should be added to the docstring as well, if it's confusing to use (that way people don't have to go looking in all the notebooks)

@vuillaut
Copy link
Member Author

Alright, I added example code in the docstring.

I also tried to use cam_id as default key but it would mean changing the default key of the square geometry from "LSTCam_square" back to simply "LSTCam" which would be a bad thing overall imo.
I think the first implementation was good, just lacked a bit of documentation for a newbie to use.

@kosack kosack merged commit 6a2a6a8 into cta-observatory:master Jul 24, 2018
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.

4 participants