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

Do not guess pixel area when transforming #1794

Merged
merged 1 commit into from
Sep 21, 2021
Merged

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented Sep 21, 2021

Instead of using the guess pixel area method, we now calculate a scale from the transformed unit vectors.

This is both faster and also works well for cameras with non-uniform pixel sizes or gaps between pixels:

Before

transform_before

After

transform_after

@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #1794 (81612d0) into master (5ff5401) will increase coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1794      +/-   ##
==========================================
+ Coverage   91.83%   91.95%   +0.11%     
==========================================
  Files         190      190              
  Lines       15241    15244       +3     
==========================================
+ Hits        13996    14017      +21     
+ Misses       1245     1227      -18     
Impacted Files Coverage Δ
ctapipe/instrument/camera/geometry.py 91.51% <100.00%> (+0.07%) ⬆️
ctapipe/tools/camdemo.py 76.13% <0.00%> (+20.45%) ⬆️

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 5ff5401...81612d0. Read the comment docs.

Copy link
Member

@LukasNickel LukasNickel left a comment

Choose a reason for hiding this comment

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

Sorry, didnt see the failing test, thought that was codacy.

@kosack
Copy link
Contributor

kosack commented Sep 21, 2021

I suspect the failed test is some random fluctuation... but better check

@maxnoe maxnoe merged commit 3976269 into master Sep 21, 2021
@maxnoe maxnoe deleted the calculate_area_scale branch September 21, 2021 16:10
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.

3 participants