ssapy.rvsampler

This module provides functions and classes for orbital mechanics calculations, optimization techniques, sampling methods, and orbital parameter translations.

Functions

circular_guess(arc[, indices])

Guess position and velocity from two closely spaced (in time) observations of ra/dec.

cluster_emcee_walkers(chain, lnprob, lnprior)

Down-select emcee walkers to those with the largest posterior mean.

damper(chi, damp)

Pseudo-Huber loss function.

damper_deriv(chi, damp[, derivnum])

Derivative of the pseudo-Huber loss function.

dircos(orbit, time[, obsPos, obsVel, ...])

Calculate observed direction-cosines of orbiting objects as viewed at specified times and positions.

eq2kep(eq)

Convert equinoctial orbital elements to classical Keplerian orbital elements.

norm(arr)

Compute the Euclidean norm of an array over the last axis while preserving leading axes.

normSq(arr)

Compute the squared norm of an array over the last axis while preserving leading axes.

normed(arr)

Normalize an array along the last axis to have unit length.

radec(orbit, time[, obsPos, obsVel, ...])

Calculate observed right ascension, declination, and slant range of orbiting objects as viewed at specified times and positions.

radecRateObsToRV(ra, dec, slantRange[, ...])

Convert object angles and observer position to 3D observer position

rvObsToRaDecRate(r, v[, obsPos, obsVel])

Convert object and observer position and velocity to angles.

sample_ball(p0, std[, nSample])

Produce a ball of walkers around an initial parameter value.

unitAngle3(r1, r2)

Robustly compute angle between unit vectors r1 and r2.

Classes

APrior(amean, asigma)

Gaussian prior on orbit semimajor axis a.

AreaPrior([mean, sigma])

Gaussian prior on log10(area) of object.

DirectInitializer(samples[, replace])

Directly specify initial position and velocity samples.

DistanceProjectionInitializer(arc, rho[, ...])

Initialize position and velocity from two closely spaced (in time) observations of ra/dec.

EPrior(emean, esigma)

Gaussian prior on orbit eccentricity e.

EmceeSampler(probfn, initializer[, nWalker])

A sampler built on the emcee package.

EquinoctialExEyPrior(sigma)

Gaussian prior on equinoctial ex and ey, favoring ex = ey = 0.

EquinoctialLMOptimizer(probfn, initel[, ...])

Optimizer that employs Levenberg-Marquardt least-squares fitting and fits in Kozai mean Keplerian element space.

GEOProjectionInitializer(arc[, rSigma, vSigma])

Initialize position and velocity samples by projecting an observed ra/dec into the equatorial plane and assuming a GEO statationary orbital velocity.

GaussianRVInitializer(rMean, vMean[, ...])

Generate position and velocity samples as an isotropic Gaussian distribution around an asserted position and velocity.

KeplerianPropagator()

A basic Keplerian propagator for finding the position and velocity of an orbiting object at some future or past time.

LMOptimizer(probfn, initRV[, fracstep, ...])

Optimizer that employs Levenberg-Marquardt least-squares fitting.

LMOptimizerAngular(probfn, initGuess, ...[, ...])

Optimizer that employs Levenberg-Marquardt least-squares fitting.

LeastSquaresOptimizer(probfn, initparam, ...)

Base class for LeastSquaresOptimizers

Log10AreaPrior([mean, sigma])

Gaussian prior on log10(area) of object.

MHSampler(probfn, initializer, proposer, nChain)

Generate MCMC samples using a Metropolis-Hastings sampler.

MVNormalProposal(cov)

A multivariate normal proposal distribution.

Orbit(r, v, t[, mu, propkw])

Orbital state of one or more objects.

ParamOrbitAngle(initparam, epoch, ...)

A class for translating orbital parameters in angle-based form, including conversions between angular parameters and orbit objects.

ParamOrbitEquinoctial(*args, **kwargs)

A class for translating orbital parameters in equinoctial form, including input/output transformations and conversions between parameters and orbit objects.

ParamOrbitRV(*args, **kwargs)

A class for translating orbital parameters in position-velocity (RV) form, including conversions between parameters and orbit objects.

ParamOrbitTranslator(initparam, epoch[, ...])

Class for making parameters into Orbits and vice-versa.

RPrior(rmean, rsigma)

Gaussian prior on distance from origin |r|.

RVProbability(arc, epoch[, priors, ...])

A class to manage MCMC sampling of orbits (parameterized by position and velocity at a given epoch) given some angular observations.

RVSigmaProposal(rSigma, vSigma)

Isotropic multivariate normal proposal distribution.

SGP4LMOptimizer(probfn, initel[, fracstep, ...])

Optimizer that employs Levenberg-Marquardt least-squares fitting and fits in Kozai mean Keplerian element space.

Time(val[, val2, format, scale, precision, ...])

Represent and manipulate times and dates for astronomy.

VPrior(vmean, vsigma)

Gaussian prior on velocity magnitude |v|.

Class Inheritance Diagram

Inheritance diagram of ssapy.rvsampler.APrior, ssapy.rvsampler.AreaPrior, ssapy.rvsampler.DirectInitializer, ssapy.rvsampler.DistanceProjectionInitializer, ssapy.rvsampler.EPrior, ssapy.rvsampler.EmceeSampler, ssapy.rvsampler.EquinoctialExEyPrior, ssapy.rvsampler.EquinoctialLMOptimizer, ssapy.rvsampler.GEOProjectionInitializer, ssapy.rvsampler.GaussianRVInitializer, ssapy.rvsampler.LMOptimizer, ssapy.rvsampler.LMOptimizerAngular, ssapy.rvsampler.LeastSquaresOptimizer, ssapy.rvsampler.Log10AreaPrior, ssapy.rvsampler.MHSampler, ssapy.rvsampler.MVNormalProposal, ssapy.rvsampler.ParamOrbitAngle, ssapy.rvsampler.ParamOrbitEquinoctial, ssapy.rvsampler.ParamOrbitRV, ssapy.rvsampler.ParamOrbitTranslator, ssapy.rvsampler.RPrior, ssapy.rvsampler.RVProbability, ssapy.rvsampler.RVSigmaProposal, ssapy.rvsampler.SGP4LMOptimizer, ssapy.rvsampler.VPrior