- etspy.base.TomoStack.shift_and_tilt_setter(mode: 'shifts' | 'tilts', value: TomoShifts | TomoTilts | ndarray | None) TomoShifts | TomoTilts [source]
Set either
self._tilts
orself._shifts
to an array.This method is split out to reduce duplication of code between the
tilts
andshifts
property setter functions, since they have significant overlap.- Parameters:¶
- mode: 'shifts' | 'tilts'¶
Whether to work on the
_shifts
or the_tilts
of the stack- value: TomoShifts | TomoTilts | ndarray | None¶
The values to set, as either an array, or
TomoShifts
, orTomoTilts
. IfNone
, the values will be initialized to an array of zeros of the appropriate shape.
- Returns:¶
target – The signal that should be set as either the shifts or tilts property.
- Return type:¶
- Raises:¶
ValueError – If the
value
is not the correct shape for either the shapes or tilts property