XMM-Newton Science Analysis System
dal (dal-1.181.1) [xmmsas_20070308_1802-6.6.0]
Meta Index / Home Page / F90 DAL API / API Overview
An array is a block that is an n-dimensional array of scalars. An array can be accessed and released with the following procedures:
- array Returns an array handle. Requires a data set handle, the name or number of the array and the access mode.
- release Release the array again. The program should do this as soon as the array is no longer needed.
Once the handle is available, the following properties can be enquired:
- numberOfElements Returns the number of elements in the array.
- dimensions Returns an integer vector with the dimensions of the array.
- numberOfDimensions Returns the number of dimensions of the array.
The data in an array can be accessed via access function. There is a large variety of those to support the different types and dimensions.
- typedimensionData Returns a pointer to the data in the array. Requires an array handle.
The following example illustrates how to change the values in an array.
type(DataSetT) :: set
type(ArrayT) :: arr
integer(kind=int32), dimension(:,:), pointer :: x
set = dataSet("test.dat",Modify)
arr = array(set,"test")
x => int32Array2Data(arr)
x = 124
To reduce the size of the array that is accessed in one go (and thereby reducing memory usage), one can select a certain range:
- arraySeek Set the range of interest. Requires an array handle and two vectors of integers, indicating the starting position and the size of the range of interest.
Note: the current DAL does not support the seek function.
XMM-Newton SOC/SSC -- 2007-03-08