EMAN2 Processor Group Manual


Last modified on Tue, 05 Apr 2022 00:12:57 CDT
This document is automatically generated. Please don't edit it.

Processor Group Name Parameters Description
Processor EMAN processors are in-place image processors. You may apply a processor to process a single image or process multiple images. Processor class is the base class for all processor.
The basic design of EMAN Processors:
1) Each Processor class defines an image-processinging algorithm.
2) All the Processor classes in EMAN are managed by a Factory pattern. So each Processor class must define:
a) a unique name to idenfity itself in the factory.
b) a static method to register itself in the factory.
3) Each Processor class defines its own parameter set.
4) Each Processor class defines functions to return its documentation including parameter information, and processor description. These functions enable EMAN to generate processor manuals dynamically.
BoxStatProcessor
eman1.filter.median int radius: The 'radius' of the (square/cube) search box, eg - 1 -> 3x3 box
int xsize: +- range on X axis, 0 uses the value only, 1 -> -1,0,+1, ...
int ysize: +- range on Y axis
int zsize: +- range on Z axis)
A processor for noise reduction. pixel = median of values surrounding pixel.
mask.onlypeaks int npeaks: The number of pixels adjacent to the pixel under consideration which may be higher and still be a valid peak. If 0, finds pure peaks
bool usemean: Count all pixels with value higher than the mean of adjacent pixels as peaks. Overwrite npeaks.
Zeros all pixels with adjacent pixels >= the value being considered. That is, it leaves behind only local maxima.
math.localmax int radius: The 'radius' of the (square/cube) search box, eg - 1 -> 3x3 box
int xsize: +- range on X axis, 0 uses the value only, 1 -> -1,0,+1, ...
int ysize: +- range on Y axis
int zsize: +- range on Z axis)
peak processor: pixel = max of values surrounding pixel in a square/cube with specified 1/2 size.
math.localminabs int radius: The 'radius' of the (square/cube) search box, eg - 1 -> 3x3 box
int xsize: +- range on X axis, 0 uses the value only, 1 -> -1,0,+1, ...
int ysize: +- range on Y axis
int zsize: +- range on Z axis)
Takes the actual value of the pixel in the local region with the smallest absolute value. This can be used for an effect somewhat like binary erosion with continuous data.
math.localsigma int radius: The 'radius' of the (square/cube) search box, eg - 1 -> 3x3 box
int xsize: +- range on X axis, 0 uses the value only, 1 -> -1,0,+1, ...
int ysize: +- range on Y axis
int zsize: +- range on Z axis)
pixel = standard deviation of values surrounding pixel.
math.submax int radius: The 'radius' of the (square/cube) search box, eg - 1 -> 3x3 box
int xsize: +- range on X axis, 0 uses the value only, 1 -> -1,0,+1, ...
int ysize: +- range on Y axis
int zsize: +- range on Z axis)
peak processor: pixel = pixel - max of values surrounding pixel. This is a sort of positive peak-finding algorithm.
morph.majority int nmaj: Number of neighbors needed to set to white.
bool return_neighbor: Return number of neighbor for each pixel.
float thresh: The threshold to binarize the map.
Set a pixel to white when >= N neighbors are white.
ComplexPixelProcessor
complex.normpixels Each Fourier pixel will be normalized. ie - amp=1, phase=unmodified. Useful for performing phase-residual-like computations with dot products.
CoordinateProcessor
mask.gaussian float dx: Modify mask center by dx relative to the default center nx/2
float dy: Modify mask center by dy relative to the default center ny/2
float dz: Modify mask center by dz relative to the default center nz/2
float exponent: The exponent, f in e^-Bs^f. default 2.0, producing a Gaussian
float inner_radius: inner mask radius. optional
float outer_radius: outer mask radius. Negative value -> box radius + outer_radius +1
a gaussian falloff to zero, radius is the 1/e of the width. If inner_radius>0, then outer radius specifies width of Gaussian starting at inner_radius rather than total radius.
mask.gaussian.nonuniform float dx: Modify mask center by dx relative to the default center nx/2
float dy: Modify mask center by dy relative to the default center ny/2
float dz: Modify mask center by dz relative to the default center nz/2
float gauss_width: Gaussian falloff width, relative to each radius, default 0.05
int radius_x: x-axis radius
int radius_y: y-axis radius
int radius_z: z-axis radius
A Gaussian falloff to zero. Anisotropic, specify inner radius for x,y,z and Gaussian falloff width. Falloff width is also anisotropic and relative to the radii, with 1 being equal to the radius on that axis.
mask.noise float dx: Modify mask center by dx relative to the default center nx/2
float dy: Modify mask center by dy relative to the default center ny/2
float dz: Modify mask center by dz relative to the default center nz/2
float inner_radius: inner mask radius. optional
float outer_radius: outer mask radius. Negative value -> box radius + outer_radius +1
fills masked region
mask.poly bool 2d: apply mask in 2D
float k0: constant term
float k1: k x term
float k2: k x^2 term
float k3: k x^3 term
float k4: k x^4 term
Mask with polynomial falloff. k4 x^4 + k3 x^3 + k2 x^2 + k1 x + k0, where x is distance to center divided by nx/2.
mask.radialprofile floatarray table: Radial array of floats, 1 float/pixel
Multiply a real-space image by a radial function. 1 value / pixel, extending to corner. Missing values -> 0.
mask.ringmean float dx: Modify mask center by dx relative to the default center nx/2
float dy: Modify mask center by dy relative to the default center ny/2
float dz: Modify mask center by dz relative to the default center nz/2
float inner_radius: inner mask radius. optional
float outer_radius: outer mask radius. Negative value -> box radius + outer_radius +1
int ring_width: The width of the mask ring.
A step cutoff to the the mean value in a ring centered on the outer radius
mask.sharp float dx: Modify mask center by dx relative to the default center nx/2
float dy: Modify mask center by dy relative to the default center ny/2
float dz: Modify mask center by dz relative to the default center nz/2
float inner_radius: inner mask radius. optional
float outer_radius: outer mask radius. Negative value -> box radius + outer_radius +1
float value: step cutoff to this value. Default is 0.
step cutoff to a user-given value in both inner and outer circles.
mask.soft float dx: Modify mask center by dx relative to the default center nx/2
float dy: Modify mask center by dy relative to the default center ny/2
float dz: Modify mask center by dz relative to the default center nz/2
float inner_radius: inner mask radius. optional
float outer_radius: outer mask radius. Negative value -> box radius + outer_radius +1
float value: cutoff to this value. default=0
float width: 1/e width of Gaussian falloff (both inner and outer) in pixels. default=4
Outer (optionally also inner) mask to a user-provided value with a soft Gaussian edge.
math.gausskernelfix float gauss_width: Used to calculate the constant factor - gauss_width / (ny*ny)
f(x) = f(x) / exp(-radius*radius * gauss_width / (ny*ny))
math.toradius float dx: Modify mask center by dx relative to the default center nx/2
float dy: Modify mask center by dy relative to the default center ny/2
float dz: Modify mask center by dz relative to the default center nz/2
float inner_radius: inner mask radius. optional
float outer_radius: outer mask radius. Negative value -> box radius + outer_radius +1
overwrites input, f(x) = radius;
math.toradiussqr float dx: Modify mask center by dx relative to the default center nx/2
float dy: Modify mask center by dy relative to the default center ny/2
float dz: Modify mask center by dz relative to the default center nz/2
float inner_radius: inner mask radius. optional
float outer_radius: outer mask radius. Negative value -> box radius + outer_radius +1
overwrites input, f(x) = radius * radius
FourierProcessor
eman1.filter.ramp float intercept: intercept in 'f(x) = slope * x + intercept'
float slope: slope in 'f(x) = slope * x + intercept'
processor radial function: f(x) = slope * x + intercept;
filter.CTF_ float apix: Override A/pix in the image header (changes x,y and z)
float b_factor: Gaussian like evelope function (b_factor).
float cs: cs in CM.
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float defocus: defocus value in Angstrom.
float npow: power of transfer function.
float ps: pixel size.
float sigma: Gaussian sigma (0-.5)
float sign: Sign of Contrast transfer function,and use -1 to compensate.
float voltage: voltage in Kv.
float wgh: Amplitude contrast ratio.
CTF_ is applied in Fourier image.
filter.DoG float sigma1: DoG sigma1
float sigma2: DoG sigma2
processor radial function: f(x) = 1/sqrt(2*pi)*[1/sigma1*exp-(x^2/2*sigma1^2) - 1/sigma2*exp-(x^2/2*sigma2^2)]
filter.LoG float sigma: LoG sigma
processor radial function: f(x) = ((x^2 - s^2)/s^4)e^-(x^2/2s^2)
filter.bandpass.gauss float apix: Override A/pix in the image header (changes x,y and z)
float center: Gaussian center.
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float sigma: Gaussian sigma (0-.5)
Bandpass Gauss filter processor applied in Fourier space.
filter.bandpass.tanh float Low_fall_off: Tanh low decay rate.
float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float fall_off: Tanh decay rate.
float high_cutoff_frequency: Absolute [0,0.5] high cut-off frequency.
float high_fall_off: Tanh high decay rate.
float low_cutoff_frequency: Absolute [0,0.5] low cut-off frequency.
float sigma: Gaussian sigma (0-.5)
Bandpass tanh processor applied in Fourier space.
filter.bandpass.tophat float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float high_cutoff_frequency: Absolute [0,0.5] high cut-off frequency.
float low_cutoff_frequency: Absolute [0,0.5] low cut-off frequency.
float sigma: Gaussian sigma (0-.5)
Bandpass top-hat filter processor applied in Fourier space.
filter.gaussinverse float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float sigma: Gaussian sigma (0-.5)
Divide by a Gaussian in Fourier space.
filter.highpass.butterworth float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float high_cutoff_frequency: Absolute [0,0.5] high cut-off frequency.
float low_cutoff_frequency: Absolute [0,0.5] low cut-off frequency.
float sigma: Gaussian sigma (0-.5)
Highpass Butterworth filter processor applied in Fourier space.
filter.highpass.gauss float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float sigma: Gaussian sigma (0-.5)
Highpass Gauss filter processor applied in Fourier space.
filter.highpass.tanh float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float fall_off: Tanh decay rate.
float sigma: Gaussian sigma (0-.5)
Highpass tanh filter processor applied in Fourier space.
filter.highpass.tophat float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float sigma: Gaussian sigma (0-.5)
Highpass top-hat filter applied in Fourier space.
filter.homomorphic.butterworth float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float high_cutoff_frequency: Absolute [0,0.5] high cut-off frequency.
float low_cutoff_frequency: Absolute [0,0.5] low cut-off frequency.
float sigma: Gaussian sigma (0-.5)
float value_at_zero_frequency: Value at zero frequency.
Homomorphic Butterworth filter processor applied in Fourier space.
filter.homomorphic.gauss float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float sigma: Gaussian sigma (0-.5)
float value_at_zero_frequency: Value at zero frequency.
Homomorphic Gauss filter processor applied in Fourier space.
filter.homomorphic.tanh float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float fall_off: Tanh decay rate.
float sigma: Gaussian sigma (0-.5)
float value_at_zero_frequency: Value at zero frequency.
Homomorphic Tanh processor applied in Fourier space
filter.homomorphic.tophat float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float high_cutoff_frequency: Absolute [0,0.5] high cut-off frequency.
float low_cutoff_frequency: Absolute [0,0.5] low cut-off frequency.
float sigma: Gaussian sigma (0-.5)
float value_at_zero_frequency: Value at zero frequency.
Homomorphic top-hat filter processor applied in Fourier space.
filter.kaiser_io_inverse float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float sigma: Gaussian sigma (0-.5)
Divide by a Kaiser-Bessel I0 func in Fourier space.
filter.kaisersinhinverse float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float sigma: Gaussian sigma (0-.5)
Divide by a Kaiser-Bessel Sinh func in Fourier space.
filter.linearfourier float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: 1/Resolution in 1/A (0 - 1 / 2*apix). eg - a 20 A filter is cutoff_freq=0.05
float cutoff_pixels: Width in Fourier pixels (0 - size()/2)
bool return_radial: Return the radial filter function as an attribute (filter_curve)
filter.lowpass.butterworth float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float high_cutoff_frequency: Absolute [0,0.5] high cut-off frequency.
float low_cutoff_frequency: Absolute [0,0.5] low cut-off frequency.
float sigma: Gaussian sigma (0-.5)
Lowpass Butterworth filter processor applied in Fourier space.
filter.lowpass.gauss float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float cutoff_resolv: Resolvibility in 1/A, applied using filter.lowpass.gauss where cutoff_freq = 2/(pi*R) & R = 1/cutoff_resolv*apix
float sigma: Gaussian sigma (0-.5)
Lowpass Gauss filter processor applied in Fourier space.
filter.lowpass.randomphase float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: 1/Resolution in 1/A (0 - 1 / 2*apix). eg - a 20 A filter is cutoff_freq=0.05
float cutoff_pixels: Width in Fourier pixels (0 - size()/2)
bool return_radial: Return the radial filter function as an attribute (filter_curve)
Above the cutoff frequency, phases will be completely randomized, but amplitudes will be unchanged. Used for testing for noise bias. If you can reconstruct information that isn't there, then you have noise bias problems.
filter.lowpass.tanh float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float fall_off: Tanh decay rate. ~0 -> step function. 1 -> smooth, gaussian-like falloff.
float sigma: Gaussian sigma (0-.5)
Lowpass tanh filter processor applied in Fourier space. 0.5*(tanh(cnst*(S+omega))-tanh(cnst*(S-omega))). omega==cutoff_abs. cnst==pi/(2*fall_off*omega). S in terms of Nyquist=0.5.
filter.lowpass.tophat float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float sigma: Gaussian sigma (0-.5)
Lowpass top-hat filter processor applied in Fourier space.
filter.radialtable floatarray table: Radial data array. 1 value per Fourier image pixel.
Filter with tabulated data in EMFourierFilterFuncFourier space. 1 value per Fourier pixel, extending to corners. Missing value assumed to be 0.
filter.shift float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: Resolution in 1/A (0 - 1 / size*apix)
float cutoff_pixels: Width in Fourier pixels (0 - size()/2
float sigma: Gaussian sigma (0-.5)
float x_shift: Shift x
float y_shift: Shift y
float z_shift: Shift z
Shift by phase multiplication in Fourier space.
NormalizeProcessor
normalize do a standard normalization on an image (mean=0, sigma=1).
normalize.circlemean float radius: Radius (pixels) of inner edge of circular ring
float width: width (pixels) of ring to average over, default 2
normalizes an image, mean value equals to mean of 2 pixel circular radius or of the circular border if no radius is set.
normalize.edgemean normalizes an image, mean value equals to edge mean.
normalize.histpeak Normalize an image so the estimated histogram peak is zero and sigma=1. Only works if the histogram peak is within +-2*sigma of the mean
normalize.lredge normalizes an image, uses 2 pixels on left and right edge
normalize.maxmin normalizes an image. mean -> (maxval-minval)/2; std dev = (maxval+minval)/2;
normalize.unitlen Normalize an image so its vector length is 1.0.
normalize.unitsum Normalize an image so its elements sum to 1.0 (fails if mean=0)
RealPixelProcessor
math.absvalue f(x) = |x|
math.exp float high: Pixels are divided by low then high is subtracted prior to the exponential operation, default 0.0
float low: Pixels are divided by low then high is subtracted prior to the exponential operation, default 1.0
f(x) = exp( x / low - high)
math.finite float to: Pixels which are not finite will be set to this value
f(x) = f(x) if f(x) is finite | to if f(x) is not finite
math.fixmode bool byte_stou: 8 bit data signed read -> unsigned
bool byte_utos: 8 bit data unsigned read -> signed
Fixes errors with reading signed/unsigned data. Need to specify the correct mode.
math.floor f(x) = floor(x)
math.linear float scale: The scaling factor to be applied to pixel values
float shift: The amount to shift pixel values by after scaling
linear transform processor: f(x) = x * scale + shift. This is equivalent to a regular contrast stretching operation
math.log f(x) = log10(x) if x > 0; else f(x) = 0;
math.pow float pow: Each pixel is raised to this power
f(x) = x ^ pow;
math.reciprocal float zero_to: Inverted zero values are set to this value, default is 0.
if f(x) != 0: f(x) = 1/f(x) else: f(x) = zero_to
math.sigma float value1: A number reflecting total standard deviations in the right direction
float value2: A number reflecting total standard deviations in the left direction
f(x) = mean if x<(mean-v2*sigma) or x>(mean+v1*sigma); else f(x) = x;
math.sqrt f(x) = sqrt(x)
math.squared f(x) = x * x;
misc.colorlabel floatarray colorlst: Array of values to replace.
Replace the value of each pixel with a value in a given array, i.e. given an array of [3,7,9], pixels with value of 0 will become 3, 1 becomes 7, 2 becomes 9. The input image has to be int, or it will be round down. Values exceed the length of array are set to zero. Designed for labeled image coloring.
threshold.abovetozero float maxval: Everything above this value is set to zero
f(x) = x if x <= maxval; f(x) = 0 if x > maxval.
threshold.belowtozero float minval: Everything below this value is set to zero
f(x) = x if x >= minval; f(x) = 0 if x < minval.
threshold.belowtozero_cut float minval: the value that will be set to zero - all values below will also be set to zero. Values above get minval subtracted from them
f(x) = x-minval if x >= minval; f(x) = 0 if x < minval.
threshold.binary float value: The thresholding value. If a pixel value is equal to or above the threshold it is set to 1. If it is below it is set to 0
f(x) = 0 if x < value; f(x) = 1 if x >= value.
threshold.binaryrange float high: The upper limit of the range that will be set to 1
float low: The lower limit of the range that will be set to 1
Range thresholding. A range of values is set to 1, all else is set to 0. f(x) = 1 if (low <= x <= high); else f(x) = 0
threshold.compress bool clamponly: Leaves values outside the collapse range at their original value, setting pixels in the range to 'value'
float range: The range about 'value' which will be collapsed to 'value'
float value: The pixel value where the focus of the collapse operation is
f(x): if v-r v; if x>v+r -> x-r; if x x+r
threshold.discritize.sigma float center: Center value from which number of standard deviations is computed (default = 0)
float step: Stepsize in terms of sigma. ie - 1.5 will discritize to 1.5*sigma steps (default = 1.0)
Converts each pixel value to the integral number of standard deviations from the specified center. Rounds to the nearest integer, -0.5*sigma 0.0
threshold.notzero f(x) = 0 if x = 0; f(x) = 1 if x != 0;
Others
basis.fft int dir: 1 for forward transform, -1 for inverse transform
Computes the DFFT (Discrete Fast Fourier Transform) of an image
ctf.snr.weight float boost: Multiplicative signal boost
floatarray noise: The noise profile, squared amplitude. As in, what is the EMAN2CTF.background attribute
floatarray snr: Squared amplitude divided by squared noise amplitude. As in, what is the EMAN2CTF.snr attribute
Weight the amplitudes of an image based on radial noise and snr curves
eman1.filter.blockcutoff float value1: val1 is dx/dy
float value2: val2 is lowpass freq cutoff in pixels
Block processor, val1 is dx/dy, val2 is lp freq cutoff in pixels. Mystery processor.
eman1.filter.blockrange float cal_half_width: cal_half_width is dx/dy for calculating an average
float fill_half_width: fill_half_width is dx/dy for fill/step
averages over cal_half_width, then sets the value in a local block
filter.ampweight int sqrt: Weights using sqrt of the amplitude if set
emdata sum: Adds the weights to sum for normalization
Multiplies each Fourier pixel by its amplitude
filter.bilateral float distance_sigma: means how large the voxel has impact on its neighbors in spatial domain. The larger it is, the more blurry the resulting image.
int half_width: processing window size = (2 * half_widthh + 1) ^ 3.
int niter: how many times to apply this processing on your data.
float value_sigma: means how large the voxel has impact on its in range domain. The larger it is, the more blurry the resulting image.
Bilateral processing on 2D or 3D volume data. Bilateral processing does non-linear weighted averaging processing within a certain window.
filter.ccdnorm int width: number of pixels on either side of the seam to sample
normalize the 4 quadrants of a CCD image
filter.convolution.kernel floatarray kernel: the convolution kernel
Filters an image with a convolution kernel in real space.
filter.ctfcorr.simple float ac: Amplitude contrast in % (default 10%)
float apix: A/pix (default value from image header)
float cs: Microscope Cs, default 2.7 mm
float defocus: Mean defocus to correct for in microns
float hppix: Optional high pass filter radius in pixels to prevent gradient amplification, default disabled
int phaseflip: Also flip phases if set, default false
int useheader: Use CTF header values if present, instead of individual values, default false
float voltage: Microscope Voltage in Kv (default 300)
One of the strongest visual impacts of CTF on a structure is the low resolution high-pass filter effect caused by phase contrast. This Processor performs a simple linear filter to roughly correct for this. This is not a substitution or replacement for the full CTF correction routine available for single particle work in EMAN, but if you are in a situation where accurate CTF correction is not possible, this will allow you to approximate the correction to relieve some of the visual artifacts. Circularly symmetric phase flipping can optionally be performed.
filter.enhance Visual enhancement filter useful for localizing particles. Results not designed for reconstruction.
filter.flattenbackground emdata mask: A mask the defines the local neighborhood that will be used to find the local mean. Exclusive of the radius argument
int radius: The radius of circle/sphere that defines the local neighborhood. Exclusive of the mask argument
Flattens the background by subtracting the local mean
filter.gradientPlaneRemover int changeZero: if zero pixels are modified when removing gradient. default = 0
emdata mask: mask object: nonzero pixel positions will be used to fit plane. default = 0
floatarray planeParam: fitted plane parameters output
Remove gradient by least square plane fit
filter.highpass.autopeak float apix: Override A/pix in the image header (changes x,y and z)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: 1/Resolution in 1/A (0 - 1 / 2*apix). eg - a 20 A filter is cutoff_freq=0.05
float cutoff_pixels: Width in Fourier pixels (0 - size()/2)
bool interpolate: Whether or not to interpolate the radial scaling function. Default=false. Prb should be true.
bool return_radial: Return the radial filter function as an attribute (filter_curve)
Attempts to automatically remove the low resolution peak present in virtually all cryoEM data.
filter.lowpass.autob float apix: Override A/pix in the image header (changes x,y and z)
float bfactor: B-factor in terms of e^-(B s^2/4)
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: 1/Resolution in 1/A (0 - 1 / 2*apix). eg - a 20 A filter is cutoff_freq=0.05
float cutoff_pixels: Width in Fourier pixels (0 - size()/2)
bool interpolate: Whether or not to interpolate the radial scaling function. Default=false. Prb should be true.
float noisecutoff: Spatial frequency past which inverse-B will not be applied, default=1/6A
bool return_radial: Return the radial filter function as an attribute (filter_curve)
int verbose: Print information about the determined B-factor
This processor sharpens a map based on the concept that the power spectrum should be roughly flat over the ~15 A-Nyquist resolution range, then combines this inverse B-factor with the specified low-pass Gaussian filter parameters to produce a single aggregate Gaussian filter.
filter.lowpass.gaussz float apix: Override A/pix in the image header (changes x,y and z)
float centerfreq: center of filter frequency at z
float cutoff_abs: Processor radius in terms of Nyquist (0-.5)
float cutoff_freq: 1/Resolution in 1/A (0 - 1 / 2*apix). eg - a 20 A filter is cutoff_freq=0.05
float cutoff_pixels: Width in Fourier pixels (0 - size()/2)
float hppix: If specified will also apply a high pass filter with the specified radius in pixels
int xynoz: If set, filters the X-Y plane instead of Z
Applies a Gaussian lowpass filter (or its inverse), but only along the Z axis (or X-Y). May be useful in anisotropic filtering of tomograms.
filter.matchto bool bydot: Rather than matching the intensity profile, uses the complex dot product as a function of resolution to match only the portion that agrees.
bool interpolate: Whether or not to interpolate the radial scaling function. Default=true
bool keephires: If the reference being matched is heavily filtered, total information loss may occur at some resolutions. This insures that some information is kept at all resolutions.
bool return_radial: Return the radial filter function as an attribute (filter_curve)
emdata to: The image to match with. Make sure apix values are correct.
Filters the image so its 1-D power spectrum matches a second image. Optionally can incorporate a dot product to better match noise.
filter.ramp Ramp processor -- Fits a least-squares plane to the picture, and subtracts the plane from the picture. A wedge-shaped overall density profile can thus be removed from the picture.
filter.setisotropicpow float apix: Override A/pix in the image header (changes x,y and z)
xydata strucfac: An XYData object contaning the intensity (not amplitude) to be imposed as a function of S
Forces a map/image to have an isotropic radial power distribution. Unlike filter.setstrucfac, which produces a filtered, but anisotropic map, this forces the radial power to be the same in all directions. Phases are unchanged.
filter.setstrucfac float apix: Override A/pix in the image header (changes x,y and z)
string filename: Filename of a text file containing s,y data as an alternative to passing an XYData object.
xydata scale: A constant to multiply strucfac by to rescale the output. Setting to 1/ny^3 provides an alternative normalization. default = 1.0
xydata strucfac: An XYData object contaning the intensity (not amplitude) to be imposed as a function of S
Filters the image so its 1-D power spectrum matches a supplied S,Y curve. If the S axis does not extend to Nyquist, only a uniform scaling will be applied beyond the end of the supplied curve.
filter.wiener.byfsc string fscfile: filename of a file containing the FSC curve to use for the SNR computation
float maxfreq: This acts as a high resolution limit to prevent FSC artifacts from iteratively reinforcing themselves. Above this spatial frequency, the FSC is forced to decrease monotonically. Default=1.0
float snrmult: This multiplier is applied to the computed SNR before Wiener filtration. This permits the filter to be applied to 1/2 images, etc. Default=2.0
float sscale: This rescales the S axis to produce empirical under/overfiltration. sscale=1.1 for example will extend the resolution (underfilter) by 10%. Default=1.0
This processor will apply a Wiener filter to a volume based on a provided FSC curve. The assumption is that the FSC curve represents a gold standard FSC between two 1/2 sets, and that the filter is being applied to the combined average. Hence the default fscmult of 2, since the SSNR is being computed as FSC/(1-FSC). Ie - the SSNR of the combined halves is twice as high.
filter.wiener2d emdata ctf: Ctf object to use for Wiener filter parameters
Applies a 2-D Wiener filter to an image based on its Ctf parameters
filter.xyaxes0 int neighbor: If set, interpolates neighbor values rather than zeroing
int neighbornorm: In neighbor mode it sums the neighboring 2 (complex) pixels, then divides by this factor. default = sqrt(2), which is good for very noisy images
int x: If set, zeroes along X axis. Default True.
int y: If set, zeroes along Y axis. Default True.
Sets values along X/Y Fourier axes to 0, except origin
gorgon.binary_skel bool mark_surfaces: Mark surfaces with a value of 2.0f, whereas curves are 1.0f.
int min_curve_width: Minimum curve width.
int min_surface_width: Minimum surface width.
float threshold: Threshold value.
Creates a skeleton of the 3D image by considering whether density is above or below a threshold value.
histogram.bin bool debug: Outputs debugging information (number of pixels per bin)
int nbins: The number of bins the pixel values will be compressed into
Bins pixel values, similar to calculating a histogram. The histogram is comprised of 'nbins' bins, and the value assigned to each pixel in the bin is the midpoint of the bin's upper and lower limits. Defaults to 256 bins
mask.addshells int nshells: number of shells to add
Add additional shells/rings to an existing 1/0 mask image
mask.addshells.gauss float val1: number of pixels to expand
float val2: number of Gaussian pixels to expand, following the first expansion
Iterative expansion of a binary mask, val1 is number of pixels to expand, if val2!=0 will make a soft Gaussian edge starting after val2 pixels.
mask.addshells.multilevel int nshells: number of shells to add
A multilevel mask has an integer value at each pixel location. -1 indicates unmasked regions. 0-n-1 are individual masks. Expands the masked regions into unmasked areas by nshells.
mask.asymunit int au: The asymmetric unit to mask out. If this is -1 will mask all asymmetric units, giving each a unique number.
string sym: The symmetry, for example, d7
int symavg: Cn symmetry only. If set, the mask for a single subunit will follow a linear falloff to the neighboring subunit. After applying, symmetrizing the map should produce a smooth symmetrized average of the masked subunit (and partially its two neighbors).
Masks out a specific asymmetric unit of the given symmetry. If the au parameter is -1 will mask all asymmetric units, assigning the asymetric unit number to the masked area.
mask.auto2d int nmaxseed: Use the n highest valued pixels in the map as a seed. Alternative to radius. Useful for viruses.
int nshells: The number of dilation operations
int nshellsgauss: number of Gaussian pixels to expand, following the dilation operations
int radius: Pixel radius of a ball which is used to seed the flood filling operation.
bool return_mask: If true the result of the operation will produce the mask, not the masked volume.
float sigma: Alternative to threshold based on mean + x*sigma
float threshold: An isosurface threshold that suitably encases the mass.
int verbose: How verbose to be (stdout)
2D version of mask.auto3d
mask.auto3d int nmaxseed: Use the n highest valued pixels in the map as a seed. Alternative to radius. Useful for viruses.
int nshells: Number of 1-voxel shells to expand the mask by.
int nshellsgauss: Width in voxels of a Gaussian decay at the edge of the mask.
int radius: Pixel radius of a ball which is used to seed the flood filling operation.
bool return_mask: If true the result of the operation will produce the mask, not the masked volume.
float sigma: Alternative to threshold based on mean + x*sigma
float threshold: An isosurface threshold that suitably encases the mass.
int verbose: How verbose to be (stdout)
This will mask a 3-D volume using a 'flood filling' approach. It begins with a seed generated either as a sphere with specified 'radius' or with the 'nmaxseed' highest values. It then includes any mass connected to the seed with value higher than 'threshold'.Next, the mask is expanded by 'nshells'+'nshellsgauss'/2 voxels. Finally a gaussian low-pass filter is applied with a width of 'nshellsgauss'.
mask.auto3d.thresh int nshells: Number of 1-voxel shells to expand the mask by.
int nshellsgauss: Width in voxels of a Gaussian decay at the edge of the mask.
bool return_mask: If true the result of the operation will produce the mask, not the masked volume.
float threshold1: High initial threshold for seeding.
float threshold2: Lower secondary threshold to define boundary.
Tries to mask out only interesting density
mask.beamstop float value1: sig multiplier
float value2: x of center
float value3: y of center
Try to eliminate beamstop in electron diffraction patterns. value1=sig multiplier; value2,value3 are x,y of center, if value1<0 also does radial subtract.
mask.cylinder float cx: Mask X center. Default nx/2
float cy: Mask Y center. Default ny/2
int inner_radius: inner mask radius. optional. Default 0
int outer_radius: outer mask radius. optional. Default nx+ny. Negative value -> box radius + outer_radius +1
float phicen: Angle in degrees ccw from the x-axis. Center of the region to NOT set to zero.
float phirange: Angle in degrees. Region phicen+-phirange will not be zeroed
bool phitriangle: If set mask will fall from 1 at phicen+-phirange to 0 at +-phitrirange
float phitrirange: Angle in degrees. With phitriangle, width outside phirange to fall from 1 to 0.
float zmax: Maximum Z to include
float zmin: Minimum Z to include
float ztriangle: 1/2 width in pixels of linear falloff in Z margin. Centered on specified zmin/zmax.
Masks out an angular arc in circular/cylindrical coordinates with a sharp edge.
mask.dampedzeroedgefill Fill zeroes at edges with nearest horizontal/vertical value damped towards Mean2.
mask.decayedge2d int width: Width of the decay region around the edge of the image in pixels
Decay edges of image to zero
mask.dust3d float threshold: Only considers densities above the threshold
int verbose: Level of verbosity, 0 default. 1 will print each non-excluded zone
int voxels: If a connected mass is smaller than this many voxels it is removed
A dust removal filter which will remove above threshold densities smaller than a given size
mask.fft.cone float angle: Angular range in degrees from the Z axis to zero. (default 15)
float rmin: Radius in Fourier pixels at which to start zeroing. This permits some very low resolution to be preserved. (default 1)
Sets a cone to zero in Fourier space around the +-Z axis to (somewhat) emulate the missing cone in an RCT experiment. Angles are measured using X/Y/Z expressed as a fraction of Nyquist, for sensible results on non-cubic images
mask.fft.peak bool removepeaks: Instead of keeping peaks and removing everything else, this will remove peaks and keep everything else.
float thresh_sigma: Values above mean + thresh_sigma * sigma are identified. Default 1.0
bool to_mean: Instead of setting identified pixels to zero, set the amplitude to the mean amplitude.
Identifies pixels corresponding to peaks in Fourier space based on the mean & standard deviation of the corresponding Fourier amplitude in each ring/shell. These pixels are masked out or in depending on options.
mask.fft.wedge float anglemax: Maximum angle (degrees) in Y-Z plane to zero (default 30)
float anglemin: Minimum angle (degrees) in Y-Z plane to zero (default -30)
float rmin: Radius in Fourier pixels at which to start zeroing. This permits some very low resolution to be preserved. (default 1)
Sets a wedge to zero in Fourier space around the +-Z axis along X as a tilt axis to (somewhat) emulate the missing wedge in a tomography experiment. For example, anglemin=-30, anglemax=30 to roughly emulate at -60 to +60 tilt series
mask.fromfile string filename: mask image file name
emdata image: The actual mask image (instead of the filename).
int maskset: One common way to store multiple masks in a single image is to assign a single integer value to each mask. For files of this type, will set values N-0.5
Multiplies the image by the specified filename or image object. Note that 'image' should be specified rather than filename for e2proc2d or e2proc3d, as these programs automatically read image filenames when specified as parameters. So-called multi-level masks are also supported via the 'maskset' option.
mask.paint int r1: Inner radius
int r2: Outter radius
float v1: Inner value
float v2: Outer Value
int x: x coordinate for Center of circle
int y: y coordinate for Center of circle
int z: z coordinate for Center of circle
Paints a circle with a decaying edge into the image. r v1, r1 (v1,v2), r>r2 unchanged
mask.smart float mask: mask value
Smart mask processor.
mask.wedgefill emdata fillsource: The image from which to draw the missing values. If omitted, will fill wedge with zero.
float maxtilt: Assumes Y is exact tilt axis, with 0 tilt in X-Y. Symmetrically fills region beyond +-maxtilt in degrees. Default=disabled
float thresh_sigma: Multiplied by the standard deviation in each Fourier shell as a threshold for identifying 'missing' data.
Identifies missing wedge voxels and fills them with data extracted from another image
mask.zeroedge2d int apodize: Number of layers linearly apodized to zero, but only on edges where >0 layers are zeroed. Default 0
int x0: The number of columns to zero from left
int x1: The number of columns to zero from right
int y0: The number of rows to zero from the bottom
int y1: The number of rows to zero from the top
zero edges of image on top and bottom, and on left and right.
mask.zeroedge3d int x0: The number of columns to zero from left
int x1: The number of columns to zero from right
int y0: The number of rows to zero from the bottom
int y1: The number of rows to zero from the top
int z0: The number of slices to zero from the bottom
int z1: The number of slices to zero from the top
zero edges of volume on all sides
mask.zeroedgefill bool nonzero: If set, will look for constant non-zero values to fill
Fill zeroes at edges with nearest horizontal/vertical value.
math.addnoise float noise: noise factor used to generate Gaussian distribution random noise
int seed: seed for random number generator
add gaussian (white) noise to an image with mean='noise' and sigma='noise/2'
math.addsignoise float noise: noise factor used to generate Gaussian distribution random noise
int seed: seed for random number generator
add sigma noise.
math.addspectralnoise float dx:
int interpolation:
int n:
int seed: seed for random number generator
float x0:
floatarray y:
add spectral noise to a complex image.
math.averageovery Average along Y and replace with average
math.bispectrum.slice int ffp: Returns a 3-D volume containing n rotationally integrated planes. R&T invariant. This is normally further processed with CTF info to produce fp equivalent.
int fp: Returns a non-square 2-D image containing n rotationally integrated planes. R&T invariant.
int jkx: Jx+Kx location of the slice in Fourier pixels
int jky: Jy+Ky location of the slice in Fourier pixels
float k: Radius of slice in Fourier pixels, integrates over angle.
int kx: Kx location of the slice in Fourier pixels
int ky: Ky location of the slice in Fourier pixels
float prb3D: Radius of maximum slic. Returns volume, integrates over angle. k>|q+k|>q
float prbk: Radius of slice in Fourier pixels, integrates over angle.
float prbkv2: Radius of slice in Fourier pixels, integrates over angle. k>|q+k|>q
int rfp: Returns a non square 2-D image containing translatinal invariants organized such that X=azimuth. Used for rotational alignment.
int size: If specified, will determine the size (x/y) of the real-space bispectrum image. If not set, a size is selected automatically
Computes a 2-D slice of the 4-D bispectrum of a 2-D image. Returns zero outside of source image. Input may be real or complex, but output is always complex. kx,ky OR jkx,jky OR k OR fp OR ffp
math.ccc_snr_wiener float scalesnr: Scales SSNR by provided value prior to return or use in Wiener calculation. Default 2 (compensates for FSC on 1/2 volumes)
int wiener: If set, returns Wiener image, default returns SNR
Converts an image containing normalized CCC values to SNR or Wiener filter values. scalesnr defaults to 2, which uses the SNR of the average of the two half-image volumes. ie - if scalesnr is 2: SNR = 2*FSC/(1-FSC)
math.convolution emdata with: The image that will convolute the other image
Performs Fourier space convolution. Maintains the space that the image is in - i.e. if image is real, the result is real and vice versa.
math.distance.manhattan Sets pixel values in a binary image equal to their element wise manhattan distance.
math.divergence Determines the divergence of a 2D image.
math.edge.xgradient Determines the image gradient in the x direction
math.edge.ygradient Determines the image gradient in the y direction
math.edge.zgradient Determines the image gradient in the z direction
math.fft.resample float n: The sample rate. Less than one enlarges the image, greater than one shrinks it.
Robust resampling of an image by clipping its Fourier transform.
math.gradient.direction Determines the direction of the gradient of a 2D image.
math.gradient.magnitude Determines the magnitude of the gradient of a 2D image.
math.gridkernelfix string mode:
This corrects the real-space effects of using one of the gridding insertion functions on the Fourier reconstructor. Valid options for mode are 'gridding_5' and 'gridding7'.
math.harmonic int fp: Returns a non-square 2-D image containing n harmonics for each R&T component. R&T invariant. Min 2, default 4
int hn: Computes a single translational invariant for the nth harmonic, 1 is a normal power spectrum
int rfp: Returns a non square 2-D image with translational invariants, y=radial, x=aziumth. Used for rotational alignment.
int rn: Computes a single rot/trans invariant for the nth rotational harmonic, requires hn to be non zero
int size: If specified, will determine the number of rotational samples in the bispectrum. If not set, a size is selected automatically
Computes invariants including relative phase in harmonic series
math.laplacian int areasize: The width of the area to process (not radius)
Discrete approximation to Laplacian. Edge enchancement, but works poorly in the presence of noise. Laplacian processor (x -> d^2/dx^2 + d^2/dy^2 + d^2/dz^2).
math.laplacian.direction Determines the direction of the laplacian of a 2D image.
math.laplacian.magnitude Determines the magnitude of the laplacian of a 2D image.
math.laplacian.sdgd Determines the second derivative of a 2D image in the gradient direction.
math.linearpyramid float x0:
float xwidth:
float y0:
float ywidth:
float z0:
float zwidth:
Multiplies image by a 'linear pyramid' in 1-3 dimensions. The origin and total base width of the pyramid can be specified. Default is centered with the total image size.
math.max emdata with: The second image
Compares pixels in two images, returning an image with the maximum pixel value in each pixel location
math.maxshrink int n: The shrink factor
int search: The search area (cubic volume width, usually the same as shrink)
Shrink an image by a given amount (default 2), using the maximum value found in the pixel neighborhood.
math.meanshrink float n: The shrink factor
Shrink an image by a given amount , using the mean value found in the pixel neighborhood.
math.medianshrink int n: The shrink factor
Shrink an image by a given amount , using the median value found in the pixel neighborhood.
math.min emdata with: The second image
Compares pixels in two images, returning an image with the minimum pixel value in each pixel location
math.minshrink int n: The shrink factor
int search: The search area (cubic volume width, usually the same as shrink)
Shrink an image by a given amount (default 2), using the minimum value found in the pixel neighborhood.
math.model_em_cylinder float length: cylinder length in angstroms, defaults to 3 turns (16.2 Angstroms)
int type: Radial profile of density method, defaults to 2: 0 = pure Gaussian falloff; 1 = Gaussian falloff + dip, so mean is zero; 2 = polynomial fitting of real helix density
int x0: x coordinate in pixels for the midpoint of the cylinder's axis, defaults to center of map
int y0: y coordinate in pixels for the midpoint of the cylinder's axis, defaults to center of map
int z0: z coordinate in pixels for the midpoint of the cylinder's axis, defaults to center of map
Adds a cylinder with a radial density profile similar to that of an alpha helix.
math.multamplitude emdata amp: Amplitude to multiply.
int verbose: Verbose
Multiply amplitude image. For reconstruction normalization.
math.nonconvex Makes a curve or plane monotonically decreasing and non-convex. Useful in generating background curves from power spectra. Anchored at edges and (in 2d) at the center. If local value > mean(surrounding values) => mean(surrounding values).
math.poly_radial_profile float length: Helix length in angstroms.
int z0: z coordinate in pixels for the midpoint of the cylinder's axis, defaults to center of map
Finds the CM of each z-axis slice and applies a polynomial radial profile about it.
math.realtofft This will replace the image with a full-circle 2D fft amplitude rendering. Note that this renders amplitude, when intensity is more common.
math.rotate.180 The 2D image is rotated by 180 degree by carefully swapping image pixel values. No explicit matrix multiplication is performed. If image dimensions are even will change pixels along x=0 and y=0. Works for all combinations of even and oddness.
math.rotationalaverage Makes image circularly/spherically symmetric.
math.rotationalsubtract subtracts circularly/spherically symmetric part of an image.
math.setbits int bits: Number of bits to retain (default 5)
int floatbits: If set to a >0 number, alters the algorithm, so the specified number of significant floating point bits is retained. The floating point exponent is not modified. This will produce less compressible data, but the values will be less perturbed.
float nsigma: Number of standard deviations to include in the n bit mapping. eg - max=min(mean+nsigma*sigma,max)
Converts each pixel value to an integer using the specified number of total bits. This will make the data more compressible, and allows you to handle conversion to integer data modes.The data itself will remain stored in single precision floating point format, so using >23 bits would be a bad idea.
math.simulatectf float ampcont: % amplitude contrast (0-100)
float apix: A/pix of data
float bfactor: B-factor in A^2, uses MRC convention rather than EMAN1 convention
int bispectrumfp: If set, the input must be the result of math.bispectrum.slice ffp= mode. Returns something comparable to fp=mode.
float cs: Cs of microscope in mm
float defocus: Defocus in microns (underfocus positive)
float noiseamp: Amplitude of the added empirical pink noise
int phaseflip: If not true, applies fabs(CTF). default true
bool purectf: If set, replaces image with simulated CTF instead of multiplying image by CTF
float voltage: Microscope voltage in KV
Applies a simulated CTF with noise to an image. Astigmatism is always zero. The added noise is either white or based on an empirical curve generated from cryoEM data.
math.sub.optimal emdata actual: If specified, ref is used for normalization, but actual is subtracted.
bool ctfweight: Filter the image by CTF before subtraction
float high_cutoff_frequency: Absolute [0,0.5] high cut-off frequency.
float low_cutoff_frequency: Absolute [0,0.5] low cut-off frequency.
emdata ref: Reference image to subtract
bool return_fft: Skips the final IFT, and returns the FFT of the subtracted image
bool return_presigma: Return the sigma of the pre-subtracted image in real-space with the specified filter applied as sigma_presub. This is an expensive option.
bool return_radial: Return the radial filter function as an attribute (filter_curve)
bool return_subim: Instead of returning the image after subtraction, returns the filtered image which would have been subtracted from the image.
This will filter/scale 'ref' optimally and subtract it from image using ring dot products in Fourier space for normalization. Cutoff frequencies apply a bandpass tophat filter to the output.
math.verticalstripefix Tries to fix images scanned on the zeiss for poor ccd normalization.
math.xybadlines intarray cols: X coordinates of bad vertical lines
int neighbornorm: Interpolate neighboring pixels, then divides by this factor. Default = 1.0.
intarray rows: Y coordinates of bad horizontal lines.
This processor will correct defective pixel columns/rows by averaging adjacent pixel values
math.xystripefix int xlen: Integration 1/2 length on x axis in pixels. Default=10
int ylen: Integration 1/2 length on y axis in pixels. Default=10
This processor will remove localized 'striping' along the x/y axes, caused by issues with CCD/CMOS readout. In theory this should be done by dark/gain correction, but in many cases, there are residual effects that this will help eliminate. This can produce high-pass filter-like effects, so generally large length values are suggested. Integration covers +-xlen/ylen. Y and X axes are corrected sequentially, not simultaneously, Y first
misc.directional_sum string axis: The direction of the sum, either x,y or z. Returned axes are xy, xz or zy.
int first: The first position along the speficied axis to use in the sum. Neg val -> nx/y/z+first (default=0)
int last: The last position along the speficied axis to use in the sum. Neg val -> nx/y/z+last (default=-1)
Calculates the projection of the image along one of the axial directions, either x, y or z
misc.mask.pack emdata mask: The mask indicating which pixels to extract. Required
int unpack: If set, image should be 1-D and return will match the dimensions of the mask
Given a mask, will return a 1-D image containing values from the original image inside the mask. If unpack is set, then the inverse operation is performed.
misc.symsearch int output_symlabel: if output the symmetry label map in which the pixel value is the index of symmetry in the symmetry list
stringarray sym: the list of symmetries to search
emdata symlabel_map: the optional return map when output_symlabel=1
float thresh: the minimal level of symmetry to be accepted (0-1)
Identifiy the best symmetry in the given symmetry list for each pixel and then apply the best symmetry to each pixel.
misc.zthick float thresh: Threshold for binarization
Calculate the z thickness of each pixel in a binarized 3d image. For each white voxel, use the number of continus white voxels above and below this voxel in z direction as the thickness.
morph.blackhat.binary int iters: The number of times to apply this process to the input image.
int radius: The number of pixels (radius) to dilate the input image.
float thresh: Only considers densities above the threshold
Performs a morphological black hat operation on a (binary) image.
morph.close.binary int iters: The number of times to apply this process to the input image.
int radius: The number of pixels (radius) to dilate the input image.
float thresh: Only considers densities above the threshold
Performs a morphological k-pixel closing of a (binary) image/volume. Note the box must be large enough to accommodate the dilation to work properly. iter(dilate) -> iter(erode)
morph.dilate.binary int iters: The number of times to apply this process to the input image.
int radius: The number of pixels (radius) to dilate the input image.
float thresh: Only considers densities above the threshold
Performs a morphological dilation of a (binary) image.
morph.erode.binary int iters: The number of times to apply this process to the input image.
int radius: The number of pixels (radius) to dilate the input image.
float thresh: Only considers densities above the threshold
Performs a morphological k-pixel erosion of a (binary) image.
morph.ext_grad.binary int iters: The number of times to apply this process to the input image.
int radius: The number of pixels (radius) to dilate the input image.
float thresh: Only considers densities above the threshold
Computes an external morphological graduent using k-pixel-width operations on a (binary) image.
morph.gradient.binary int iters: The number of times to apply this process to the input image.
int radius: The number of pixels (radius) to dilate the input image.
float thresh: Only considers densities above the threshold
Computes the morphological graduent using k-pixel-width operations on a (binary) image.
morph.grow int radius: Half of the box size to determine the local direction.
int verbose: Verbose
Grow a skeleton map toward a local direction.
morph.int_grad.binary int iters: The number of times to apply this process to the input image.
int radius: The number of pixels (radius) to dilate the input image.
float thresh: Only considers densities above the threshold
Computes an internal morphological graduent using k-pixel-width operations on a (binary) image.
morph.object.density float thresh: The threshold to seperate objects.
Sum of density of each object above threshold. Treats a 3D volume as 2D slices.
morph.object.label bool write_centers: Write the center of each object in the attribute obj_centers.
Label each object above threshold. Also return the center of each object. Treats a 3D volume as 2D slices.
morph.open.binary int iters: The number of times to apply this process to the input image.
int radius: The number of pixels (radius) to dilate the input image.
float thresh: Only considers densities above the threshold
Performs a morphological k-pixel opening of a (binary) image/volume. iter(erode) -> iter(dilate)
morph.prune int maxdist: Maximum distance from the endpoint to branchpoint
bool returnlength: Return the distance of each white pixel to its nearest branch. Does not do the prunning.
float thresh: The threshold to binarize the map.
int verbose: Verbose
Prune branches from the skeleton. Remove a piece when the minimum distance through density from an endpoint to the nearest branch point is shorter than a given value.
morph.thin int ntimes: Number of iterations in the thinning process. Default: -1 (perform thinning until the image is skeltonized
bool preserve_value: The value on the skeleton is the same as the original map.
float thresh: The threshold to binarize the map.
int verbose: Verbose
Thinning a binary map to skelton using the Zhang-Suen thinning algorithm.
morph.tophat.binary int iters: The number of times to apply this process to the input image.
int radius: The number of pixels (radius) to dilate the input image.
float thresh: Only considers densities above the threshold
Performs a morphological top hat operation on a (binary) image.
normalize.bymass float apix: Angstrom per pixel of the image. If not set will use the apix_x attribute of the image
float mass: The approximate mass of protein/structure in kilodaltons
float thr: The isosurface threshold which encapsulates the structure
int verbose: If set will give details about the normalization
Normalize the mass of the image assuming a density of 1.35 g/ml (0.81 Da/A^3) (3D only)
normalize.local float apix: Angstroms per pixel
float radius: Fourier filter radius expressed in pixels in Fourier space. cutoff_pixels in filter.lowpass.gauss
float threshold: Only values above the threshold will be used to compute the normalization. Generally a good isosurface value.
This processor attempts to perform a 'local normalization' so low density and high density features will be on a more even playing field in an isosurface display. threshold is an isosurface threshold at which all desired features are visible, radius is a feature size over which to equalize.
normalize.mask int apply_mask: If set, the mask will also be applied (multiplied) to the volume
emdata mask: The 0-1 mask defining the region for the normalization. Any non-zero values will be considered
int no_sigma: If set, the mean will be set to zero, but sigma will not be modified
Uses a 1/0 mask defining a region to use for the zero-normalization.if no_sigma is 1, standard deviation not modified.
normalize.ramp.normvar First call filter.ramp on the image, then make the mean 0 and norm 1
normalize.rows bool unitlen: Adjusts the length of the 'row vector' to be 1.0 without adjusting the mean
Modifies each row in the image individually. Default behavior is to divide each value by the mean value of the row, as long as the mean>0.
normalize.toimage bool debug: This is a debugging flag which will cause various diagnostic files to be written.
int fourieramp: If set, performs normalization using Fourier amplitudes instead of real-space image. Default = False.
float high_threshold: only take into account the reference image's pixel value between high and low threshold (zero is always ignored)
float ignore_lowsig: If >0, then any pixels closer to the mean than val*sigma in either image excluded
bool ignore_zero: If set, ignores any pixels which are exactly zero in either image. Defaut = True.
float low_threshold: only take into account the reference image's pixel value between high and low threshold (zero is always ignored)
emdata to: reference image normalize to
This will use a pixel vs pixel least squares fit to normalize one image to optimally match a second image, with various options for excluding some pixels. norm_mult and norm_add will be set in the header of the result.
rotateinfs float interpCutoff: cutoff for interpolation
transform transform: transform
Rotates a Fourier object using a kernel.
segment.distance float maxsegsep: Required: Maximum segment separation in pixels. Segments too close will trigger a reseed
float minsegsep: Required: Minimum segment separation in pixels. Segments too close will trigger a reseed
float thr: Optional : Isosurface threshold value. Pixels below this will not be segment centers (default = 0.9)
int verbose: Be verbose while running
Segments a volume into pieces separated by distances in the specified range.
segment.gauss emdata mask: Optional: mask to apply to map after filtration to limit where centers are placed
int maxnseg: Maximum number of segments to return (default = unlimited)
float minratio: The ratio of the smallest amplitude segment to locate relative to the strongest peak (default=0.5)
int skipseg: Normally the returned map is a segmentation map, but this is unnecessary if only the center coordinates are needed. If 1, the returned map will be a residual volume, not a segmentation map. If 2, it will be the filtered map before segmentation
int verbose: Be verbose while running
float width: Required: full width of Gaussians in A at 1/e (FWHM). Also used to determine map prefiltration.
Segments a volume by sequentially finding and subtracting Gaussians at a specified resolvability.
segment.kmeans int ampweight: If set, will weight centers by voxel amplitude. default = 1
float maxiter: Maximum number of iterations to run before stopping. Default=100
float maxsegsize: Maximum radial distance from segment center to member voxel. Default=10000
float maxvoxmove: Maximum number of voxels that can move before quitting. Default=25
float minsegsep: Minimum segment separation. Segments too close will trigger a reseed
int nseg: Number of segments to divide the image into. default=12
bool pseudoatom: Doing pseudoatom generation
float sep: Separation distance, used only in pseudoatom generation. Default=3.78
float thr: Isosurface threshold value. Pixels below this will not be segmented
int verbose: Be verbose while running
Performs K-means segmentation on a volume. Note that this method uses random seeds, and thus will return different results each time it is run. Returned map contains number of segment for each voxel (or 0 for unsegmented voxels). Segmentation centers are stored in 'segmentcenters' attribute, consisting of a list of 3n floats in x,y,z triples.
segment.subunit string sym: Symmetry
float thr: Minimum density to consider for extraction
This will attempt to mask out a single subunit from a symmetric structure. There may be some ambiguity at the intersection, so the result may not be unambiguous.
segment.watershed int nseg: Number of segments to (attempt) to produce. The actual number may be fewer. (default=12)
int segbymerge: If set, will achieve the specified number of segments by progressively merging the most connected segments. Can produce very different results.
float thr: Isosurface threshold value. Pixels below this value will not be segmented. All voxels above this value will be segmented. (default=0.5)
int verbose: If set, will print console output while running
Watershed segmentation. Warning: uses up to 2.5x the map size in RAM. This will segment all voxels above threshold except for a 1-voxel wide border on all edges.
testimage.axes float fill: value to make non-zero pixels
float int: radius of the lines emanating from the origin
Make an image consisting of a single cross
testimage.circlesphere string axis: specify a major axis for asymmetric features
float c: distance between focus and the center of an ellipse
int fill: Flag indicating if image is filled, default filled, 1 for filled, 0 for blank.
float radius: radius of circle or sphere, unit: pixel
Replace a source image as a circle or sphere depends on 2D or 3D of the source image
testimage.cylinder float height: height for the cylinder, by default it's the nz
float radius: radius for the cylinder
Replace a source image as a cylinder
testimage.disc float height: height of disc, by default it's nz
float major: major axis length for face of disc
float minor: major axis length for face of disc
Replace source image with a disc
testimage.ellipsoid float a: equatorial radius along x axes (major semiaxes)
float b: equatorial radius along y axes (minor semiaxes)
float c: polar radius for ellipsoid (x^2/a^2+y^2/b^2+z^2/c^2=1)
float fill: value you want to fill in ellipse, default to 1.0
transform transform: Optionally transform the ellipse
Insert an ellipse into the image.
testimage.ellipsoid.hollow float a: outter equatorial radii along x axes
float b: outter equatorial radii along y axes
float c: outter polar radius
float fill: value you want to fill in hollow ellipse, default to 1.0
transform transform: Optionally transform the ellipse
float width: width - specify the width or specify each width explicitly - xwidth, ywidth, zwidth
float xwidth: inner equatorial radii along x axes
float ywidth: inner equatorial radii along y axes
float zwidth: inner polar radius
Insert a hollow ellipse into the image.
testimage.fourier.gaussianband float center: center of the band in Fourier pixels. required
float width: 1/2e width of Gaussian in Fourier pixels. default = sqrt(2)
Replace a source image with a single radial Fourier band with a (truncated) Gaussian profile. f(s)=exp(-(s-c/w)^2). width=sqrt(2) is the minimum width to produce a flat sum with a spacing of 1 pixel.
testimage.gaussian string axis: specify a major axis for asymmetric features
float c: distance between focus and the center of an ellipse
float sigma: sigma value for this Gaussian blob
Replace a source image as a Gaussian Blob
testimage.gradient string axis: The axis the will be used to determine pixel values. Must be x,y or z
float b: b in the equation m*axis+b. Default is 0.0
float m: m in the equation m*axis+b. Default is 1.0
Make a gradient image of the form y=mx+b, where x is any of the image axes.
testimage.linewave float period: The period of the oscillating sine wave. Default 10.
Insert an oscillating sine wave into the pixel data
testimage.noise.fourier.gaussian float sigma: sigma value
Replace a source image with pink Fourier noise, based on a Gaussian. Random phase.
testimage.noise.fourier.profile floatarray profile: The noise profile, squared amplitude. As in, what is the EMAN2CTF.background attribute
Replace a source image with Fourier noise using amplitude information that is stored in a profile.
testimage.noise.gauss float mean: mean value of gausian distributed noise, default is zero.
int seed: the seed for random number generator, default is not to reseed.
float sigma: sigma value of gausian distributed noise, default is 0.5
Replace a source image as a random noise, the random value is gaussian distributed
testimage.noise.uniform.rand int seed: seed for random number generator
Replace a source image as a uniform random noise, random number generated from gsl_rng_mt19937, the pixel value is [0, 1)
testimage.puregaussian float x_center: center for this Gaussian blob on x direction
float x_sigma: sigma value for this Gaussian blob on x direction
float y_center: center for this Gaussian blob on y direction
float y_sigma: sigma value for this Gaussian blob on y direction
float z_center: center for this Gaussian blob on z direction
float z_sigma: sigma value for this Gaussian blob on z direction
Replace a source image as a strict Gaussian
testimage.scurve Replace a source image with a lumpy S-curve used for alignment testing
testimage.sinewave float alt: (optional) angle in degree. only in 3D case, alt for euler angle, default is zero
string axis: (optional) specify a major axis for asymmetric features, default x axis
float az: (optional) angle in degree. for 2D image, this is the rotated angle of the image, in 3D image, it's az for euler angle. default is zero
float phase: (optional) the phase in radians
float phi: (optional) angle in degree. only in 3D case, phi for euler angle, default is zero
float wavelength: wavelength in equation sin(x*2*PI/wavelength - phase*180/PI)
Replace a source image as a sine wave in specified wave length
testimage.sinewave.circular string axis: specify a major axis for asymmetric features
float c: distance between focus and the center of an ellipse
float phase: (optional)phase for sine wave, default is 0
float wavelength: (required)this value is the d in function |sin(x/d)|, unit: pixel
Replace a source image as a circular sine wave in specified wave length
testimage.sphericalwave float phase: in radians
float wavelength: cos(2*pi*r/wavelength+phase)
float x: center of the spherical wave
float y: center of the spherical wave
float z: center of the spherical wave
Replace a source image in 2d or 3d with a spherical wave cos(2*pi*r/wavelength+phase) also 1/r (2d) or 1/r^2 (3d)
testimage.squarecube string axis: specify a major axis for asymmetric features
float edge_length: edge length of the square or cube, unit: pixel
int fill: Flag indicating if image is filled, default filled, 1 for filled, 0 for blank
float odd_edge: edge length for the asymmetric axis
Replace a source image as a square or cube depends on 2D or 3D of the source image
testimage.tomo.objects Make an image consisting various objects, useful for tomographic testing
threshold.belowtominval float minval: Everything below this value is set to this value
float newval: If set, values below minval will be set to newval instead of minval
f(x) = x if x >= minval; f(x) = minval|newval if x < minval.
threshold.binary.circularmean int thresh: The radius threshold that the circular average of density keep dropping.
Binarize an image based on the circular average around each pixel in real space.
threshold.binary.fourier float value: The Fourier amplitude threshold cutoff
f(k) = 0 + 0i if ||f(k)|| < value; f(k) = a + bi if ||f(k)|| >= value.
threshold.clampminmax float maxval: The pixel values that bounds the largest pixel value in the output image
float minval: The pixel values that bounds the smallest pixel value in the output image
bool tomean: Replace outlying pixels values with the mean pixel value instead
bool tozero: Replace outlying pixels values with zero
This function clamps the min and max vals in the image at minval and maxval, respectively. In a sense this a bi-truncation of the data.
threshold.clampminmax.nsigma float nsigma: The number (n) of sigmas to clamp min and max vals at, so that the clamped boundaries are mean-n*sigma and mean+n*sigma
bool tomean: Replace outlying pixels values with the mean pixel value instead
bool tozero: Replace outlying pixels values with zero
This function clamps the min and max vals in the image at minval and maxval at mean-n*sigma and mean+n*sigma, respectively. The parameter specified by the user is n, the default value of n is 2.
threshold.outlier.localmean bool fix_zero: If set, any pixels that are exactly zero are considered to be outliers, default=false
float sigma: outliers are defined as mean+-x*sigma where x is the specified value, default=3.0
Identifies any pixels that are outliers and adjusts them to be the average of any nearby non-outlier pixels. Operates iteratively when required, so large 'outlier' areas can be corrected.
threshold.rangetozero float gauss_width: Range will be narrowed around zero based on a radial Gaussian falloff modeled on math.gausskernelfix. Disabled if set to 0.
float maxval: Upper threshold (required)
float minval: Lower threshold (required)
Sets values in a range to zero. Opposite of threshold.clampminmax. f(x) = x if x > maxval or x < minval; f(x) = 0 for min <= x <= max. If gauss_width set nozero, applies a radial correction factor to both min and max.
tomo.tiltangleweight int angle: The angle that the image is, with respect to the zero tilt image
bool angle_fim: Read fim as 'from image metadata' - this causes the altitude angle stored in by the image object (i.e. as extracted from the header, as currently stored in memory) to be used as the angle. This overrides the angle argument
Weights the image by 1/cos(angle)
tomo.tiltedgemask int angle: The angle that the image is, with respect to the zero tilt image
bool angle_fim: Read fim as 'from image metadata' - this causes the altitude angle stored in by the image object (i.e. as extracted from the header, as currently stored in memory) to be used as the angle. This overrides the angle argument
bool biedgemean: Mutually exclusive of edgemean. Experimental. Causes the pixels in the masked out areas to take the average value of both the left and right edge pixel strips
bool edgemean: Mutually exclusive of biedgemean. Masked pixels values assume the mean edge pixel value, independently, for both sides of the image.
int gauss_falloff: Causes the edge masking to have a smooth Gaussian fall-off - this parameter specifies how many pixels the fall-off will proceed over. Default is 0.
float gauss_sigma: The sigma of the Gaussian function used to smooth the edge fall-off (functional form is exp(-(pixel distance)^2/sigma^2)
Masks the part of the image which is not present in the 0-tilt image. Masked areas can be 0 or set to the edgemean (of the nearest or both edges). Masked areas can also have a Gaussian fall-off to make the appearance smooth.
xform float alpha: 2-D alpha angle
float alt: 3-D Altitude
float az: 3-D Azimuth
float phi: 3-D Phi
transform transform: The Transform object that will be applied to the image
float tx: x translation
float ty: y translation
float tz: y translation
int zerocorners: If set, corners (anything beyond radius/2-1) may be zeroed out in real or Fourier space. This will produce a considerable speedup in Fourier rotations.
The image is transformed using transform parameter, or alternatively specific numbers alpha,tx,ty or az,alt,phi,tx,ty,tz (shortcut for convenience)
xform.applysym string averager: Name of an Averager to use. default=mean
string sym: The symmetry under which to do the alignment, Default=c1
Symmetry is imposed on a 2-D image (Cn only) or 3-D volume
xform.center Centers similar to the way a human would, by identifying the shape of the object and centering its sillouette. May be inaccurate if sillouette cannot be clearly identified.
xform.centeracf Center image using self-convolution.
xform.centerofmass int int_shift_only: set to 1 only shift by integer, no interpolation
int powercenter: If set, squares pixel values before computing the center. The threshold is with respect to the squared values.
float threshold: Only values larger than the threshold are included in the center of mass computation. Default is 0.
ToMassCenterProcessor centers image at center of mass, with a threshold. Only values higher than the threshold are considered.
xform.flip string axis: 'x', 'y', or 'z' axis.
Flips an image along the specified axis, preserving the center. This will introduce a plane of 0's for even box sizes. Use 'xform.reverse' processor to avoid the zero plane, but not preserve the center.
xform.fourierorigin.tocenter Translates the origin in Fourier space from the corner to the center in y and z - works in 2D and 3D
xform.fourierorigin.tocorner Undoes the xform.fourierorigin.tocenter processor
xform.mirror string axis: 'x', 'y', or 'z' axis
Mirrors an image along the specified axis. This will shift the image center for even box sizes. Use the 'xform.flip' processor to preserve center.
xform.phasecenterofmass int int_shift_only: If set, will only shift by integer amounts to avoid interpolation
centers the image the center of mass, which is calculated using Fourier phases, ignores old dx, dy.
xform.phaseorigin.tocenter Undoes the effect of the xform.phaseorigin.tocorner processor
xform.phaseorigin.tocorner Translates a centered image to the corner in a forward fashion
xform.reverse string axis: 'x', 'y', or 'z' axis.
Mirrors (reverses) an image along the specified axis, preserving the center. This will NOT introduce a plane of 0's for even box sizes. Use 'xform.mirror' or 'xform.flip' processor to include the zero plane and preserve the center.
xform.scale int clip: The length of each output dimension. Non sophisticated, output dimensions can't be different
float scale: The amount by which to scale
The image is scaled with the clip variable in mind, being sure to preserve as much pixel information as possible.
xform.translate.int intarray trans: The displacement array, can be length 1-3
The image is translated an integer amount
xform.transpose Get the transpose of an image. Works for 2D only