[daip] Re: SETJY question

Eric Greisen egreisen at nrao.edu
Fri Jan 6 15:56:22 EST 2006


Robert Braun writes:

 > I was looking at the source code of SETJY and am very puzzled by the 
 > calculation of known source fluxes. Although the documentation suggests 
 > that a polynomial of log(freq) is used to model log(flux) it looks as 
 > though the higher order coefficients of the polynomial are all 
 > being multipled simply by log(freq) and not log(freq), (log(freq))**2, 
 > etc. Am I going nuts, or has SETJY been broken for decades?

I am happy to say that you are going nuts - at least here.  To grab
one sample of identical forms of code

         TEMP2 = NCOEFF(1,ISRC) + DT * (NCOEFF(2,ISRC) + DT *
     *      (NCOEFF(3,ISRC) + DT * NCOEFF(4,ISRC)))

Note the ( before each of the NCOEFF's after the first and embedded
DT's with two trailing )'s at the end.  Pealing it apart

         TEMP2 = NCOEFF(1,ISRC) + DT * NCOEFF(2,ISRC) +
     *      DT * DT * NCOEFF(3,ISRC) + DT * DT * DT * NCOEFF(4,ISRC)

is clearer but involves a few extra multiplies.

Thanks for checking and asking - it is possible to get this wrong as
you well know.

Eric Greisen




More information about the Daip mailing list