Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

example_modal_decomposition_data.py not working #178

Closed
RemiLehe opened this issue Sep 7, 2023 · 0 comments
Closed

example_modal_decomposition_data.py not working #178

RemiLehe opened this issue Sep 7, 2023 · 0 comments

Comments

@RemiLehe
Copy link
Member

RemiLehe commented Sep 7, 2023

When trying to run example_modal_decomposition_data.py, I get the following error:

/Users/rlehe/Documents/codes/lasy/lasy/utils/mode_decomposition.py:140: ComplexWarning: Casting complex values to real discards the imaginary part
  coeffTest[i] = np.sum(profile * field)
Estimated w0 = 13.20 microns
/Users/rlehe/Documents/codes/lasy/lasy/utils/mode_decomposition.py:91: ComplexWarning: Casting complex values to real discards the imaginary part
  if math.isnan(coef):
Traceback (most recent call last):
  File "/Users/rlehe/Documents/codes/lasy/examples/example_modal_decomposition_data.py", line 59, in <module>
    reconstructedProfile = modeCoeffs[
                           ^^^^^^^^^^^
  File "/Users/rlehe/Documents/codes/lasy/lasy/profiles/profile.py", line 67, in __rmul__
    return ScaledProfile(self, factor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rlehe/Documents/codes/lasy/lasy/profiles/profile.py", line 128, in __init__
    assert isinstance(factor, (int, float)), "The factor must be a number."
AssertionError: The factor must be a number.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant