PhoSim Tutorial 13: How to Make a 3 Color Image

You can make a three (or more) color image by simulating the same catalog through multiple filters. An example of this is by constructing 3 catalogs as:

rightascension 0

declination 0

vistime 120.0

stars 0.0 30.0 0.3

galaxies 0.0 30.0 0.3

filter 1


rightascension 0

declination 0

vistime 120.0

stars 0.0 30.0 0.3

galaxies 0.0 30.0 0.3

filter 2


rightascension 0

declination 0

vistime 120.0

stars 0.0 30.0 0.3

galaxies 0.0 30.0 0.3

filter 3


The three catalogs just switch the filter, and will have the same stars and galaxies generated since they will have the default random number seed. The filters, in this case, for the default telescope (generic) correspond with B, V, R Johnson-Cousins filters.

We ran three instances of these three catalogs with -c examples/nobackground. Then to combine these into a single image, we can use the ds9 command:

ds9 -rgb -red output/generic_e_9999_f3_chip_E000.fits.gz -scale log -green output/generic_e_9999_f2_chip_E000.fits.gz

-scale log -blue output/generic_e_9999_f1_chip_E000.fits.gz -scale log -rgb close


The corresponding three color image where we have assigned the red/green/blue channels to the B/V/R filters is:

PhoSim Three Color Image