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

Need underload value for detectors #656

Closed
phyy-nx opened this issue Apr 16, 2019 · 1 comment
Closed

Need underload value for detectors #656

phyy-nx opened this issue Apr 16, 2019 · 1 comment
Labels

Comments

@phyy-nx
Copy link
Contributor

phyy-nx commented Apr 16, 2019

NXdetector specifies the saturation value for the detector:

saturation_value: (optional) NX_INT

The value at which the detector goes into saturation. Especially common to CCD detectors, the data is known to be invalid above this value.

The corresponding value, underload, is missing. Granted, in pixel_mask, bit 2 is classified as under responding. However, having a separate underload value available means a global number can be specified.

Note that in ImageCIF, underload is not explicitly defined, but it does define the parameters overload and undefined_value:
https://www.iucr.org/__data/iucr/cifdic_html/2/cif_img.dic/Carray_intensities.html
https://www.iucr.org/__data/iucr/cifdic_html/2/cif_img.dic/Iarray_intensities.overload.html
https://www.iucr.org/__data/iucr/cifdic_html/2/cif_img.dic/Iarray_intensities.undefined_value.html

So we could use undefined_value, but to me that does not imply pixels less than this value should not be included. If I had my druthers we would use trusted_min and trusted_max since those are very clear. However, since we already have saturation_value, I'd propose underload_value to match it.

Proposal:

underload_value: (optional) NX_INT

The lowest value at which pixels for this detector would be reasonably measured. The data is known to be invalid below this value.

The choice of language here matches the implied inequalities for saturation_value and matches the implementation in DIALS for generating a mask from a trusted range (min and max):
https://github.com/dials/dials/blob/master/util/masking.py#L168

mask = (imd > low) & (imd < high)

However, I think we could be more explicit in both saturation_value and underload_value by adding this sentence to both entries:

For example, given a saturation_value and an underload_value, the valid pixels are those less than or equal to the saturation_value and greater than or equal to underload_value.

phyy-nx added a commit to cctbx/dxtbx that referenced this issue Apr 16, 2019
AFAIK undefined_value isn't in any existing nexus files.

See nexusformat/definitions#656 for the proposed replacement.
@phyy-nx phyy-nx added the telco label Apr 16, 2019
@phyy-nx
Copy link
Contributor Author

phyy-nx commented Apr 24, 2019

Approved during telco

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

No branches or pull requests

1 participant