-
Notifications
You must be signed in to change notification settings - Fork 24
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
Utility to denoise laser profile and adding a test for the same #315
base: development
Are you sure you want to change the base?
Conversation
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.
Thanks for this PR! A few general points:
- Good idea to put this in a separate file
denoise.py
as you propose, if we consider having other denoising methods implemented later. Could you adapt the naming etc.? For instance, the function could be called:denoise_LG_modes
or so. - I would encourage you to check
mode_decomposition.py
, it can take either a full Laser profile or a Transverse profile, and explain what it does in each case. IMO the clearest would be for your function to take a genericprofile
that can be aTransverseProfile
or aLaser
but always return aTransverseProfile
. In the future, we could always return the same type as input, I think that would be the best, but would take more work to handle the longitudinal data. - Could you avoid ambiguous input arguments like
parameters
bundling different variables, unless necessary? Just pass the arguments you need, and no more (for instance you may get rid ofpolarization
). - Please document all input parameters, check other functions for example.
- Please add a CI test.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Changed the name of variable to try and fix the pre commit bot error.
for more information, see https://pre-commit.ci
With D4, We have added the additional capability of inputing an image file as transverse profile. Skimage package is used to extract the intensity data. |
modeCoeffs, waist = hermite_gauss_decomposition( | ||
transverse_profile, wavelength, n_modes_x, n_modes_y, resolution, lo, hi | ||
) |
Check failure
Code scanning / CodeQL
Wrong number of arguments in a call Error
MERGE AFTER #326.
Denoising can be considered as one of the common thing that's done while creating a laser object and yet there is no trivial way to do so in LASY. With this pull request we aim to add this functionality i.e. mode decomposition based denoising. In its current state the code does two distinct things, mode decomposition and creating denoised profile.