Square

class baseband_tasks.functions.Square(ih, polarization=None)[source] [edit on github]

Bases: baseband_tasks.base.TaskBase

Converts samples to intensities by squaring.

Note that Square does not keep full polarization information; it simply calculates the power for each polarization. Use Power to also calculate cross products.

Parameters
ihtask or baseband stream reader

Input data stream.

polarizationarray or (nested) list of char, optional

Output polarization labels. Should broadcast to the sample shape, i.e., the labels are in the correct axis. For instance, ['XX', 'YY'], or [['LL'], ['RR']]. By default, doubled labels from the underlying stream (and ignored if not given).