The IDL-programme RAYTRACING simulates a typical observation with the Bragg spectrometer of the SODART telescope using the Monte Carlo raytracing method.


back to OXS Software or SODART_OXS

It combines the two parts of the raytracing program package RAYTRAC_OXS and RAYTRAC_TEL , which together represent a complete raytracing through the spectrometer and the telescope for a certain angular position of OXS, with a flux generating procedure FLUX_GNRTR and a background simulator BACKGROUND.

The following parameters are used in this programme:

SName - source name and line (one common string) used as plot title
Ecent - central energy (in keV) for the Bragg spectrometer scan
deltE - energy step (in eV) for the Bragg spectrometer scan
Bcent - Bragg angle (in deg) corresponding to Ecent
deltB - Bragg angle (in deg) step corresponding to deltE
Pcent - panel angle (in deg) corresponding to Ecent
deltP - panel angle (in deg) step corresponding to deltE
OffAxisZ - off-axis angle in Z direction (in arcmin)
Num - number of angular positions
ObsTime - observation time (in ks) per angular position
SFlux - source flux (in phot/cm^2/s/keV) - fltarr(Num)

The following satellite coordinate system is used in this programme:

origin - centre of Bragg spectrometer axis
+X-axis - towards source in main telescope direction
-Y-axis - towards Bragg source direction
Z-axis - along the Bragg spectrometer axis
(XYZ right-handed system)

For the active spectrometer side (looking to the source) the following Bragg coordinate system is used:

origin - same as for the satellite system
y-axis - along the Bragg panel axis (= Z-axis)
x-axis - moves in the XY-plane, towards the "upper" part of satellite
(= X-axis for panel angle = 0)

This programme runs over several angular positions of the spectrometer panel, simulating a complete and realistic scan of a spectrum with SODART/OXS. The number Num of angular positions is limited by the size of the detector, since the change of the panel position by an angle deltP leads to a deflection of the radiation in the focal plane by 2 * deltP. Suppose at a certain angular position Pcent the radiation is reflected to the centre of the detector. Then the scan starts at an angular position Pcent - ((Num-1)/2) * deltP, runs over Num-1 angle steps of size deltP, and ends at the angular position Pcent + ((Num-1)/2) * deltP. At the same time, the photon spot in the detector plane moves from one detector edge through the centre to the other edge.

The measurement at central position Pcent is on-axis, while all others are more or less off-axis (in Y direction). The choise of the step number Num is a compromise: On one side, one should take the largest possible number in order to use the complete detector plane for scanning the spectrum and not to reorient too often the whole satellite to continue the scan. On the other side, in case of off-axis measurements the photon number is reduced by the off-axis factor (e.g. ca. 50% at 15 arcmin off-axis angle). For faint sources this might be an unacceptable reduction. Furthermore, at large off-axis angles a certain partition of photons may fall into a position outside the detector's sensitive area.

In this discussion it is supposed, that all measurements are on-axis with respect to Z direction. Theoretically, this is always possible, and one should aspire to realise it in all measurements. Otherwise, one has to accept an additional decrease of the off-axis factor, which further reduces the photon number.

One has to distinguish between Bragg angle, Panel angle, and Source angle. Source angle and Panel angle are measured from +X axis towards the -Y axis. The relationship is: Bragg angle = Source angle - Panel angle. During a panel scan we assume a fixed Source angle = 2 * Bcent. Increasing Panel angles cause decreasing Bragg angles (and increasing energies), i.e., deltP = - deltB. At center position one has Pcent = (2*Bcent) - Bcent = Bcent.

Additionally, the Panel angle must be corrected due to the fact, that the average NONP is not Zero. This is important when scanning narrow lines. The average NONP is always positive for all crystals. It is found by averaging the NONP values of all crystals (MeanNonp) or by folding the NONP distribution with the average crystal RC (MaxPanRC). MaxPanRC is slightly energy dependent, but this can be neglected. Both values are given in arcmin. The PanAngle (or RotAngle) must be decreased by MeanNonp or MaxPanRC.

We use here MeanNonp for correction, (a) since these values are independent from the energy dependent crystal rocking curve, and therefore from energy, (b) since these values are roughly the center of gravity of the panel rocking curve. This is important especially for the Si panel rocking curve. Corresponding to this choice in FLUX_GNRTR the energy interval, where the photons are distributed, is chosen symmetrically to the central energy.

Input data and results are written in a protocol file named: rtr.doc. Multiplots to demonstrate the motion of the photon spot in the focal plane are presented on screen and (as option) in ps-files named rtr.ps. For large numbers of angular positions this plot is continued in rtr_1.ps, rtr_2.ps ... The user is free to specify the file name by adding a string after rtr (e.g. _X for rtr_X.doc and rtr_X.ps, rtr_X_1.ps ...)

After plotting the photon spots, the user can cut out ellipses around the spot centers and count there the signal and background photons. The position and the half-axes of the ellipses can be varied, and the programme offers the point spread functions in both dimension for orientation.

This procedure calls directly the following functions and procedures:

PARAMETERS, BRAGG, ENERGY, DETECTOR, OFFAXIS,
CRYSTAL_TYPE, ENERGY_RES, PSF_TOTAL, CUT_ELLIPSE, PLOT_FRAME,
BACKGROUND, FLUX_GNRTR, RAYTRAC_OXS, RAYTRAC_TEL, FATESUM.

The following functions and procedures are links to /bragg/prog/response/:

PARAMETERS, BRAGG, ENERGY, DETECTOR, OFFAXIS.

The structure of calls and data fluxes is shown in the figure: struct_rtr.gif.

written by Hans Wiebicke, Jan - Jul, 2000


back to OXS Software or SODART_OXS