-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
waveorder
handles all rotational quantities (including retardance) in radians
#149
Conversation
retardance = adr_parameters[0] * wavelength_illumination / (2 * np.pi) | ||
|
||
# Apply orientation transformations | ||
orientation = stokes.apply_orientation_offset( | ||
adr_parameters[1], rotate=rotate_orientation, flip=flip_orientation | ||
) | ||
|
||
return retardance, orientation, adr_parameters[2], adr_parameters[3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewers: this is the "critical" change.
I'm now skipping the multiplication by wavelength_illumination / (2 * np.pi)
...
# Apply orientation transformations | ||
orientation = stokes.apply_orientation_offset( | ||
adr_parameters[1], rotate=rotate_orientation, flip=flip_orientation | ||
) | ||
|
||
return retardance, orientation, adr_parameters[2], adr_parameters[3] | ||
return adr_parameters[0], orientation, adr_parameters[2], adr_parameters[3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and returning the retardance directly.
What about returning the retardance AND phase in |
This is definitely a good alternative, and I don't have a strong preference between returning radians or nm. A few points come to mind:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good points @talonchandler. The discussion also made me think that we need retardance in radians when we want to compute circular statistics over space or time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstrings are useful. Please add comments on abbreviations used in method names where needed.
This PR makes
waveorder.model
s handle all rotational quantities in radians, and adds documentation to make that clear to users.The only "critical" change is to
inplane_oriented_thick_pol3d.apply_inverse_transfer_function
:wavelength_illumination
I'm making this change here for two reasons:
To be clear, I think
recOrder
should continue to return retardance reconstructions in nm (for internal and external consistency), but I also wantwaveorder
to be self consistent.