Meep improvements
See original GitHub issue- how can we plot refractive index colorbar on meep?
- how can we use plot2D when the simulation is 3d?
import gdsfactory.simulation.gmeep as gm
import gdsfactory.simulation as sim
import meep as mp
import gdsfactory as gf
nm = 1e-3
c = gf.components.mmi1x2(cross_section=gf.cross_section.nitride)
fig = c.plot()
# How can we plot the epsilon or refractive index?
sim = gm.get_simulation(c, is_3d=False)['sim']
sim.plot2D(output_plane=mp.Volume(size=sim.cell_size, center=mp.Vector3(0, 0, 0*nm)))
# This does not work
sim = gm.get_simulation(c, is_3d=True)['sim']
sim.plot2D()
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
improved Apple silicon support · Issue #1853 · NanoComp/meep
I now have an Apple M4 laptop, and I've verified that Meep master and all of its dependencies build from source. I've also...
Read more >Department of the Air Force launches pilot program to ... - SAF/IE
Initial estimates show that employing MEEP can improve energy intensity – or the mission effectiveness per gallon of fuel – by 3%.
Read more >Parallel Meep - MEEP Documentation
The following benchmarking results show load-balancing improvements from a parallel run on a shared compute cluster in a datacenter. The per-core working times ......
Read more >Home | MEEP
A software development tool and experimentation platform to enable software readiness for new hardware. MEEP enables software development, accelerating software ...
Read more >The Massachusetts Education Equity Partnership | MEEP
MEEP is a collective effort of civil rights, social justice, ... by the SOA results in dramatic improvement in learning experiences and outcomes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@HelgeGehring is right. The idea is you need to pass a plane to visualize (specified by a
Volume
object).The output of
plot2D()
returns the axis handle of the plot. You should be able to loop through this handle until you find the relevantimshow
data structure, which you can then use to create a colorbar.I don’t have any examples offhand… the last time I actually did this was when I wrote the function 3+ years ago…
Sure that’d be great. Meep PRs are always welcome. 3D rendering with python has come a long way since we first added visualization support to meep.