-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
bugSomething isn't workingSomething isn't working
Description
We have a small issue with the units inside the function in the code snippet below, the function takes arctan() of a quantity with units [1/m], which is dimensionally incorrect:
wf-psf/src/wf_psf/utils/preprocessing.py
Lines 39 to 44 in 7c4b515
| return ( | |
| zernike_norm_factor | |
| * (tel_diameter / 2) | |
| * np.sin(np.arctan((dxy / reference_pix_sampling) / tel_focal_length)) | |
| * 3.0 | |
| ) |
There is a unit problem inside the arctan! The reference pixel shift should be unitless and the 1e-6 should be to change from [m] to [um]!
Given the small angle approximation there is almost no error with the current implementation, but has a conceptual error.
TODO:
- Fix the unit mismatch on the function
- Write corresponding unit test for this
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working