Re: [Meep-discuss] Gaussian Beam source

2020-11-10 Thread Ian Sage
On 09/11/2020 03:54, Ardavan Oskooi wrote: sources = [mp.GaussianBeamSource(src=mp.ContinuousSource(fcen), center=mp.Vector3(), size=mp.Vector3(s,s,0), beam_x0=beam_x0,

[Meep-discuss] Tiny bugs in build script (I think)

2020-11-09 Thread Ian Sage
I just needed to do a fresh Meep install, on a fresh install of Ubuntu 18.04. As usual, I used the script in the "build from source" section of the docs. All was well, except: 1) The meep python package is installed to /usr/local/lib/python3.6/site-packages but that directory is not added to

[Meep-discuss] Gaussian Beam source

2020-11-08 Thread Ian Sage
I was prompted by Steven Johnson's recent posting (1st Nov) to switch some of my simulations to use the MEEP GaussianBeamSource. The documentation states that a complex valued polarization vector can be used to generate a circular polarized beam, but there are no explicit instructions for this. I

Re: [Meep-discuss] GaussianBeamSource

2020-10-31 Thread Ian Sage
You just need to apply an amp_func function to your source, with an appropriate spatial profile. The function takes as argument a vector giving the spatial offset from the centre of the source, allowing you to specify a scaled exponential fall-off from the centre. You can also return a complex

Re: [Meep-discuss] Providing geometry as voxel-array via python

2019-02-21 Thread Ian Sage
You can use a material function to do this from Python. - straightforwardly if your voxel data matches the resolution of the Meep simulation but you'd need to interpolate or discretize otherwise Ian On 21/02/2019 14:13, Jonathan wrote: Hello, the normal way to set up the scene geometry via

[Meep-discuss] Class methods as materials functions

2019-01-29 Thread Ian Sage
I am able to tailor Meep sources by using a src_func, and have no problem writing that function either as a plain standalone, or as a class method. The latter is often handy if only to avoid a proliferation of global variables etc. Equally, I can create custom materials by providing a

Re: [Meep-discuss] Problem using epsilon_offdiag with load_minus_flux_data

2018-12-21 Thread Ian Sage
On 21/12/2018 18:56, Ardavan Oskooi wrote: > You will need to add "force_all_components=True" Thank you, Ardavan - that has fixed it. As a matter of interest, can I now use that flag in a 1-d simulation to access E_y field components? Many thanks, Ian

[Meep-discuss] Problem using epsilon_offdiag with load_minus_flux_data

2018-12-21 Thread Ian Sage
I have been trying to examine the reflection of light from a (semi-infinite) birefringent slab, and encounter a problem when the optic axis is rotated, giving non-zero entries in epsilon_offdiag. Under this condition, the program fails at the load_minus_flux_data command, with the error message:  

[Meep-discuss] Chiral LC simulation - a question of dimension

2018-08-29 Thread Ian Sage
As one of my main interests is in liquid crystal layer optics, I have recently tried to model the classic textbook example of reflection from a cholesteric material. Such a material is optically uniaxial, with a helical arrangement of the optic axis, with a pitch length in the optical range. I

[Meep-discuss] Install from git clone - another fail

2018-08-07 Thread Ian Sage
On Arch linux, installing from git through the AUR packages, I now see a problem reminiscent of (but different from) John's: In file included from meep-python.cpp:3794: typemap_utils.cpp: In function ‘std::__cxx11::string py_class_name_as_string(PyObject*)’: typemap_utils.cpp:21:51: error:

Re: [Meep-discuss] Neophyte looking for example of continuous symmetry.

2018-05-08 Thread Ian Sage
thinking...  >>> It would probably help if I was a "real programmer". >>> >>> I was presuming that, at least initially, I'd need to >>> phase-match my >>> incident wave at the boundary. To achieve a more fine-tuned

Re: [Meep-discuss] Neophyte looking for example of continuous symmetry.

2018-05-08 Thread Ian Sage
> so far, I'm happily sending an oblique plane wave at a block of glass, and seeing it refract/reflect as expected. > I'd like to transform my finite block of stuff to be infinitely long and specified in terms of a unit cell, (and the same for the > plane-wave source) so that I can construct

[Meep-discuss] Python material_function and extra_materials

2018-04-09 Thread Ian Sage
I have no problems using a material_function to set an index which varies with position. However, the construct fails if my function returns materials_library.Al even if I include this in an extra_materials list (either in the initialization of the simulation or as a separate assignment). The

Re: [Meep-discuss] Custom Amp Function for Chirping

2018-03-28 Thread Ian Sage
On 28/03/18 02:21, Priscilla Kelly wrote: > Hello, > > I am trying to add a phase in terms of time but by setting the amplitude as a > function. > > I see there is a way to do it as a function of space, but how do you do it as > a function of time? I’d like to add a chirp to the pulse. I cannot

[Meep-discuss] Documentation of use_output_directory

2018-03-25 Thread Ian Sage
In the Python Tutorial/Basics documentation, it says: Instead, we can add the following command to run: mp.use_output_directory() but my attempts to use the command in this way (as a clause in the sim.run command) have been unsuccessful. Everything is fine if I do: sim.use_output_directory()

Re: [Meep-discuss] Argument required for output_efield()?

2018-03-24 Thread Ian Sage
)|*, |as typical function calls||when ||- as is clear from the tutorials - a function reference is what is needed.|*| |* *|Ian |* On 23/03/18 23:54, Ian Sage wrote: > I am trying to analyze the polarization state of light at a particular > point in a simulation. As the propagation directi

[Meep-discuss] Argument required for output_efield()?

2018-03-23 Thread Ian Sage
I am trying to analyze the polarization state of light at a particular point in a simulation. As the propagation direction may vary, I plan to record the three components of both the electric and magnetic fields as a first step. I guess I need to apply synchronize_magnetic, at_time and in_point to

[Meep-discuss] Possible bug in output_png parallel operation?

2018-03-10 Thread Ian Sage
I am running a simple 2d simulation using the latest de8571e commit code on Arch Linux. The python file is named gaussian_beam.py and output is by the output_png instruction: sim.run(mp.at_beginning(mp.output_epsilon), mp.at_every(0.1, mp.output_png(mp.Ez, '-c bluered -Z')), until=t) If I do:

[Meep-discuss] Problem using output_field_function in at_every

2018-02-07 Thread Ian Sage
The documentation is not all that clear about the procedure to follow, when using the Python interface. I'd like to call a function like: def esq_mag(r, ex, ey, ez):     return ex*ex.conjugate()+ey*ey.conjugate()+ez*ez.conjugate() from the at_every construct - I initially used the above function

[Meep-discuss] Build fail using latest commit

2018-02-02 Thread Ian Sage
FYI, in my hands using Arch Linux, build of the latest (1st Feb) commit failed with the following message: Making all in python make[2]: Entering directory '/localpath/meep-git/src/meep/python' swig -Wextra -I../src -I../libmeepgeom -I..  -outdir . -c++ -python -o meep-python.cpp ./meep.i cp

Re: [Meep-discuss] Defining Gaussian beam in pymeep

2018-01-20 Thread Ian Sage
> I have tried the following for a beam propagating along the x-axis (so > y-coordinate should follow a Gaussian profile): > But it seems to give something more like a point source rather than a beam. You don't give all the parameters you used; if the source area is point-like, it will diverge

[Meep-discuss] PyMeep - output_Xfield_r, output_Xfield_p not implemented?

2018-01-15 Thread Ian Sage
Again in my hands, I get no output or error message when I try to invoke the above output functions. The corresponding functions output_Xfield_x,y,z work fine, as expected. Are the polar functions awaiting implementation? Thanks, Ian ___

Re: [Meep-discuss] PyMeep - possible progress_interval bug?

2018-01-15 Thread Ian Sage
Thanks, Chris. Ian On 15/01/18 15:00, Chris Hogan wrote: > Hi Ian, > > Thanks for catching this. I've fixed it in PR#170.  > > ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu

Re: [Meep-discuss] Plot field on a line at every time step

2018-01-15 Thread Ian Sage
On 15/01/18 10:22, Kapidani Bernard wrote: > What is the correct procedure to output the the fields on a physical > line with a given resolution at each time step? I cannot say it's a "right" way - and I use the Python rather than Scheme interface, but in a homebrew step function, looping over

[Meep-discuss] PyMeep - possible progress_interval bug?

2018-01-14 Thread Ian Sage
In my hands, using the 5th Jan development code commit on Arch Linux, an error: TypeError: __init__() got an unexpected keyword argument 'progress_interval' results, if I include an assignment to progress_interval in the simulation definition: sim=mp.Simulation(cell_size=cell,  

[Meep-discuss] Thin metals - further observations

2018-01-10 Thread Ian Sage
I have been looking a little further at the issues surrounding limitingly thin metal layers. Setting a metal layer thickness to 0.0, (air/vacuum on each side) still gives a finite reflection. This holds whether the metal is patterned or continuous across the simulation volume. It also - apparently

[Meep-discuss] Simulation corner case - zero thickness metal layer

2018-01-03 Thread Ian Sage
I realize this is abuse of software, but here goes. I've been attempting to simulate WGP structures and looked at the transmission as a function of (rectangular) wire thickness at constant pitch of 200nm (100nm each of wire and gap). If the metal thickness is taken to zero, the transmission does

Re: [Meep-discuss] Writing fluxes to file in PyMeep

2018-01-01 Thread Ian Sage
On 31/12/2017 23:45, Ardavan Oskooi wrote: The save_flux routine outputs Meep's internal data which unfortunately is not easily decipherable. We will soon add support for outputting the Fourier-transformed fields to a file in a readable format. Thanks, Ardavan - I'll be on the edge of my

[Meep-discuss] Writing fluxes to file in PyMeep

2017-12-29 Thread Ian Sage
The display_fluxes() function is very convenient for listing transmission/reflection spectra, as is well illustrated in the tutorials. Is there a similar, easy route to write the same information to a file? The save_flux() function - if I understand correctly - writes out the Fourier transformed

Re: [Meep-discuss] Parallel PyMeep - odd effect of resolution change

2017-12-19 Thread Ian Sage
Thanks for your efforts on all our behalves, Ardavan. Ian On 19/12/2017 16:34, Ardavan Oskooi wrote: This is a bug; the patch is on GitHub . ___ meep-discuss mailing list

[Meep-discuss] Parallel PyMeep - odd effect of resolution change

2017-12-18 Thread Ian Sage
In trying to educate myself about Meep and FDTD, I have been running various toy simulations, and most recently have tried to replicate metal reflectivity results as presented at http://juluribk.com/2011/04/27/plasmonic-materials-in-meep/ ; the project file linked from that page is also the