Simulation

class cometsuite.simulation.Simulation(*args, **keywords)

Bases: object

A set of simulated particles and RunDynamics parameters.

Simulation(filename, [n=]) Simulation(sim, [observer=]) Simulation(**keywords)

Parameters:
filenamestring

An xyz file name from which to read particles.

nint, optional

Limit the number of particles read from filename to n.

simSimulation

A simulation to copy.

observerSolarSysObject

An observer used to project particles onto the Celestial Sphere.

cameraCamera

Project the particles onto this camera’s array.

versionstring, optional

When reading from a file, assume this version of XYZFile.

allocatebool, optional

When intializing an empty simulation, set to False to prevent the particles record array from being allocated.

verbosebool, optional

When False, feedback to the user will generally be suppressed.

**keywords

Any RunDynamics parameter, or particles.

Attributes:
parameterstuple of strings

A list of all possible RunDynamics parameters.

allowedDatatuple of strings

A list of all allowed particle data names.

unitsstring

The particle data units, as kept in the file. Note that the age attribute will be in days.

particlesnp.recarray

The particle data.

observerSolarSysObject

The observer used to project particles onto the sky.

sky_coordsProjection

The particles projected onto the sky for observer.

array_coordsnp.recarray

The particles projected onto a camera array.

The following attributes directly correspond to those found in
RunDynamics parameter files:

comet, kernel, jd, xyzfile, labelprefix (corrsponds to label), pfunc, tol, planets, planetlookup, closeapproaches, box, ltt, save, synbeta (corresponds to beta), ndays, steps, orbit, nparticles, units, data

label and beta were renamed to allow these attributes to be used for the saved data.

Attributes taken from the particle data:

radius, graindensity, beta, age, origin, v_ej, r_i, v_i, t_i, r_f, v_f, t_f, label

Attributes generated on the fly:

s_ej - ejection speed [km/s] s_i - initial speed [km/s] s_f - final speed [km/s] d_i - initial heliocentric distance [km] d_f - final heliocentric distance [km] d - target-particle distance [km] rh_i - initial heliocentric distance [AU] rh, rh_f - final heliocentric distance [AU] r_c - comet heliocentric coordinates [km] m - mass [g] cs - cross section [cm^2] xyz_heder - A header for XYZFile.

Attributes taken from `sky_coords` (see `Projection` for details):

lam, bet, dlam, dbet (from offset), theta, rho, phi, Delta

Attributes taken from `array_coords`: x, y

Attributes Summary

Delta

Particle-observer distance.

age

allowedData

bet

Sky coordinate 1: Dec/beta/etc.

beta

cs

Cross section (cm^2).

d

Target-particle distance (km).

d_f

Final Sun-particle distance (km).

d_i

Initial Sun-particle distance (km).

dbet

Sky coordinate 1 (Dec/beta/etc.) offset from target.

dlam

Sky coordinate 0 (RA/lambda/etc.) offset from target.

graindensity

label

lam

Sky coordinate 0: RA/lambda/etc.

m

Mass (g).

origin

phi

Projected position angle from target, CCW from dlam, dbet = (0, 1).

r_c

Comet heliocentric coordintes at time of observation.

r_f

r_i

radius

rh

Final heliocentric distance (AU).

rh_f

Final heliocentric distance (AU).

rh_i

Initial heliocentric distance (AU).

rho

Projected distance from target.

s_ej

Ejection speed (km/s).

s_f

Final speed (km/s).

s_i

Initial speed (km/s).

t_f

t_i

theta

Angular distance from target.

v_ej

v_f

v_i

x

Array coordinate x.

y

Array coordinate y.

Methods Summary

init_particles()

Initialize the particle record array.

observe()

Observe the particles with the observer..

Attributes Documentation

Delta

Particle-observer distance. [km]

age
allowedData = ('radius', 'graindensity', 'beta', 'age', 'origin', 'v_ej', 'r_i', 'v_i', 't_i', 'r_f', 'v_f', 't_f', 'label')
bet

Sky coordinate 1: Dec/beta/etc. [degrees].

beta
cs

Cross section (cm^2).

d

Target-particle distance (km).

d_f

Final Sun-particle distance (km).

d_i

Initial Sun-particle distance (km).

dbet

Sky coordinate 1 (Dec/beta/etc.) offset from target.

dlam

Sky coordinate 0 (RA/lambda/etc.) offset from target.

graindensity
label
lam

Sky coordinate 0: RA/lambda/etc. [degrees]

m

Mass (g).

origin
phi

Projected position angle from target, CCW from dlam, dbet = (0, 1).

r_c

Comet heliocentric coordintes at time of observation.

r_f
r_i
radius
rh

Final heliocentric distance (AU).

rh_f

Final heliocentric distance (AU).

rh_i

Initial heliocentric distance (AU).

rho

Projected distance from target.

s_ej

Ejection speed (km/s).

s_f

Final speed (km/s).

s_i

Initial speed (km/s).

t_f
t_i
theta

Angular distance from target.

v_ej
v_f
v_i
x

Array coordinate x. [pixels]

y

Array coordinate y. [pixels]

Methods Documentation

init_particles()

Initialize the particle record array.

The length of the array is based on params[‘particles’]. The columns are from params[‘save’].

Parameters:
None
Returns:
None
observe()

Observe the particles with the observer..

Use to force an update to sky_coords.

Parameters:
None
Returns:
None