dials.generate_mask

Introduction

This program is used to generate mask to specify which pixels should be considered “invalid” during spot finding and integration. It provides a few options to create simple masks using the detector trusted range, or from simple shapes or by setting different resolution ranges.

Examples:

dials.generate_mask datablock.json border=5

dials.generate_mask datablock.json \
  untrusted.rectangle=50,100,50,100 \
  untrusted.circle=200,200,100

dials.generate_mask datablock.json resolution.d_max=2.00

Basic parameters

output {
  mask = mask.pickle
  datablock = None
}
border = 0
use_trusted_range = True
d_min = None
d_max = None
resolution_range = None
untrusted {
  panel = 0
  circle = None
  rectangle = None
  polygon = None
  pixel = None
}
ice_rings {
  filter = False
  d_min = None
}

Full parameter definitions

output {
  mask = mask.pickle
    .help = "Name of output mask file"
    .type = path
  datablock = None
    .help = "Save the modified datablock. (usually only modified with the"
            "generated pixel mask)"
    .type = path
}
border = 0
  .help = "The border around the edge of the image."
  .type = int
use_trusted_range = True
  .help = "Use the trusted range to mask bad pixels."
  .type = bool
d_min = None
  .help = "The high resolution limit in Angstrom for a pixel to be accepted by"
          "the filtering algorithm."
  .type = float(value_min=0)
d_max = None
  .help = "The low resolution limit in Angstrom for a pixel to be accepted by"
          "the filtering algorithm."
  .type = float(value_min=0)
resolution_range = None
  .help = "an untrusted resolution range"
  .type = floats(size=2)
  .multiple = True
untrusted
  .multiple = True
{
  panel = 0
    .help = "The panel number"
    .type = int
  circle = None
    .help = "An untrusted circle (xc, yc, r)"
    .type = ints(size=3)
  rectangle = None
    .help = "An untrusted rectangle (x0, x1, y0, y1)"
    .type = ints(size=4)
  polygon = None
    .help = "The pixel coordinates (fast, slow) that define the corners  of"
            "the untrusted polygon. Spots whose centroids fall within  the"
            "bounds of the untrusted polygon will be rejected."
    .type = ints(value_min=0)
  pixel = None
    .help = "An untrusted pixel (x, y)"
    .type = ints(size=2, value_min=0)
}
ice_rings {
  filter = False
    .type = bool
  unit_cell = 4.498,4.498,7.338,90,90,120
    .help = "The unit cell to generate d_spacings for powder rings."
    .type = unit_cell
    .expert_level = 1
  space_group = 194
    .help = "The space group used to generate d_spacings for powder rings."
    .type = space_group
    .expert_level = 1
  width = 0.002
    .help = "The width of an ice ring (in 1/d^2)."
    .type = float(value_min=0)
    .expert_level = 1
  d_min = None
    .help = "The high resolution limit (otherwise use detector d_min)"
    .type = float(value_min=0)
}