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/09/24 07:51] – heger | classes:2008:fall:astro4001.001:graphics [2008/10/23 11:48] (current) – heger | ||
---|---|---|---|
Line 10: | Line 10: | ||
[[http:// | [[http:// | ||
+ | There is only a very limited number of IDL licenses at SDVL/MSI computers. | ||
+ | |||
+ | ===== Getting Started ===== | ||
+ | |||
+ | Edit the output file (we assume a file name '' | ||
+ | |||
+ | To read the data file, use the IDL program {{http:// | ||
+ | |||
+ | 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> readmatrix, | ||
+ | |||
+ | You can now assign the different columns of the array to vectors: | ||
+ | |||
+ | IDL> rho=a[*,1] | ||
+ | IDL> Tc=a[*,2] | ||
+ | |||
+ | We can make a first plot: | ||
+ | |||
+ | lDL> plot,rho,Tc | ||
+ | |||
+ | ===== 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! |