Overview



 

Python Parasol Enables Parametric Solutions

Parasol is a python framework in which mathematical models can be investigated parametrically. Parasol enables easy optimization, sensitivity study, and visualization. The math model can be as big or as small as desired. Output is generated in plain text, HTML, and native Microsoft Suite files (Excel, Word and PowerPoint).

A problem is defined by input and output parameters. Results are presented in a manner that conveys insight into system trends and characteristics. The process of performing an analysis results in an ample assortment of graphs, charts, and images that display system sensitivities, variations, and characteristics. Barriers to creating these displays have been reduced to single commands in order to facilitate their use.

Parasol has been designed to run under Microsoft Windows. In that environment, creating a new project and running cases consists of the following steps:

1) Create a directory for your project (e.g., FunctionOpt)
2) Create a parasol file as a Python script (e.g., func_opt_a.py)
3) Execute the Python file
     a. At the command prompt enter “python func_opt_a.py”
         (RECOMMENDED, allows options to launch Excel, Word, or PowerPoint)
     b. OR double click func_opt_a.py
         (will lose progress messages to console)
4) Review the output.

The file structure for the above description is shown at right. This shows the newly created parasol file in the directory "FunctionOpt".

Use your favorite python text editor to create and edit the python file. My personal favorite is the Scintilla Text Editor.

Start A Project

The file structure after the parasol file is executed is shown here. Notice that a new subdirectory and HTML file have been created.

A double-click on the HTML file will launch the system default web browser and show the results of the run. ("F5" will refresh the browser for re-run cases)

Run A Project

The files in the newly created subdirectory are the images created by parasol of plots or ray tracings, Excel CSV data files of plot data, and a text summary file with extension ".summary". (see below)

A double-click on the CSV file will launch Microsoft Excel and show the data used for a particular plot.

Review A Project

If desired, parasol can also create an output file in Microsoft Excel, Word or PowerPoint. The Excel file contains both data and plots in native Excel format, the Word file contains much the same information as the HTML file, and the PowerPoint contains all the main charts and tables that might be required for a presentation. The advantage of the Microsoft formats is that all text and graphics are embedded in a single file that can be easily shared electronically with others.

Excel cases are launched by executing the parasol file with a "-x" option, Word is launched with "-w", and PowerPoint is launced with "-p". The Microsoft applications are saved and closed at the end of the run. To leave them open, add an "o" to the run option (for example "-xo", "-wo", or "-po").

Launching Excel

An example of launching Excel is shown above. At the command prompt give a "-x" option when launching the parasol file and Excel will be launced, plots and summary data inserted into Excel, and the Excel file will be saved under the same name as the parasol file (see right) with the XLS extension. (the "-x" option will save and close Excel, the "-xo" option will save and leave Excel open)

After Excel

Double-click the XLS file to launch Microsoft Excel. A saved Excel contour plot is shown below. The corresponding matplotlib plot from parasol is shown beside the Excel plot (click them to enlarge).

Excel Screen Shot Matplotlib Plot