## Posts Tagged ‘Sunrise’

### Data Compression

Monday, February 20th, 2012

The size of the FITS files generated by the mcrx component of Sunrise is daunting. With my current choice of settings, each mcrx.fits file weighs in at over 40GB. The files are so large because they contain a spectrum in each pixel of six separate images of the simulated galaxy. After doing more research, I may eventually be able to get away with storing fewer wavelengths, reducing the resolution of the images and/or reducing the number of images per file, but the files are still likely to be rather large. The mcrx component of Sunrise includes an option for using file compression, but the compression method is lossy and it’s not recommended for use. Fortunately, my FITS files are generated synthetically; unlike images from a real telescope, the dark parts of the images are noise-free! Therefore, the areas that appear blank are essentially all identical. The presence of many identical pixels makes the files potentially highly compressible via lossless compression algorithms. (more…)

### Hooray for PyFITS!

Monday, February 13th, 2012

Using PyFITS to read, manipulate, and write FITS files is so easy that it almost feels like cheating. The PyFITS user guide is here: packages.python.org/pyfits/users_guide/users_guide.html. A few minutes after looking at the Quick Tutorial section of the user guide, I was able to read the spectrum contained in a pixel of a Sunrise mcrx output file. It should be rather straightforward to write a script that combines the spectra contained in a rectangular region of an image. Here’s a spectrum that I found in one of the pixels of the first mcrx.fits files that I examined. I had to plot the wavelength axis logarithmically because matplotlib refused to work when I used a linear plot.

Here’s the code I used for this specific pixel. It will soon be generalized and optimized: (more…)

### AGN Spectra, Filters, and RGB Images

Sunday, February 12th, 2012

#### AGN Spectra

I’ve learned how to include luminosity-dependent AGN spectra in Sunrise, thanks to Desika Narayanan. The instructions are not provided on the Sunrise wiki, so I will summarize the procedure here. In the sfrhist.stub file, you have to specify an AGN spectrum file using the keyword bhmodelfile and specify the radiative efficiency with the keyword bh_radiative_efficiency. Desika uses the following:

bhmodelfile newbhmodel.fits
bh_radiative_efficiency 0.1

I’ve uploaded the file, newbhmodel.fits, since it is apparently not available elsewhere on the web. Following these simple instructions causes Sunrise to treat the supermassive black hole particles in the simulation (particle type 5 in a GADGET-2 snapshot) as AGNs. The spectra are based on Phil Hopkins’ AGN_spectrum.c code, which can be found here.

The remainder of this post is devoted to a discussion of filters in Sunrise and the creation of RGB images using Patrik’s make_color.py python script, which is available here. (more…)

### More Images & a New MakeGalaxy Code

Sunday, February 5th, 2012

I have had some more time to struggle with practice using Sunrise now. I’ve managed to sucessfully run the radiative transfer on several GADGET-2 snapshots of merging systems. This required me to make a minor edit to the code.  There was a seemingly arbitrary speed limit in the code which caused it to exit if any particles moved faster than 1000 km/s. I had to increase the speed limit in order to prevent the code from exiting.  I’ve contacted Patrik to see if there was a technical reason for the 1000 km/s speed limit. I wouldn’t want to break anything.  The code has now been recompiled with CUDA support.  The CUDA version runs noticeably faster, as expected.

In other news, T.J. Cox just made the MakeGalaxy code public on Bitbucket. Someone has uploaded a new flexible version of CombineGalaxies to Bitbucket as well. To download the Mercurial repositories use: (more…)

### First Sunrise Images

Sunday, January 29th, 2012

After spending quite a bit of time moving to a new apartment (cleaning, packing, moving, more cleaning, and unpacking), I have had time to try using Patrik Jonsson’s Sunrise code.  The instructions on the Sunrise wiki were quite helpful. I ran into very few problems in the process. The biggest “problem” was a minor bug that took two minutes or so to figure out; the code requires the environment variable HOST to be defined. The code tries to handle the possibility that the name of the host computer is stored in the variable HOSTNAME (the default situation in Ubuntu), but there’s a problem with the implementation: (more…)

### Sunrise is Compiled!

Friday, December 30th, 2011

I have finally managed to compile the latest (default) version of Sunrise! I had to tinker with it periodically over the course of a few days, but I finally managed to do it.  The current version of the code in the Mercurial repository has evidently been designed to compile only with Arepo support, but I do not have Arepo and I will not be using Arepo for my project.  It seems that compiling the code without Arepo is planned, but not fully implemented in the current version.  There are several errors that occur when Arepo is absent.  In order to get the code to compile, I had to extensively edit the pre-processor directives.

(more…)

### Crunch

Monday, February 14th, 2011

Dr. Gillian Wilson, one of my thesis committee members, was kind enough to provide me with funding to build a workstation for my project. I needed a fast shared memory machine with at least 32 GB of RAM in order to run Sunrise efficiently. After configuring several systems on the HP, Dell, Apple, and other websites, I discovered that it would be considerably more cost-effective if I designed and built the machine myself. Ideally, I would have built a system consisting of 2 or 4 of Intel’s latest Xeon processors and an Nvidia Tesla c2050 card, but I tried to keep the price as low as possible for the level of performance necessary.  I eventually obtained the following combination of components:

 Motherboard: Asus KGPE-D16 Dual Socket G34 AMD SR5690 SSI EEB 3.61 Processors: 2x AMD Opteron 6172 Magny-Cours 2.1 GHz  (24 cores total) Memory: 16x 4 GB DDR3 1333 unregistered DRAM (64 GB total) Graphics: EVGA Nvidia GeForce GTX 580 (containing 512 CUDA cores and 1.5 GB GDDR5 ) System disk: 64 GB Crucial RealSSD C300 Data disks: 2x 1.0 TB Western Digital Caviar Black WD1002FAEX Chassis: Intel 5U Server Chassis SC5650WSNA, with 1000W PSU
(more…)