EXOSIMS.Observatory package
Submodules
EXOSIMS.Observatory.ObservatoryL2Halo module
- class EXOSIMS.Observatory.ObservatoryL2Halo.ObservatoryL2Halo(equinox=60575.25, haloStartTime=0, orbit_datapath=None, **specs)[source]
Bases:
ObservatoryObservatory at L2 implementation. The orbit method from the Observatory prototype is overloaded to implement a space telescope on a halo orbit about the Sun-Earth L2 point. This class
Orbit is stored in pickled dictionary on disk (generated by MATLAB code adapted from E. Kolemen (2008). Describes approx. 6 month halo which is then patched for the entire mission duration).
- eclip2rot(TL, sInd, currentTime)[source]
Rotates star position vectors from ecliptic to rotating frame in CRTBP
This method returns a star’s position vector in the rotating frame of the Circular Restricted Three Body Problem.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer) – Integer index of the star of interest
currentTime (astropy Time) – Current absolute mission time in MJD
- Returns:
Star position vector in rotating frame in units of AU
- Return type:
astropy Quantity 1x3 array
- equationsOfMotion_CRTBP(t, state)[source]
Equations of motion of the CRTBP with Solar Radiation Pressure
Equations of motion for the Circular Restricted Three Body Problem (CRTBP). First order form of the equations for integration, returns 3 velocities and 3 accelerations in (x,y,z) rotating frame. All parameters are normalized so that time = 2*pi sidereal year. Distances are normalized to 1AU. Coordinates are taken in a rotating frame centered at the center of mass of the two primary bodies. Pitch angle of the starshade with respect to the Sun is assumed to be 60 degrees, meaning the 1/2 of the starshade cross sectional area is always facing the Sun on average
- Parameters:
t (float) – Times in normalized units
state (float 6xn array) – State vector consisting of stacked position and velocity vectors in normalized units
- Returns:
First derivative of the state vector consisting of stacked velocity and acceleration vectors in normalized units
- Return type:
float 6xn array
- haloPosition(currentTime)[source]
Finds orbit positions of spacecraft in a halo orbit in rotating frame
This method returns the telescope L2 Halo orbit position vector in an ecliptic, rotating frame as dictated by the Circular Restricted Three Body-Problem. The origin of this frame is the centroid of the Sun and Earth-Moon system.
- Parameters:
currentTime (astropy Time array) – Current absolute mission time in MJD
- Returns:
Observatory orbit positions vector in an ecliptic, rotating frame in units of AU
- Return type:
astropy Quantity nx3 array
- haloVelocity(currentTime)[source]
Finds orbit velocity of spacecraft in a halo orbit in rotating frame
This method returns the telescope L2 Halo orbit velocity vector in an ecliptic, rotating frame as dictated by the Circular Restricted Three Body-Problem.
- Parameters:
currentTime (astropy Time array) – Current absolute mission time in MJD
- Returns:
Observatory orbit velocity vector in an ecliptic, rotating frame in units of AU/year
- Return type:
astropy Quantity nx3 array
- inert2rotV(rR, vI, t_norm)[source]
Convert velocity from inertial frame to rotating frame
- Parameters:
rR (float nx3 array) – Rotating frame position vectors
vI (float nx3 array) – Inertial frame velocity vectors
t_norm (float) – Normalized time units for current epoch
- Returns:
Rotating frame velocity vectors
- Return type:
float nx3 array
- integrate(s0, t)[source]
Integrates motion in the CRTBP given initial conditions
This method returns a star’s position vector in the rotating frame of the Circular Restricted Three Body Problem.
- Parameters:
s0 (float 1x6 array) – Initial state vector consisting of stacked position and velocity vectors in normalized units
t (float) – Times in normalized units
- Returns:
State vector consisting of stacked position and velocity vectors in normalized units
- Return type:
float nx6 array
- jacobian_CRTBP(t, s)[source]
Equations of motion of the CRTBP
Equations of motion for the Circular Restricted Three Body Problem (CRTBP). First order form of the equations for integration, returns 3 velocities and 3 accelerations in (x,y,z) rotating frame. All parameters are normalized so that time = 2*pi sidereal year. Distances are normalized to 1AU. Coordinates are taken in a rotating frame centered at the center of mass of the two primary bodies
- Parameters:
t (float) – Times in normalized units
s (float nx6 array) – State vector consisting of stacked position and velocity vectors in normalized units
- Returns:
Jacobian matrix of the state vector in normalized units
- Return type:
float nx6x6 array
- lookVectors(TL, N1, N2, tA, tB)[source]
Finds star angular separations relative to the halo orbit positions
This method returns the angular separation relative to the telescope on its halo orbit in the rotating frame of the CRTBP problem.
- Parameters:
TL (TargetList module) – TargetList class object
N1 (integer) – Integer index of the most recently observed star
N2 (integer) – Integer index of the next star of interest
tA (astropy Time) – Current absolute mission time in MJD
tB (astropy Time array) – Time at which next star observation begins in MJD
- Returns:
- float:
Angular separation between two target stars
- float 3 array:
Unit vector point from telescope to star 1
- float 3 array:
Unit vector point from telescope to star 2
- float 3 array:
Position of telescope
- Return type:
- orbit(currentTime, eclip=False)[source]
Finds observatory orbit positions vector in heliocentric equatorial (default) or ecliptic frame for current time (MJD).
This method returns the telescope L2 Halo orbit position vector.
- Parameters:
currentTime (astropy Time array) – Current absolute mission time in MJD
eclip (boolean) – Boolean used to switch to heliocentric ecliptic frame. Defaults to False, corresponding to heliocentric equatorial frame.
- Returns:
Observatory orbit positions vector in heliocentric equatorial (default) or ecliptic frame in units of AU
- Return type:
astropy Quantity nx3 array
Note: Use eclip=True to get ecliptic coordinates.
- rot2inertV(rR, vR, t_norm)[source]
Convert velocity from rotating frame to inertial frame
- Parameters:
rR (float nx3 array) – Rotating frame position vectors
vR (float nx3 array) – Rotating frame velocity vectors
t_norm (float) – Normalized time units for current epoch
- Returns:
Inertial frame velocity vectors
- Return type:
float nx3 array
EXOSIMS.Observatory.SotoStarshade module
- class EXOSIMS.Observatory.SotoStarshade.SotoStarshade(orbit_datapath=None, f_nStars=10, **specs)[source]
Bases:
ObservatoryL2HaloStarShade Observatory class This class is implemented at L2 and contains all variables, functions, and integrators to calculate occulter dynamics.
- boundary_conditions(rA, rB)[source]
Creates boundary conditions for solving a boundary value problem
This method returns the boundary conditions for the starshade transfer trajectory between the lines of sight of two different stars. Point A corresponds to the starshade alignment with star A; Point B, with star B.
- Parameters:
rA (float 1x3 ndarray) – Starshade position vector aligned with current star of interest
rB (float 1x3 ndarray) – Starshade position vector aligned with next star of interest
- Returns:
Star position vector in rotating frame in units of AU
- Return type:
float 1x6 ndarray
- calculate_dV(TL, old_sInd, sInds, sd, slewTimes, tmpCurrentTimeAbs)[source]
Finds the change in velocity needed to transfer to a new star line of sight
This method sums the total delta-V needed to transfer from one star line of sight to another. It determines the change in velocity to move from one station-keeping orbit to a transfer orbit at the current time, then from the transfer orbit to the next station-keeping orbit at currentTime + dt. Station-keeping orbits are modeled as discrete boundary value problems. This method can handle multiple indeces for the next target stars and calculates the dVs of each trajectory from the same starting star.
- Parameters:
- Returns:
Delta-V values in units of length/time
- Return type:
- calculate_slewTimes(TL, old_sInd, sInds, sd, obsTimes, tmpCurrentTimeAbs)[source]
Finds slew times and separation angles between target stars
This method determines the slew times of an occulter spacecraft needed to transfer from one star’s line of sight to all others in a given target list.
- Parameters:
- Returns:
Time to transfer to new star line of sight in units of days
- Return type:
- generate_dVMap(TL, old_sInd, sInds, currentTime)[source]
Creates dV map for an occulter slewing between targets.
This method returns a 2D array of the dV needed for an occulter to slew between all the different stars on the target list. The dV map is calculated relative to a reference star and the stars are ordered by their angular separation from the reference star (X-axis). The Y-axis represents the time of flight (“slew time”) for a trajectory between two stars.
- Parameters:
TL (TargetList module) – TargetList class object
old_sInd (integer) – Integer index of the last star of interest
sInds (integer ndarray) – Integer indices of the stars of interest
currentTime (astropy Time array) – Current absolute mission time in MJD
- Returns:
- dVMap (float ndarray):
Map of dV needed to transfer from a reference star to another. Each ordered pair (psi,t) of the dV map corresponds to a trajectory to a star an angular distance psi away with flight time of t. units of (m/s)
- angles (float ndarray):
Range of angles (in deg) used in dVMap as the X-axis
- dt (float ndarray):
Range of slew times (in days) used in dVMap as the Y-axis
- Return type:
- impulsiveSlew_dV(dt, TL, nA, N, tA)[source]
Finds the change in velocity needed to transfer to a new star line of sight
This method sums the total delta-V needed to transfer from one star line of sight to another. It determines the change in velocity to move from one station-keeping orbit to a transfer orbit at the current time, then from the transfer orbit to the next station-keeping orbit at currentTime + dt. Station-keeping orbits are modeled as discrete boundary value problems. This method can handle multiple indeces for the next target stars and calculates the dVs of each trajectory from the same starting star.
- Parameters:
dt (float 1x1 ndarray) – Number of days corresponding to starshade slew time
TL (float 1x3 ndarray) – TargetList class object
nA (integer) – Integer index of the current star of interest
N (integer) – Integer index of the next star(s) of interest
tA (astropy Time array) – Current absolute mission time in MJD
- Returns:
State vectors in rotating frame in normalized units
- Return type:
float nx6 ndarray
- log_occulterResults(DRM, slewTimes, sInd, sd, dV)[source]
Updates the given DRM to include occulter values and results
- Parameters:
DRM (dict) – Design Reference Mission, contains the results of one complete observation (detection and characterization)
slewTimes (astropy Quantity) – Time to transfer to new star line of sight in units of days
sInd (integer) – Integer index of the star of interest
sd (astropy Quantity) – Angular separation between stars in rad
dV (astropy Quantity) – Delta-V used to transfer to new star line of sight in units of m/s
- Returns:
Design Reference Mission dicitonary, contains the results of one complete observation (detection and characterization)
- Return type:
- minimize_fuelUsage(TL, nA, nB, tA)[source]
Minimizes the fuel usage of a starshade transferring to a new star line of sight
This method uses scipy’s optimization module to minimize the fuel usage for a starshade transferring between one star’s line of sight to another’s. The total slew time for the transfer is bounded with some dt_min and dt_max.
- Parameters:
TL (float 1x3 ndarray) – TargetList class object
nA (integer) – Integer index of the current star of interest
nB (integer) – Integer index of the next star of interest
tA (astropy Time array) – Current absolute mission time in MJD
- Returns:
- opt_slewTime (float):
Optimal slew time in days for starshade transfer to a new line of sight
- opt_dV (float):
Optimal total change in velocity in m/s for starshade line of sight transfer
- Return type:
- minimize_slewTimes(TL, nA, nB, tA)[source]
Minimizes the slew time for a starshade transferring to a new star line of sight
This method uses scipy’s optimization module to minimize the slew time for a starshade transferring between one star’s line of sight to another’s under the constraint that the total change in velocity cannot exceed more than a certain percentage of the total fuel on board the starshade.
- Parameters:
TL (float 1x3 ndarray) – TargetList class object
nA (integer) – Integer index of the current star of interest
nB (integer) – Integer index of the next star of interest
tA (astropy Time array) – Current absolute mission time in MJD
- Returns:
- opt_slewTime (float):
Optimal slew time in days for starshade transfer to a new line of sight
- opt_dV (float):
Optimal total change in velocity in m/s for starshade line of sight transfer
- Return type:
- send_it(TL, nA, nB, tA, tB)[source]
Solves boundary value problem between starshade star alignments
This method solves the boundary value problem for starshade star alignments with two given stars at times tA and tB. It uses scipy’s solve_bvp method.
- Parameters:
TL (float 1x3 ndarray) – TargetList class object
nA (integer) – Integer index of the current star of interest
nB (integer) – Integer index of the next star of interest
tA (astropy Time array) – Current absolute mission time in MJD
tB (astropy Time array) – Absolute mission time for next star alignment in MJD
- Returns:
State vectors in rotating frame in normalized units
- Return type:
float nx6 ndarray
EXOSIMS.Observatory.SotoStarshade_ContThrust module
- class EXOSIMS.Observatory.SotoStarshade_ContThrust.SotoStarshade_ContThrust(orbit_datapath=None, **specs)[source]
Bases:
SotoStarshade_SKiStarShade Observatory class This class is implemented at L2 and contains all variables, functions, and integrators to calculate occulter dynamics.
- DCM_i2r(t)[source]
Direction cosine matrix to rotate from Inertial Frame to Rotating Frame
Finds rotation matrix for positions and velocities (6x6)
- Parameters:
t (float) – Rotation angle
- Returns:
rotation of full 6 dimensional state from I to R frame
- Return type:
float 6x6 array
- DCM_r2i(t)[source]
Direction cosine matrix to rotate from Rotating Frame to Inertial Frame
Finds rotation matrix for positions and velocities (6x6)
- Parameters:
t (float) – Rotation angle
- Returns:
rotation of full 6 dimensional state from R to I frame
- Return type:
float 6x6 array
- DCM_r2i_9(t)[source]
Direction cosine matrix to rotate from Rotating Frame to Inertial Frame
Finds rotation matrix for positions, velocities, and accelerations (9x9)
- Parameters:
t (float) – Rotation angle
- Returns:
rotation of full 9 dimensional state from R to I frame
- Return type:
float 9x9 array
- EoM_Adjoint(t, state, constrained=False, amax=False, integrate=False)[source]
Equations of Motion with costate vectors
Equations of motion for CR3BP with costates for control.
- Parameters:
- Returns:
The time derivatives of the states and costates.
- Return type:
array
- boundary_conditions_thruster(sA, sB, constrained=False)[source]
Creates boundary conditions for solving a boundary value problem
Function used in scipy solve_bvp function call. Returns residuals
- Parameters:
sA (6 or 7 array) – To be compared with the initial state for boundary condition.
sB (6 or 7 array) – To be compared with the final state for boundary condition.
constrained (boolean) – Whether there are 6 (false) or 7 (true) boundary conditions.
- Returns:
Returns the residuals of the boundary conditions/constraint equation.
- Return type:
array
- calculate_dMmap(TL, tA, dtRange, filename)[source]
Calculates change in mass for transfers of various times and angular distances
These are stored in a cache .dmmap file.
- Parameters:
TL (TargetList module) – Target list of stars
tA (astropy Time array) – Initial absolute mission time in MJD
dtRange (astropy Time array) – Transfer times to try
filename (string) – File name to store the cached data.
- calculate_dMmap_collocate(TL, tA, dtRange, filename)[source]
Calculates change in mass for transfers of various times and angular distances
These are stored in a cache .dmmap file. Only collocation without the single shooting.
- Parameters:
TL (TargetList module) – Target list of stars
tA (astropy Time array) – Initial absolute mission time in MJD
dtRange (astropy Time array) – Transfer times to try
filename (string) – File name to store the cached data.
- calculate_dMmap_collocateEnergy(TL, tA, dtRange, filename, m0=1, seed=0)[source]
Calculates change in mass for transfers of various times and angular distances
These are stored in a cache .dmmap file. Only minimum energy collocation is used.
- Parameters:
TL (TargetList module) – Target list of stars
tA (astropy Time array) – Initial absolute mission time in MJD
dtRange (astropy Time array) – Transfer times to try
filename (string) – File name to store the cached data.
m0 (float) – Initial mass
seed (int) – Seed random number for repeatability of experiments
- calculate_dMmap_collocateEnergy_LatLon(TL, tA, dtRange, nStars, filename, m0=1, seed=0)[source]
Calculates change in mass for transfers of various times and angular distances
These are stored in a cache .dmmap file. Only minimum energy collocation is used. All pairs between nStars random stars from the targetlist. All transfer times are used.
- Parameters:
TL (TargetList module) – Target list of stars
tA (astropy Time array) – Initial reference absolute mission time in MJD
dtRange (astropy Time array) – Transfer times to try
nStars (int) – Number of trials/combinations to perform
filename (string) – File name to store the cached data.
m0 (float) – Initial mass
seed (int) – Seed random number for repeatability of experiments
- calculate_dMmap_collocateEnergy_angSepDist(TL, tA, dtRange, nPairs, filename, m0=1, seed=0)[source]
Calculates change in mass for transfers of various times and angular distances
These are stored in a cache .dmmap file. Only minimum energy collocation is used. nPair random combinations of initial and final star are used while all transfer times are used.
- Parameters:
TL (TargetList module) – Target list of stars
tA (astropy Time array) – Initial reference absolute mission time in MJD
dtRange (astropy Time array) – Transfer times to try
nPairs (int) – Number of trials/combinations to perform
filename (string) – File name to store the cached data.
m0 (float) – Initial mass
seed (int) – Seed random number for repeatability of experiments
- calculate_dMsols_collocateEnergy(TL, tStart, tArange, dtRange, N, filename, m0=1, seed=0)[source]
Calculates change in mass for transfers of various times and angular distances
These are stored in a cache .dmmap file. Only minimum energy collocation is used. N random combinations of starting times, transfer times, and initial, and final stars are used.
- Parameters:
TL (TargetList module) – Target list of stars
tStart (astropy Time array) – Initial reference absolute mission time in MJD
tArange (astropy Time array) – Potential times to add to tStart
dtRange (astropy Time array) – Transfer times to try
N (int) – Number of trials/combinations to perform
filename (string) – File name to store the cached data.
m0 (float) – Initial mass
seed (int) – Seed random number for repeatability of experiments
- collocate_Trajectory(TL, nA, nB, tA, dt)[source]
Solves minimum energy and minimum fuel cases for continuous thrust
- Parameters:
- Returns:
- ~numpy.ndarray:
Trajectory
- ~numpy.ndarray:
Times corresponding to trajectory
- float:
last epsilon that fully converged (2 if minimum energy didn’t work) Parameterizes minimum energy to minimum fuel solution.
- ~astropy.units.quantity.Quantity:
Range of thrusts (Newtons) considered.
- Return type:
- collocate_Trajectory_minEnergy(TL, nA, nB, tA, dt, m0=1)[source]
Solves minimum energy and minimum fuel cases for continuous thrust
- Parameters:
- Returns:
- ~numpy.ndarray:
Trajectory
- ~numpy.ndarray:
Times corresponding to trajectory
- float:
last epsilon that fully converged (2 if minimum energy didn’t work) Parameterizes minimum energy to minimum fuel solution.
- ~astropy.units.quantity.Quantity:
Range of thrusts (Newtons) considered.
- Return type:
- conFun_singleShoot(w, t0, tF, Tmax, returnLog=False)[source]
Objective Function for single shooting thruster
- Parameters:
- Returns:
- float:
Norm of difference between current state and boundary value
- ~numpy.ndarray:
Trajectory states
- ~astropy.time.Time(~numpy.ndarray):
Times corresponding to states
- Return type:
- determineThrottle(state)[source]
Determines throttle based on instantaneous switching function value.
Typically being used during collocation algorithms. A zero-crossing of the switching function is highly unlikely between the large number of nodes.
- Parameters:
state (float array) – State vector and lagrange multipliers
- Returns:
Throttle between 0 and 1, and in the same shape as state
- Return type:
float array
- findInitialTmax(TL, nA, nB, tA, dt, m0=1, s_init=array([], dtype=float64))[source]
Finding initial guess for starting Thrust
- Parameters:
TL (TargetList) – TargetList class object
nA (int) – The index for the starting star in the target list
nB (int) – The index for the final star in the target list
dt (Time(ndarray)) – A time step between the two voundary conditions
m0 (float) – Initial mass
s_init (ndarray) – An initial guess for the state
- Returns:
- ~astropy.units.quantity.Quantity:
The maximum initial thrust (force units).
- ~numpy.ndarray:
States from the solved bvp.
- ~numpy.ndarray:
Times at corrsponding to each state.
- Return type:
- findTmaxGrid(TL, tA, dtRange)[source]
Create grid of Tmax values using unconstrained thruster
This method is used purely for creating figures.
- integrate_thruster(sGuess, tGuess, Tmax, verbose=False)[source]
Integrates thruster trajectory with thrust case switches
This methods integrates an initial guess for the spacecraft state forwards in time. It uses event functions to find the next zero of the switching function which means a new thrust case is needed (full, medium or no thrust).
- Parameters:
- Returns:
- ~numpy.ndarray:
Trajectory states
- ~astropy.time.Time(~numpy.ndarray):
Times corresponding to states
- Return type:
- lagrangeMult()[source]
Generate a random lagrange multiplier for initial guess (6x1)
Generates an array of 6 numbers with two pairs of 3 coordinates describing position on a sphere. The first two represent the x and y positions on a sphere with random radius between 1 and 5, and the last coordinate represents the z coordinate scaled by the radius.
- minimize_TerminalState(s_best, t_best, Tmax, method)[source]
Minimizes boundary conditions for thruster
- Parameters:
s_best (array) – Initial state and costate
t_best (astropy Time array) – Times corresponding to the guess of the state at each time
Tmax (astropy force) – Maximum thrust attainable
method (string) – Optimization method for Scipy minimize call
- Returns:
- float:
Norm of difference between current state and boundary value
- array:
Trajectory states
- astropy Time array:
Times corresponding to states
- Return type:
- newStar_angularSep(TL, iStars, jStars, currentTime, dt)[source]
Finds angular separation from old star to given list of stars
This method returns the angular separation from the last observed star to all others on the given list at the currentTime. This is distinct from the prototype version of the method in its signing of the angular separation based on halo velocity direction
- Parameters:
TL (TargetList) – TargetList class object
iStars (ndarray(int)) – Integer indices of originating stars
jStars (ndarray(int)) – Integer indices of destination stars Observation times for targets.
currentTime (Time(ndarray)) – Current absolute mission time in MJD
dt (float) – Timestep in units of days for determining halo velocity frame
- Returns:
Angular separation between two target stars
- Return type:
- selectEventFunctions(s0)[source]
Selects the proper event function for integration.
This method calculates the switching function and its derivative at a single specific state. It then determines which thrust case it will be in: full, medium, or no thrust. If the value of the switching function is within a certain tolerance of the boundaries, it uses the derivative to determine the direction it is heading in. Then the proper event functions are created for the integrator to determine the next crossing (i.e. the next case change).
- Parameters:
s0 (float array) – Iniitial state vector and lagrange multipliers
- Returns:
- function list:
A list of functions which are the switching function adjusted by 1e-10. These take in an unused first parameter, and then the state. Depending on the case (2), multiple functions are returned. These functions will return 0 when the switching function crosses 1e-10 or -1e-10.
- int:
An integer 0,1,2 representing whether the switching function of the initial state is within a 1e-10 tolerance of the of zero (2), less than -1e-10 (1), or greater than 1e-10 (0).
- Return type:
- selectPairsOfStars(TL, nPairs, currentTime, dt, nSamples)[source]
Rejection sampling of star pairings using desired distribution and sampling from that final distribution
- Parameters:
TL (TargetList module) – TargetList class object
nPairs (int) – Number of pairs to produce
currentTime (astropy Time array) – Current absolute mission time in MJD
dt (float) – Timestep in units of days for determining halo velocity frame
nSamples (int) – Number of samples to be used when generating random stars for pairing
- Returns:
- int list:
The list of indices corresponding to starting stars in TargetList
- int list:
The list of indices corresponding to the ending stars in TargetList
- float array:
Angular distance between pairs from iFinal and jFinal
- Return type:
- send_it_thruster(sGuess, tGuess, aMax=False, constrained=False, m0=1, maxNodes=100000.0, verbose=False)[source]
Solving generic bvp from t0 to tF using states and costates
Uses the Scipy solve_bvp method.
- Parameters:
sGuess (array) – Initial state and costate guess
tGuess (astropy Time array) – Times corresponding to the guess of the state at each time
aMax (astropy Newton or boolean) – Maximum attainable acceleration
constrained (boolean) – Flag for whether this is constrained or unconstrained problem This determines dimensions of the state inputs.
m0 (float) – Initial mass
maxNodes (int) – Maximum number of nodes to use in the BVP problem solution
verbose (boolean) – Flag passed to solve_bvp
- Returns:
- array:
State and costate at the various mesh times
- array:
Corresponding times to the sampled states.
- boolean:
Status returned by the bvp_solve method
- Return type:
- singleShoot_Trajectory(stateLog, timeLog, e_best, TmaxRange, method='SLSQP')[source]
Perform single shooting to solve the boundary value problem.
- Parameters:
stateLog (array) – Approximate trajectory typically determined by collocation
timeLog (astropy Time array) – Corresponging time values for the trajectory
e_best (float) – Epsilon value corresponding to previous approxmiate trajectory
TmaxRange (astropy Newton array) – Range of thrusts (Newtons) considered.
method (string) – Optimization method for Scipy minimize call
- Returns:
- array:
Trajectory states
- astropy Time array:
Times corresponding to states
- float:
Epsilon value determining how fuel vs energy optimal the trajectory is.
- Return type:
- star_angularSepDesiredDist(psiPop, nSamples=1000000.0, angBinSize=3)[source]
Rejection sample from psiPop to achieve nSamples fitting logistic distribution
- Parameters:
- Returns:
- array float:
Angles (nSamples) fitting the logistic distribution
- array int:
An array of indices of original psiPop that were accepted
- Return type:
- starshadeBoundaryVelocity(TL, sInd, currentTime, SRP=True)[source]
Calculates starshade and telescope velocities in R- or I-frames during stationkeeping
Calculates the rotating system position and velocity of the starshade at insertion into the optimal initial state for observation of the given star.
- Parameters:
TL (TargetList module) – Target List
sInd (int) – Index of star for observation in the target list
currentTime (astropy Time array) – Current absolute mission time in MJD
SRP (boolean) – Whether or not solar radiation pressure should be used in calculating the insertion state for optimal starshade stationkeeping observation position.
- Returns:
- array:
Position in the rotating frame
- array:
Velocity in the rotating frame
- Return type:
- switchingFunction(state)[source]
Evaluates the switching function at specific states.
- Parameters:
state (float array) – State vector and lagrange multipliers
- Returns:
Value of the switching function
- Return type:
EXOSIMS.Observatory.SotoStarshade_SKi module
- class EXOSIMS.Observatory.SotoStarshade_SKi.SotoStarshade_SKi(latDist=0.9, latDistOuter=0.95, latDistFull=1, axlDist=250, **specs)[source]
Bases:
SotoStarshadeStarShade Observatory class
This class is implemented at L2 and contains all variables, functions, and integrators to calculate occulter dynamics.
- Bframe(TL, sInd, currentTime, tRange=array([0]))[source]
Calculates unit vectors defining B-frame of telescope
The B-frame is placed at the inertial location of the telescope on its halo orbit. The third axis points directly towards the target star sInd. The second axis, by our definition, points parallel to the ecliptic plane of the Sun-Earth.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
currentTime (astropy Time array) – Current absolute mission time in MJD
tRange (float ndarray) – Array of times relative to currentTime to calculate values. The array has size m
- Returns:
- b1_I (float 3xm numpy.ndarray):
First axis B-frame unit vector for each time in dimension m
- b2_I (float 3xm numpy.ndarray):
Second axis B-frame unit vector for each time in dimension m
- b3_I (float 3xm numpy.ndarray):
Third axis B-frame unit vector for each time in dimension m. This one points towards the star sInd
- Return type:
- EulerAngleAndDerivatives(TL, sInd, currentTime, tRange=array([0]))[source]
Calculates Euler angles and rates for LOS from telescope to star sInd
This method calculates Euler angles defining the line of sight (LOS) from the telescope to some star sInd in the target list TL. The Euler angles are defined relative to some B-frame placed at the inertial location of the telescope on its halo orbit. Derivatives of the Euler angles, representing slewing rates of the LOS, are also calculated.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
currentTime (astropy Time array) – Current absolute mission time in MJD
tRange (float ndarray) – Array of times relative to currentTime to calculate values. The array has size m
- Returns:
- theta (float m numpy.ndarray):
Azimuthal angle to define star LOS in rad
- phi (float m numpy.ndarray):
Polar angle to define star LOS in rad
- dtheta (float m numpy.ndarray):
Azimuthal angle to define star LOS in canonical units
- dphi (float m numpy.ndarray):
Polar angle to define star LOS in canonical units
- Return type:
- SRPforce(TL, sInd, currentTime, tRange, radius=36)[source]
Solar radiation pressure force for starshade
This method calculate the solar radiation pressure force on a starshade on a nominal trajectory aligned with some star sInd from the target list TL.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
currentTime (astropy Time array) – Current absolute mission time in MJD
tRange (float ndarray) – Array of times relative to currentTime to calculate values. The array has size m
radius (float array) – Radius of the starshade in meter
- Returns:
Solar radiation pressure force in canonical units
- Return type:
f_SRP (float 6xn array)
- convertAcc_to_canonical(dimAcc)[source]
Convert array of accelerations from dimensional units to canonical units
Method converts the accelerationss inside the array from the given dimensional unit (doesn’t matter which, it converts to units of au/yr^2 in an intermediate step) into canonical units of the CR3BP.
- Parameters:
dimAcc (float numpy.ndarray) – Array of accelerations in some acceleration unit
- Returns:
Array of accelerations in canonical units
- Return type:
canonicalAcc (float numpy.ndarray)
- convertAcc_to_dim(canonicalAcc)[source]
Convert array of accelerations from canonical units to dimensional units
Method converts the accelerations inside the array from canonical units of the CR3BP into units of au/yr^2.
- Parameters:
canonicalAcc (float numpy.ndarray) – Array of accelerations in canonical units
- Returns:
Array of accelerations in units of AU/yr^2
- Return type:
dimAcc (float numpy.ndarray)
- convertAngAcc_to_canonical(dimAngAcc)[source]
Convert array of angular accelerations from dimensional units to canonical units
Method converts the angular accelerationss inside the array from the given dimensional unit (doesn’t matter which, it converts to units of rad/yr^2 in an intermediate step) into canonical units of the CR3BP.
- Parameters:
dimAngAcc (float numpy.ndarray) – Array of angular accelerations in some angular acceleration unit
- Returns:
Array of angular accelerations in canonical units
- Return type:
canonicalAngAcc (float numpy.ndarray)
- convertAngAcc_to_dim(canonicalAngAcc)[source]
Convert array of angular accelerations from canonical units to dimensional units
Method converts the angular accelerations inside the array from canonical units of the CR3BP into units of rad/yr^2.
- Parameters:
canonicalAngAcc (float numpy.ndarray) – Array of accelerations in canonical units
- Returns:
Array of accelerations in units of rad/yr^2
- Return type:
dimAngAcc (float numpy.ndarray)
- convertAngVel_to_canonical(dimAngVel)[source]
Convert array of angular velocities from dimensional units to canonical units
Method converts the angular velocities inside the array from the given dimensional unit (doesn’t matter which, it converts to units of rad/yr in an intermediate step) into canonical units of the CR3BP.
- Parameters:
dimAngVel (float numpy.ndarray) – Array of angular velocities in some angular velocity unit
- Returns:
Array of angular velocities in canonical units
- Return type:
canonicalAngVel (float numpy.ndarray)
- convertAngVel_to_dim(canonicalAngVel)[source]
Convert array of angular velocities from canonical units to dimensional units
Method converts the angular velocities inside the array from canonical units of the CR3BP into units of rad/yr.
- Parameters:
canonicalAngVel (float numpy.ndarray) – Array of angular velocities in canonical units
- Returns:
Array of angular velocities in units of rad/yr
- Return type:
dimAngVel (float numpy.ndarray)
- convertPos_to_canonical(dimPos)[source]
Convert array of positions from dimensional units to canonical units
Method converts the positions inside the array from the given dimensional unit (doesn’t matter which, it converts to units of AU in an intermediate step) into canonical units of the CR3BP. 1 au = 1 DU where DU are the canonical position units.
- Parameters:
dimPos (float numpy.ndarray) – Array of positions in some distance unit
- Returns:
Array of distance in canonical units
- Return type:
canonicalPos (float numpy.ndarray)
- convertPos_to_dim(canonicalPos)[source]
Convert array of positions from canonical units to dimensional units
Method converts the positions inside the array from canonical units of the CR3BP into units of AU.
- Parameters:
canonicalPos (float numpy.ndarray) – Array of distance in canonical units
- Returns:
Array of positions in units of AU
- Return type:
dimPos (float numpy.ndarray)
- convertTime_to_canonical(dimTime)[source]
Convert array of times from dimensional units to canonical units
Method converts the times inside the array from the given dimensional unit (doesn’t matter which, it converts to units of years in an intermediate step) into canonical units of the CR3BP. 1 yr = 2 pi TU where TU are the canonical time units.
- Parameters:
dimTime (float numpy.ndarray) – Array of times in some time unit
- Returns:
Array of times in canonical units
- Return type:
canonicalTime (float numpy.ndarray)
- convertTime_to_dim(canonicalTime)[source]
Convert array of times from canonical units to unit of years
Method converts the times inside the array from canonical units of the CR3BP into year units. 1 yr = 2 pi TU where TU are the canonical time units.
- Parameters:
canonicalTime (float numpy.ndarray) – Array of times in canonical units
- Returns:
Array of times in units of years
- Return type:
dimTime (float numpy.ndarray)
- convertVel_to_canonical(dimVel)[source]
Convert array of velocities from dimensional units to canonical units
Method converts the velocities inside the array from the given dimensional unit (doesn’t matter which, it converts to units of AU/yr in an intermediate step) into canonical units of the CR3BP.
- Parameters:
dimVel (float numpy.ndarray)) – Array of velocities in some speed unit
- Returns:
Array of velocities in canonical units
- Return type:
canonicalVel (float numpy.ndarray))
- convertVel_to_dim(canonicalVel)[source]
Convert array of velocities from canonical units to dimensional units
Method converts the velocities inside the array from canonical units of the CR3BP into units of AU/yr.
- Parameters:
canonicalVel (float numpy.ndarray) – Array of velocities in canonical units
- Returns:
Array of velocities in units of AU/yr
- Return type:
dimVel (float numpy.ndarray)
- crossThreshholdEvent(t, s, TL, sInd, trajStartTime, latDist, SRP=False, Moon=False)[source]
Event function for when starshade crosses deadbanding limit
This method is used as an event function in solve_ivp and returns the current distance of the starshade centroid from the lateral deadbanding limit for observations. Takes an input latDist which can be changed if the user selects inner and outer thresholds.
- Parameters:
t (float) – Times in normalized units
s (float 6xn array) – State vector consisting of stacked position and velocity vectors in normalized units
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
trajStartTime (astropy Time array) – Current absolute mission time in MJD
latDist (float Quantity) – The lateral deadbanding boundary for observations in meters
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
- Returns:
Distance from the deadbanding radius
- Return type:
distanceFromLim (float)
- drift(TL, sInd, trajStartTime, dt=<Quantity 20. min>, freshStart=True, s0=None, fullSol=False, SRP=False, Moon=False)[source]
Method to simulate drift between deadbanding burns for a starshade
This method simulates drifting between deadbanding burns during a starshade observation. Creates event functions for lateral deadbanding threshold crossings, both with inner and outer thresholds. Integrates relative equations of motion until event is triggered and resolves that event to see where the crossing happened.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
trajStartTime (astropy Time array) – Current absolute mission time in MJD
dt (float Quantity) – The initial guess for lateral drift time in minutes
freshStart (bool) – Toggles whether starshade starts at the optimal initial point if True or at some given s0 if False
s0 (float 6 ndarray) – The initial state of the drift, set to None as default. Given in canonical units and in I-frame components
fullSol (bool) – Optional flag, default False, set True to return additional information Returns full state solutions if True or just the crossing states
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
- Returns:
- cross (float):
Flag where 0,1,or 2 mean Tolerance Not Crossed, Lateral Cross, or Axial Cross
- driftTime (float astropy.units.Quantity):
Amount of time between threshold crossings in minutes
- t_cross (float numpy.ndarray):
Time of lateral limit crossing in canonical units. If fullSol is True, this is t_full - Full time history of drift in canonical units
- r_cross (float numpy.ndarray):
Position of lateral limit crossing in canonical units in C-frame components. If fullSol is True, this is r_full - Full position history of drift in canonical units in C-frame components
- v_cross (float numpy.ndarray):
Velocity of lateral limit crossing in canonical units in C-frame components but inertial derivatives If fullSol is True, this is v_full - Full velocity history of drift in canonical units in C-frame components but inertial derivatives
- Return type:
- equationsOfMotion_CRTBPInertial(t, state, TL, sInd, integrate=False, SRP=False, Moon=False)[source]
Equations of motion in inertial frame with CRTBP framework
Equations of motion for an object under Sun and Earth’s gravity. Forces and accelerations are framed relative to an inertial I-frame with origin at the Sun-Earth barycenter. Assumptions of the Circular Restricted Three Body Problem (CRTBP) are applied here, namely that the Earth and Sun orbit their common center of mass in circular orbits. All components and vectors are given in canonical units of the CRTBP. Two boolean inputs specify whether to add solar radiation pressure or lunar gravity as perturbation forces.
- Parameters:
t (float) – Times in normalized units
state (float 6xn array) – State vector consisting of stacked position and velocity vectors in normalized units
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
integrate (bool) – If true, output array is flattened to ensure it is proper input in solve_ivp. Typically have it set to False if using solve_bvp
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
- Returns:
First derivative of the state vector consisting of stacked velocity and acceleration vectors in normalized units
- Return type:
f_P0_I (float 6xn array)
- equationsOfMotion_aboutS(t, state, TL, sInd, trajStartTime, integrate=False, SRP=False, Moon=False)[source]
Equations of motion of starshade relative to nominal trajectory
Equations of motion for a starshade relative to the nominal trajectory, which is defined as following the LOS perfectly to a star sInd from target list TL. Motion is defined relative to the nominal point S; the offset motion is labeled as O and origin of the solar system barycenter is 0. All components are given in inertial frame components, all vector derivatives are inertial frame derivatives. Units are canonical units.
- Parameters:
t (float) – Times in normalized units
state (float 6xn array) – State vector consisting of stacked position and velocity vectors in normalized units
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
trajStartTime (astropy Time array) – Current absolute mission time in MJD
integrate (bool) – If true, output array is flattened to ensure it is proper input in solve_ivp. Typically have it set to False if using solve_bvp
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
- Returns:
First derivative of the state vector consisting of stacked relative velocity and acceleration vectors in normalized units
- Return type:
ds (float 6xn array)
- globalStationkeep(TL, trajStartTime, tau=<Quantity 0. d>, dt=<Quantity 30. min>, simTime=<Quantity 1. h>, SRP=False, Moon=False, axlBurn=True)[source]
Method to simulate global stationkeeping with all target list stars
This method simulates full observations in a loop for all stars in a target list. It logs the same metrics as the stationkeep method and saves it onto a file specified in the body of the method. This method returns nothing.
- Parameters:
TL (TargetList module) – TargetList class object
trajStartTime (astropy Time array) – Current absolute mission time in MJD
tau (float Quantity) – Time relative to trajStartTime at which to simulate observations in units of days
dt (float Quantity) – First guess of trajectory drift time in units of minutes
simTime (float Quantity) – Total simulated observation time in units of hours
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
axlBurn (bool) – Set True for purely axial burn (no dz velocity). Defaults true.
- Returns:
None
- guessAParabola(TL, sInd, trajStartTime, r_OS_C, Iv_OS_C, latDist=<Quantity 0.9 m>, fullSol=False, SRP=False, Moon=False, axlBurn=True)[source]
Method to simulate ideal starshade drift with parabolic motion
This method assumes an ideal, unperturbed trajectory in between lateral deadbanding burns. It assumes that the differential lateral force is constant throughout the entire trajectory and therefore motion is parabolic. Everything is calculated in C-frame components but I-frame derivatives.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
trajStartTime (astropy Time array) – Current absolute mission time in MJD
r_OS_C (float Quantity) – The initial guess for lateral drift time in minutes
Iv_OS_C (bool) – Toggles whether starshade starts at the optimal initial point if True or at some given s0 if False
latDist (float 6 ndarray) – The initial state of the drift, set to None as default. Given in canonical units and in I-frame components
fullSol (bool) – Optional flag, default False, set True to return additional information:
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
axlBurn (bool) – Set True for purely axial burn (no dz velocity). Defaults true.
- Returns:
- dt_newTOF (float):
New time of flight for parabolic trajectory in canonical units of CRTBP
- Iv_PS_C_newIC (float 3 numpy.ndarray):
New velocity of parabolic trajectory (P) relative to nominal starshade (S) starting at previous lateral burn in canonical units of CRTBP
- dv_dim (float numpy.ndarray):
Delta-v of initial lateral burn in dimensional units of m/s
- r_PS_C (float ndarray):
Full time history of drift in canonical units (just x-y plane of the C-frame in canonical units of CRTBP). Only returned if fullSol is True.
- Return type:
- lunarPerturbation(TL, sInd, currentTime, tRange, nodalRegression=True)[source]
Lunar gravity force for starshade
This method calculates the lunar gravity force on a starshade on a nominal trajectory aligned with some star sInd from the target list TL. Assumes a perfectly circular lunar orbit about the Earth which is inclined at 5.15 degrees from the ecliptic plane and has a period of 29.53 days. We also include precession of the lunar nodes when calculating the lunar position.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
currentTime (astropy Time array) – Current absolute mission time in MJD
tRange (float ndarray) – Array of times relative to currentTime to calculate values. The array has size m
nodalRegression (bool) – Dummy input
- Returns:
Lunar gravity force in canonical units
- Return type:
f_Moon (float 6xn array)
- rotateComponents2NewFrame(TL, sInd, trajStartTime, s_int, t_int, final_frame='C', SRP=False, Moon=False)[source]
Rotates state vector at different times into an ideal dynamics frame
We introduce a new frame (the C-frame) rotated from the B-frame by an angle psi. Psi is found through the self.starshadeIdealDynamics. The C-frame is defined so that the lateral component of the differential force on the starshade always points down (in the -c2 direction). This method rotates a state vector s_int at every given respective time t_int.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
trajStartTime (astropy Time array) – Current absolute mission time in MJD
s_int (float 6xn array) – Array of n state vectors with inertial velocities. Components are given in canonical units and are in either I-frame or C-frame.
t_int (float numpy.ndarray) – Array of times for each of the n state vectors in s_int given in canonical units
final_frame (string) – String entry that rotates states to the C-frame if input is ‘C’ or I-frame otherwise
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
- Returns:
- Array of n position vectors rotated to frame specified by
final_frame
- Iv_f (float 3xn array):
Array of n velocity vectors rotated to frame specified by final_frame
- Return type:
r_f (float 3xn array)
- starshadeIdealDynamics(TL, sInd, currentTime, tRange=array([0]), SRP=False, Moon=False)[source]
Calculates ideal dynamics of nominal starshade positioning at LOS
This method calculates things to define ideal dynamics of a starshade under an nominal trajectory. The starshade is assumed to be on the nominal trajectory (on the LOS at some separation distance) and experiences gravity from the Sun and Earth. SRP and Moon forces can be included but are optional inputs. Method returns differential forces, the difference between the forces on the starshade and the acceleration it must have to remain on the nominal path. This difference pushes the starshade away from the nominal trajectory onto some offset trajectory.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
currentTime (astropy Time array) – Current absolute mission time in MJD
tRange (float ndarray) – Array of times relative to currentTime to calculate values. The array has size m
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
- Returns:
- The third Euler angle that completes the set. Roll angle that
rotates B frame to some new frame where lateral component of dF points in the negative 2nd axis direction
- dfL_I (float 3xm array):
Lateral component of the differential force on starshade in canonical units (lateral to LOS)
- dfA (float m array):
Axial component of the differential force on starshade in canonical units (along LOS)
- df_S0_I (float 3xm array):
Full differential force on starshade in canonical units (net force - nominal accelerations of S)
- f_S0_I (float 3xm array):
Full net force on starshade in canonical units
- Return type:
psi (float m array)
- starshadeInjectionVelocity(TL, sInd, trajStartTime, SRP=False, Moon=False)[source]
Method to find injection velocity of starshade to start observation
This method returns the ideal injection velocity and position of a starshade to begin an observation with a star sInd from target list TL. Position and velocity are given in C-frame components but I-frame derivatives.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
trajStartTime (astropy Time array) – Current absolute mission time in MJD
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
- Returns:
- New position of offset trajectory (O) relative to nominal
starshade (S) starting at previous lateral burn in canonical units of CRTBP
- Iv_OS_C_newIC (float 3 ndarray):
New velocity of offset trajectory (O) relative to nominal starshade (S) starting at previous lateral burn in canonical units of CRTBP and inertial derivatives
- Return type:
r_OS_C (float)
- starshadeKinematics(TL, sInd, currentTime, tRange=array([0]))[source]
Calculates full kinematics of nominal starshade positioning at LOS
This method calculates the full kinematics (positions, velocities, and accelerations) of the nominal starshade trajectory during an observation. The nominal trajectory is one that follows the changing LOS from telescope to star at a constant separation distance. Kinematics are given in inertial frame components and derivates are taken as inertial vector derivatives. Also returns the inertial kinematics relative to the telescope.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
currentTime (astropy Time array) – Current absolute mission time in MJD
tRange (float ndarray) – Array of times relative to currentTime to calculate values. The array has size m
- Returns:
- Nominal position (r) of starshade (S) relative to inertial frame
origin (0) given in inertial frame components (_I)
- Iv_S0_I (float 3xm array):
Nominal inertial velocity (Iv) of starshade (S) relative to inertial frame origin (0) given in inertial frame components (_I)
- Ia_S0_I (float 3xm array):
Nominal inertial acceleration (Ia) of starshade (S) relative to inertial frame origin (0) given in inertial frame components (_I)
- r_ST_I (float 3xm array):
Nominal position (r) of starshade (S) relative to telescope location (T) given in inertial frame components (_I)
- Iv_ST_I (float 3xm array):
Nominal inertial velocity (Iv) of starshade (S) relative to telescope location (T) given in inertial frame components (_I)
- Ia_ST_I (float 3xm array):
Nominal inertial acceleration (Ia) of starshade (S) relative to telescope location (T) given in inertial frame components (_I)
- Return type:
r_S0_I (float 3xm array)
- stationkeep(TL, sInd, trajStartTime, dt=<Quantity 30. min>, simTime=<Quantity 1. h>, SRP=False, Moon=False, axlBurn=True)[source]
Method to simulate full stationkeeping with a given star
This method simulates a full observation for a star sInd in target list TL. It calculates drifts in a sequence until the allotted simulation time simTime is over. It then logs various metrics including delta-v, drift times and number of thruster firings to be catalogued by the user.
- Parameters:
TL (TargetList module) – TargetList class object
sInd (integer ndarray) – Integer index of some target star
trajStartTime (astropy Time array) – Current absolute mission time in MJD
dt (float Quantity) – First guess of trajectory drift time in units of minutes
simTime (float Quantity) – Total simulated observation time in units of hours
SRP (bool) – Toggles whether or not to include solar radiation pressure force
Moon (bool) – Toggles whether or not to include lunar gravity force
axlBurn (bool) – Set True for purely axial burn (no dz velocity). Defaults true.
- Returns:
- nBounces (float):
Number of thruster firings throughout observation
- timeLeft (float Quantity):
Amount of time left when simulation ended in units of hours
- dvLog (float n Quantity):
Log of delta-v’s with size n where n is equal to nBounces and units of m/s
- dvAxialLog (float n Quantity):
Log of delta-v’s purely in the axial direction with size n where n is equal to nBounces and units of m/s
- driftLog (float n Quantity):
Log of all drift times with size n where n is equal to nBounces and units of minutes
- Return type:
- unitVector(p)[source]
Normalizes an array and returns associated unit vector
Takes in some array p that represents a vector with dimensions 3xn. It then calculates the norm of that vector and also normalizes it to create a unit vector.
- Parameters:
p (float 3xn numpy.ndarray) – Array of values
- Returns:
- p (float 3xn numpy.ndarray):
Unit vector associated with p, same dimensions
- pnorm (float numpy.ndarray):
Norm of the given vector for each value n
- Return type:
EXOSIMS.Observatory.SotoStarshade_parallel module
- class EXOSIMS.Observatory.SotoStarshade_parallel.SotoStarshade_parallel(orbit_datapath=None, **specs)[source]
Bases:
SotoStarshade_ContThrustStarShade Observatory class This class is implemented at L2 and contains all variables, functions, and integrators to calculate occulter dynamics.
- Parameters:
orbit_datapath (str, optional) – Full path to reference orbit file
**specs – Input Specification
- rc
Client
- Type:
ipyparallel.Client
- dview
Direct view
- Type:
ipyparallel.Client
EXOSIMS.Observatory.WFIRSTObservatoryL2 module
- class EXOSIMS.Observatory.WFIRSTObservatoryL2.WFIRSTObservatoryL2(**specs)[source]
Bases:
ObservatoryL2HaloWFIRST Observatory at L2 implementation. Contains methods and parameters unique to the WFIRST mission.