next up previous contents
Next: A Data routine Up: The Application Level Previous: Associating a Dataset with   Contents

Accessing PSF data

Discussion of the arguments to PSF routines is not complete without a definition of the coordinate system used.

         +---------------------------------------------------+
         |                                                   |     
         |                                                   |     
         |                            ^ +-----------------+  |     
         |                            | |                 |  |     
         |                            | |   +             |  |     
         |                            NY|(X0,Y0) +        |  |     
         |                            | |        (X0+QX,  |  |     
         |                         +  | |         Y0+QY)  |  |     
         |                      (0,0) v +------ARRAY------+  |     
         |                              <--------NX------->  |     
         |                                                   |     
         |                                                   |     
         |                                                   |     
         |                                                   |     
         |                                                   |     
         +---------------- dataset X,Y space ----------------+

The dataset associated with a PSF must have enough axis information to define the X,Y space in angular units. The ASTERIX standards document PROG_002 defines the pointing direction as (0,0) in this space.

The most primitive PSF access routine is PSF_2D_DATA which directly drives the PSF data routines. Other system routines such as the profilers RADIAL_PFL and ENERGY_PFL are built on top of PSF_2D_DATA. The argument list of PSF_2D_DATA is,

       PSF_2D_DATA( SLOT, X0, Y0, QX, QY, DX, DY, INTEG, NX, NY,
                                                 ARRAY, STATUS )

         SLOT		<int>   The PSF reference
         X0,Y0		<real>  The image position at which the PSF is to
                        	be evaluated, in radians
         QX,QY		<real>  Radian offsets from the position (X0,Y0)
                        	to the centre of the array ARRAY
         DX,DY		<real>  The widths of the bins in ARRAY
         INTEG		<log>   Return integrated probability per pixel?
         NX,NY  	<int>   The dimensions of ARRAY
         ARRAY(NX,NY)	<real>  The 2D probability array

The units of the values in ARRAY when INTEG is true are integrated probability per unit pixel area DX*DY. Thus, if the image area ARRAY is sufficiently large, the sum of the values returned should approach or even equal unity. The units of if INTEG is false are currently undefined.

The discussion above has mentioned nothing of potential time or energy dependence of the PSF. Most application software is optimised to handle spatial variation efficiently, with time and energy being treated as extensions. The PSF system is organised to reflect this method of programming - the data routines only provide control over the spatial variables. To change the energy or time separate calls to PSF_DEF must be made. This allows time and energy bands, as well as user definable data to be passed to the PSF data routine. A typical structure for processing such data where the PSF also varies with image position might look like,

       CALL PSF_ASSOCI( LOC, SLOT, STATUS )
       DO E = 1, NCHANNEL
         CALL PSF_DEF( SLOT, ..., STATUS )
         DO X = 1, NX
           DO Y = 1, NY
             CALL PSF_2D_DATA( SLOT, ... STATUS )
           END DO
         END DO 
       END DO

Note that the PSF system routines know nothing about time or energy. The sole means by which the PSF_DEF call has any effect is by altering the internal state of the PSF library routine generating the 2D PSF data.


next up previous contents
Next: A Data routine Up: The Application Level Previous: Associating a Dataset with   Contents
Asterix
2000-06-28