Campuses:
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| classes:2008:fall:astro4001.001:graphics [2008/10/16 12:26] – alex | classes:2008:fall:astro4001.001:graphics [2008/10/23 11:48] (current) – heger | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| ITT send me a link to their online resources with tutorials at | ITT send me a link to their online resources with tutorials at | ||
| [[http:// | [[http:// | ||
| + | |||
| + | There is only a very limited number of IDL licenses at SDVL/MSI computers. | ||
| ===== Getting Started ===== | ===== Getting Started ===== | ||
| Line 18: | Line 20: | ||
| The first parameter gives the name of the matrix, the second the name of the file to load. We use an optional parameter ``o=6`` to skip the first six lines. | The first parameter gives the name of the matrix, the second the name of the file to load. We use an optional parameter ``o=6`` to skip the first six lines. | ||
| - | IDL> | + | IDL> |
| + | |||
| + | You can now assign the different columns of the array to vectors: | ||
| + | |||
| + | IDL> rho=a[*, | ||
| + | IDL> Tc=a[*,2] | ||
| + | |||
| + | We can make a first plot: | ||
| + | |||
| + | lDL> plot, | ||
| + | |||
| + | ===== A Convenient Utility - Demo ===== | ||
| + | |||
| + | At [[http:// | ||
| + | |||
| + | It uses the two demo files form homework problem set 1, | ||
| + | [[http:// | ||
| + | [[http:// | ||
| + | |||
| + | There are several subroutines in [[http:// | ||
| + | |||
| + | PRO readez, | ||
| + | rhoc =rhoc , $ | ||
| + | | ||
| + | | ||
| + | | ||
| + | teff =teff , $ | ||
| + | time =time , $ | ||
| + | | ||
| + | l_he =l_he , $ | ||
| + | reff =reff , $ | ||
| + | mass =mass , $ | ||
| + | m_he =m_he , $ | ||
| + | | ||
| + | | ||
| + | xhe4 =xhe4 , $ | ||
| + | xc12 =xc12 , $ | ||
| + | xn14 =xn14 , $ | ||
| + | xo16 =xo16 , $ | ||
| + | psic =psic , $ | ||
| + | gamc =gamc | ||
| + | |||
| + | is used to lead the data file. The first parameter gives the name of the file to load, then comes a list of optional keyword parameters that allows to extract the desired values. | ||
| + | |||
| + | readez,' | ||
| + | |||
| + | The file [[http:// | ||
| + | |||
| + | PRO hrd, | ||
| + | XRANGE=xr, $ | ||
| + | YRANGE=yr, $ | ||
| + | OVERPLOT=over, | ||
| + | LINE=line | ||
| + | |||
| + | that takes a parameters effective temperature (in K) and luminosity (in solar luminosities), | ||
| + | |||
| + | The subroutine | ||
| + | |||
| + | PRO rhoctc, | ||
| + | XRANGE=xr, $ | ||
| + | YRANGE=yr, $ | ||
| + | OVERPLOT=over, | ||
| + | LINE=line | ||
| + | |||
| + | plots central temperature and density (first two parameters, in cgs units), and the same optional parameters. | ||
| + | |||
| + | There are also two subroutines, | ||
| + | |||
| + | PRO plot2hrd | ||
| + | |||
| + | and | ||
| + | |||
| + | PRO plot2rhoctc | ||
| + | |||
| + | that demonstrate how to plot multiple tracks in one figure. | ||
| + | dir0='' | ||
| + | Enjoy! | ||