The code can be obtained through the PhoSim git repository using an appropriate tagged version. It is easiest to simply download a tarball of the latest version. First, unzip and untar the code in the desired installation directory.
Then to configure the code and installing the two dependencies (cfitsio and fftw) by:
Then, to build the code simply do:
Note PhoSim requires python >= 2.6 and a c++ compiler that supports the c++14 standards. To test with a simulation of a single star and no background:
./phosim examples/star -c examples/nobackground
To activate the graphical user interface (GUI) simply do:
The default usage is:
The instanceCatalog specifies the configuration of the observation and the astrophysical inputs.
For more complex usage:
phosim instanceCatalog -c physicsCommands -i instrumentSiteDirectory<generic>
The physicsCommands modify the default (realistic) physics.
The instrumentSiteDirectory points to the instrument and site characteristics files. A number of implemented observatories are currently included in PhoSim.
This library of SEDs can be used with the simulator that are curated at the Spanish Virtual Observatory and the Space Telescope Institute. Put the SEDs into the directory data/SEDs after untarring.
The output is a stream of FITS files.
For larger simulations, there are two options for parallelization. One that parallelizes at the chip level will run N copies of the raytrace portion of the calculation.
phosim instanceCatalog -p N
This is only useful when simulating a catalog covering more than one chip. Another multi-threads the calculation in the raytrace on a per astronomical source basis:
phosim instanceCatalog -t M
These options could even be used together in a complementary manner. To see a speed up, you should have N*M cores available.
To only simulate a specific chip or group of chips (e.g. "chipname1|chipname2|chipname3") use the -s option:
phosim instanceCatalog -s chipname
To have PhoSim instantly open the simulated file(s) when they are completed with ds9 use the --ds9 option:
phosim instanceCatalog --ds9
To print the phosim version, use:
For a series of tutorials to get started, please follow the PhoSim Tutorials.
If you don't want to run PhoSim, you can also download some sample images.
This code is also developed for use on large-scale grid computing using CONDOR with the -g condor option. Use phosim -h for a full listing of options. There is also the PhoSim visualizer for plotting the rays in 3-d, which is useful for implementing new telescopes.
PhoSim First Reference Paper (General Reference): Peterson, J. R., Jernigan, J. G., Kahn, S. M., Rasmussen, A. P., Peng, E., Ahmad, Z., Bankert, J., Chang, C., Claver, C., Gilmore, D. K., Grace, E., Hannel, M., Hodge, M., Lorenz, S., Lupu, A., Meert, A., Nagarajan, S., Todd, N., Winans, A., Young, M. 2015, ApJS 218, 14.
PhoSim Second Reference Paper (Optics Deformation Physics): Peterson, J. R., Peng, E., Burke, C. J., Sembroski, G., Cheng, J. 2019, ApJ 873, 98.
PhoSim Third Reference Paper (Additional Physics for Space Telescopes): Burke, C. J., Peterson, J. R., Egami, E., Leisenring, J. M., Sembroski, G., Rieke, M. J. 2019, SPIE JATIS 5(3), 038002.
PhoSim Fourth Reference Paper (Sensor Distortion Physics): Peterson, J. R., O'Connor, P., Nomerotski, A., Magnier, E., Jernigan, J. G., Cheng, J., Cui, W., Peng, E., Rasmussen, A., Sembroski, G. 2020, ApJ 889, 2.
PhoSim Reference Document (pre-2013 work)
PhoSim Internal Notes
Publications That Use PhoSim
Current Release Notes and Limitations