Description:
This
routine calculates the sky contribution by attempting to remove the source from the input data stream.
The source signal can either be calculated by this routine or by reading in a model of the source from a
file.
When calculating the source structure internally a similar method to that used by DESPIKE is
employed. The input data are placed into bins of size one quarter beamwidth. The median of each bin
is calculated and this is treated as the source model (cf. REBIN_METHOD=MEDIAN in
REBIN).
Once the source model is available, it is removed from all of the input data. The source-removed data
are then analysed with the sky emission derived from the mean of the signal across the array for all
the sample times.
Since the sky signal is expected to vary on timesales of the order of one second, an option is included
for smoothing the sky signal. This is especially useful for scan map data where samples are taken at
7.8 Hz.
Invocation
CALL SURF_GRID_CALCSKY ( TSKNAME, N_FILES, N_PTS, N_POS,
N_BOLS, N_BOLS, WAVELENGTH, DIAMETER, IMNDF, N_M_FITS, MODEL_FITS, CHOP_THROW,
CHOP_PA, BOX_SIZE, BOL_RA_PTR, BOL_DEC_PTR, DATA_PTR, QUALITY_PTR, SKY_PTR,
SKY_ERR, BADBIT, STATUS )
Arguments
TSKNAME = CHARACTER (Given)
Name of
task to be used in output messages
N_FILES = INTEGER (Given)
Number of data sets
(ie files)
N_PTS ( N_FILES ) = INTEGER (Given)
Total number of points in each map
N_POS( N_FILES ) = INTEGER (Given)
Number of positions per set (Y positions)
N_BOLS( N_FILES ) = INTEGER (Given)
Number of bolometers per set (X positions)
WAVELENGTH = REAL (Given)
Wavelength of observation in microns
DIAMETER = REAL
(Given)
Diameter of telescope in metres
IMNDF = INTEGER (Given)
NDF identifier
of the supplied model. If this is equal to NDF__NOID then no external model is used.
N_M_FITS = INTEGER (Given)
Number of FITS keywords in the model
MODEL_FITS =
CHAR(80)
(Given)
FITS keywords from the model
CHOP_THROW = REAL (Given)
Size of chop
throw for the first input image (arcsec)
CHOP_PA = REAL (Given)
Chop position angle
of first input image (degrees)
BOX_SIZE ( N_FILES ) = INTEGER (Given)
Size of
smoothing box - pixels
BOL_RA_PTR( N_FILES ) = INTEGER (Given)
Array of pointers
to position information (X coords) Note that each data set has positions for N_POS
N_BOLS
BOL_RA_PTR( N_FILES ) = INTEGER (Given)
Array of pointers to position information
(Y coords)
DATA_PTR( N_FILES ) = INTEGER (Given, modified data)
Pointers to actual data
arrays. The arrays are modified and contain the source removed data on exit.
QUALITY_PTR(
N_FILES ) = INTEGER (Given)
Pointer to quality arrays
SKY_PTR ( N_FILES ) = INTEGER
(Pointer Given, data returned)
Storage space for the sky signal
SKY_ERR ( N_FILES ) =
INTEGER (Pointer Given, data returned)
Storage space for the error on sky signal
BADBIT (
N_FILES ) = BYTE (Given)
Bad bit mask for identifying bad pixels from quality
STATUS
= INTEGER (Given & Returned)
Global Status
Examples:
calcsky test_rlb model=!
Calculate sky for test_rlb.sdf. Only read in one file and don’t use an external source model. calcsky list.inp model=m82
noloop
Read in the files specified in list.inp and use m82.sdf as a model of the source. calcsky file nosrc=nosrc boxsz=10.0
Calculate sky for file.sdf. Store the source subtracted image in nosrc.sdf. Use a smoothing size of 10
seconds. Notes:
-
The model itself is only an approximation to the data (since the data points can fall anywhere within a
given cell) so some source signal will remain after source subtraction.
-
If a model is supplied externally (via MODEL parameter) the cell size and the map centre of the model
is used for the source subtraction.
-
The sky signal is stored in an NDF extension (.MORE.REDS.SKY). The file must be processed by
REMSKY to actually remove the sky contribution.
Related Applications
SURF: REMSKY
Copyright
Copyright ©1995,1996,1997,1998,1999 Particle Physics and Astronomy Research Council.
All Rights Reserved.