xmipp3.protocols.protocol_movie_gain module

class xmipp3.protocols.protocol_movie_gain.XmippProtMovieGain(**args)[source]

Bases: ProtProcessMovies, Protocol

Estimate the gain image of a camera, directly analyzing one of its movies. It can correct the orientation of an external gain image (by comparing it with the estimated). Finally, it estimates the residual gain (the gain of the movie after correcting with a gain). The gain used in the correction will be preferably the external gain, but can also be the estimated gain if the first is not found. The same criteria is used for assigning the gain to the output movies (external corrected > external > estimated)

createOutputStep()[source]
doGainProcess(movieId)[source]
estimateGainFun(movie, noSigma=False, residual=False)[source]
estimateOrientationStep(movieDict)[source]
estimatedDatabase = 'estGains.sqlite'
getArgs(movieFn, movieId, extraArgs='', residual=False)[source]
getEstimatedGainPath(movieId)[source]
getFinalGainPath(tifFlipped=False)[source]
getFlippedOrientedGainPath()[source]
getInputGain()[source]
getOrientedCorrectionPath()[source]
getOrientedGainPath()[source]
getResidualGainPath(movieId)[source]
invertImage(img, outFn)[source]
match_orientation(exp_gain, est_gain)[source]

Calculates the correct orientation of the experimental gain image with respect to the estimated Input: 2 Xmipp Images

normalizeGainStep()[source]
residualDatabase = 'resGains.sqlite'
searchEstimatedGainPath()[source]
updateGainsOutput(movie, imgSet, imageFile)[source]
xmipp3.protocols.protocol_movie_gain.array_zeros_to_median(a, thres=0.01, depth=1)[source]

Return an array, replacing the zeros (values under a threshold) with the median of its surrounding values (with a depth)

xmipp3.protocols.protocol_movie_gain.arrays_correlation_FT(ar1, ar2_ft_conj, normalize=True)[source]

Return the correlation matrix of an array and the FT_conjugate of a second array using the fourier transform

xmipp3.protocols.protocol_movie_gain.invert_array(gain, thres=0.01, depth=1)[source]

Return the inverted array by first converting the values under the threshold to the median of the surrounding

xmipp3.protocols.protocol_movie_gain.translation_correction(Loc, shape)[source]

Return translation corrections given the max/min Location and the image shape