New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meow plugin #1015
Meow plugin #1015
Conversation
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.06%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Codecov Report
@@ Coverage Diff @@
## main #1015 +/- ##
=======================================
Coverage 74.37% 74.38%
=======================================
Files 436 436
Lines 22521 22522 +1
Branches 2987 2987
=======================================
+ Hits 16751 16752 +1
Misses 4878 4878
Partials 892 892
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I added a new meow requirement tag to pip install meow, this should be added to docs too |
Thank you Simon! |
fixes #747 |
nice! |
yay, nice work @simbilod . One comment: in the future we could probably skip meow extrusion conversion and directly define eme cells (following the meow eme cell interface) within GDSFactory. Maybe I'll make an ABC for the Cell interface within meow where people can inherit from. This would allow for way more general extrusion rules based on the GDSFactory layerstack and possibly tcad cross-section index calculations independent of the meow extrusion rules (which basically are a minimal implementation). |
We could use the existing gmsh plugin to read profiles from arbitrary component cross-sections and LayerStack (see notebooks). We then could take the mesh (or shapes before meshing) and project them back onto a finite-difference materials grid to use tidy3d to get the EME cells. Alternatively @HelgeGehring and I made some progress on integrating a FEM mode solver with your EME, but there were some kinks to work out. FEM mode solving is interesting due to adaptive meshing capabilities. |
self.cells = self.get_eme_cells() | ||
self.env = mw.Environment(wl=self.wavelength, T=self.temperature) | ||
self.css = [mw.CrossSection(cell=cell, env=self.env) for cell in self.cells] | ||
self.modes = [None] * num_cells |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here we should use self.modes = [None] * num_modes
self.modes contains all of the modes for the EME calculation
There is num_modes at each cell. Each list entry in self.modes is another list with num_modes entries
I was staying close to the MEOW example to start, we can rename or optimize the silver more. How about self.modes_at_cells?
________________________________
From: Joaquin Matres ***@***.***>
Sent: Wednesday, December 21, 2022 8:00:19 AM
To: gdsfactory/gdsfactory ***@***.***>
Cc: Simon Bilodeau ***@***.***>; Mention ***@***.***>
Subject: Re: [gdsfactory/gdsfactory] Meow plugin (PR #1015)
@joamatab commented on this pull request.
________________________________
In gdsfactory/simulation/eme/meow_simulation.py<#1015 (comment)>:
+ self.horiz_span = np.diff(component.bbox[:, 1])[0] + horiz_buffer
+ zs = list_unique_layerstack_z(layerstack)
+ self.vert_span = np.max(zs) - np.min(zs) + vert_buffer
+ self.horiz_offset = horiz_offset
+ self.horiz_res = horiz_res
+ self.vert_offset = vert_offset
+ self.vert_res = vert_res
+
+ # Setup simulation
+ self.component, self.layerstack = self.add_global_layers(component, layerstack)
+ self.extrusion_rules = self.layerstack_to_extrusion()
+ self.structs = mw.extrude_gds(self.component, self.extrusion_rules)
+ self.cells = self.get_eme_cells()
+ self.env = mw.Environment(wl=self.wavelength, T=self.temperature)
+ self.css = [mw.CrossSection(cell=cell, env=self.env) for cell in self.cells]
+ self.modes = [None] * num_cells
I think here we should use self.modes = [None] * num_modes
—
Reply to this email directly, view it on GitHub<#1015 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALCG3WKU2ZD6VHIPQHCP2DDWOMSRHANCNFSM6AAAAAATC63OYI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
How about |
Sure, I made it a list so we could only compute cross-section modes as we needed them (for instance, to inspect one before simulating all of them) |
Can call MEOW directly on component + layerstack to get single-wavelength Sparameters from EME