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

Loading/saving masks in pixel coordinates #116

Closed
jo-moeller opened this issue Mar 17, 2020 · 7 comments · Fixed by #132
Closed

Loading/saving masks in pixel coordinates #116

jo-moeller opened this issue Mar 17, 2020 · 7 comments · Fixed by #132
Labels
feature New feature
Milestone

Comments

@jo-moeller
Copy link

We would need the masks to be saved and loaded in the same shape as the detector data. As for example for AGIPD as (16,512,128) array. This would make the masks reusable, even if the geomertry of the quadrants changes. And in general, a bad pixel stays bad, even if the quadrant moves.

Also, it would make EXtra-foam masks compatible with other programs, as for example the the ADU_histogram device in Karabo.

@jo-moeller jo-moeller changed the title Loading/saving masks is pixel coordinates Loading/saving masks in pixel coordinates Mar 17, 2020
@zhujun98
Copy link
Collaborator

Do you have a sample file for the mask?

I would like to make you realize that in the deployed new version 0.8.1, there is an option in the Geometry panel to select assembler. Unlike LPD and DSSC, now the default assembler for AGIPD is still EXtra-geom and I will switch it to EXtra-foam at some point. The assembler in EXtra-foam is implemented in C++ and is 5 - 10 times faster than EXtra-geom on the online cluster.

As the C++ assembler now support all the three modular detectors, it is time to implement the universal mask that you requested.

@zhujun98 zhujun98 added the feature New feature label Mar 18, 2020
@zhujun98 zhujun98 added this to the Release 0.9.0 milestone Mar 18, 2020
@jo-moeller
Copy link
Author

You can find an example mask at /gpfs/exfel/exp/MID/201901/p002542/usr/Software/mask.npy

@zhujun98
Copy link
Collaborator

I just deployed a test version 0.8.3dev at EXtra-foam/alpha. Can you test it when you have time? Thank you!

@zhujun98
Copy link
Collaborator

We can reopen the issue or start another one if you find any bug or need some additional features.

@zhujun98
Copy link
Collaborator

Forgot to mention that I also updated the documentation

https://extra-foam.readthedocs.io/en/latest/image_tool.html#mask-panel

@jo-moeller
Copy link
Author

Hi,
there might be still an issue. I have selected this geometry: /gpfs/exfel/exp/MID/202022/p002693/usr/Software/geom_20200912.geom with Assembler: extra-foam.
When I now create a mask in extra-foam, save it and reload it, I get the follwing error:
ERROR- Shape of the image mask (1259,1092) is different form the image (1357,1195)!

@zhujun98
Copy link
Collaborator

Yes, there is something not easy to fix in order to synchronize the mask in the processors and the GUI sides. If I still remember correctly, you will need to keep the image tool showing the geometry panel and wait for the new mask to get updated. Otherwise, there is a chance to get the error you mentioned if you switched to other pannels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants