suncasa.utils.fit_planet_position

Functions

fpoly(x, np)

svdfit(xx, yy, sig, ma)

svd(a)

Compute the singular value decomposition of array.

pythag(a, b)

svbksb(uu, ww, vv, bb)

svdvar(vv, ww, ma)

fit_planet_positions(times, ras, decs[, start_time, ...])

find a fitting polynomial for an ephemeris table.

Module Contents

suncasa.utils.fit_planet_position.fpoly(x, np)[source]
suncasa.utils.fit_planet_position.svdfit(xx, yy, sig, ma)[source]
suncasa.utils.fit_planet_position.svd(a)[source]

Compute the singular value decomposition of array.

suncasa.utils.fit_planet_position.pythag(a, b)[source]
suncasa.utils.fit_planet_position.svbksb(uu, ww, vv, bb)[source]
suncasa.utils.fit_planet_position.svdvar(vv, ww, ma)[source]
suncasa.utils.fit_planet_position.fit_planet_positions(times, ras, decs, start_time=None, end_time=None, distances=None, allowed_error=0.01)[source]

find a fitting polynomial for an ephemeris table.

inputs:
times = list of times at which the ephemeris positions are

tabulated. assumed sorted in ascending order. (MJD).

ras = list of right ascensions at those times (radians). decs = list of declinations at those times (radians).

Optional inputs:

start_time = the start time of the SB (MJD). end_time = the end time of the SB (MJD). distances = list of distances at those times (AU). allowed_error = the allowed error in the fitting polynomials

for ra and dec from the tabulated values (asec).

returned is a list, first element is the return status:

0 -> success 1-7 -> Warning: did not converge to required accuracy.

1 -> right ascension only didn’t converge 2 -> declination only didn’t converge 3 -> right ascension and declination didn’t converge 4 -> distance only didn’t converge 5 -> right ascension and distance didn’t converge 6 -> declination and distance didn’t converge 7 -> none of the three converged (note that in this case the best fitted polynomials are still returned [N.B. i should return the error somewhere…].)

8 -> Error: the time range from start_time to end_time is

not completely contained in the tabulated times.

second element is the time t0 to which the polynomial is

referenced.

third element is the list of right ascension coefficients. fourth element is the list of declination coefficients. fifth element is the list of distance coefficients.

bjb nrao summer 2012