* jfjoch_broker: Optional per-dataset authentication - statistics, images and plots can require a bearer token, which jfjoch_viewer supports. * jfjoch_viewer: Dark mode and a theme-matched colour scheme, a magnifier panel, and simpler contrast and background controls. * Rugnux: Multiple performance improvements on GPU and CPU (CPU-only processing up to 40% faster, faster image decoding on ARM), with unchanged results. * Rugnux: `--model` rigid-body refinement runs on the GPU, and the model-validation check is faster and more reliable. * Rugnux: Improved scaling and merging - error model, outlier rejection, absorption correction and French-Wilson amplitudes now agree more closely with XDS and ctruncate. * Rugnux: Improved integration - radial background on powder and ice rings, crowded rotation data keep their reflections, and CPU-only builds integrate large unit cells as GPU builds do. * Rugnux: More robust detector geometry - measured beam centre, X-ray bandwidth and goniometer rate, and geometry refinement accepted only on significant evidence. * Rugnux: Merged files are written in the standard setting, or in the setting of a reference MTZ, structure-factor mmCIF or model, with its free-R flags. * Rugnux: Richer report - ice and powder rings, further lattices, superstructure candidates and mosaicity, with warnings worded as prompts to check. * Rugnux: Clear error messages when a data set needs more GPU or host memory than is available. Reviewed-on: #83 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
2.3 KiB
Pixel mask
Mask format
Jungfraujoch generally follows the NXmx format for the pixel mask. The pixel mask is a 32-bit unsigned integer array of the same size as the image. The conditions for masking a pixel are encoded by setting a particular bit to one. This makes it possible to record the reason why a pixel is included in the mask, and several reasons can be recorded for one pixel at the same time.
Bit values are set as follows:
Bit 0 - gap (pixel with no sensor)
Bit 1 - error pixel (for PSI JUNGFRAU: pixel doesn't set proper gain during pedestal, for DECTRIS: pixel is part of detector pixel mask)
Bit 4 - noisy pixel (for PSI JUNGFRAU: pixel pedestal G0 RMS is over threshold, for DECTRIS: pixel was flagged with signal during dark data collection at initialization)
Bit 8 - user defined mask
Bit 9 - beam stop shadow (found by rugnux --detect-beam-stop, on by default; see Rugnux).
Unlike the other bits this one belongs to the run that found it, not to the dataset: Rugnux clears it
at the start of every run, so a mask read back from a file that carries one starts clear. The user
mask (bit 8) is left alone.
Bit 10 - defective pixel found on the run's own frames (rotation data from a counting sensor; see CPU data analysis §1.6): lit above its resolution ring on more frames than one reflection or chance explains, or holding the detector's error value on most frames.
Bit 30 - module edge (only for PSI systems)
Bit 31 - chip edge interpolated pixel (multipixel)
Custom user mask
Jungfraujoch allows a custom user mask to be uploaded. This happens in two steps. First create the mask in TIFF format:
import numpy as np
import tifffile as tiff
# Create an array matching a 2068 x 2164 (width x height) image: 2164 rows, 2068 columns
array = np.zeros((2164, 2068), dtype=np.uint32)
# Mark the pixel at column 400, row 300 with the value 1
array[300, 400] = 1
# Save the array as a TIFF file
tiff.imwrite('mask.tiff', array)
Pixels with non-zero value in the TIFF file will be marked as belonging to the user mask (bit 8).
Then upload the mask to Jungfraujoch server:
curl -v http://<jfjoch_broker http address>/config/user_mask.tiff -XPUT --data-binary @mask.tiff