Description:
This routine takes an input name and reads in all NDFs
resulting from this name. SCUBA sections are parsed. Text files are expanded into
NDF+parameters.
Nested text files are allowed.
Invocation
CALL SURF_RECURSE_READ( RLEV, NAME, MAX_FILE,
OUT_COORDS, N_FILE, N_BOL, N_POS, N_INTS, IN_UT1, IN_RA_CEN, IN_DEC_CEN, FITS, N_FITS,
WAVELENGTH, SUB_INSTRUMENT, OBJECT, UTDATE, UTSTART, FILENAME, BOL_ADC, BOL_CHAN,
BOL_RA_PTR, BOL_RA_END, BOL_DEC_PTR, BOL_DEC_END, DATA_PTR, DATA_END, VARIANCE_PTR,
VARIANCE_END, QMF, QUALITY_PTR, QUALITY_END, QBITS, ANG_INT, ANG_MEAS, INT_LIST,
MEAS_LIST, BOLWT, WEIGHT, SHIFT_DX, SHIFT_DY, NPARS, PARS, STATUS)
Arguments
RLEV
= INTEGER (Given)
Recursion level. This is the number of times that the routine has
called itself. A value of 1 should be passed in by the external routine.
NAME = CHAR
(Given)
Name of input file. This may also contain scuba section specifications. The input file
can be a NDF or a text file containing a list of NDFs.
MAX_FILE = INTEGER (Given)
Maximum number of NDFs that can be read by the system.
OUT_COORDS = CHAR
(Given)
Output coordinates system. (Passed into SURF_READ_REBIN_NDFS)
N_FILE =
INTEGER (Given & Returned)
Current file number (less than MAX_FILE and greater
than 0). This counter is incremented when an NDF has been read successfully.
N_BOL(
MAX_FILE ) = INTEGER (Returned)
Number of bolometers associated with each file
N_POS(
MAX_FILE ) = INTEGER (Returned)
Number of samples associated with each file
N_INTS(
MAX_FILE ) = INTEGER (Returned)
Total Number of integrations associated with each file
(INT∗MEAS)
N_MEAS( MAX_FILE ) = INTEGER (Returned)
Number of measurements associated with each file
IN_UT1( MAX_FILE ) = DOUBLE (Returned)
Modified Julian data of observation for each file
IN_RA_CEN( MAX_FILE ) = DOUBLE (Returned)
RA of centre for each file
IN_DEC_CEN(
MAX_FILE ) = DOUBLE (Returned)
Dec of centre for each file
FITS ( N_FITS, MAX_FILE) =
CHARACTER∗(80)
(Returned)
FITS entries for each file
N_FITS = INTEGER (Given)
Size of FITS array for each file
WAVELENGTH = REAL (Given & Returned)
Wavelength of map
SUB_INSTRUMENT =
CHAR (Given & Returned)
Sub instrument of map
OBJECT( MAX_FILE ) = CHAR
(Returned)
Name of object in each file
UTDATE( MAX_FILE ) = CHAR (Returned)
UT
date of each observation
UTSTART( MAX_FILE ) = CHAR (Returned)
UT time of each
observation
FILENAME( MAX_FILE ) = CHAR (Returned)
Actual filename of each file read.
BOL_ADC ( ) = INTEGER (Returned)
ADC information for bolometers - only used by
BOLREBIN
BOL_CHAN ( ) = INTEGER (Returned)
Channel information for bolometers -
only used by BOLREBIN
BOL_RA_PTR( MAX_FILE ) = INTEGER (Returned)
Array of
pointers to RA bolometer positions read from each file
BOL_RA_END( MAX_FILE )
= INTEGER (Returned)
Array of pointers to end of RA bolometer positions read from
each file
BOL_DEC_PTR( MAX_FILE ) = INTEGER (Returned)
Array of pointers to
DEC bolometer positions read from each file
BOL_DEC_END( MAX_FILE ) = INTEGER
(Returned)
Array of pointers to end of DEC bol positions read from each file
DATA_PTR(
MAX_FILE ) = INTEGER (Returned)
Array of pointers to data values read from each file
DATA_END( MAX_FILE ) = INTEGER (Returned)
Array of pointers to end of data values
VARIANCE_PTR( MAX_FILE ) = INTEGER (Returned)
Array of pointers to variance
values read from each file
VARIANCE_END( MAX_FILE ) = INTEGER (Returned)
Array of pointers to end of variance values
QMF = LOGICAL (Given)
Flag to decide
whether quality is being stored (.FALSE.) or being folded into the data array (.true.). See
NDF_SQMF
QUALITY_PTR(MAX_FILE) = INTEGER (Returned)
Pointer to quality array
QUALITY_END(MAX_FILE) = INTEGER (Returned)
Pointer to end of quality array
QBITS(MAX_FILE) = BYTE (Returned)
Bad bits mask for each file
ANG_INT( MAX_FILE,
SCUBA__MAX_INT,2) = REAL (Returned)
Array containing the polarimetry angles for each
integration The 2 dimensions are for WPLATE and ANGROT
ANG_MEAS( MAX_FILE,
SCUBA__MAX_MEAS,2) = REAL (Returned)
Array containing the pol angles for each
measurement The 2 dimensions are for WPLATE and ANGROT
INT_LIST( MAX_FILE,
SCUBA__MAX_INT+1)
= INTEGER (Returned)
Position of integrations in each data file
MEAS_LIST(MAX_FILE,
SCUBA__MAX_MEAS+1)
= INTEGER (Returned)
Position of measurements in each data file
BOLWT (max num of bols,
MAX_FILE) = REAL (Returned)
Relative Weights of each bolometer for each file
WEIGHT(
MAX_FILE ) = REAL (Returned)
Weight of each input file
SHIFT_DX( MAX_FILE ) = REAL
(Returned)
X Shift of each input file
SHIFT_DY( MAX_FILE ) = REAL (Returned)
Y Shift of
each input file
NPARS = INTEGER (Given)
Number of parameters in PARS array.
PARS( NPARS ) = REAL (Given)
Values of input parameters. 1: WEIGHT, 2: SHIFT_DX, 3:
SHIFT_DY
STATUS = INTEGER (Given and Returned)
The global status
Notes:
-
This subroutine can be called recursively. A limit of 5 recursion levels is imposed. Note that recursion
is not approved of in Fortran 77 (mainly because local variables remember their state on
entry!).
-
Text files with extension .txt are converted to NDFs by the NDF_OPEN command. This is bad - do not
use .txt files as batch files.
Copyright
Copyright ©1995,1996,1997,1998,1999 Particle Physics and
Astronomy Research Council. All Rights Reserved.