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#
|
Stack a polarimetric SAR channel dictionary into a tensor. |
|
Linearly remap intensity values from |
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_rangetoout_range.Mirrors
skimage.exposure.rescale_intensity()for torch tensors. Values outsidein_rangeare clamped to the corresponding output bound.in_range=Noneuses(x.min(), x.max()).