-
Notifications
You must be signed in to change notification settings - Fork 46
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
dials.image_viewer: Display -2 as "masked" occurs for non-Pilatus images #536
Comments
This is a known thing, and I'm not sure a fix is possible without a significant reworking of how the display is handled in the FlexImage class: |
I wonder if @nksauter would like to comment? Why do we need special code to display -2 as masked anyway? Shouldn't the masked pixels be defined by the mask? |
The code in FlexImage long-predates dxtbx and image masks (and also Pilatus detectors) - judging by labelit svn logs it dates back to 2004. |
I haven't yet tried it, but I thought for a simple fix that this line: https://github.com/cctbx/cctbx_project/blob/master/iotbx/detectors/display.h#L199 |
Yes, but then it won't be possible to view image masks for CCD images. The problem is that the image viewer is (ab)using the functionality in FlexImage flagging the special Pilatus -2 pixels in order to display dxtbx image masks. |
I would definitely say that @nksauter would hold an opinion here as clearly this must also be a problem for pedestal subtracted CSPAD images….
Properly supporting the concept of a mask not derived from pixel values seems like a good idea…
|
dials/util/image_viewer/spotfinder_frame.py Lines 1077 to 1080 in 42fcf5f
|
Presumably they are only appearing as white because of the code above that sets the masked pixels to -2, and -2 is a "small number", so the display is set to white (or close to white) for those pixels (with that colour scheme). |
I'd like the opportunity to work on this problem, so that we can account
for both the Pilatus inactive pixels, and the possibility of displaying
masks separately. Realistically my first opportunity to even think about
the problem would be during the week of May 6. If we can hold the issue
open till then I'll have a look.
Nick
Nicholas K. Sauter, Ph. D.
Senior Scientist, Molecular Biophysics & Integrated Bioimaging Division
Lawrence Berkeley National Laboratory
1 Cyclotron Rd., Bldg. 33R0345
Berkeley, CA 94720
(510) 486-5713
…On Mon, Apr 16, 2018 at 9:47 AM, Richard Gildea ***@***.***> wrote:
Presumably they are only appearing as white because of the code above that
sets the masked pixels to -2, and -2 is a "small number", so the display is
set to white (or close to white) for those pixels (with that colour scheme).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#536 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AOGuVqlRYGef44O-D3t1UV_7XorsvZ0kks5tpMsXgaJpZM4TVI15>
.
|
Hi @nksauter, I don't think any of us are going to touch this until you have a chance to take a look. Thanks. |
See also cctbx/cctbx_project#49 |
Just noting that I get problems with this particularly with electron diffraction datasets where there may be genuine negative-valued pixels. I'd like to see what the values are, but of course the image viewer always tells me they are -2. |
Use a special value -(2 ** 31) that will never be a valid pixel value to indicate a masked pixel, rather than -2. For #536.
* MASK_VAL for explicitly-masked pixels Use a special value -(2 ** 31) that will never be a valid pixel value to indicate a masked pixel, rather than -2. For #536. * De-uglify formatting * Use c_sizeof to avoiding hardcoding MASK_VAL * News
An example is in the backstop region of this image:
For those with access, the images in
/dls/mx-scratch/rjgildea/fisher/013_021_G4
are worse, with many "masked" pixels across the imageThe text was updated successfully, but these errors were encountered: