Go to the U of M home page
School of Physics & Astronomy
School of Physics and Astronomy Wiki
classes:2008:fall:astro4001.001:graphics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
classes:2008:fall:astro4001.001:graphics [2008/10/16 12:35] alexclasses: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://www.ittvis.com/ProductServices/IDL/IDLTutorials.aspx]]. [[http://www.ittvis.com/ProductServices/IDL/IDLTutorials.aspx]].
 +
 +There is only a very limited number of IDL licenses at SDVL/MSI computers.  Better use the physics computers.
  
 ===== Getting Started ===== ===== Getting Started =====
Line 29: Line 31:
   lDL> plot,rho,Tc   lDL> plot,rho,Tc
  
 +===== A Convenient Utility - Demo =====
 +
 +At [[http://webusers.physics.umn.edu/~alex/stellarevolution/AST-4001/EZ]] you can find a demo IDL program [[http://webusers.physics.umn.edu/~alex/stellarevolution/AST-4001/EZ/readez.pro|readez.pro]] that reads in the EZ output without editing (explained on 2008/10/23 in class).
 +
 +It uses the two demo files form homework problem set 1,
 +[[http://webusers.physics.umn.edu/~alex/stellarevolution/AST-4001/EZ/25_02.txt|25_02.txt]] and
 +[[http://webusers.physics.umn.edu/~alex/stellarevolution/AST-4001/EZ/25_0001.txt|25_0001.txt]], which are also in this directory.  Save all files in a directory, e.g., ''EZ''.
 +
 +There are several subroutines in [[http://webusers.physics.umn.edu/~alex/stellarevolution/AST-4001/EZ/readez.pro|readez.pro]]:
 +
 +  PRO readez,name, $
 +           rhoc =rhoc , $
 +           tc   =tc   , $
 +           pc   =pc   , $
 +           lum  =lum  , $
 +           teff =teff , $
 +           time =time , $
 +           dt   =dt   , $
 +           l_he =l_he , $
 +           reff =reff , $
 +           mass =mass , $
 +           m_he =m_he , $
 +           m_env=m_env, $
 +           xh1  =xh1  , $
 +           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.  For example, to load central density and central temperature form the file [[http://webusers.physics.umn.edu/~alex/stellarevolution/AST-4001/EZ/25_02.txt|25_02.txt]] and store in variables x and y, use
 +
 +  readez,'25_02.txt',RHOC=x,TC=y
 +
 +The file [[http://webusers.physics.umn.edu/~alex/stellarevolution/AST-4001/EZ/readez.pro|readez.pro]] also contains a routine to make an Hertzprung-Russel-Diagram (HRD)
 +
 +   PRO hrd,teff,lum, $
 +        XRANGE=xr, $
 +        YRANGE=yr, $
 +        OVERPLOT=over, $
 +        LINE=line
 +
 +that takes a parameters effective temperature (in K) and luminosity (in solar luminosities), and optional parameters for the x- and y-ranges to plot, whether to overplot, and what line style to use.
 +
 +The subroutine
 +
 +  PRO rhoctc,tc,rhoc, $
 +        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.  Inside these programs, the path (dir0) and file list (files)  needs to be adjusted accordingly.  For example, to load files from the local directory, just set the path to an empty string
 +
 +  dir0=''
  
 +Enjoy!
classes/2008/fall/astro4001.001/graphics.1224178553.txt.gz · Last modified: 2008/10/16 12:35 by alex