complextorch.transforms.functional#

Lower-level helpers backing the class transforms in complextorch.transforms.transforms. Most are intentionally private (_-prefixed); the public ones are listed in __all__.

Functions#

polsar_dict_to_array() → torch.Tensor)

Stack a polarimetric SAR channel dictionary into a tensor.

rescale_intensity() → torch.Tensor)

Linearly remap intensity values from in_range to out_range.

Module Contents#

complextorch.transforms.functional.polsar_dict_to_array(d: dict[str, torch.Tensor], order: tuple[str, Ellipsis] = ('HH', 'HV', 'VH', 'VV')) torch.Tensor[source]#

Stack a polarimetric SAR channel dictionary into a tensor.

Parameters:
  • d – mapping from polarization name (e.g. 'HH') to a 2-D complex tensor of shape (H, W) (or higher-rank; all entries must agree).

  • order – which channels to keep, in the desired output order. Defaults to the standard quad-pol order (HH, HV, VH, VV).

Returns:

Complex tensor of shape (len(order), H, W).

complextorch.transforms.functional.rescale_intensity(x: torch.Tensor, in_range: tuple[float, float] | None = None, out_range: tuple[float, float] = (0.0, 1.0)) torch.Tensor[source]#

Linearly remap intensity values from in_range to out_range.

Mirrors skimage.exposure.rescale_intensity() for torch tensors. Values outside in_range are clamped to the corresponding output bound. in_range=None uses (x.min(), x.max()).