Research:Sunrise

From Astronomy Facility Wiki

Jump to: navigation, search

Contents

Overview

Sunrise is actually a suite of three (or, for v2.5, four) programs that produce as a final output a 2D "astronomical" image of an N-Body simulation that contains stars and gas. Each pixel contains the full REST FRAME flux SED of the sources along that line of sight. Sunrise includes a full treatment of dust reprocessing with radiative transfer. The three (four) programs you will run in turn are

  • sfrhist: Star formation history integration code. This module calculates the SEDs for the particles in you simulation, based on Starburst99 theoretical models. In version 3.0, the makegrid module is absorbed into this.
  • makegrid: This is run separately in v2.5, not in v3. Adaptive-refinement grid creation. The makegrid executable loads a snapshot file output by sfrhist and creates the adaptive-refinement grid. The output file describes the grid structure along with the luminosity and density in the grid cells. This module is not run separately in version 3.0 of Sunrise.
  • mcrx: Radiative-transfer calculation. The mcrx executable is the actual radiative-transfer program. It does the ray tracing, both for the non-scattering stage and the scattering stage, and then the necessary post-processing: calculating attenuation, interpolating over wavelength, adding the IR template, etc.
  • broadband: Broadband color integration. The broadband executable takes the output from mcrx and integrates the data cubes into broadband color images. It also integrates the integrated SEDs into integrated magnitudes

Each of the executables takes a .config files as its parameter and outputs a .fits file.

Much of this text come from the Twiki Sunrise Page. Patrik Jonsson's documentation can be found at http://www.ucolick.org/~patrik/sunrise/. See either of these pages for more information.

Getting the Code

Sunrise is currently installed on:

  • Elektra (version 3.0) This is the one you want
    • Executables in /astro/users/patrik/bin/
    • Source Code in /astro/users/patrik/build-sunrise/sunrise/src
    • Libraries in /astro/users/patrik/lib/
    • mcrx_data_dir (called in mcrx.stub) should be set to ~patrik/build-sunrise/sunrise/src/
  • Elektra (version 2.55)
    • Executables in /astro/apps/for/elektra/pkg/Sunrise/
    • Source Code in /astro/apps/for/elektra/pkg/Sunrise/sunrise-2.55/
    • SEDs and other libraries in /astro/apps/for/elektra/pkg/Sunrise/dust_data
    • Libraries in /astro/apps/for/elektra/pkg/Sunrise/lib
    • mcrx_data_dir (called in makegrid.stub and mcrx.stub) should be set to /astro/apps/for/elektra/pkg/Sunrise/sunrise-2.55/src/
  • Robert (version 3.0).
    • This was on bigdisk1 and is now gone. It will need to be reinstalled before use
    • mcrx_data_dir (called in mcrx.stub) should be set to /home/trq/src/build-sunrise/src/
  • Robert (version 2.55).
    • Executables in /home/trq/sunrise2/bin/
    • Source Code in /home/trq/src/build-sunrise/src/
    • SEDs and other libraries in Needs to be copied over from /astro/apps/for/elektra/pkg/Sunrise/dust_data on Elektra
    • Libraries in /home/trq/sunrise2/lib/
    • mcrx_data_dir (called in mcrx.stub) should be set to /home/trq/src/build-sunrise/src/

For code modified to incorporate redshift dimming, Lyman alpha absorption, or for non-cosmological expansion, email christensen <AT> astro <DOT> washington <DOT> edu

Build instructions for Sunrise for sharks are here. For more detailed instructions, ask Patrik Jonsson, Tom Quinn, Sarah Loebman or Charlotte Christensen.

Getting Started

You may either run Sunrise on Elektra or on Robert. The first thing to do, therefore, is to get an account on one (or all!) of the computers. Email Tom Quinn trq@astro or Richard Coffey richardc@phys for this.

To start, you will need a tipsy ascii file of your simulation. There is a program floating around the astronomy department called bin2ascii which will handle this for you. If it is a disk like galaxy it is better if it is aligned with the xy axis so you may also want to realign your galaxy. Furthermore, if your galaxy is part of a larger cosmological simulation, you will want to use Amiga to pull out the part you are interested in. I hear Chris Brooks has some good code for this.

Move your new tipsy ascii file to the computer of your choice and get ready to roll. For each of the modules, you will give a .config file as the input. This means that your commands will looks something like this:

    >> sfrhist sfrhist.config
    >> mcrx mcrx.config
    >> broadband broadband.config

The .config files lists the values for all the appropriate parameters (such as the simulation units, the camera positions, the number of rays etc). The hardest part of Sunrise is setting these up; for details and instructions see the following tutorials.

Running Sunrise on Different Computers

To run Sunrise on Robert, you will need to go through the same steps as on Elektra: sfrhist, makegrid, mcrx and broadband. Again, each module will take a .config file as its parameter and output a .fits file. The only differences is that on Robert, Sunrise is in /share/bigdisk1/PROJECTS/sunrise. Your library paths will now be /share/bigdisk1/PROJECTS/sunrise/lib and the executables live in /share/bigdisk1/PROJECTS/sunrise/bin.

If you want to run an older version of Sunrise, an older library is required. You will have to change your library path accordingly. There is one library in /astro/net/scratch2/christensen/Sunrise/libPJutil.

Why the Hell did it Crash?

Good (and common) question. You should take a look at Research:Sunrise_Errors; this lists some of the crashes people have run into before. Once you have fixed your problem, update Research:Sunrise_Errors to reflect any new information.

Analysis

Once you have Sunrised a simulation, you'll want to look at the results. Sunrise outputs a ton of useful data and (if you know what to do) you can make composite images, plot the SED, find luminosity profile and more. All of the output information is stored in your three .fits files:

  • grid.fits has information for each of the stellar particles, including their age, metallicity and magnitude, information on the grid, and the integrated SED for all particles
  • mcrx.fits has for each camera, the SED for each grid location and the luminosities, scattered luminosities, and absorbed luminosities vs lambda for the whole grid.
  • broadband.fits has images of the galaxy in each filter and the magnitudes of the galaxy in each filter.

For more information on how to do analysis and post-processing see Research:Sunrise Analysis

On-Going Modifications

I have added parameters to the broadband module to include redshift and lyman absorption. The next step is a function to read Research:Tipsy bin files -- Charlotte Christensen 9/6/07

It is currently possible to create broadband images of a galaxy that incorporates redshift and luminosity dimming for a given z. To do this, add the following line to your broadband.config file:

    Redshift z

where "z" is the numerical value of the redshift of the galaxy. This will result in images in which the wavelengths have been lengthen by (1+z) and the luminosity has been dimmed by 1/(1+z)^2. The best way to incorporate redshift into the full SED produced by mcrx.cc is to do post processing to shift the wavelengths and dim the luminosity

You can also include lyman absorption by intervening galaxies by putting the following line in your broadband.config file

  Lyman_Absorption 1
Personal tools