Source shapes in MARX¶
marx offers different source shapes. Tests in this module exercise those sources (except SAOSAC, which is heavily used in the PSF tests already).
Build-in geometric sources¶
This test exercises build-in marx sources with different geometric shapes. Most source types have parameters, and not all parameters are tested here. See source documentation for a detailed description of source parameters.
Image as source¶
An image can be used as marx input. In this case, the intensity of the X-ray radiation on the sky is taken to be proportional to the value of the image at that point.
In this example we use Python to make a simple image as input, but one could use any fits image, e.g. a source observed in a different wavelength or the output of a simulation. In the Python code, we set up a 3-d box and fill it with an emitting shell. We then integrate along one dimension to obtain a collapsed image. Physically, this represents the thin shell of a supernova explosion.
The left image shows the input image, the right image the binned events from marx using that image as source. Note that the apparent size of the images is different, since the scale is in pixels, not in Ra/Dec and the pixel size of the input image differs from the ACIS pixel size.
Using a RAYFILE source¶
marx is a Monte-Carlo code, thus the exact distribution of photons on the sky will be different every time the code is run. Sometimes it can be useful to generate a list of photons with position, time and energy from the source on the sky and then “observe” the exact same list with different instrument configurations so that any differences in the result are only due to the different configuration and not to random fluctuations in the source.
In this example, we look at a relatively large, diffuse emission region with a very soft spectrum (for simplicity we are using a flat spectrum). We compare simulations using ACIS-S and ACIS-I. ACIS-S has a better response to soft photons, but some parts of the source may not be in the field-of-view; ACIS-I is less efficient for soft photons, but has a larger field-of-view. For the simulation, we pick a date early in the Chandra mission, since the contamination layer on ACIS was still thin at the time. Today, neither ACIS-S nor ACIS-I would detect many photons from such a soft source.
Both sources are generated from the same photon list. Sometimes the same pattern of photons can be seen in both images, but with a some events missing on ACIS-I due to the lower soft response, while others lie outside of the ACIS-S field-of-view.
Compiling a USER source¶
marx comes with several examples for user written sources in C. These can be compiled as shared objects and dynamically linked into marx at run time. To test this, we copy one of the source files from the installed marx version and compile it with gcc. This particular case is not very useful, because marx already has a point source with the same properties build-in. The purpose of this test is only to have a check that the dynamic linking works.
The distribution of photons looks indeed like a point source; it seems that we compiled and linked the user source file correctly.