PhoSim Tutorial 16: How to Use Custom Truth Images

In addition to parameterized models of sources, full images can be used as truth images for what the object would like above the telescope/atmosphere. The advantage is that very complex morphologies can be simulated. This is straight-forward to do with PhoSim as it can photon sample from this image.

For a sample image, we use the FITS image of the Antennae Galaxies. We use the green channel file. In the catalog, we set the spatial name to be the name of the FITS file. PhoSim looks for spatial names with the word fit or fits to determine whether the spatial model should be a truth image. The two parameters after the model name determine the size per pixel in arcseconds and the position angle in degrees.

rightascension 0

declination 0

filter 2

object 0 0.00 0.0 10  ../sky/sed_flat.txt 0 0 0 0 0 0 ../../green.fits 0.2 0.0 none none


The corresponding image is:

Antennae Galaxies with PhoSim

Notice by using this image, the background is treated as a source of photons so it will leave an artifact if not subtracted. This is also true about the gap between the CCD, as well as any finite angular resolution/distortion that is not small compared to what is being simulated by PhoSim. If we subtract 20 counts from the background before simulating it in PhoSim we obtain:

Background Subtracted Antennae Galaxies with PhoSim

A convenient use of this is to make this represent a more distant galaxy and therefore make the pixel angular size much smaller than the real object. This will make some of the artifacts unimportant and it also can be used many times in the same image. An example of this is a catalog below where the same truth image is used 3 times at three different pixel scale and three position angles:

rightascension 0

declination 0

filter 2

object 0 0.01 0.0 10  ../sky/sed_flat.txt 0 0 0 0 0 0 ../../green.fits 0.04 180.0 none none

object 0 0.000 0.01 10  ../sky/sed_flat.txt 0 0 0 0 0 0 ../../green.fits 0.02 0.0 none none

object 0 -0.02 0.02 10  ../sky/sed_flat.txt 0 0 0 0 0 0 ../../green.fits 0.01 70.0 none none

The corresponding image is:

Antennae galaxies at different scales and orientations with PhoSim

Note it is very easy to mix truth images with all the other ways of simulating objects in PhoSim that are parameterized. An example of this is using the same catalog and adding background stars and galaxies:

rightascension 0

declination 0

filter 2

stars 0.0 30.0 0.3

galaxies 0.0 30.0 0.3

object 0 0.01 0.0 15  ../sky/sed_flat.txt 0 0 0 0 0 0 ../../green_sub.fits 0.04 180.0 none none

object 0 0.000 0.01 15  ../sky/sed_flat.txt 0 0 0 0 0 0 ../../green_sub.fits 0.02 0.0 none none

object 0 -0.02 0.02 15  ../sky/sed_flat.txt 0 0 0 0 0 0 ../../green_sub.fits 0.01 70.0 none none


The corresponding images are:

Antennae Galaxies and synthetic sources with PhoSim

To simulate the exact scale and intensity of the image automatically, see PhoSim Tutorial 22: How to use a Truth Image and Match its Intensity and Scale.