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

16 and 8 bit data #11

Open
c-mita opened this issue Nov 6, 2019 · 1 comment
Open

16 and 8 bit data #11

c-mita opened this issue Nov 6, 2019 · 1 comment
Assignees

Comments

@c-mita
Copy link
Contributor

c-mita commented Nov 6, 2019

Following from https://www.globalphasing.com/autoproc/wiki/index.cgi?DataProcessingHdf5Eiger16bit201910, where neggia does not help XDS detect overexposed pixels for 16 bit data.

The reason this "works" for durin is because durin pretends the raw data is signed when converting to 32 bit in the COPY_AND_MASK macro in plugin.c (resulting in sign rather than zero extension). This means that values over 32767 are interpreted as the corresponding negative number (in particular, 65535 is interpreted as -1).

This was a deliberate decision made after discussion with @graeme-winter a while ago, so overloaded pixels would be handled "as expected", even though it was a departure from neggia. This certainly seems to have been the better direction to take.

But it is maybe a bit too simple. Perhaps it would be better to treat the source data as unsigned, and identify the proper upper bound (even if it's just UINT_N_MAX) and only make negative (or -1) for pixels at or above that value. Compare with the suggested patch to neggia here:
CV-GPhL/neggia@2d47864

This would likely be a bigger issue for 8-bit data, where the highest value durin would be able to read would be 127, when it may be only the value 255 should be interpreted as -1.

@graeme-winter graeme-winter self-assigned this Jan 22, 2020
@graeme-winter
Copy link
Collaborator

Another issue while looking at this is the treatment of data over the count rate limit - should durin squash this to -2 or no?

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

No branches or pull requests

2 participants