flip_diffraction_x#
- Diffraction2D.flip_diffraction_x()[source]#
Flip the dataset along the diffraction x-axis.
The function returns a new signal, but the data itself is a view of the original signal. So changing the returned signal will also change the original signal (and visa versa). To avoid changing the original signal, use the deepcopy method afterwards, but note that this requires double the amount of memory. See below for an example of this.
- Returns:
flipped_signal
- Return type:
Diffraction2D signal
Example
>>> s = pxm.data.dummy_data.get_holz_simple_test_signal() >>> s_flip = s.flip_diffraction_x()
To avoid changing the original object afterwards
>>> s_flip = s.flip_diffraction_x().deepcopy()