This documentation page refers to a previous release of DIALS (1.14).
Click here to go to the corresponding page for the latest version of DIALS

dials.generate_mask

Introduction

Mask images to remove unwanted pixels.

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
  log = 'dials.generate_masks.log'
}
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
}
verbosity = 1

Full parameter definitions

output {
  mask = mask.pickle
    .help = "Name of output mask file."
    .type = path
  datablock = None
    .help = "Name of output datablock file.  If this is set, a copy of  the"
            "datablock, modified with the generated pixel masks,  will be"
            "saved to this location."
    .type = path
  log = 'dials.generate_masks.log'
    .help = "The log filename."
    .type = str
}
border = 0
  .help = "The border around the edge of the image."
  .type = int(allow_none=True)
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, allow_none=True)
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, allow_none=True)
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(allow_none=True)
  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, allow_none=True)
    .expert_level = 1
  d_min = None
    .help = "The high resolution limit (otherwise use detector d_min)"
    .type = float(value_min=0, allow_none=True)
}
verbosity = 1
  .help = "The verbosity level."
  .type = int(value_min=0, allow_none=True)