Calculation time ? I use a "standard" PC under Windows

Issue #26 new
Former user created an issue

Good morning, first of all, very nice code. A lot of work has been done, congratulations. I am working on a standard PC under Windows. I am trying the example given in your doc:


from diffractio import degrees, eps, mm, no_date, np, plt, um from diffractio.scalar_fields_XYZ import Scalar_field_XYZ from diffractio.scalar_masks_XY import Scalar_mask_XY from diffractio.scalar_masks_XYZ import Scalar_mask_XYZ from diffractio.scalar_sources_XY import Scalar_source_XY from diffractio import degrees, mm, np, plt, um from diffractio.scalar_masks_X import Scalar_mask_X from numpy import loadtxt length = 500 * um x0 = np.linspace(-length / 2, length / 2, 128) y0 = np.linspace(-length / 2, length / 2, 128) z0 = np.linspace(2 * mm, 7 * mm, 2) wavelength = 0.6328 * um u1 = Scalar_source_XY(x=x0, y=y0, wavelength=wavelength) u1.gauss_beam(A=1, r0=(0, 0), z0=0, w0=(150 * um, 150 * um)) t1 = Scalar_mask_XY(x=x0, y=y0, wavelength=wavelength) t1.ronchi_grating(x0=0 * um, period=20 * um, angle=0 * degrees) t2 = Scalar_mask_XY(x=x0, y=y0, wavelength=wavelength) t2.lens(r0=(0 * um, 0 * um), radius=(200 * um, 200 * um), focal=(5 * mm, 5 * mm), angle=0 * degrees) t3 = u1 * t1 * t2 print('3') uxyz = Scalar_field_XYZ(x=x0, y=y0, z=z0, wavelength=wavelength) print('4') uxyz.incident_field(t3) print('5') print(z0) uxyz.RS() print('6') uxyz.normalize() print(z) print('7')


It goes very fast until
print('5') print(z0)

After I do not know, I obtain nothing !!! My questions is how long it should take ? regards

Comments (1)

  1. LUIS MIGUEL SANCHEZ BREA repo owner

    Thank you very much for your feedback.

    I have checked the code in linux and Windows, and it works. The execution time in my computer is aprox 0.25 seconds.

    I do not know very well what happens.

    Regards

    Luis Miguel

  2. Log in to comment