Difference between revisions of "Simulation/Fimmwave-Fimmprop"

From OptoelectronicsWiki
Jump to: navigation, search
Line 1: Line 1:
 
Scripting:
 
Scripting:
  
There are a few steps that you need to do in order to allow scripting in python of Fimmwave. Please see the manual for step by step instructions.
+
There are a few steps that you need to do with your computer in order to allow scripting in python of Fimmwave. Please see the manual ([[File:Fimmwave Scripting Manual.pdf]] for step by step instructions. I have already done this to the simulation computer.
  
 
Once you have completed these preliminary steps, please feel free to take a look at this already constructed python scripting example. If you write a new and interesting example, with additional functionality please post the commented code.
 
Once you have completed these preliminary steps, please feel free to take a look at this already constructed python scripting example. If you write a new and interesting example, with additional functionality please post the commented code.
Line 13: Line 13:
 
4) Download [[File:LionixPyScriptExampleFDM.txt]], [[File:LionixPyScriptExampleFMM.txt]], & [[File:PdPythonLib.txt]]
 
4) Download [[File:LionixPyScriptExampleFDM.txt]], [[File:LionixPyScriptExampleFMM.txt]], & [[File:PdPythonLib.txt]]
  
5) Change the filename extensions to LionixPyScriptExampleFDM.'''py''', LionixPyScriptExampleFMM.'''py''', & PdPythonLib.'''pyc''' and place them all in the same direcory.
+
5) Change the filename extensions to LionixPyScriptExampleFDM.'''py''', LionixPyScriptExampleFMM.'''py''', & PdPythonLib.'''pyc''' and place them all in the same direcory. It is important that you always have the PdPythonLib.pyc file in the same directory as the one you have saved your script to so that it can find the file.
  
 
5) Modify a output file save location, else the data will simply be saved at the "C:\LionixPyScriptExampleOUTPUTFILE.dat"
 
5) Modify a output file save location, else the data will simply be saved at the "C:\LionixPyScriptExampleOUTPUTFILE.dat"

Revision as of 17:27, 5 March 2010

Scripting:

There are a few steps that you need to do with your computer in order to allow scripting in python of Fimmwave. Please see the manual (File:Fimmwave Scripting Manual.pdf for step by step instructions. I have already done this to the simulation computer.

Once you have completed these preliminary steps, please feel free to take a look at this already constructed python scripting example. If you write a new and interesting example, with additional functionality please post the commented code.

1) Open Fimmwave via the desktop shortcut for reasons described in the manual.

2) Open LionixWG.prj

3) Open Python IDLE (or your preferred python compiler)

4) Download File:LionixPyScriptExampleFDM.txt, File:LionixPyScriptExampleFMM.txt, & File:PdPythonLib.txt

5) Change the filename extensions to LionixPyScriptExampleFDM.py, LionixPyScriptExampleFMM.py, & PdPythonLib.pyc and place them all in the same direcory. It is important that you always have the PdPythonLib.pyc file in the same directory as the one you have saved your script to so that it can find the file.

5) Modify a output file save location, else the data will simply be saved at the "C:\LionixPyScriptExampleOUTPUTFILE.dat"

5) Run the script from the python GUI or command line.

6) Once the script is complete the output file can be viewed. It is tab delimited and makes a nice table in excel.

Have fun!!!