Re: [Camfr-users] Defining the planar structure - how to add a new Planar to existing Stack.
Brought to you by:
pbienst
From: Peter B. <Pet...@ug...> - 2008-07-07 20:49:38
|
Please mail me your exact code. Peter On Monday 07 July 2008 22:48:35 Vratislav Kolinský wrote: > Hello, > > I introduced the recommends below to the code of program and > permanent error occured: > > Traceback (most recent call last): > File "D:/Mé_programy/Python/PhCProgramy/InhomProfile6.pyw", > line 60, in ? e += p(d_GaAs / steps) > Boost.Python.ArgumentError: Python argument types in > Expression.__iadd__(Expression, Term) > did not match C++ signature: > __iadd__(struct boost::python::back_reference<class > Expression &>, class Expression) > > I could not overcome this. What's the problem? > > Thank you for your kind answer and advice. > > Regards, > > V. Kolinský > > Dear, > > I am using CAMFR via Python on MS Windows 2000. > > My task is to build a stack containing Planars with different > indices of refraction, but the number of Planars can vary from one > simulation to another simulation. > > Do you know, how to manage adding a new Planar to existing > Stack with for example a "for" loop? > > I want to make this transcription: > > stack = Stack(Planar[0](d) + Planar[1](d) + ...) -> for i in > arange(0,NumofPlanars,1): stack = stack + Planar[i](d) > > But this is not working. > > Can you give me an advice? > > Thank you and regards, > > Vratislav Kolinsky > > > > > > > Re: [Camfr-users] Defining the planar structure - how to add a new > Planar to existing Stack. From: Peter Bienstman <Peter.Bienstman@ug...> - > 2008-07-02 09:00 > > Attachments: Message as HTML > > On Wednesday 02 July 2008 10:52:10 vratislav.kolinsky@di... wrote: > > Dear, > > > > I am using CAMFR via Python on MS Windows 2000. > > > > My task is to build a stack containing Planars with > > different indices of refraction, but the number of Planars > > can vary from one simulation to another simulation. > > > > Do you know, how to manage adding a new Planar to existing > > Stack with for example a "for" loop? > > > > I want to make this transcription: > > > > stack = Stack(Planar[0](d) + Planar[1](d) + ...) -> for i > > in arange(0,NumofPlanars,1): stack = stack + Planar[i](d) > > cache = [] > > e = Expression() > > for ....: > p = Planar() > cache.append(p) > e += p(d) # or e.append(p(d)), I don't remember the syntax by > hear > > s = Stack(e) > > Peter > > -- > ------------------------------------------------ > Peter Bienstman > Ghent University, Dept. of Information Technology > Sint-Pietersnieuwstraat 41, B-9000 Gent, Belgium > tel: +32 9 264 34 46, fax: +32 9 264 35 93 > WWW: http://photonics.intec.UGent.be > email: Peter.Bienstman@UG... > ------------------------------------------------ -- ------------------------------------------------ Peter Bienstman Ghent University, Dept. of Information Technology Sint-Pietersnieuwstraat 41, B-9000 Gent, Belgium tel: +32 9 264 34 46, fax: +32 9 264 35 93 WWW: http://photonics.intec.UGent.be email: Peter.Bienstman@UGent.be ------------------------------------------------ |