Coder Social home page Coder Social logo

modesolverpy's People

Contributors

joamatab avatar jtambasco avatar sulien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modesolverpy's Issues

plot issue on mode hybridization for fractional TE mode

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.

Layer thicknesses wrong in Slab class

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.

Plot data using matplotlib instead of Gnuplot

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)?

Inconsistent treatment of x and y in class _AbstractStructure

  1. The following property definitions are inconsistent with one another:

@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?

  1. There is a typo in the line " x = np.arange(self.x_min, self.x_max+self.x_step-self.y_step0.1, self.x_step)". You are substracting self.y_step0.1, but it should be self.x_step*0.1. Probably hasn't been seen yet because I guess most people use uniform grid spacing and then it doesn't matter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.