jtambasco / modesolverpy Goto Github PK
View Code? Open in Web Editor NEWPhotonic mode solver with a simple interface.
License: MIT License
Photonic mode solver with a simple interface.
License: MIT License
Getting the following error on windows:
`The system cannot find the path specified.
"title='Mode 0 |E_{y}| Profile, n_{eff}: 2.482, λ = 1.550 µm "
^
line 0: invalid command
Invalid Parameter - /modes_semi_vec
The system cannot find the path specified.
Invalid Parameter - /modes_semi_vec`
Is there any way I could interface modesolverpy with matplotlib instead of gnuplot (if this is the issue)?
how could we have python2 and python3 compatibility?
On line 372 in structure_base.py the height of a Slab Class feature is first discretised and then another y_step is added to the height:
height_discretised = self.y_step*((height // self.y_step) + 1)
Even if you choose a stepsize for the layers, such that is correctly discretised (e.g. 10nm stepsize for a 100nm layer), this line of code will still add another self.y_step (in this case 10nm) to the layer thickness and cause it to be larger (110nm) instead. While this might not be an issue for small stepsizes or a low amount of layers, this causes problems for larger stepsizes or many layers, such as in Bragg-mirror structures.
I am unsure why the self.y_step is added, maybe there is a solid reason for it, but in my case it simply causes the layers to have wrong thicknesses.
Dear Jtambasco,
I copied your program on modesolverpy for mode hybridization. The program does not give the output plot as shown on your page, especially the structure_n_effs.png file is supposed to have TE fraction shown as well but it does not appear on the plot. Please, I request you to make necessary adjustment.
@Property
def x(self):
'''
np.array: The grid points in x.
'''
if None not in (self.x_min, self.x_max, self.x_step) and
self.x_min != self.x_max:
x = np.arange(self.x_min, self.x_max+self.x_step-self.y_step*0.1, self.x_step)
else:
x = np.array([])
return x
@property
def y(self):
'''
np.array: The grid points in y.
'''
if None not in (self.y_min, self.y_max, self.y_step) and \
self.y_min != self.y_max:
y = np.arange(self.y_min, self.y_max-self.y_step*0.1, self.y_step)
else:
y = np.array([])
return y
In the definition for x, x_max will be included in the grid. For y, it won't. Is this intended?
modesolverpy/modesolverpy/structure_base.py
Line 525 in 0b5cdcf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.