Open gschlafly opened 1 year ago
High retardance that goes over 2*pi
Retardance is high for a shell with pytorch and numpy backends.
Adjusted the creation of the ellipsoid/shell so that the birefringence values were not overwritten by the mask:
vol[0,...] = vol[0,...] * combined_mask.astype(float)
However, the retardance still should not be able to go above $\pi$ even with a highly birefringent object.
The retardance function should only output values between $0$ and $\pi$: https://github.com/PolarizedLightFieldMicroscopy/GeoBirT/blob/ac9075d681375ebd2d64a9635217e086eeca5dd7/src/VolumeRaytraceLFM/jones/eigenanalysis.py#L65-L68 Thus, the angle calculation should only output values between $0$ and $\pi/2$: https://github.com/PolarizedLightFieldMicroscopy/GeoBirT/blob/ac9075d681375ebd2d64a9635217e086eeca5dd7/src/VolumeRaytraceLFM/jones/eigenanalysis.py#L5-L21 Consequently, the real part of $a$ should be nonnegative.
The real part of the first element of the jones matrix, $a$, is the cosine of the accumulated retardance. The retardance is positive. So the negative real component of $a$ is introduced from the product of the jones matrices.
The phase wrapping effect should be accounted for in the final step of calculating the retardance from a jones matrix.
# Calculate the phase differences (retardance)
retardance = np.angle(eigenvalues[0]) - np.angle(eigenvalues[1])
# Normalize the phase difference to [0, 2*pi) and assure values are positive
retardance = (retardance + 2 * np.pi) % (2 * np.pi)
# Wrap the phase difference to [0, pi]
if retardance > np.pi:
retardance = 2 * np.pi - retardance
Need to check if calculation and interpretation is appropriate