Tempo2 predictors use incorrect TZRSITE for phase prediction

Issue #84 resolved
Michael Keith created an issue

It has been discovered that tempo2 predictor code uses the target site for the predictor rather than TZRSITE when defining the reference phase.

Background: When generating a predictor or polyco, phase zero is defined by the TZR parameters: TZRMJD, TZRFREQ and TZRSITE. These define a time, location and frequency at which we define phase zero. The phase at other epochs, frequencies and locations is extrapolated from here.

The result of this is that installing an ephemeris from one observatory into another archive will not correctly align in phase. This only affects the definition of phase zero, and should not affect any arrival times computed from these data. Largely this means it is only going to affect plotting of archives or adding/comparason of observations between observatories.

The tempo1 emulation polyco code is not affected.

The phase computed directly by tempo2 (i.e. not using a predictor) is not affected.

The par files produced by tempo2 do have correct TZR parameters, they are just incorrectly interpreted by the code that generates predictors.

Details:

The suspect code is in cheby2d_int.C

psr->obsn[0].sat = psr->param[param_tzrmjd].val[0];
psr->obsn[0].freq = psr->param[param_tzrfrq].val[0];
psr->obsn[0].efac = 1;
strcpy(psr->obsn[0].fname,"reference");
strcpy(psr->obsn[0].telID,  info->model->sitename);//XXX!!!

I believe that the last line here should be

strcpy(psr->obsn[0].telID,  psr->tzrsite);

which would match the behaviour of the polyco code.

Comments (1)

  1. Log in to comment