Difference between revisions of "Simulation/Fimmwave-Fimmprop"

From OptoelectronicsWiki
Jump to: navigation, search
Line 3: Line 3:
 
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.
 
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 [[File:LioniX_WG_Example.zip]]. 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.
+
1) Extract all of the files in the above .zip you will need them to walk through this example. Be sure to place all three of these files (LionixPyScriptExampleFDM.py, LionixPyScriptExampleFMM.py and PdPythonLib.py) in the '''same folder'''.
  
2) Open [[File:LioniX_WG.prj‎]]
+
2) Open Fimmwave via the desktop shortcut with the target ''"...Fimmwave.exe" -pt 5101'' for reasons described in the manual. (python and other programs communicate with communicate with Fimmave over TCP/IP)
  
3) Open Python IDLE (or your preferred python compiler)
+
3) Open LioniX_WG.prj
 +
 +
4) Open LionixPyScriptExampleFDM.py or LionixPyScriptExampleFMM.py in Python IDLE (or your preferred python script compiler)
  
4) Download [[File:LionixPyScriptExampleFDM.txt]], [[File:LionixPyScriptExampleFMM.txt]], & [[File:PdPythonLib.txt]]
+
5) You can modify a output file save location in this script, else the data will simply be saved in the current directory of your script
  
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.
+
6) Run the script.
  
6) Modify a output file save location, else the data will simply be saved in the current directory of your script
+
7) Once the script is complete the output file can be viewed. It is tab delimited and makes a nice table in excel.
 
+
7) Run the script from the python GUI or your favorite command line program.
+
 
+
8) Once the script is complete the output file can be viewed. It is tab delimited and makes a nice table in excel.
+
  
 
Have fun and share your knowledge!!!
 
Have fun and share your knowledge!!!

Revision as of 14:19, 10 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 File:LioniX WG Example.zip. If you write a new and interesting example, with additional functionality please post the commented code.

1) Extract all of the files in the above .zip you will need them to walk through this example. Be sure to place all three of these files (LionixPyScriptExampleFDM.py, LionixPyScriptExampleFMM.py and PdPythonLib.py) in the same folder.

2) Open Fimmwave via the desktop shortcut with the target "...Fimmwave.exe" -pt 5101 for reasons described in the manual. (python and other programs communicate with communicate with Fimmave over TCP/IP)

3) Open LioniX_WG.prj ‎ 4) Open LionixPyScriptExampleFDM.py or LionixPyScriptExampleFMM.py in Python IDLE (or your preferred python script compiler)

5) You can modify a output file save location in this script, else the data will simply be saved in the current directory of your script

6) Run the script.

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

Have fun and share your knowledge!!!