Ignore:
Timestamp:
Dec 9, 2006, 1:33:35 AM (18 years ago)
Author:
dkearney
Message:

updated examples removing output sections from tool.xml files and making the example code generate the output section using the rappture library put command. this change is made in the example files to help curb people from defining output sections in their tool.xml files. the output sections should really be created inside the program when the output data is ready to be entered.

Location:
trunk/examples/app-fermi/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/app-fermi/python/fermi.py

    r543 r555  
    3535E = Emin
    3636dE = 0.005*(Emax-Emin)
     37
     38# Label the output graph with a title, x-axis label,
     39# y-axis label, and y-axis units
     40driver.put('output.curve(f12).about.label','Fermi-Dirac Factor',append=0)
     41driver.put('output.curve(f12).xaxis.label','Fermi-Dirac Factor',append=0)
     42driver.put('output.curve(f12).yaxis.label','Energy',append=0)
     43driver.put('output.curve(f12).yaxis.units','eV',append=0)
     44
    3745while E < Emax:
    3846    f = 1.0/(1.0 + exp((E - Ef)/kT))
  • trunk/examples/app-fermi/python/tool.xml

    r66 r555  
    3939        </number>
    4040    </input>
    41     <output>
    42         <curve id="f12">
    43             <about><label>Fermi-Dirac Factor</label></about>
    44             <xaxis>
    45               <label>Fermi-Dirac Factor</label>
    46             </xaxis>
    47             <yaxis>
    48               <label>Energy</label>
    49               <units>eV</units>
    50             </yaxis>
    51         </curve>
    52     </output>
    5341</run>
    54 
Note: See TracChangeset for help on using the changeset viewer.