SURFLIB_READ_IPFILE

Reads IP data from text file

Description:

This routine reads IP data from a text file and stores it in a multi-dimensional array. The format of the file is: Any line starting with the string ’FAST’ is assumed to be specifying the angle between 0 degrees on the waveplate and the angle to the fast axis. This is wavelength dependent. The line should be of the format

FAST filter angle

eg “FAST 450 -3.0”

The list of valid filter names is passed in to the routine. An error is raised if a fast axis angle has not been specified for each filter.

For each bolometer the following information is required:

BolName P0 P0_Err Pslope_Err Theta0 Theta0_Err ThetaSlope ThetaSlope_Err

BolName Name of bolometer (eg H7,G12..)
P0 IP percentage polarization at the horizon
P0Err Error in P0
PSlope Gradient in P (ie P = P0 + Pslope Elevation)
PSlopeErr Error in PSlope
Theta0 polarization angle of IP (degrees)
Theta0Err Error in polarisation angle
ThetaSlope Gradient in Theta (ie Theta = Theta0 + ThetaSlope El)
ThSlErr Error in ThetaSlope

For example: H7 2.0 0.01 0.02 0.01 167 2 1.0 0.01

{ is the comment character. Blank lines are ignored. The columns must be space separated.

All angles are converted to radians before further processing (including Pslope which is in degrees1)

Invocation

CALL SURFLIB_READ_IPFILE( FD, NUM_CHAN, NUM_ADC, N_FILT, FILTERS, FAST_ANG, BOL_IP_DATA, STATUS)

Arguments

FD = FILE (Given)
Identifier to the open file (opened for read access)
NUM_CHAN = INTEGER (Given)
Number of available bolometer channels
NUM_ADC = INTEGER (Given)
Number of available AtoD cards
N_FILT = INTEGER (Given)
Number of filters requested
FILTERS( N_FILT ) = CHARACTER (Given)
Array of requested filter names
FAST_ANG( N_FILT ) = REAL (Returned)
Fast axis angle for each filter. Will contain bad values if no angle was found
BOL_IP_DATA(8, NUM_CHAN, NUM_ADC) = REAL (Returned)
The IP data. This array contains the ip data for each bolometer (specified by a combination of CHAN and ADC). The 4 slices represent: P0, Pslope, Theta0 and ThetaSlope The last 4 slices contain the corresponding variance All angles are converted to radians (Pslope has to be converted from /degree to /radian).

Copyright

Copyright ©1995,1996,1997,1998,1999 Particle Physics and Astronomy Research Council. All Rights Reserved.