nextuppreviouscontents
Next:Running the Penn State Up:CCDSIM User Guide Previous:Introduction

Running the MARX Simulation

You can have MARX use an SAOSAC ray file instead of its internal HRMA model, however the timestamps assigned to SAOSAC photons are spaced by exactly one second, which is relevant for simulations where pileup is present.

We use MARX as a source of photons because it provides the user with convenient control over the spatial, spectral, and timing characteristics of the photons. Re-implementing all the cool current features of MARX, and the future ones too, sounded like no fun at all! Detailed information on MARX parameters is, of course, in the MARX User's Guide.

As described in Section 6.3 of the MARX User's Guide, you should set the MARX parameter DetIdeal to ``yes'' when the MARX output will be used by a CCD simulator. Also, do not forget that MARX has the unfortunate habit of modifying its parameter file marx.par based on the command-line options you specify.

Note that fluxes in MARX are specified by the parameter SourceFlux in photons/sec/cm2 at the entrance to the HRMA. Choosing a flux appropriate to your investigation can make your brain hurt due to several complications. (Yes, maximizing ``complicating details'' was one of our design goals!)

MARX can use SAOSAC rays, rather than its own HRMA model, in a simulation. The Penn State ACIS simulator will accept such an SAOSAC-derived MARX simulation, however the flux level in the CCD simulation will not be what you specified in the MARX run. The problem is that MARX 2.04 does not assign appropriate timestamps to SAOSAC photons. In the future, either MARX will be fixed or the Penn State ACIS simulator will be hacked to work around this problem.

You may find it convenient to run MARX from some type of script (csh, perl, etc.). If you decide to use IDL as your scripting language, you'll find the following IDL code interesting. (Change the reference to /bulk/pkg/asc/marx_2.04-dist to the appropriate MARX directory on your machine.)

spawn, '/bin/cp /bulk/pkg/asc/marx_2.04-dist/marx.par .'

spawn, 'echo "MARX LOG" > marxlog.txt'

num_events = 1000
flux       = ...
dir        = "my_sim"
energy     = 1.486

f='("marx ExposureTime=0 NumRays=",I0," SourceFlux=",F0," OutputDir=",A,' +$
  '" MinEnergy=",F0," MaxEnergy=",F0," DetIdeal=yes  >> marxlog.txt")'

cmd = string(num_events, flux, dir, energy, energy, F=f)
print, cmd
spawn, 'echo "' + cmd + '" >> marxlog.txt '
spawn, cmd

nextuppreviouscontents
Next:Running the Penn State Up:CCDSIM User Guide Previous:Introduction
Please address comments and questions to Dr. John Nousek ( nousek@astro.psu.edu )