[evla-sw-discuss] Residual sub-sample delay correction
Barry Clark
bclark at nrao.edu
Thu Jun 16 12:37:04 EDT 2011
Attached are:
1. A fragment of C code which calculates the residual delay error and
decoherence of an integration due to the finite size of delay steps.
2. A .h file defining a structure used in the above calculation.
3. An example of how it might be used, using some delay polynomials
collected by eavesdropping on the Executor.
4. The output of that example.
Below, copies of the documentation embedded in the C code.
/**
* Here are two pieces of the correction for the delay steps when
* the delay module changes its delay by a bit.
* The first piece, clunk(), is called on a per sampler and per
* integration basis (or, if we implement separate delay tracking
* for subbands, on sampler, subband, integration basis. This
* routine stores a list of delay changes in the structure named 'clunk'.
*
* The second piece, blclunk(), takes the two lists of delay changes
* and calculates the mean and mean square errors of these integer
* delays from the desired delay polynomial. It is called for each
* baseline and provides the data to currect the spectrum output
* on that baseband (in the usual case, for all subbands).
*
* There will generally be several integrations per delay polynomial.
* These routines will need to be called for each integration.
* It will commonly occur that an integration will span two polynomials.
* We are in a fortunate situation that the polynomials are changing
* sufficiently slowly that we can ignore that. Either polynomial
* can be used for current purposes.
*/
/**
* clunk solves for the times that the station boards cause the delay
* to go 'clunk'
* @param reftime reference time for the delay polynomial (days)
* @param time start of the integration interval to be searched (days)
* @param endtime end of integration interval (days)
* @param bits sample rate selection; bits=1 is 2 GHz, bits=2 is 4 GHz
* @param poly delay polynomial
* @param npoly order of the polynomial
* @param sclunk a clunk structure holding answers
*/
void clunk(double reftime, double starttime, double endtime, int bits,
double poly[], int npoly, struct clunk *sclunk)
/**
* Baseline portion - calculate mean and mean square delay differneces
* between for the integration, integrating the segments between clunks
* @param delmean pointer to where mean delay error is returned
* @param decohere pointer to where mean square delay error is returned
* @param clunk1 list of clunks, first antenna
* @param clunk2 list of clunks, second antenna
*
* Note that the output, delmean, is in units of seconds, so the
* actual phase error is, in turns, delmean*f where f is in Hz.
* Similarly, the loss of cohernce is decohere*f*f, again, f in Hz.
* And finally, it is probably more convenient to think in terms of
* a complex correction factor, which is the reciprocal of the
* errors above, that is,
* (1 - (delmean*f)^2 + decohere*f*f , -delmean*f)
*/
void blclunk (double *delmean, double *decohere,
struct clunk *clunk1, struct clunk *clunk2)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clunk.c
Type: text/x-csrc
Size: 7797 bytes
Desc: not available
URL: <http://listmgr.nrao.edu/pipermail/evla-sw-discuss/attachments/20110616/a560c2cd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clunk.h
Type: text/x-chdr
Size: 706 bytes
Desc: not available
URL: <http://listmgr.nrao.edu/pipermail/evla-sw-discuss/attachments/20110616/a560c2cd/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mclunk.c
Type: text/x-csrc
Size: 2091 bytes
Desc: not available
URL: <http://listmgr.nrao.edu/pipermail/evla-sw-discuss/attachments/20110616/a560c2cd/attachment-0002.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t
URL: <http://listmgr.nrao.edu/pipermail/evla-sw-discuss/attachments/20110616/a560c2cd/attachment.ksh>
More information about the evla-sw-discuss
mailing list