rafael-fuente / diffractsim

✨🔬 A flexible diffraction simulator for exploring and visualizing physical optics.
https://rafael-fuente.github.io/simulating-diffraction-patterns-with-the-angular-spectrum-method-and-python.html
Other
754 stars 93 forks source link

Missing backend_name import plot_longitudinal_profile_intensity. #51

Closed Attolight-NTappy closed 4 months ago

Attolight-NTappy commented 4 months ago

Hey Rafael,

Congrats on a really sweet project. Just wanted to point at a small bug I encountered while trying it out.

diffractsim.visualization.plot_longitudinal_profile.plot_longitudinal_profile_intensity seems to lack a from ..util.backend_functions import backend_name, and for this reason an error is raised a few lines below: https://github.com/rafael-fuente/diffractsim/blob/0b6a74415f8ebcbf68fe2c1b50f90957301bab4a/diffractsim/visualization/plot_longitudinal_profile.py#L92C10-L92C35

the plot_rgb function works just fine though. Best Regards and keep up the good work!

Nicolas

rafael-fuente commented 4 months ago

Hi Attolight,

Thanks for noticing the bug. I corrected it in the new version (diffractsim 2.2.5).

Best regards, Rafael