Configuration file

The DryMass configuration file drymass.cfg is located in the root of the output folder (“_dm” appended to the data path). The configuration file is divided into sections.

[bg] Background correction

DryMass uses the Python library qpimage for background correction. For detailed information on the algorithms (and the corresponding keyword arguments) used, please see qpimage.bg_estimate.

  • amplitude binary threshold = None (float_or_str) – Binary image threshold value or method
    If not None, defines either a threshold for background segmentation or a method in skimage.filters.
  • amplitude border perc = 10 (float) – Amplitude bg border region to analyze [%]
    Set to 0 to disable.
  • amplitude border px = 5 (int) – Amplitude bg border region to analyze [px]
    Set to 0 to disable.
  • amplitude data = None (int_or_path) – Amplitude bg correction file or index
    Image indexing starts with 1. If a file, either specify the full path or the relative path to the directory containing the input data.
  • amplitude mask sphere = None (float) – Circular mask for amplitude bg correction
    If not None, a mask is used for background correction. A value of ‘1.0’ results in a mask with the radius as determined with the edge-detection approach from phase [sic]. Set this to ‘1.1’ to exclude peripheral phase values. If the amplitude border values or binary thresholds are set, the intersection of the resulting masks is used for background correction. For procedural details see qpsphere.cnvnc.bg_phase_mask_for_qpi().
  • amplitude offset = mean (lcstr) – Amplitude bg correction offset method
    Valid values are defined in qpimage.bg_estimate.VALID_FIT_OFFSETS.
  • amplitude profile = tilt (lcstr) – Amplitude bg correction profile method
    Valid values are defined in qpimage.bg_estimate.VALID_FIT_PROFILES.
  • enabled = True (fbool) – Enable bg correction globally
    Set to False to disable background correction.
  • phase binary threshold = True (fbool) – Enable bg correction globally
    Set to False to disable background correction.
  • phase border perc = 10 (float) – Phase bg border region to analyze [%]
    Set to 0 to disable.
  • phase border px = 5 (int) – Phase bg border region to analyze [px]
    Set to 0 to disable.
  • phase data = None (int_or_path) – Phase bg correction file or index
    Image indexing starts with 1. If a file, either specify the full path or the relative path to the directory containing the input data.
  • phase mask sphere = None (float) – Circular mask for phase bg correction
    If not None, a mask is used for background correction. A value of ‘1.0’ results in a mask with the radius as determined with the edge-detection approach from phase. Set this to ‘1.1’ to exclude peripheral phase values. If the phase border values or binary thresholds are set, the intersection of the resulting masks is used for background correction. For procedural details see qpsphere.cnvnc.bg_phase_mask_for_qpi().
  • phase offset = mean (lcstr) – Phase bg correction offset method
    Valid values are defined in qpimage.bg_estimate.VALID_FIT_OFFSETS.
  • phase profile = tilt (lcstr) – Phase bg correction profile method
    Valid values are defined in qpimage.bg_estimate.VALID_FIT_PROFILES.

[holo] Hologram analysis

These parameters tune the analysis of off-axis hologram data (if applicable). The parameters shown are passed to qpimage.holo.get_field().

  • filter name = disk (str) – Filter name for sideband isolation
  • filter size = 0.3333333333333333 (float) – Filter size (fraction of the sideband frequency)
  • sideband = 1 (floattuple_or_one) – Sideband ±1 or frequency coordinates

[meta] Image meta data

This section contains meta data of the experiment.

  • medium index = None (float) – Refractive index of the surrounding medium
  • pixel size um = None (float) – Detector pixel size [µm]
  • wavelength nm = None (float) – Imaging wavelength [nm]

[output] Supplementary data output

This section defines what additional data are written to disk.

  • roi images = True (fbool) – Rendered phase images with ROI location
  • sphere images = True (fbool) – Phase/Intensity images for sphere analysis
  • sensor tif data = True (fbool) – Phase/Amplitude sensor tif data

[roi] Extraction of regions of interest

The extraction of ROIs is done in drymass.extractroi.extract_roi().

  • dist border px = 10 (int) – Minimum distance of objects to image border [px]
  • eccentricity max = 0.7 (float) – Allowed maximal eccentricity of the specimen
  • enabled = True (fbool) – Perform automated search for ROIs
    If set to False, the file ‘roi_slices.txt’ must contain ROIs.
  • exclude overlap px = 30.0 (float) – Allowed distance between two objects [px]
  • force = None (tupletupleint) – Force ROI coordinates (x1,x2,y1,y2) [px]
  • ignore data = None (strlist) – Exclude images and ROIs from the analysis
    To exclude individual ROIs found in a previous run, simply type the ROI index, i.e. ‘exclude = 1.0, 2.2’. You may additionally exclude a full sensor image (e.g. image 3) with ‘exclude = 1.0, 2.2, 3’.
  • pad border px = 40 (int) – Padding of object regions [px]
  • size variation = 0.5 (float01) – Allowed variation relative to specimen size

[specimen] Specimen parameters

Prior information about the analyzed object(s).

  • size um = 10 (float) – Approximate diameter of the specimen [µm]
    This is used as the initial value for the sphere analysis.

[sphere] Sphere-based image analysis

Retrieval of refractive index and radius is done with the Python module qpsphere. The parameters either apply to qpsphere.edgefit.contour_canny() or to qpsphere.imagefit.alg.match_phase(), depending on which analysis approach is used.

  • edge coarse = 0.4 (float) – Coarse edge detection filter size
  • edge fine = 0.1 (float) – Fine edge detection filter size
  • edge clip radius min = 0.9 (float) – Interior edge point filtering radius
  • edge clip radius max = 1.1 (float) – Exterior edge point filtering radius
  • edge iter = 20 (int) – Maximum number iterations for coarse edge detection
  • image fit range position = 0.05 (float) – Fit interpolation range for radius
  • image fit range radius = 0.05 (float) – Fit interpolation range for radius
  • image fit range refractive index = 0.1 (float) – Fit interpolation range for refractive index
  • image fix phase offset = True (fbool) – Fix the simulation background phase to zero
  • image iter = 100 (int) – Maximum number of iterations for image fitting
  • image stop delta position = 1 (float) – Stopping criterion for position
  • image stop delta radius = 0.001 (float) – Stopping criterion for radius
  • image stop delta refractive index = 0.0005 (float) – Stopping criterion for refractive index
  • image verbosity = 1 (int) – Verbosity level of image fitting algorithm
  • method = edge (lcstr) – Method for determining sphere parameters
    Valid values are ‘edge’ (edge-detection approach) or ‘image’ (2D phase image fitting).
  • model = projection (lcstr) – Physical sphere model
    Valid values are defined in qpsphere.models.available. If method=edge, then model must be set to projection. If method=image, setting model to rytov-sc has the best trade-off between accuracy and speed.
  • refraction increment = 0.18 (float) – Refraction increment [mL/g]
  • radial inclusion factor = 1.2 (float) – Radial inclusion factor for dry mass computation