PhoSim v6.3 is available!
The default and simplest useage of PhoSim is:
Generic template for running PhoSim
Example of specifying an instance catalog in the example folder
This will run PhoSim using a generic telescope and with a complete background. Users should be aware that running PhoSim with a complete background will take a while.
The instanceCatalog specifies the observation configuration and the astrophysical inputs. Please check out the instance catalog page for a complete list of instance catalog commands. You can also specify the objects (stars, galaxies, etc.) you want to simulate.
PhoSim can be used more intricately with a command file and an instrument directory. A list of physics commands can be found here physicsCommands. Modifying the physics commands can help isolate problems and help study particular effects. Without specifying any physics commands, the default is realistic physics.
The instrumentSiteDirectory points to the instrument and site characteristics files. A number of implemented observatories are currently included in PhoSim. They can also be found in the data folder, /phosim_release/data/, the title of the directory is what is used to specify an instrument.
Below are examples of specifying a command file and an instrument directory:
Generic template of running PhoSim with more commands
Example using real paths and directories
To override the current site and move the telescope/camera to another location use:
Where x is the site from data/standard/location. Note the .txt extension is not used (e.g. --site=new_york_city)
PhoSim can be used without downloading these files. Without downloading these, PhoSim will use a flat SED for all objects. If you would like to use SEDs, this library of SEDs can be used.
https://phosim.rcac.purdue.edu/doc/SEDs.tar.gz
These SEDs were curated at the Spanish Virtual Observatory and the Space Telescope Institute. To use these SEDs, please untar the folder and place them in the SEDs folder found here
/phosim_release/data/SEDs/.
It should then be shown like so:
After running PhoSim, the output files are a stream of FITS files. The naming convention and the exact output scheme can be found in detail on the output page. The exact details of FITS files can be found on the NASA website.
By default the files are outputted at /phosim_release/output/, but you can specify an output path using '-o'
Note: Depending on your operating system, you might have to use quotation marks to specify your output path. One recommendation is not to use spaces, since this might be confused as well. A path like "/home/output data" should be renamed to "home/output_data/" to prevent any confusion.
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.
This is only useful when simulating a catalog covering more than one chip. Another multi-threaded calculation in the raytrace on a per astronomical source basis:
These options could even be used together in a complementary manner. To see a speedup, 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:
To have PhoSim instantly open the simulated file(s) when they are completed with ds9 use the --ds9 option:
To print the phosim version, use:
For more in-depth usage examples, 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.
The PhoSim visualizer is a helpful tool that is also used for plotting the rays in 3D. This can be helpful to visualize your optical system and see effects such as vignetting. It can also be a powerful tool when implementing a new telescope. Using the visualizer, you can see the points where the rays are diverging, and you can then further inspect the surface that may be suspect.