-
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
highlighted pixel display error #1081
Comments
Without the data, we will not be able to reproduce this. Can you at least print image and mask or provide it as files? Unrelated: This does not look like the LST Camera Geometry you sue is in the coordinate frame ctapipe expects for coordinate transformation (HESS / SIMTEL), but in the MAGIC / FACT reference frame. |
Hi @maxnoe, I read it as following (let me know if there is a better way):
|
Unfortunately I have not idea of the difference, this is the geometry I created for LST1. What do you see wrong with that? |
In the hess / simtel reference frame, the flat side should be up. |
Coordinate transformations from Camera to Sky and from Sky to Camera will probably be wrong. |
@FrancaCassol I'm sorry, but could you expand the code snippet, so that it reproduces the plot? |
Yes, sorry.
|
Please: Provide a minimal example, that I can just copy / paste that runs and produces the plot! E.g. I have no idea, where event comes from. The script should "just work" and produce the plot, where you suspect the error. |
Quick look:
|
So, there is a wrong global rotation? |
No, the transform is a reflection. I think it is x -> -y, y -> -x. See discussion here: #255 Compare e.g. with |
Yes
you find a it in the notebook in https://www.cppm.in2p3.fr/~cassol/Test_code.ipynb |
The problem is, that you mask has dtype Integers will be interpreted as pixel ids, not as boolean mask. This is not a bug in ctapipe, you must make sure, that the mask has the correct type (boolean). I don't know, why it was saved as uint8 and not as bool |
Also numpy will interprete ints as indices, not a mask. So instead of all the values where you have True or False, you get the index 0 or 1:
|
Wonderful, an other mystery solved :-) I write them with the HDF5TableWriter, it seems it does not preserve the bool ... |
ctapipe/ctapipe/io/hdf5tableio.py Lines 17 to 31 in e4030e3
It seems bool is explicitly converted to uint8 |
I see, is there a specific reason for that? I see that the BoolCol exists (@kosack ?) |
See proposed solution here #1083 |
@FrancaCassol the fix is now merged, can you try again? |
It works! :-) |
Hi,
I have a strange phenomenon by displaying highlight pixels: the pixels that are highlighted do not corresponds to the given mask. This is strange because in other entries of my notebook , it works very well. I do not really understand what is happening
Thanks
The text was updated successfully, but these errors were encountered: