nabu.pipeline.helical.weight_balancer module

class nabu.pipeline.helical.weight_balancer.WeightBalancer(rot_center, angles_rad)[source]

Bases: object

This class contains the method for rebalancing the weight prior to backprojection. The weights of halfomo redundacy data ( the central part) are rebalanced. In a pipeline, the weights rebalanced by the method balance_weight, have to be applied to the ramp-filtered data prior to backprojection. As a matter of fact the method balance_weights could be called as a function, but in order to be conformant to Nabu, we create this class and follow the scheme initialisation + application.

Parameters:
  • rot_center (float) – the center of rotation in pixel units

  • angles_rad – the angles corresponding to the to be rebalanced projections

balance_weights(radios_weights)[source]

The parameter radios_weights is a stack having having the same weight as the stack of projections. It is modified in place, correcting the value of overlapping data, so that the sum is always one

nabu.pipeline.helical.weight_balancer.shift(arr, shift, fill_value=0.0)[source]

trivial horizontal shift. Contrarily to scipy.ndimage.interpolation.shift, this shift does not cut the tails abruptly, but by interpolation