Skip to content

Commit e2476df

Browse files
Clarify documentation per final CodeRabbit review
- Fix Returns docstring to accurately describe output shapes - Clarify that 'complex' return_type returns magnitude+phase concatenated - All functionality remains unchanged, only documentation improved
1 parent ea41ff6 commit e2476df

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

monai/transforms/signal/radial_fourier.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ class RadialFourier3D(Transform):
4848
4949
Returns:
5050
Radial Fourier transform of input data. Shape depends on parameters:
51-
- If radial_bins is None: complex tensor of same spatial shape as input
52-
- If radial_bins is set: real tensor of shape (radial_bins,) for magnitude/phase
51+
- If radial_bins is None: same spatial shape as input; magnitude and phase
52+
(if both requested) are concatenated along the last dimension, doubling it.
53+
- If radial_bins is set: shape (..., radial_bins) or (..., 2*radial_bins) if both
54+
magnitude and phase are requested, preserving leading (batch/channel) dimensions.
5355
5456
Raises:
5557
ValueError: If max_frequency not in (0.0, 1.0], radial_bins < 1,
@@ -293,6 +295,7 @@ class RadialFourierFeatures3D(Transform):
293295
Args:
294296
n_bins_list: list of radial bin counts to compute.
295297
return_types: list of return types: 'magnitude', 'phase', or 'complex'.
298+
'complex' returns both magnitude and phase concatenated as real values.
296299
normalize: if True, normalize the output.
297300
298301
Returns:

0 commit comments

Comments
 (0)