next up previous 623
Next: SCULIB_COPY_DEMOD_SWITCH - copy a switch of demodulated data into arrays holding the switch chop data, chop variance, calibrator, cal variance
Up: Library APIs
Previous: SCULIB_CONSTRUCT_OUT - Append a identification string to a string


SCULIB_CONVOLVE - convolve array A with array B to give result in R

Description:
This routine convolves array A with array B using multiplication only (i.e. no FFTs are used). The routine assumes that the A arrays are N_A long and that the convolution array B is N_B long, centred at N_MIDDLE. The final result is normalised by dividing by NORM. Elements of the A array that have bad quality are ignored. The input variances are propagated as:-

$\displaystyle R_{Variance} = \frac{ \sum B^2A_{Variance}}{norm^2}$ (26)

After this process the errors can no longer be considered independent.


Invocation:
CALL SCULIB_CONVOLVE (A_DATA, A_VARIANCE, A_QUALITY, B, N_A, N_B, N_MIDDLE, NORM, R_DATA, R_VARIANCE, R_QUALITY, STATUS)

Arguments:

A_DATA (N_A) = REAL (Given)
input data array
A_VARIANCE (N_A) = REAL (Given)
variance on A_DATA
A_QUALITY (N_A) = BYTE (Given)
quality on A_DATA
B (N_B) = REAL (Given)
convolution function
N_A = INTEGER (Given)
the size of A_DATA
N_B = INTEGER (Given)
length of convolution function
N_MIDDLE = INTEGER (Given)
index of zero point of convolution function
NORM = REAL (Given)
normalisation factor for convolution function
R_DATA (N_A) = REAL (Returned)
result of the convolution
R_VARIANCE (N_A) = REAL (Returned)
variance on R_DATA
R_QUALITY (N_A) = QUALITY (Returned)
quality on R_DATA
BADBIT = BYTE (Given)
badbit mask
STATUS = INTEGER (Given and returned)
global status

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


next up previous 623
Next: SCULIB_COPY_DEMOD_SWITCH - copy a switch of demodulated data into arrays holding the switch chop data, chop variance, calibrator, cal variance
Up: Library APIs
Previous: SCULIB_CONSTRUCT_OUT - Append a identification string to a string

SURF Programming Interface
Starlink System Note 72
Tim Jenness, John F. Lightfoot
Joint Astronomy Centre, Hilo, Hawaii
10 July 2000
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council