-
Notifications
You must be signed in to change notification settings - Fork 270
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
Fixing the toy image generator #790
Fixing the toy image generator #790
Conversation
* The evaluation of the 2d gaussian was missing the normalisation for the pixel area * Length and width were not squared * Adapted test image to show a more realistic shower image
The hillas tests are now failing because some methods report a |
@@ -12,19 +12,33 @@ | |||
cam_ids = CameraGeometry.get_known_camera_names() | |||
|
|||
|
|||
def create_mock_image(geom): |
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.
maybe one could expose the "magic numbers" as parameters of this function, like?
def create_mock_image(
geom,
centroid=0.3,
width=0.03,
length=0.10,
psi="25d",
intensity=0.5,
nsb_level_pe=3,
):
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.
or maybe one could somehow comment on this particular choice for these 6 parameters?
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 function is defined in the test, so is not a user facing function. The whole does also not work with astropy units. So if we would like to generalize this function, more work is needed anyway.
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.
ok
The tests are passing again, because I coerced the psi angles in the test to the [-90, 90] interval. Maybe we should think about adding this in the hillas_functions themselves but we will also not keep 5 hillas_functions, right? |
Codecov Report
@@ Coverage Diff @@
## master #790 +/- ##
==========================================
+ Coverage 71.7% 71.76% +0.05%
==========================================
Files 201 202 +1
Lines 10939 10968 +29
==========================================
+ Hits 7844 7871 +27
- Misses 3095 3097 +2
Continue to review full report at Codecov.
|
1764333
to
f7335c5
Compare
Somehow the installation of pyqt fails on travis for python 3.6 |
Thanks - making the toy model be actually useful and in correct units has been on the todo list for a long time... it got kind of forgotten once we had simulation data.
It's annoying that we even need to install it since it's not used, but I think it's a matplotlib dep in Anaconda's build of matplotlib? In any case, that can be fixed in another PR. |
When implementing the concentrations features, I found that the toy image generator was severely broken.
The given intensity is not reproduced, the showers are much, much too bright.
Width and Length are taken as variance, not standard deviation
The cleaning for the test event is far from optimal.
Here is the image that is used for the hillas tests:
The maximum pixel value is over 9000!
Just kidding, it's over 2000.