PhoSim (The Photon Simulator)
Welcome to the official Photon Simulator (PhoSim) site! PhoSim is a set of extremely fast photon Monte Carlo codes that calculate the ab initio physics of the atmosphere and a telescope & camera in order to simulate realistic optical/UV/IR/X-ray astronomical images. PhoSim can also simulate any optical system that produces images (e.g. cameras, satellites, human eye).
PhoSim does this using modern numerical techniques applied to the physical response of photons (and electrons) to comprehensive physical descriptions of the atmosphere, telescope, and camera. After these detailed physics calculations, PhoSim simply generates images by collecting electrons into pixels. The photon simulations below (Rubin [below left], JWST [below middle], WIYN [below right]) show the photon Monte Carlo method where photons and electrons are physically propagated through the system. The photon/electron interaction physics includes the appropriate application of novel advanced raytracing, diffraction, and quantum mechanical interactions.
Photon Simulation with Rubin
Photon Simulation with JWST
PhoSim Simulation with WIYN
The physics of the site/telescope/camera includes: hydrodynamic-based descriptions [below left] of the atmosphere, elasticity theory calculations [below middle] of optics deformations, and electrostatic simulations [below right] of sensors. Since PhoSim is a physics-based code, it is written independent of the telescope/camera/site system, so there are a number of present, past, and future observatories implemented as different input configuration files.
Turbulence (Hydro)
Mirror (Elasticity)
Silicon (Electrostatics)
Despite the physics detail, PhoSim is quite fast due to both novel numerical techniques and efficient multithreading. Individual astrophysical objects can be simulated in milliseconds, and large fields of objects in seconds to several minutes depending on the size and depth. PhoSim is easy to install and has a tiered set of commands designed for both simple or complex applications. PhoSim has both a graphical user interface and a standard command line/file input interface. PhoSim can run on either your desktop or laptop as well as high performance computing systems (HPC).
There are a variety of uses of PhoSim. Some of the more common applications include: 1) detailed simulation of a telescope while it is being designed, constructed, or commissioned in order to understand scientific performance and unexpected behavior, 2) planning of future observations with straight-forward realistic image simulations, and 3) simulation of realistic training sets with perfect input knowledge for a variety of machine learning/AI and any advanced image processing algorithms.
PhoSim is currently being improved by: 1) asymptotically improving the ab initio physics implementation, 2) pursuing a number of validation studies, 3) enhancing computational performance, and 4) refining interfaces based on user feedback. Many additional large telescopes are currently being implemented. Besides large professional astronomical telescopes, PhoSim has applications in remote sensing/earth-facing satellites, photography & cameras, and various optical instruments (amateur telescopes, binoculars, & microscopes).
The buttons below describe how to use PhoSim. These include a link to download the code, user documentation, tutorials, an announcment blog, frequently asked questions, bug issue tracking, links to integrate PhoSim with other codes, detailed technical documentation and references, and contact information. If you are new to PhoSim, a good place to start is the tutorials. Also, scroll down below to see many examples of PhoSim capabilities.
PhoSim Examples
A visualization of the photons through the optical designs for various telescopes that have been implemented is shown below.
An uncalibrated uiy 13'x6' PhoSim image is below. An explanation for what you are looking at is here.
Below are series of exposures of the image above: a sequence of 100 exposures of a 13' x 13' field [left] similar to the example image above, a cumulative sequence of these exposures [middle left], a sequence of a smaller 2.5' x 2.5' field [middle right], and the cumulative sequence of the smaller field [right].
100 exposures of 13' Field
Cumulative of 13' Field
100 exposures 2.5' Field
Cumulative of 2.5' Field
A guider simulation [left] shows the changes in the image quality due to the atmosphere in the movie below. A mirror control simulation [right] shows the distortion of the mirror shape and the corresponding actuator correction of the control system below.
Guider Movie of Star
Mirror Control System
An example of a 3 gigapixel image: large-scale PhoSim images
A very large simulation run to download: PhoSim Rubin (LSST) Simulated Survey #1
Other simulations runs to download: Sample images
An example of using parameterized galaxy shapes to produce a range of galaxy morphologies (left). An example of cosmic rays produced from a long dark exposure (right).
Hubble Tuning Fork Diagram
Cosmic Rays
An example of stars, cosmic rays, and background using a generic telescope is shown to the left below, and an example of galaxies is shown to the right below.
Synethetic Stars
Synthetic Galaxies
On-axis (left) and off-axis (right) examples of chromatic point-spread-functions with various physics are shown below.
On-Axis Chromatic PSFs
Off-Axis Chromatic PSFs
Below are large star and galaxy fields with real stars-- Orion (left) and the Big Dipper (right).
Orion
Big Dipper
PhoSim does not only have to be used to simulate astronomical objects through astronomical telescopes. It can also be used to simulate any optical instrument, camera, or even biological optical systems with any kind of input. Below is a simulation of the Mona Lisa painting (left) through the human eye (right).
Input Mona Lisa Image
Output Mona Lisa Image through Human Eye
The sky rotation near the celestial pole through the human eye for a one hour exposure (left) and the Moon with synthetic clouds and scattering (right) are shown below.
Sky Rotation
Moon with Clouds
Sample synthetic James Webb Space Telescope ( JWST) NirCam Images are shown below. The left image shows a deep (12 hour) three color (F090W, F115W, F150W) exposure of a galactic field with a foreground star and the right image shows a LW exposure of the Large Magellanic Cloud.
JWST Deep Field
JWST LMC
Below is a simulation of a field with a mirror that is highly contaminated and is unpolished (left) and the corresponding clean and polished mirror (right).
Contaminated and Unpolished Mirror
Clean and Polished Mirror
The left image below shows the simulation of Saturn through atmospheric turbulence above a 1 meter telescope. The right image below shows the simulation of the Moon through Galileo's telescope while being attenuated by simulated clouds.
Simulation of photons accumulating from the Rubin observatory (left) and James Webb Space Telescope (right) are shown below. The frames are paced according to depth rather than time.
Below is the simulation of the night sky through the human eye by combining thousands of short exposures in an all sky mosaic (left). The star chart on the right identifies some of the brighter stars.