PhoSim Tutorial 7: How to simulate sky background
In the previous tutorials, we have deliberately turned off sky background. This is a very common use. This because that there are overwhelmingly more photons from sky background than there are from astrophysical sources. The default is to keep sky background on, since the default settings for PhoSim are to have the most realistic settings. However, there are many applications and studies where no background is desired.
There are approximations for background photons to make them simulate a couple of orders of magnitude faster, but there are still billions of photons in a single image. There are essentially three types of background approximations that are described in the background approximation chart.
The standard approximation called "normal approximation" uses all of the same physics on background photons that are on astrophysical photons, except it uses bunches of photons with smoothing prior to hitting the detector. This essentially averages over the physics prior to the detector on a small scale and is a near perfect approximation since the response of telescope varies over large spatial scales.
An example with normal background applied is to simply use no command file as:
phosim examples/large_catalog
The normal background image is:
A further approximation is to average over the response in the detector as well by using bunches of photons in a small angular pattern. This is not a perfect approximation as there are variations in response from one pixel to the next and a number of distortions of the field lines. We call this approximation "quick background". This is a good approximation to use if you do not care about the detailed properties of the background and just want an image with a reasonable background. An example of this is given by the command below. The command is just "quickbackground" in a command file.
phosim examples/large_catalog -c examples/quickbackground
The quick background image is:
Finally, you can turn off all approximations and simply have the background generated one photon at a time just like the photons for astrophysical sources. This option is generally unnecessary and is usually only important for validation purposes. An example of this background is done by using the command below. The command is simply "singlephotonbackground" in a command file.
phosim examples/large_catalog -c examples/singlephotonbackground
The single photon background image is:
As you can see from the 3 images, they are identical by eye. Any differences are only apparent with detailed analysis and usually with much higher background levels. The run time for the three examples was approximately 0.5 minute, 0.75 minutes, and 2.5 minutes for the quick, normal, and single photon methods, respectively.
In general, normal background (no option) is useful for detailed analyses and quick background is useful for quick studies.