demisjohn / pyFIMM

Python Interface to PhotonDesign's FimmWave/FimmProp software.
15 stars 4 forks source link

Device.plot_input_field(): broken #73

Open demisjohn opened 8 years ago

demisjohn commented 8 years ago

FimmWave returned: ERROR:could not find item "wg.evlist.list[1].profile.update()"

the wg object does not appear to be part of the Element - maybe not valid for Path-type elements.

Don't rememeber what this wg part was meant to do - maybe just to calc the modes?

demisjohn commented 8 years ago

Try this method:

Calculate the scattering matrices (this is what Dev.calc() should do), Device_453103.calcfieldprofile(0,0,0,0) Dev.calcfieldprofile(): FUNCTION (zpos,fieldType[0-total,1-fwd,2-bwd,3-field vecs],refelt[0-wrt cpt,N-wrt elt N],refpt[0-beg elt,1-end elt]): stores field Xsection in fieldprofile. refpt,refelt default to 0,0"

Device_453103.fieldprofile.writeamf( "lhs_field.amf" ) Then use get_amf_data() to extract the field data.

Unfortunately, ß & n_eff are not calculated in this method, although it looks like they should be.

demisjohn commented 8 years ago

here's how to use get_amf_data():

modestring = self.nodestring + ".cdev.eltlist[%i]"%(n) + ".get%sevlist"%(sidestr) + ".list[1].profile.data"
d = get_amf_data( modestring )