EXOSIMS.Prototypes package
Submodules
EXOSIMS.Prototypes.BackgroundSources module
- class EXOSIMS.Prototypes.BackgroundSources.BackgroundSources(cachedir=None, **specs)[source]
Bases:
object
BackgroundSources Prototype
- Parameters:
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
**specs – Input Specification
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- _outspec
-
- Type:
- dNbackground(coords, intDepths)[source]
Returns background source number densities
- Parameters:
coords (SkyCoord) – SkyCoord object containing right ascension, declination, and distance to star of the planets of interest in units of deg, deg and pc
intDepths (ndarray(float)) – Integration depths equal to the planet magnitude (Vmag+dMag), i.e. the V magnitude of the dark hole to be produced for each target. Must be of same length as coords.
- Returns:
dN: Number densities of background sources for given targets in units of 1/arcmin2. Same length as inputs.
- Return type:
EXOSIMS.Prototypes.Completeness module
- class EXOSIMS.Prototypes.Completeness.Completeness(minComp=0.1, cachedir=None, **specs)[source]
Bases:
object
Completeness Prototype
- Parameters:
minComp (float) – Minimum completeness for target filtering. Defaults to 0.1.
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
**specs – Input Specification
- _outspec
-
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- PlanetPhysicalModel
Planet physical model object
- Type:
- PlanetPopulation
Planet population object
- Type:
- updates
Dynamic completeness updates array for revisists.
- Type:
- comp_calc(smin, smax, dMag)[source]
Calculates completeness for given minimum and maximum separations and dMag.
- Parameters:
- Returns:
Completeness values
- Return type:
Warning
The prototype implementation does not perform any real completeness calculations. To be used when you need a completeness object but do not care about the actual values.
- comp_per_intTime(intTimes, TL, sInds, fZ, fEZ, WA, mode, C_b=None, C_sp=None, TK=None)[source]
Calculates completeness values per integration time
Note: Prototype does no calculations and always returns the same value
- Parameters:
TL (TargetList) – TargetList object
sInds (ndarray(int)) – Integer indices of the stars of interest
fZ (Quantity(ndarray(float))) – Surface brightness of local zodiacal light in units of 1/arcsec2
fEZ (Quantity(ndarray(float))) – Surface brightness of exo-zodiacal light in units of 1/arcsec2
WA (Quantity(ndarray(float))) – Working angle of the planet of interest in units of arcsec
mode (dict) – Selected observing mode
C_b (Quantity(ndarray(float)), optional) – Background noise electron count rate in units of 1/s
C_sp (Quantity(ndarray(float)), optional) – Residual speckle spatial structure (systematic error) in units of 1/s
- Returns:
Completeness values
- Return type:
- completeness_setup()[source]
Preform any preliminary calculations needed for this flavor of completeness
For the Prototype, this is just a dummy function for later overloading
- completeness_update(TL, sInds, visits, dt)[source]
Updates completeness value for stars previously observed
- dcomp_dt(intTimes, TL, sInds, fZ, fEZ, WA, mode, C_b=None, C_sp=None, TK=None)[source]
Calculates derivative of completeness with respect to integration time
Note: Prototype does no calculations and always returns the same value
- Parameters:
TL (TargetList) – TargetList class object
sInds (ndarray(int)) – Integer indices of the stars of interest
fZ (Quantity(ndarray(float))) – Surface brightness of local zodiacal light in units of 1/arcsec2
fEZ (Quantity(ndarray(float))) – Surface brightness of exo-zodiacal light in units of 1/arcsec2
WA (Quantity(ndarray(float))) – Working angle of the planet of interest in units of arcsec
mode (dict) – Selected observing mode
- Returns:
Derivative of completeness with respect to integration time (units 1/time)
- Return type:
- gen_update(TL)[source]
Generates any information necessary for dynamic completeness calculations (completeness at successive observations of a star in the target list)
- Parameters:
TL (TargetList) – TargetList object
- Returns:
None
- revise_updates(ind)[source]
Keeps completeness update values only for targets remaining in target list during filtering (called from TargetList.filter_target_list)
- target_completeness(TL)[source]
Generates completeness values for target stars
This method is called from TargetList __init__ method.
- Parameters:
TL (TargetList) – TargetList object
- Returns:
Completeness values for each target star
- Return type:
Warning
The prototype implementation does not perform any real completeness calculations. To be used when you need a completeness object but do not care about the actual values.
EXOSIMS.Prototypes.Observatory module
- class EXOSIMS.Prototypes.Observatory.Observatory(SRP=True, koAngles_SolarPanel=[0, 180], ko_dtStep=1, settlingTime=1, thrust=450, slewIsp=4160.0, scMass=6000.0, slewMass=0.0, skMass=0.0, twotanks=False, skEff=0.7098, slewEff=1.0, dryMass=3400.0, coMass=5800.0, occulterSep=55000.0, skIsp=220.0, defburnPortion=0.05, constTOF=14, maxdVpct=0.02, spkpath=None, checkKeepoutEnd=True, forceStaticEphem=False, occ_dtmin=0.055, occ_dtmax=61.0, sk_Tmin=0.0, sk_Tmax=365.0, non_lambertian_coefficient_front=0.038, non_lambertian_coefficient_back=0.004, specular_reflection_factor=0.975, nreflection_coefficient=0.999, emission_coefficient_front=0.8, emission_coefficient_back=0.2, allowRefueling=False, external_fuel_mass=0, cachedir=None, **specs)[source]
Bases:
object
Observatory Prototype
- Parameters:
SRP (bool) – Toggle solar radiation pressure. Defaults True.
koAngles_SolarPanel (list(float)) – [Min, Max] keepout angles (in degrees) due to solar panels. Defaults to [0,180].
ko_dtStep (float) – Step size to use when calculating keepout maps (in days). Defaults to 1.
settlingTime (float) – Observatory settling time after retargeting (in days). Defaults to 1. This time is added to every observation and counts againts the total integration time allocation.
thrust (float) – Slew thrust mangitude (in mN). Defaults to 450 mN.
slewIsp (float) – Slew specific impulse (in seconds). Defaults to 4160 s.
scMass (float) –
Maneuvering spacecraft initial wet mass (in kg). Nominally this is the starshade, but may also be the observatory if the starshade is kept on the stable orbit. Defaults to 6000 kg.
Warning
If
twotanks
is true, this input will be ignored and attributescMass
will be initially set to the sum ofslewMass
andskMass
.slewMass (float) – Initial fuel mass of slewing propulsion system (in kg). Defaults to 0. Only used if twotanks is True.
skMass (float) – Initial fuel mass of stationkeeping propulsion system (in kg). Defaults to 0. Only used if twotanks is True.
twotanks (bool) – Determines whether stationkeeping and slewing propulsion systems use separate tanks. If False, it is assumed that all onboard fuel is fungible. Defaults False.
skEff (float) – Stationkeeping propulsion system efficiency. Must be between 0 and 1. Defaults to 0.7098 (approximately 45 deg cosine losses).
slewEff (float) – Slewing propulsion system efficiency. Must be between 0 and 1. Defaults to 1.
dryMass (float) – Maneuvering spacecraft dry mass (in kg). Defaults to 3400 kg. Must be smaller than scMass.
coMass (float) – Non-manuevering spacecraft (nominally the observatory) initial wet mass (in kg). Defaults to 5800 kg.
occulterSep (float) – Initial occulter separation (in km). Defaults to 55000.
skIsp (float) – Stationkeeping propulsion system specific impulse (in seconds). Defaults to 220 s.
defburnPortion (float) – Default burn portion for simple model slews. Must be between 0 and 1. Defaults to 0.05.
constTOF (float) – Constant time of flight value (in days). Defaults to 14. DEPRECATED
maxdVpct (float) – Maximum delta V percentage allowed for any maneuver. Must be between 0 and 1. Defaults to 0.02.
spkpath (str, optional) – Path to SPK file on disk. If not set, defaults to de432s.bsp in Downloads Directory.
checkKeepoutEnd (bool) – Check keepout conditions at end of observation. Defaults True. TODO: Move to SurveySimulation
forceStaticEphem (bool) – Use static ephemerides for solar system objects instead of jplephem. Defaults False.
occ_dtmin (float) – Minimum slew time (in days). Defaults to 0.055
occ_dtmax (float) – Maximum slew time (in days). Defaults to 61
sk_Tmin (float) – Minimum time after mission start to compute stationkeeping (in days). Defaults to 0.
sk_Tmax (float) – Maximum time after mission start to compute stationkeeping (in days). Defaults to 365
non_lambertian_coefficient_front (float) – Non-Lambertion reflectivity coefficient of front face of manuevering spacecraft. Used for SRP calculations. Defaults to 0.038.
non_lambertian_coefficient_back (float) – Non-Lambertion reflectivity coefficient of back face of manuevering spacecraft. Used for SRP calculations. Defaults to 0.004.
specular_reflection_factor (float) – Specular reflectivity of maneuvering spacecraft. Used for SRP calculations. Defaults to 0.975.
nreflection_coefficient (float) – non-specular reflectivity of maneuvering spacecraft. Used for SRP calculations. Defaults to 0.999
emission_coefficient_front (float) – Emission coefficient of front face of maneuvering spacecraft. Used for SRP calculations. Defaults to 0.8
emission_coefficient_back (float) – Emission coefficient of rear face of maneuvering spacecraft. Used for SRP calculations. Defaults to 0.2
allowRefueling (bool) – Fuel tanks can be topped off when they reach empty from external fuel source whose capacity is defined by the
external_fuel_mass
input. Defaults False.external_fuel_mass (float) – Initial mass of external fuel supply (in kg). Ignored if
allowRefueling
is False. Defaults to 0.cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
**specs – Input Specification
- _outspec
-
- Type:
- ao
Thurst acceleration (current thrust/spacecraft mass). Acceleration units.
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- checkKeepoutEnd
Toggle checking of keepout at end of observations (as well as the beginning). TODO: need to depricate in favor of continuous visibility.
- Type:
- coMass
Non-manuevering spacecraft (nominally the observatory) wet mass. Mass units.
- constTOF
Constant time of flight for single occulter slew. DEPRECATED
- dryMass
Maneuvering spacecraft dry mass. Mass units.
- dVmax
Maximum single-slew allowable delta V (as determined by maxdVpct input. Units of velocity.
- dVtot
Total possible slew delta V as determined by ideal rocket equation applied to the initial fuel mass.
- emission_coefficient_back
Emission coefficient of back face of maneuvering spacecraft. Used for SRP calculations.
- Type:
- emission_coefficient_front
Emission coefficient of front face of maneuvering spacecraft. Used for SRP calculations.
- Type:
- flowRate
Slew ropulsion system mass flow rate. Units: mass/time
- kernel
jplephem kernel used for ephemeris calculations of solar system bodies
- Type:
jplephem.spk.SPK
- ko_dtStep
Step size to use when calculating keepout maps. Time units.
- koAngles_SolarPanel
[Min, Max] keepout angles due to solar panels.
- maxFuelMass
Total capacity of all fuel. This parameter is constant and should never be modified externally.
- non_lambertian_coefficient_back
Non-Lambertion reflectivity coefficient of back face of manuevering spacecraft. Used for SRP calculations.
- Type:
- non_lambertian_coefficient_front
Non-Lambertion reflectivity coefficient of front face of manuevering spacecraft. Used for SRP calculations.
- Type:
- nreflection_coefficient
Non-specular reflectivity of maneuvering spacecraft. Used for SRP calculations.
- Type:
- occ_dtmax
Maximum allowable slew time
- occ_dtmin
Minimum allowable slew time.
- occulterSep
Current occulter separation distance.
- scMass
Current maneuvering spacecraft mass.
- settlingTime
Observatory settling time after every retargeting.
- sk_Tmax
Maximum time after mission start to compute stationkeeping
- sk_Tmin
Minimum time after mission start to compute stationkeeping
- skIsp
Stationkeeping propulsion system specific impulse. Time units.
- skMass
Stationkeeping propulsion system fuel mass.
- skMaxFuelMass
Total capacity of stationkeeping fuel tank. This parameter is constant and should never be modified externally. Set to 0 if allowRefueling is False.
- slewIsp
Slew propulsion system specific impulse. Time units.
- slewMass
Slew propulsion system fuel mass.
- slesMaxFuelMass
Total capacity of slewing fuel tank. This parameter is constant and should never be modified externally. Set to 0 if allowRefueling is False.
- specular_reflection_factor
Specular reflectivity of maneuvering spacecraft. Used for SRP calculations.
- Type:
- thrust
Slew propulsion system thrust. Force units.
- twotanks
Toggles whether stationkeeping and slewing fuel are bookkept separately. If false, all fuel is fungible.
- Type:
Note
For finding positions of solar system bodies, this routine will attempt to use the jplephem module and a local SPK file on disk. The module can be installed via pip or from source. The default SPK file (which the code attempts to automatically download) can be downloaded manually from: http://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de432s.bsp and should be placed in the Downloads Directory (or another path, specified by the
spkpath
input).- class SolarEph(a, e, I, O, w, lM)[source]
Bases:
object
Solar system ephemerides class
This class takes the constants in Appendix D.4 of Vallado as inputs and stores them for use in defining solar system ephemerides at a given time.
- Parameters:
Each of these lists has a maximum of 4 elements. The values in these lists are used to propagate the solar system planetary ephemerides for a specific solar system planet.
Each of these lists has a maximum of 4 elements. The values in these lists are used to propagate the solar system planetary ephemerides for a specific solar system planet.
- 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:
State vectors in rotating frame in normalized units (nx6)
- Return type:
- calculate_observableTimes(TL, sInds, currentTime, koMaps, koTimes, mode)[source]
Returns the next window of time during which targets are observable
This method returns a nx2 ndarray of times for every star given in the target list. The two entries for every star are the next times (after current time) when the star exits and enters keepout (i.e. the start and end times of the next window of observability).
- Parameters:
TL (TargetList) – TargetList class object
sInds (numpy.ndarray(int)) – Integer indices of the stars of interest
currentTime (Time) – Current absolute mission time in MJD
koMaps (dict) – Keepout values for n stars throughout time range of length m, key names being the system names specified in mode. True is a target unobstructed and observable, and False is a target unobservable due to obstructions in the keepout zone.
koTimes (Time) – Absolute MJD mission times from start to end in steps of 1 d
mode (dict) – Selected observing mode
- Returns:
Start and end times of next observability time window in absolute time MJD. n is length of sInds
- Return type:
- calculate_slewTimes(TL, old_sInd, sInds, sd, obsTimes, currentTime)[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:
TL (TargetList) – TargetList class object
old_sInd (int) – Integer index of the most recently observed star
sInds (ndarray(int)) – Integer indices of the star of interest
sd (Quantity) – Angular separation between stars in rad
currentTime (astropy Time) – Current absolute mission time in MJD
- Returns:
Time to transfer to new star line of sight in units of days
- Return type:
- cent(currentTime)[source]
Finds time in Julian centuries since J2000 epoch
This quantity is needed for many algorithms from Vallado 2013.
- distForces(TL, sInd, currentTime)[source]
Finds lateral and axial disturbance forces on an occulter
- Parameters:
TL (TargetList) – TargetList class object
sInd (int) – Integer index of the star of interest
currentTime (Time) – Current absolute mission time in MJD
- Returns:
- Return type:
- eclip2equat(r_eclip, currentTime)[source]
Rotates heliocentric coordinates from ecliptic to equatorial frame.
- equat2eclip(r_equat, currentTime, rotsign=1)[source]
Rotates heliocentric coordinates from equatorial to ecliptic frame.
- Parameters:
- Returns:
Positions vector in heliocentric ecliptic frame in units of AU. nx3
- Return type:
- find_nextObsWindow(TL, sInds, currentTimes, koMap, koTimes)[source]
Method used by calculate_observableTimes for finding next observable windows
This method returns a nx2 ndarray of times for every star given in the target list. The two entries for every star are the next times (after current time) when the star exits and enters keepout (i.e. the start and end times of the next window of observability).
- Parameters:
TL (TargetList) – TargetList class object
sInds (ndarray(int)) – Integer indices of the stars of interest
currentTimes (Time) – Current absolute mission time in MJD same length as sInds
koMap (ndarray(int)) – Keepout values for n stars throughout time range of length m (mxn)
koTimes (astropy.time.Time) – Absolute MJD mission times from start to end in steps of 1 d
mode (dict) – Selected observing mode
- Returns:
Start and end times of next observability time window in MJD
- Return type:
- generate_koMap(TL, missionStart, missionFinishAbs, koangles)[source]
Creates keepout map for all targets throughout mission lifetime.
This method returns a binary map showing when all stars in the given target list are in or out of the keepout zone (i.e. when they are not observable) from mission start to mission finish.
- Parameters:
TL (TargetList) – TargetList class object
missionStart (Time) – Absolute start of mission time in MJD
missionFinishAbs (Time) – Absolute end of mission time in MJD
koangles (Quantity(ndarray(float))) – s x 4 x 2 array where s is the number of starlight suppression systems as defined in the Optical System. Each of the remaining 4 x 2 arrays are system specific koAngles for the Sun, Moon, Earth, and small bodies (4), each with a minimum and maximum value (2) in units of deg.
- Returns:
- koMap (~numpy.ndarray(bool)):
True is a target unobstructed and observable, and False is a target unobservable due to obstructions in the keepout zone.
- koTimes (~astropy.time.Time):
Absolute MJD mission times from start to end in steps of 1 d
- Return type:
- keepout(TL, sInds, currentTime, koangles, returnExtra=False)[source]
Finds keepout Boolean values for stars of interest.
This method returns the keepout Boolean values for stars of interest, where True is an observable star.
- Parameters:
TL (TargetList) – TargetList class object
sInds (ndarray(int)) – Integer indices of the stars of interest
currentTime (Time) – Current absolute mission time in MJD MAY ONLY BE ONE VALUE OR DUPLICATES OF THE SAME VALUE
koangles (Quantity(ndarray(float))) – s x 4 x 2 array where s is the number of starlight suppression systems as defined in the Optical System. Each of the remaining 4 x 2 arrays are system specific koAngles for the Sun, Moon, Earth, and small bodies (4), each with a minimum and maximum value (2) in units of deg.
returnExtra (bool) – Optional flag, default False, set True to return additional information.
- Returns:
- kogood (~numpy.ndarray(bool)):
kogood s x n x m array of boolean values. True is a target unobstructed and observable, and False is a target unobservable due to obstructions in the keepout zone.
- r_body (~astropy.units.Quantity(~numpy.ndarray(float))):
Only returned if returnExtra is True 11 x m x 3 array where m is len(currentTime) of heliocentric equatorial Cartesian elements of the Sun, Moon, Earth and Mercury->Pluto
- r_targ (~astropy.units.Quantity(~numpy.ndarray(float))):
Only returned if returnExtra is True m x n x 3 array where m is len(currentTime) or 1 if staticStars is true in TargetList of heliocentric equatorial Cartesian coords of target and n is the len(sInds)
- culprit (numpy.ndarray(int)):
Only returned if returnExtra is True s x n x m x 12 array of boolean integer values identifying which body is responsible for keepout (when equal to 1). m is number of targets and n is len(currentTime). Last dimension is ordered same as r_body, with an extra line for solar panels being the culprit
- koangleArray (~astropy.units.Quantity(~numpy.ndarray(float))):
Only returned if returnExtra is True s x 11 x 2 element array of minimum and maximum keepouts used for each body. Same ordering as r_body.
- Return type:
- keplerplanet(currentTime, bodyname, eclip=False)[source]
Finds solar system body positions vector in heliocentric equatorial (default) or ecliptic frame for current time (MJD).
This method uses algorithms 2 and 10 from Vallado 2013 to find heliocentric equatorial position vectors for solar system objects.
- Parameters:
- Returns:
Solar system body positions in heliocentric equatorial (default) or ecliptic frame in units of AU
- Return type:
Note
Use eclip=True to get ecliptic coordinates.
- 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.units.Quantity) – Time to transfer to new star line of sight in units of days
sInd (int) – Integer index of the star of interest
sd (astropy.units.Quantity) – Angular separation between stars in rad
dV (astropy.units.Quantity) – Delta-V used to transfer to new star line of sight in units of m/s
- Returns:
Design Reference Mission dictionary, contains the results of one complete observation (detection and characterization)
- Return type:
- mass_dec(dF_lateral, t_int)[source]
Returns mass_used and deltaV
The values returned by this method are used to decrement spacecraft mass for station-keeping.
- Parameters:
dF_lateral (astropy.units.Quantity) – Lateral disturbance force in units of N
t_int (astropy.units.Quantity) – Integration time in units of day
- Returns:
- intMdot (astropy.units.Quantity):
Mass flow rate in units of kg/s
- mass_used (astropy.units.Quantity):
Mass used in station-keeping units of kg
- deltaV (astropy.units.Quantity):
Change in velocity required for station-keeping in units of km/s
- Return type:
- mass_dec_sk(TL, sInd, currentTime, t_int)[source]
Returns mass_used, deltaV and disturbance forces
This method calculates all values needed to decrement spacecraft mass for station-keeping.
- Parameters:
TL (TargetList) – TargetList class object
sInd (int) – Integer index of the star of interest
currentTime (astropy.time.Time) – Current absolute mission time in MJD
t_int (astropy.units.Quantity) – Integration time in units of day
- Returns:
- dF_lateral (astropy.units.Quantity):
Lateral disturbance force in units of N
- dF_axial (astropy.units.Quantity):
Axial disturbance force in units of N
- intMdot (astropy.units.Quantity):
Mass flow rate in units of kg/s
- mass_used (astropy.units.Quantity):
Mass used in station-keeping units of kg
- deltaV (astropy.units.Quantity):
Change in velocity required for station-keeping in units of km/s
- Return type:
- moon_earth(currentTime)[source]
Finds geocentric equatorial positions vector for Earth’s moon
This method uses Algorithm 31 from Vallado 2013 to find the geocentric equatorial positions vector for Earth’s moon.
- 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 geosynchronous circular orbit position vector.
- Parameters:
- Returns:
Observatory orbit positions vector in heliocentric equatorial (default) or ecliptic frame in units of AU. nx3
- Return type:
Note
Use eclip=True to get ecliptic coordinates.
- refuel_tank(TK, tank=None)[source]
Attempt to refuel a fuel tank and report status
- Parameters:
TK (TimeKeeping) – TimeKeeping object. Not used in prototype but an input for any implementations that wish to do time-aware operations.
tank (str, optional) – Either ‘sk’ or ‘slew’ when
twotanks
is True. Otherwise, None. Defaults None
- Returns:
True represents successful refeuling. False means refueling is not possible for selected tank.
- Return type:
- solarSystem_body_position(currentTime, bodyname, eclip=False)[source]
Finds solar system body positions vector in heliocentric equatorial (default) or ecliptic frame for current time (MJD).
This passes all arguments to one of spk_body or keplerplanet, depending on the value of self.havejplephem.
- Parameters:
- Returns:
Solar system body positions in heliocentric equatorial (default) or ecliptic frame in units of AU. nx3
- Return type:
Note
Use eclip=True to get ecliptic coordinates.
- spk_body(currentTime, bodyname, eclip=False)[source]
Finds solar system body positions vector in heliocentric equatorial (default) or ecliptic frame for current time (MJD).
This method uses spice kernel from NAIF to find heliocentric equatorial position vectors for solar system objects.
- Parameters:
- Returns:
Solar system body positions in heliocentric equatorial (default) or ecliptic frame in units of AU. nx3
- Return type:
Note: Use eclip=True to get ecliptic coordinates.
- star_angularSep(TL, old_sInd, sInds, currentTime)[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.
- Parameters:
TL (TargetList) – TargetList class object
old_sInd (int) – Integer index of the last star of interest
sInds (ndarray(int)) – Integer indices of the stars of interest
currentTime (Time) – Current absolute mission time in MJD
- Returns:
Angular separation between two target stars
- Return type:
EXOSIMS.Prototypes.OpticalSystem module
- class EXOSIMS.Prototypes.OpticalSystem.OpticalSystem(obscurFac=0.1, shapeFac=0.7853981633974483, pupilDiam=4, intCutoff=50, scienceInstruments=[{'name': 'imager'}], QE=0.9, optics=0.5, FoV=10, pixelNumber=1000, pixelSize=1e-05, pixelScale=0.02, sread=1e-06, idark=0.0001, texp=100, Rs=50, lenslSamp=2, starlightSuppressionSystems=[{'name': 'coronagraph'}], lam=500, BW=0.2, occ_trans=0.2, core_thruput=0.1, core_contrast=1e-10, contrast_floor=None, core_platescale=None, core_platescale_units=None, input_angle_units='arcsec', ohTime=1, observingModes=None, SNR=5, timeMultiplier=1.0, IWA=0.1, OWA=inf, stabilityFact=1, cachedir=None, koAngles_Sun=[0, 180], koAngles_Earth=[0, 180], koAngles_Moon=[0, 180], koAngles_Small=[0, 180], binaryleakfilepath=None, texp_flag=False, bandpass_model='box', bandpass_step=0.1, use_core_thruput_for_ez=False, csv_angsep_colname='r_as', **specs)[source]
Bases:
object
OpticalSystem Prototype
- Parameters:
obscurFac (float) – Obscuration factor (fraction of primary mirror area obscured by secondary and spiders). Defaults to 0.1. Must be between 0 and 1. See
pupilArea
attribute definition.shapeFac (float) – Shape Factor. Determines the ellipticity of the primary mirror. Defaults to np.pi/4 (circular aperture). See
pupilArea
attribute definition.pupilDiam (float) – Primary mirror major diameter (in meters). Defaults to 4.
intCutoff (float) – Integration time cutoff (in days). Determines the maximum time that is allowed per integration, and is used to limit integration target \(\Delta\mathrm{mag}\). Defaults to 50.
scienceInstruments (list(dict)) – List of dicts defining all science instruments. Minimally must contain one science instrument. Each dictionary must minimally contain a
name
keyword, which must be unique to each instrument and must include the substringimager
(for imaging devices) orspectro
(for spectrometers). By default, this keyword is set to[{'name': 'imager'}]
, creating a single imaging science instrument. Additional parameters are filled in with default values set by the keywords below. For more details on science instrument definitions see OpticalSystem.QE (float) – Default quantum efficiency. Only used when not set in science instrument definition. Defaults to 0.9
optics (float) – Total attenuation due to science instrument optics. This is the net attenuation due to all optics in the science instrument path after the primary mirror, excluding any starlight suppression system (i.e., coronagraph) optics. Only used when not set in science instrument definition. Defaults to 0.5
FoV (float) – Default instrument half-field of view (in arcseconds). Only used when not set in science instrument definition. Defaults to 10
pixelNumber (float) – Default number of pixels across the detector. Only used when not set in science instrument definition. Defaults to 1000.
pixelSize (float) – Default pixel pitch (nominal distance between adjacent pixel centers, in meters). Only used when not set in science instrument definition. Defaults to 1e-5
pixelScale (float) – Default pixel scale (instantaneous field of view of each pixel, in arcseconds). Only used when not set in science instrument definition. Defaults to 0.02.
sread (float) – Default read noise (in electrons/pixel/read). Only used when not set in science instrument definition. Defaults to 1e-6
idark (float) – Default dark current (in electrons/pixel/s). Only used when not set in science instrument definition. Defaults to 1e-4
texp (float) – Default single exposure time (in s). Only used when not set in science instrument definition. Defaults to 100
Rs (float) – Default spectral resolving power. Only used when not set in science instrument definition. Only applies to spetrometers. Defaults to 50.
lenslSamp (float) – Default lenslet sampling (number of pixels per lenslet rows or columns). Only used when not set in science instrument definition. Defaults to 2
starlightSuppressionSystems (list(dict)) – List of dicts defining all starlight suppression systems. Minimally must contain one system. Each dictionary must minimally contain a
name
keyword, which must be unique to each system. By default, this keyword is set to[{'name': 'coronagraph'}]
, creating a single coronagraphic starlight suppression system. Additional parameters are filled in with default values set by the keywords below. For more details on starlight suppression system definitions see OpticalSystem.lam (float) – Default central wavelength of starlight suppression system (in nm). Only used when not set in starlight suppression system definition. Defaults to 500
BW (float) – Default fractional bandwidth. Only used when not set in starlight suppression system definition. Defaults to 0.2
occ_trans (float) – Default coronagraphic transmission. Only used when not set in starlight suppression system definition. Defaults to 0.2
core_thruput (float) – Default core throughput. Only used when not set in starlight suppression system definition. Defaults to 0.1
core_contrast (float) – Default core contrast. Only used when not set in starlight suppression system definition. Defaults to 1e-10
contrast_floor (float, optional) – Default contrast floor. Only used when not set in starlight suppression system definition. If not None, sets absolute contrast floor. Defaults to None
core_platescale (float, optional) – Default core platescale. Only used when not set in starlight suppression system definition. Defaults to None. Units determiend by
input_angle_units
.input_angle_units (str, optional) – Default angle units of all starlightSuppressionSystems-related inputs (as applicable). This includes all CSV input tables or FITS input tables without a UNIT keyword in the header. Only used when not set in starlight suppression system definition. None, ‘unitless’ or ‘LAMBDA/D’ are all interepreted as \(\\lambda/D\) units. Otherwise must be a string that is parsable as an astropy angle unit. Defaults to ‘arcsec’.
ohTime (float) – Default overhead time (in days). Only used when not set in starlight suppression system definition. Time is added to every observation (on top of observatory settling time). Defaults to 1
observingModes (list(dict), optional) – List of dicts defining observing modes. These are essentially combinations of instruments and starlight suppression systems, identified by their names in keywords
instName
andsystName
, respectively. One mode must be identified as the default detection mode (by setting keyworddetectionMode
to True in the mode definition. If None (default) a single observing mode is generated combining the first instrument inscienceInstruments
with the first starlight suppression system instarlightSuppressionSystems
, and is marked as the detection mode. Additional parameters are filled in with default values set by the keywords below. For more details on mode definitions see OpticalSystem.SNR (float) – Default target signal to noise ratio. Only used when not set in observing mode definition. Defaults to 5
timeMultiplier (float) – Default integration time multiplier. Only used when not set in observing mode definition. Every integration time calculated for an observing mode is scaled by this factor. For example, if an observing mode requires two rolls per observation (i.e., if it covers only 180 degrees of the field), then this quantity should be set to 2 for that mode. However, in some cases (i.e., spectroscopic followup) it may not be necessary to integrate on the full field, in which case this quantity could be set to 1. Defaults to 1
IWA (float) – Default IWA (in input_angle_units). Only used when not set in starlight suppression system definition. Defaults to 0.1
OWA (float) – Default OWA (in input_angle_units). Only used when not set in starlight suppression system definition. Defaults to numpy.Inf
stabilityFact (float) – Stability factor. Defaults to 1
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
koAngles_Sun (list(float)) – Default [Min, Max] keepout angles for Sun. Only used when not set in starlight suppression system definition. Defaults to [0,180]
koAngles_Earth (list(float)) – Default [Min, Max] keepout angles for Earth. Only used when not set in starlight suppression system definition. Defaults to [0,180]
koAngles_Moon (list(float)) – Default [Min, Max] keepout angles for the moon. Only used when not set in starlight suppression system definition. Defaults to [0,180]
koAngles_Small (list(float)) – Default [Min, Max] keepout angles for all other bodies. Only used when not set in starlight suppression system definition. Defaults to [0,180],
binaryleakfilepath (str, optional) – If set, full path to binary leak definition file. Defaults to None
texp_flag (bool) – Toggle use of planet shot noise value for frame exposure time (overriides instrument texp value). Defaults to False.
bandpass_model (str) – Default model to use for mode bandpasses. Must be one of ‘gaussian’ or ‘box’ (case insensitive). Only used if not set in mode definition. Defaults to box.
bandpass_step (float) – Default step size (in nm) to use when generating Box-model bandpasses. Only used if not set in mode definition. Defaults to 0.1.
use_core_thruput_for_ez (bool) – If True, compute exozodi contribution using core_thruput. If False (default) use occ_trans
csv_angsep_colname (str) – Default column name to use for the angular separation column for CSV data. Only used when not set in starlight suppression system definition. Defaults to r_as (matching the default input_angle_units). These two inputs should be updated together.
**specs – Input Specification
- _outspec
-
- Type:
- allowed_scienceInstrument_kws
List of allowed keywords in scienceInstrument dictionaries
- Type:
- allowed_starlightSuppressionSystem_kws
List of allowed keywords in starlightSuppressionSystem dictionaries
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- default_vals
All inputs not assigned to object attributes are considered to be default values to be used for filling in information in the optical system definition, and are copied into this dictionary for storage.
- Type:
- intCutoff
Maximum allowable continuous integration time. Time units.
- IWA
Minimum inner working angle.
- obscurFac
Obscuration factor (fraction of primary mirror area obscured by secondary and spiders).
- Type:
- observingModes
List of dicts defining observing modes. These are essentially combinations of instruments and starlight suppression systems, identified by their names in keywords
instName
andsystName
, respectively. One mode must be identified as the default detection mode (by setting keyworddetectionMode
to True in the mode definition. If None (default) a single observing mode is generated combining the first instrument inscienceInstruments
with the first starlight suppression system instarlightSuppressionSystems
, and is marked as the detection mode. Additional parameters are filled in with default values set by the keywords below. For more details on mode definitions see OpticalSystem.- Type:
- OWA
Maximum outer working angle.
- pupilArea
Total effective pupil area:
\[A = (1 - F_o)F_sD^2\]where \(F_o\) is the obscuration factor, \(F_s\) is the shape factor, and \(D\) is the pupil diameter.
- pupilDiam
Pupil major diameter. Length units.
- scienceInstruments
List of dicts defining all science instruments. Minimally must contain one science instrument. Each dictionary must minimally contain a
name
keyword, which must be unique to each instrument and must include the substringimager
(for imaging devices) orspectro
(for spectrometers). By default, this keyword is set to[{'name': 'imager'}]
, creating a single imaging science instrument. Additional parameters are filled in with default values set by the keywords below. For more details on science instrument definitions see OpticalSystem.- Type:
- starlightSuppressionSystems
List of dicts defining all starlight suppression systems. Minimally must contain one system. Each dictionary must minimally contain a
name
keyword, which must be unique to each system. By default, this keyword is set to[{'name': 'coronagraph'}]
, creating a single coronagraphic starlight suppression system. Additional parameters are filled in with default values set by the keywords below. For more details on starlight suppression system definitions see OpticalSystem.- Type:
- texp_flag
Toggle use of planet shot noise value for frame exposure time (overriides instrument texp value).
- Type:
- use_core_thruput_for_ez
Toggle use of core_thruput (instead of occ_trans) in computing exozodi flux.
- Type:
- Cp_Cb_Csp(TL, sInds, fZ, fEZ, dMag, WA, mode, returnExtra=False, TK=None)[source]
Calculates electron count rates for planet signal, background noise, and speckle residuals.
- Parameters:
TL (TargetList) – TargetList class object
sInds (ndarray(int)) – Integer indices of the stars of interest
fZ (Quantity(ndarray(float))) – Surface brightness of local zodiacal light in units of 1/arcsec2
fEZ (Quantity(ndarray(float))) – Surface brightness of exo-zodiacal light in units of 1/arcsec2
dMag (ndarray(float)) – Differences in magnitude between planets and their host star
WA (Quantity(ndarray(float))) – Working angles of the planets of interest in units of arcsec
mode (dict) – Selected observing mode
returnExtra (bool) – Optional flag, default False, set True to return additional rates for validation
TK (TimeKeeping, optional) – Optional TimeKeeping object (default None), used to model detector degradation effects where applicable.
- Returns:
- C_p (~astropy.units.Quantity(~numpy.ndarray(float))):
Planet signal electron count rate in units of 1/s
- C_b (~astropy.units.Quantity(~numpy.ndarray(float))):
Background noise electron count rate in units of 1/s
- C_sp (~astropy.units.Quantity(~numpy.ndarray(float))):
Residual speckle spatial structure (systematic error) in units of 1/s
- Return type:
- Cp_Cb_Csp_helper(TL, sInds, fZ, fEZ, dMag, WA, mode)[source]
Helper method for Cp_Cb_Csp that performs lots of common computations :param TL: TargetList class object :type TL: TargetList :param sInds: Integer indices of the stars of interest :type sInds: ~numpy.ndarray(int) :param fZ: Surface brightness of local zodiacal light in units of 1/arcsec2 :type fZ: ~astropy.units.Quantity(~numpy.ndarray(float)) :param fEZ: Surface brightness of exo-zodiacal light in units of 1/arcsec2 :type fEZ: ~astropy.units.Quantity(~numpy.ndarray(float)) :param dMag: Differences in magnitude between planets and their host star :type dMag: ~numpy.ndarray(float) :param WA: Working angles of the planets of interest in units of arcsec :type WA: ~astropy.units.Quantity(~numpy.ndarray(float)) :param mode: Selected observing mode :type mode: dict
- Returns:
- C_star (~astropy.units.Quantity(~numpy.ndarray(float))):
Non-coronagraphic star count rate (1/s)
- C_p0 (~astropy.units.Quantity(~numpy.ndarray(float))):
Planet count rate (1/s)
- C_sr (~astropy.units.Quantity(~numpy.ndarray(float))):
Starlight residual count rate (1/s)
- C_z (~astropy.units.Quantity(~numpy.ndarray(float))):
Local zodi count rate (1/s)
- C_ez (~astropy.units.Quantity(~numpy.ndarray(float))):
Exozodi count rate (1/s)
- C_dc (~astropy.units.Quantity(~numpy.ndarray(float))):
Dark current count rate (1/s)
- C_bl (~astropy.units.Quantity(~numpy.ndarray(float))):
Background leak count rate (1/s)’
- Npix (float):
Number of pixels in photometric aperture
- Return type:
- calc_dMag_per_intTime(intTimes, TL, sInds, fZ, fEZ, WA, mode, C_b=None, C_sp=None, TK=None)[source]
Finds achievable planet delta magnitude for one integration time per star in the input list at one working angle.
- Parameters:
intTimes (Quantity(ndarray(float))) – Integration times in units of day
TL (TargetList) – TargetList class object
sInds (numpy.ndarray(int)) – Integer indices of the stars of interest
fZ (Quantity(ndarray(float))) – Surface brightness of local zodiacal light in units of 1/arcsec2
fEZ (Quantity(ndarray(float))) – Surface brightness of exo-zodiacal light in units of 1/arcsec2
WA (Quantity(ndarray(float))) – Working angles of the planets of interest in units of arcsec
mode (dict) – Selected observing mode
C_b (Quantity(ndarray(float))) – Background noise electron count rate in units of 1/s (optional)
C_sp (Quantity(ndarray(float))) – Residual speckle spatial structure (systematic error) in units of 1/s (optional)
TK (TimeKeeping, optional) – Optional TimeKeeping object (default None), used to model detector degradation effects where applicable.
- Returns:
Achievable dMag for given integration time and working angle
- Return type:
Warning
The prototype implementation assumes the exact same integration time model as the other prototype methods (specifically Cp_Cb_Csp and calc_intTime). If either of these is overloaded, and, in particular, if C_b and/or C_sp are not modeled as independent of C_p, then the analytical approach used here will not work and must be replaced with numerical inversion.
- calc_intTime(TL, sInds, fZ, fEZ, dMag, WA, mode, TK=None)[source]
Finds integration time to reach a given dMag at a particular WA with given local and exozodi values for specific targets and for a specific observing mode.
- Parameters:
TL (TargetList) – TargetList class object
sInds (numpy.ndarray(int)) – Integer indices of the stars of interest
fZ (Quantity(ndarray(float))) – Surface brightness of local zodiacal light in units of 1/arcsec2
fEZ (Quantity(ndarray(float))) – Surface brightness of exo-zodiacal light in units of 1/arcsec2
dMag (numpy.ndarray(int)numpy.ndarray(float)) – Differences in magnitude between planets and their host star
WA (Quantity(ndarray(float))) – Working angles of the planets of interest in units of arcsec
mode (dict) – Selected observing mode
TK (TimeKeeping, optional) – Optional TimeKeeping object (default None), used to model detector degradation effects where applicable.
- Returns:
Integration times
- Return type:
Note
All infeasible integration times are returned as NaN values
- calc_saturation_dMag(TL, sInds, fZ, fEZ, WA, mode, TK=None)[source]
This calculates the delta magnitude for each target star that corresponds to an infinite integration time.
- Parameters:
TL (TargetList) – TargetList class object
sInds (numpy.ndarray(int)) – Integer indices of the stars of interest
fZ (Quantity(ndarray(float))) – Surface brightness of local zodiacal light in units of 1/arcsec2
fEZ (Quantity(ndarray(float))) – Surface brightness of exo-zodiacal light in units of 1/arcsec2
WA (Quantity(ndarray(float))) – Working angles of the planets of interest in units of arcsec
mode (dict) – Selected observing mode
TK (TimeKeeping, optional) – Optional TimeKeeping object (default None), used to model detector degradation effects where applicable.
- Returns:
Saturation (maximum achievable) dMag for each target star
- Return type:
- ddMag_dt(intTimes, TL, sInds, fZ, fEZ, WA, mode, C_b=None, C_sp=None, TK=None)[source]
Finds derivative of achievable dMag with respect to integration time.
- Parameters:
intTimes (Quantity(ndarray(float))) – Integration times in units of day
TL (TargetList) – TargetList class object
sInds (numpy.ndarray(int)) – Integer indices of the stars of interest
fZ (Quantity(ndarray(float))) – Surface brightness of local zodiacal light in units of 1/arcsec2
fEZ (Quantity(ndarray(float))) – Surface brightness of exo-zodiacal light in units of 1/arcsec2
WA (Quantity(ndarray(float))) – Working angles of the planets of interest in units of arcsec
mode (dict) – Selected observing mode
C_b (Quantity(ndarray(float))) – Background noise electron count rate in units of 1/s (optional)
C_sp (Quantity(ndarray(float))) – Residual speckle spatial structure (systematic error) in units of 1/s (optional)
TK (TimeKeeping, optional) – Optional TimeKeeping object (default None), used to model detector degradation effects where applicable.
- Returns:
Derivative of achievable dMag with respect to integration time in units of 1/s
- Return type:
- genObsModeHex()[source]
Generate a unique hash for every observing mode to be used in downstream identification and caching.
The hash will be based on the _outspec entries for the obsmode, its science instrument and its starlight suppression system.
- get_angle_unit_from_header(hdr, syst)[source]
Helper method. Extract angle unit from header, if it exists.
- Parameters:
hdr (astropy.io.fits.header.Header or list) – FITS header for data or header row from CSV
syst (dict) – Dictionary containing the parameters of one starlight suppression system
- Returns:
The angle unit.
- Return type:
- get_coro_param(syst, param_name, fill=0.0, expected_ndim=None, expected_first_dim=None, min_val=None, max_val=None)[source]
For a given starlightSuppressionSystem, this method loads an input parameter from a table (fits or csv file) or a scalar value. It then creates a callable lambda function, which depends on the wavelength of the system and the angular separation of the observed planet.
- Parameters:
syst (dict) – Dictionary containing the parameters of one starlight suppression system
param_name (str) – Name of the parameter that must be loaded
fill (float) – Fill value for working angles outside of the input array definition
expected_ndim (int, optional) – Expected number of dimensions. Only checked if not None. Defaults None.
expected_first_dim (int, optional) – Expected size of first dimension of data. Only checked if not None. Defaults None
min_val (float, optional) – Minimum allowed value of parameter. Defaults to None (no check).
max_val (float, optional) – Maximum allowed value of paramter. Defaults to None (no check).
- Returns:
Updated dictionary of starlight suppression system parameters
- Return type:
Note
The created lambda function handles the specified wavelength by rescaling the specified working angle by a factor syst[‘lam’]/mode[‘lam’]
Note
If the input parameter is taken from a table, the IWA and OWA of that system are constrained by the limits of the allowed WA on that table.
- get_param_data(ipth, left_col_name=None, param_name=None, expected_ndim=None, expected_first_dim=None)[source]
Gets the data from a file, used primarily to create interpolants for coronagraph parameters
- Parameters:
ipth (str) – String to file location, will also work with any other path object
left_col_name (str,optional) – For CSV files only. String representing the column containing the independent parameter to be extracted. This is for use in the case where the CSV file contains multiple columns and only two need to be returned. Defaults None.
param_name (str, optional) – For CSV files only. String representing the column containing the dependent parameter to be extracted. This is for use in the case where the CSV file contains multiple columns and only two need to be returned. Defaults None.
expected_ndim (int, optional) – Expected number of dimensions. Only checked if not None. Defaults None.
expected_first_dim (int, optional) – Expected size of first dimension of data. Only checked if not None. Defaults None
- Returns:
- dat (~numpy.ndarray):
Data array
- hdr (list or astropy.io.fits.header.Header):
Data header. For CVS files this is a list of column header strings.
- Return type:
Note
CSV files must have a single header row
- populate_observingModes(observingModes)[source]
Helper method to parse input observingMode dictionaries and assign default values, as needed. Also creates the allowed_observingMode_kws attribute.
- Parameters:
observingModes (list) – List of observingMode dicts.
- populate_observingModes_extra()[source]
Additional setup for observing modes This is intended for overloading in downstream implementations and is intentionally left blank in the prototype.
- populate_scienceInstruments(scienceInstruments)[source]
Helper method to parse input scienceInstrument dictionaries and assign default values, as needed. Also creates the allowed_scienceInstrument_kws attribute.
- Parameters:
scienceInstruments (list) – List of scienceInstrument dicts.
- populate_scienceInstruments_extra()[source]
Additional setup for science instruments. This is intended for overloading in downstream implementations and is intentionally left blank in the prototype.
- populate_starlightSuppressionSystems(starlightSuppressionSystems)[source]
Helper method to parse input starlightSuppressionSystem dictionaries and assign default values, as needed. Also creates the allowed_starlightSuppressionSystem_kws attribute.
- Parameters:
starlightSuppressionSystems (list) – List of starlightSuppressionSystem dicts.
- populate_starlightSuppressionSystems_extra()[source]
Additional setup for starlight suppression systems. This is intended for overloading in downstream implementations and is intentionally left blank in the prototype.
- update_syst_WAs(syst, WA0, param_name)[source]
Helper method. Check system IWA/OWA and update from table data, as needed. Alternatively, set from defaults.
- Parameters:
syst (dict) – Dictionary containing the parameters of one starlight suppression system
WA0 (ndarray, optional) – Array of angles from table data. Must be in arcseconds. If None, then just set from defaults.
param_name (str, optional) – Name of parameter the table data belongs to. Must be set if WA is set.
- Returns:
Updated dictionary of starlight suppression system parameters
- Return type:
EXOSIMS.Prototypes.PlanetPhysicalModel module
- class EXOSIMS.Prototypes.PlanetPhysicalModel.PlanetPhysicalModel(cachedir=None, whichPlanetPhaseFunction='lambert', **specs)[source]
Bases:
object
PlanetPhysicalModel Prototype
- Parameters:
whichPlanetPhaseFunction (str) – Name of phase function to use. See PlanetPhysicalModel.
**specs – Input Specification
- _outspec
-
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- calc_Phi(beta, phiIndex=None)[source]
Calculate the phase function. Prototype method uses the Lambert phase function from Sobolev 1975.
- calc_Teff(starL, d, p)[source]
Calcluates the effective planet temperature given the stellar luminosity, planet albedo and star-planet distance.
This calculation represents a basic balckbody power balance, and does not take into account the actual emmisivity of the planet, or any non-equilibrium effects or temperature variations over the surface.
Note: The input albedo is taken to be the bond albedo, as required by the equilibrium calculation. For an isotropic scatterer (Lambert phase function) the Bond albedo is 1.5 times the geometric albedo. However, the Bond albedo must be strictly defined between 0 and 1, and an albedo of 1 produces a zero effective temperature.
- calc_albedo_from_sma(a, prange=[0.367, 0.367])[source]
Helper function for calculating albedo given the semi-major axis. The prototype provides only a dummy function that always returns the same value of 0.367.
- calc_radius_from_mass(Mp)[source]
Helper function for calculating radius given the mass.
Prototype provides only a dummy function that assumes a density of water.
- Parameters:
Mp (astropy.units.Quantity(numpy.ndarray(float))) – Planet mass in units of Earth mass
- Returns:
Planet radius in units of Earth radius
- Return type:
EXOSIMS.Prototypes.PlanetPopulation module
- class EXOSIMS.Prototypes.PlanetPopulation.PlanetPopulation(arange=[0.1, 100.0], erange=[0.01, 0.99], Irange=[0.0, 180.0], Orange=[0.0, 360.0], wrange=[0.0, 360.0], prange=[0.1, 0.6], Rprange=[1.0, 30.0], Mprange=[1.0, 4131.0], scaleOrbits=False, constrainOrbits=False, eta=0.1, cachedir=None, **specs)[source]
Bases:
object
PlanetPopulation Prototype
- Parameters:
arange (list(float)) – [Min, Max] semi-major axis (in AU). Defaults to [0.1,100.]
erange (list(float)) – [Min, Max] eccentricity. Defaults to [0.01,0.99]
Irange (list(float)) – [Min, Max] inclination (in degrees). Defaults to [0.,180.]
Orange (list(float)) – [Min, Max] longitude of the ascending node (in degrees). Defaults to [0.,360.]
wrange (list(float)) – [Min, Max] argument of periapsis. Defaults to [0.,360.]
prange (list(float)) – [Min, Max] geometric albedo. Defaults to [0.1,0.6]
Rprange (list(float)) – [Min, Max] planet radius (in Earth radii). Defaults to [1.,30.]
Mprange (list(float)) – [Min, Max] planet mass (in Earth masses). Defaults to [1.,4131.]
scaleOrbits (bool) – Scale orbits by \(\sqrt{L}\) where \(L\) is the stellar luminosity. This has the effect of matching insolation distnaces and preserving the habitable zone of the population. Defaults to False.
constrainOrbits (bool) – Do not allow orbits where orbital radius can exceed the
arange
limits. Defaults to Falseeta (float) – Overall occurrence rate of the population. The expected number of planets per target star. Must be strictly positive, but may be greater than 1 (if more than 1 planet is expected per star, on average). Defaults to 0.1.
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
**specs – Input Specification
- _outspec
-
- Type:
- arange
[Min, Max] semi-major axis
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- erange
[Min, Max] eccentricity.
- Type:
- eta
Overall occurrence rate of the population. The expected number of planets per target star. Must be strictly positive, but may be greater than 1 (if more than 1 planet is expected per star, on average).
- Type:
- Irange
[Min, Max] inclination
- Mprange
[Min, Max] planet mass
- Orange
[Min, Max] longitude of the ascending node
- PlanetPhysicalModel
Planet physical model object
- Type:
- prange
[Min, Max] geometric albedo.
- Type:
- Rprange
[Min, Max] planet radius
- rrange
[Min, Max] orbital radius
- scaleOrbits
Scale orbits by \(\sqrt{L}\) where \(L\) is the stellar luminosity. This has the effect of matching insolation distnaces and preserving the habitable zone of the population.
- Type:
- wrange
[Min, Max] argument of periapsis.
- checkranges(var, name)[source]
Helper function provides asserts on all 2 element lists of ranges
- Parameters:
- Returns:
Sorted input variable
- Return type:
Raises AssertionError on test fail.
- dist_albedo(p)[source]
Probability density function for albedo
The prototype provides a uniform distribution between the minimum and maximum values.
- dist_eccen(e)[source]
Probability density function for eccentricity
The prototype provides a uniform distribution between the minimum and maximum values.
- dist_eccen_from_sma(e, a)[source]
Probability density function for eccentricity constrained by semi-major axis, such that orbital radius always falls within the provided sma range.
The prototype provides a uniform distribution between the minimum and maximum allowable values.
- dist_mass(Mp)[source]
Probability density function for planetary mass in Earth mass
The prototype provides an unbounded power law distribution. Note that this should really be a function of a density model and the radius distribution for all implementations that use it.
- dist_radius(Rp)[source]
Probability density function for planetary radius in Earth radius
The prototype provides a log-uniform distribution between the minimum and maximum values.
- dist_sma(a)[source]
Probability density function for semi-major axis in AU
The prototype provides a log-uniform distribution between the minimum and maximum values.
- gen_angles(n, commonSystemInclinations=False, commonSystemInclinationParams=None)[source]
Generate inclination, longitude of the ascending node, and argument of periapse in degrees
The prototype generates inclination as sinusoidally distributed and longitude of the ascending node and argument of periapse as uniformly distributed.
- Parameters:
n (int) – Number of samples to generate
commonSystemInclinations (bool) – Generate delta inclinations from common orbital plane rather than fully independent inclinations. Defaults False. If True, commonSystemInclinationParams must be supplied.
commonSystemInclinationParams (None or list) – 2 element list of [mean, standard deviation] in units of degrees, describing the distribution of inclinations relative to a common orbital plane. Ignored if commonSystemInclinations is False.
- Returns:
- I (~astropy.units.Quantity(~numpy.ndarray(float))):
Inclination in units of degrees OR deviation in inclination (deg)
- O (~astropy.units.Quantity(~numpy.ndarray(float))):
Longitude of the ascending node (deg)
- w (~astropy.units.Quantity(~numpy.ndarray(float))):
Argument of periapsis (deg)
- Return type:
- gen_input_check(n)[source]
Helper function checks that input is integer, casts to int, is >= 0
- Parameters:
n (float) – An integer to validate
- Returns:
The input integer as an integer
- Return type:
Raises AssertionError on test fail.
- gen_mass(n)[source]
Generate planetary mass values in units of Earth mass.
The prototype provides a log-uniform distribution between the minimum and maximum values.
- gen_plan_params(n)[source]
Generate semi-major axis (AU), eccentricity, geometric albedo, and planetary radius (earthRad)
The prototype generates semi-major axis and planetary radius with log-uniform distributions and eccentricity and geometric albedo with uniform distributions.
- Parameters:
n (int) – Number of samples to generate
- Returns:
- a (~astropy.units.Quantity(~numpy.ndarray(float))):
Semi-major axis in units of AU
- e (~numpy.ndarray(float)):
Eccentricity
- p (~numpy.ndarray(float)):
Geometric albedo
- Rp (~astropy.units.Quantity(~numpy.ndarray(float))):
Planetary radius in units of earthRad
- Return type:
EXOSIMS.Prototypes.PostProcessing module
- class EXOSIMS.Prototypes.PostProcessing.PostProcessing(FAP=3e-07, MDP=0.001, ppFact=1.0, ppFact_char=1.0, FAdMag0=15, cachedir=None, **specs)[source]
Bases:
object
PostProcessing Prototype
- Parameters:
FAP (float) – False Alarm Probability. See [Kasdin2006]. Defaults to 3e-7
MDP (float) – Missed Detection Probability. See [Kasdin2006]. Defaults to 1e-3
ppFact (float or str) – Post-processing contrast factor, between 0 and 1. Either a scalar float for constant gain, or a string with the full path to a FITS file containing a two-column array for separation-dependent gain, where the first column contains the angular separation in units of arcsec. Defaults to 1.0
ppFact_char (float or str) – Same as ppFact, but for spectral characterization. Defaults to 1.0
FAdMag0 (float or str) – Minimum delta magnitude that can be obtained by a false alarm: either a scalar for constant dMag, or a string with the full path to a FITS file containing a two-column array for separation-dependent dMag, where the first column contains the angular separation in units of arcsec. Defaults to 15
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
**specs – Input Specification
- _outspec
-
- Type:
- BackgroundSources
BackgroundSources object
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- FAP
False Alarm Probability. See [Kasdin2006].
- Type:
- MDP
Missed Detection Probability. See [Kasdin2006].
- Type:
- ppFact
Post-processing contrast factor, between 0 and 1, parametrized by angular separation
- Type:
callable
- ppFact_char
Same as ppFact, but for characterization
- Type:
callable
- FAdMag0
Minimum delta magnitude that can be obtained by a false alarm parametrized by angular separation
- Type:
callable
- det_occur(SNR, mode, TL, sInd, intTime)[source]
Determines if a detection has occurred
- Parameters:
- Returns:
- FA (bool):
False alarm (false positive) boolean.
- MD (
ndarray
(bool)): Missed detection (false negative) boolean with the size of number of planets around the target.
- Return type:
Note
The prototype implemenation does not consider background sources in calculating false positives, however, the unused TargetList, integration time and star index inputs are part of the interface to allow another implementation to do this.
EXOSIMS.Prototypes.SimulatedUniverse module
- class EXOSIMS.Prototypes.SimulatedUniverse.SimulatedUniverse(fixedPlanPerStar=None, Min=None, cachedir=None, lucky_planets=False, commonSystemInclinations=False, commonSystemInclinationParams=[0, 2.25], **specs)[source]
Bases:
object
SimulatedUniverse Prototype
- Parameters:
fixedPlanPerStar (int, optional) – If set, every system will have the same number of planets. Defaults to None
Min (float, optional) – Initial mean anomaly for all planets. If set, every planet has the same mean anomaly at mission start. Defaults to None
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
lucky_planets (bool) – Used downstream in survey simulation. If True, planets are observed at optimal times. Defaults to False
commonSystemInclinations (bool) – Planet inclinations are sampled as normally distributed about a common system plane. Defaults to False
commonSystemInclinationParams (list(float)) – [Mean, Standard Deviation] defining the normal distribution of inclinations about a common system plane. Ignored if commonSystemInclinations is False. Defaults to [0 2.25], where the standard deviation is approximately the standard deviation of solar system planet inclinations.
**specs – Input Specification
- _outspec
-
- Type:
- a
Planet semi-major axis (length units)
- BackgroundSources
BackgroundSources object
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- commonSystemInclinationParams
2 element list of [mean, standard deviation] in units of degrees, describing the distribution of inclinations relative to a common orbital plane. Ignored if commonSystemInclinations is False.
- Type:
- commonSystemInclinations
If False, planet inclinations are independently drawn for all planets, including those in the same target system. If True, inclinations will be drawn from a normal distribution defined by commonSystemInclinationParams and added to a single inclination value drawn for each system.
- Type:
- Completeness
Completeness object
- Type:
- d
Current orbital radius magnitude (length units)
- dMag
Current planet \(\Delta\mathrm{mag}\)
- Type:
- e
Planet eccentricity
- Type:
- fEZ
Surface brightness of exozodiacal light in units of 1/arcsec2
- fixedPlanPerStar
If set, every system has the same number of planets, given by this attribute
- Type:
int or None
- I
Planet inclinations (angle units)
- M0
Initial planet mean anomaly (at mission start time).
- Min
Input constant initial mean anomaly. If none, initial mean anomaly is randomly distributed from a uniform distribution in [0, 360] degrees.
- Type:
float or None
- Mp
Planet mass.
- O
Planet longitude of the ascending node (angle units)
- OpticalSystem
Optical System object
- Type:
- p
Planet geometric albedo
- Type:
- phi
Current value of planet phase function.
- Type:
- phiIndex
Intended for use with input ‘whichPlanetPhaseFunction’=’realSolarSystemPhaseFunc’ When None, the default is the phi_lambert function, otherwise it is Solar System Phase Functions
- Type:
- plan2star
Index of host star or each planet. Indexes attributes of TargetsList.
- Type:
- PlanetPhysicalModel
Planet physical model object.
- Type:
- PlanetPopulation
Planet population object.
- Type:
- PostProcessing
Postprocessing object.
- Type:
- r
Current planet orbital radius (3xnPlans). Length units.
- Rp
Planet radius (length units).
- s
Current planet projected separation. Length units.
- sInds
Indices of stars with planets. Equivalent to unique entries of
plan2star
.- Type:
- TargetList
Target list object.
- Type:
- v
Current orbital velocity vector (3xnPlans). Velocity units.
- w
Planet argument of periapsis.
- WA
Current planet angular separation (angle units)
- ZodiacalLight
Zodiacal light object.
- Type:
Note
When generating planets, PlanetPopulation attribute
eta
is treated as the rate parameter of a Poisson distribution. Each target’s number of planets is a Poisson random variable sampled with \(\lambda\equiv\eta\).Warning
All attributes described as ‘current’ are updated only when planets are observed. As such, during mission simulations, these values for different planets correspond to different times (bookkept in the survey simulation object).
- dump_system_params(sInd=None)[source]
Create a dictionary of time-dependant planet properties for a specific target
- dump_systems()[source]
Create a dictionary of planetary properties for archiving use.
- Parameters:
None –
- Returns:
Dictionary of planetary properties
- Return type:
- gen_physical_properties(**specs)[source]
Generates the planetary systems’ physical properties.
Populates arrays of the orbital elements, albedos, masses and radii of all planets, and generates indices that map from planet to parent star.
- Parameters:
**specs – Input Specification
- Returns:
None
- init_systems()[source]
Finds initial time-dependant parameters. Assigns each planet an initial position, velocity, planet-star distance, apparent separation, phase function, surface brightness of exo-zodiacal light, delta magnitude, and working angle.
This method makes use of the systems’ physical properties (masses, distances) and their orbital elements (a, e, I, O, w, M0).
- load_systems(systems)[source]
Load a dictionary of planetary properties (nominally created by dump_systems)
- Parameters:
systems (dict) – Dictionary of planetary properties corresponding to the output of dump_systems.
Returns – None
Note
If keyword
starI
is present in the dictionary, it is assumed that it was generated withcommonSystemInclinations
set to True. Similarly, if keywordstarnEZ
is present, it is assumed thatZodiacalLight.commonSystemfEZ
should be true.Warning
This method assumes that the exact same targetlist is being used as in the object that generated the systems dictionary. If this assumption is violated unexpected results may occur.
- propag_system(sInd, dt)[source]
Propagates planet time-dependant parameters: position, velocity, planet-star distance, apparent separation, phase function, surface brightness of exo-zodiacal light, delta magnitude, and working angle.
This method uses the Kepler state transition matrix to propagate a planet’s state (position and velocity vectors) forward in time using the Kepler state transition matrix.
- revise_planets_list(pInds)[source]
Replaces Simulated Universe planet attributes with filtered values, and updates the number of planets.
Warning
Throws AssertionError if all planets are removed
- revise_stars_list(sInds)[source]
Revises the TargetList with filtered values, and updates the planets list accordingly.
- set_planet_phase(beta=1.5707963267948966)[source]
Positions all planets at input star-planet-observer phase angle where possible. For systems where the input phase angle is not achieved, planets are positioned at quadrature (phase angle of 90 deg).
The position found here is not unique. The desired phase angle will be achieved at two points on the planet’s orbit (for non-face on orbits).
- Parameters:
beta (float) – star-planet-observer phase angle in radians.
EXOSIMS.Prototypes.StarCatalog module
- class EXOSIMS.Prototypes.StarCatalog.StarCatalog(ntargs=1, cachedir=None, VmagFill=0.1, **specs)[source]
Bases:
object
StarCatalog Prototype
- Parameters:
ntargs (int) – Number of stars in catalog. Defaults to 1.
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
VmagFill (float) – Fill value for V magnitudes. Defaults to 0.1. Must be set to non-zero value or TargetList will fail to build.
**specs – Input Specification
- Binary_Cut
Boolean where True is a binary star with companion closer than 10 arcsec
- coords
SkyCoord object (ICRS frame) containing right ascension, declination, and distance to star in units of deg, deg, and pc
Note
The prototype will generate empty arrays for all attributes of size ntargs. These can then be either filled in or overwritten by inheriting implementations.
EXOSIMS.Prototypes.SurveyEnsemble module
- class EXOSIMS.Prototypes.SurveyEnsemble.SurveyEnsemble(cachedir=None, **specs)[source]
Bases:
object
SurveyEnsemble Prototype
- Parameters:
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
**specs – Input Specification
- _outspec
-
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
Important
The prototype implementation provides no parallelization. See SurveyEnsemble for more info.
- run_ensemble(sim, nb_run_sim, run_one=None, genNewPlanets=True, rewindPlanets=True, kwargs={})[source]
Execute simulation ensemble
- Parameters:
sim (
EXOSIMS.MissionSim
) – MissionSim objectnb_run_sim (int) – number of simulations to run
run_one (callable) – method to call for each simulation
genNewPlanets (bool) – Generate new planets each for simulation. Defaults True.
rewindPlanets (bool) – Reset planets to initial mean anomaly for each simulation. Defaults True
kwargs (dict) – Keyword arguments to pass onwards (not used in prototype)
- Returns:
List of dictionaries of mission results
- Return type:
- run_one(SS, genNewPlanets=True, rewindPlanets=True)[source]
- Parameters:
SS (SurveySimulation) – SurveySimulation object
genNewPlanets (bool) – Generate new planets each for simulation. Defaults True.
rewindPlanets (bool) – Reset planets to initial mean anomaly for each simulation. Defaults True
- Returns:
Mission results
- Return type:
EXOSIMS.Prototypes.SurveySimulation module
- class EXOSIMS.Prototypes.SurveySimulation.SurveySimulation(scriptfile=None, ntFlux=1, nVisitsMax=5, charMargin=0.15, dt_max=1.0, record_counts_path=None, nokoMap=False, nofZ=False, cachedir=None, defaultAddExoplanetObsTime=True, find_known_RV=False, include_known_RV=None, **specs)[source]
Bases:
object
SurveySimulation Prototype
- Parameters:
scriptfile (str, optional) – JSON script file. If not set, assumes that dictionary has been passed through specs. Defaults to None ntFlux (int): Number of intervals to split integration into for computing total SNR. When greater than 1, SNR is effectively computed as a Reimann sum. Defaults to 1
nVisitsMax (int) – Maximum number of observations (in detection mode) per star. Defaults to 5
charMargin (float) – Integration time margin for characterization. Defaults to 0.15
dt_max (float) – Maximum time for revisit window (in days). Defaults to 1.
record_counts_path (str, optional) – If set, write out photon count info to file specified by this keyword. Defaults to None.
nokoMap (bool) – Skip generating keepout map. Only useful if you’re not planning on actually running a mission simulation. Defaults to False.
nofZ (bool) – Skip precomputing zodical light minima. Only useful if you’re not planning on actually running a mission simulation. Defaults to False.
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
defaultAddExoplanetObsTime (bool) – If True, time advancement when no targets are observable will add to exoplanetObsTime (i.e., wasting time is counted against you). Defaults to True
find_known_RV (bool) – Identify stars with known planets. Defaults to False
include_known_RV (str, optional) – Path to file including known planets to include. Defaults to None
**specs – Input Specification
- _outspec
-
- Type:
- absTimefZmin
Absolute time of local zodi minima
- Type:
- BackgroundSources
BackgroundSources object
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- Completeness
Completeness object
- Type:
- defaultAddExoplanetObsTime
If True, time advancement when no targets are observable will add to exoplanetObsTime (i.e., wasting time is counted against you).
- Type:
- dt_max
Maximum time for revisit window.
- fullSpectra
Array of booleans indicating whether a planet’s spectrum has been fully observed.
- Type:
- intTimeFilterInds
Indices of targets where integration times fall below cutoff value
- Type:
numpy.ndarray(ind)
- intTimesIntTimeFilter
Default integration times for pre-filtering targets.
- known_earths
Indices of Earth-like planets
- Type:
- koTimes
Times corresponding to keepout map array entries.
- Type:
- lastDetected
ntarg x 4. For each target, contains 4 lists with planets’ detected status (boolean), exozodi brightness (in units of 1/arcsec2), delta magnitude, and working angles (in units of arcsec)
- Type:
- lastObsTimes
Contains the last observation start time for future completeness update in units of day
- logger
Logger object
- Type:
- ntFlux
Number of intervals to split integration into for computing total SNR. When greater than 1, SNR is effectively computed as a Reimann sum.
- Type:
- Observatory
Observatory object.
- Type:
- OpticalSystem
Optical system object.
- Type:
- partialSpectra
Array of booleans indicating whether a planet’s spectrum has been partially observed.
- Type:
- PlanetPhysicalModel
Planet pysical model object
- Type:
- PlanetPopulation
Planet population object
- Type:
- PostProcessing
Postprocessing object
- Type:
- propagTimes
Contains the current time at each target system.
- record_counts_path
If set, write out photon count info to file specified by this keyword.
- Type:
str, optional
- SimulatedUniverse
Simulated universe object
- Type:
- StarCatalog
Star catalog object (only if
keepStarCatalog
input is True.- Type:
- starExtended
TBD
- Type:
- starRevisit
ntargs x 2. Contains indices of targets to revisit and revisit times of these targets in units of day
- Type:
- starVisits
ntargs x 1. Contains the number of times each target was visited
- Type:
- TargetList
TargetList object.
- Type:
- TimeKeeping
Timekeeping object
- Type:
- valfZmin
Minimum local zodi for each target.
- ZodiacalLight
Zodiacal light object.
- Type:
- arbitrary_time_advancement(dt)[source]
Handles fully dynamically scheduled case where OBduration is infinite and missionPortion is less than 1.
- Parameters:
dt (Quantity) – Total amount of time, including all overheads and extras used for the previous observation.
- Returns:
None
- calc_signal_noise(sInd, pInds, t_int, mode, fZ=None, fEZ=None, dMag=None, WA=None)[source]
Calculates the signal and noise fluxes for a given time interval. Called by observation_detection and observation_characterization methods in the SurveySimulation module.
- Parameters:
sInd (int) – Integer index of the star of interest
t_int (Quantity(ndarray(float))) – Integration time interval in units of day
pInds (int) – Integer indices of the planets of interest
mode (dict) – Selected observing mode (from OpticalSystem)
fZ (Quantity(ndarray(float))) – Surface brightness of local zodiacal light in units of 1/arcsec2
fEZ (Quantity(ndarray(float))) – Surface brightness of exo-zodiacal light in units of 1/arcsec2
dMag (ndarray(float)) – Differences in magnitude between planets and their host star
WA (Quantity(ndarray(float))) – Working angles of the planets of interest in units of arcsec
- Returns:
- Signal (float):
Counts of signal
- Noise (float):
Counts of background noise variance
- Return type:
- calc_targ_intTime(sInds, startTimes, mode)[source]
Helper method for next_target to aid in overloading for alternative implementations.
Given a subset of targets, calculate their integration times given the start of observation time.
Prototype just calculates integration times for fixed contrast depth.
- Parameters:
- Returns:
Integration times for detection same dimension as sInds
- Return type:
Note
next_target filter will discard targets with zero integration times.
- chooseOcculterSlewTimes(sInds, slewTimes, dV, intTimes, charTimes)[source]
Selects the best slew time for each star
This method searches through an array of permissible slew times for each star and chooses the best slew time for the occulter based on maximizing possible characterization time for that particular star (as a default).
- Parameters:
slewTimes (astropy quantity array) – slew times to all stars (must be indexed by sInds)
dV (Quantity(ndarray(float))) – Delta-V used to transfer to new star line of sight in unis of m/s
intTimes (Quantity(ndarray(float))) – Integration times for detection in units of day
charTimes (Quantity(ndarray(float))) – Time left over after integration which could be used for characterization in units of day
- Returns:
- sInds (int):
Indeces of next target star
- slewTimes (astropy.units.Quantity(numpy.ndarray(float))):
slew times to all stars (must be indexed by sInds)
- intTimes (astropy.units.Quantity(numpy.ndarray(float))):
Integration times for detection in units of day
- dV (astropy.units.Quantity(numpy.ndarray(float))):
Delta-V used to transfer to new star line of sight in unis of m/s
- Return type:
- choose_next_target(old_sInd, sInds, slewTimes, intTimes)[source]
Helper method for method next_target to simplify alternative implementations.
Given a subset of targets (pre-filtered by method next_target or some other means), select the best next one. The prototype uses completeness as the sole heuristic.
- Parameters:
- Returns:
- sInd (int):
Index of next target star
- waitTime (
Quantity
): Some strategic amount of time to wait in case an occulter slew is desired (default is None)
- Return type:
- filterOcculterSlews(sInds, slewTimes, obsTimeArray, intTimeArray, mode)[source]
Filters occulter slews that have already been calculated/selected.
Used by the refineOcculterSlews method when slew times have been selected a priori. This method filters out slews that are not within desired observing blocks, the maximum allowed integration time, and are outside of future keepouts.
- Parameters:
slewTimes (Quantity(ndarray(float))) – slew times to all stars (must be indexed by sInds)
obsTimeArray (Quantity(ndarray(float))) – Array of times during which a star is out of keepout, has shape nx50 where n is the number of stars in sInds. Unit of days
intTimeArray (Quantity(ndarray(float))) – Array of integration times for each time in obsTimeArray, has shape nx2 where n is the number of stars in sInds. Unit of days
mode (dict) – Selected observing mode for detection
- Returns:
- sInds (int):
Indeces of next target star
- intTimes (astropy.units.Quantity(numpy.ndarray(float))):
Integration times for detection in units of day
- slewTimes (astropy.units.Quantity(numpy.ndarray(float))):
slew times to all stars (must be indexed by sInds)
- Return type:
- findAllowableOcculterSlews(sInds, old_sInd, sd, slewTimes, obsTimeArray, intTimeArray, mode)[source]
Finds an array of allowable slew times for each star
Used by the refineOcculterSlews method when slew times have NOT been selected a priori. This method creates nx50 arrays (where the row corresponds to a specific star and the column corresponds to a future point in time relative to currentTime).
These arrays are initially zero but are populated with the corresponding values (slews, intTimes, etc) if slewing to that time point (i.e. beginning an observation) would lead to a successful observation. A “successful observation” is defined by certain conditions relating to keepout and the komap, observing blocks, mission lifetime, and some constraints on the dVmap calculation in SotoStarshade. Each star will likely have a range of slewTimes that would lead to a successful observation – another method is then called to select the best of these slewTimes.
- Parameters:
old_sInd (int) – Index of the previous target star
sd (Quantity(ndarray(float))) – Angular separation between stars in rad
slewTimes (astropy quantity array) – slew times to all stars (must be indexed by sInds)
obsTimeArray (Quantity(ndarray(float))) – Array of times during which a star is out of keepout, has shape nx50 where n is the number of stars in sInds
intTimeArray (Quantity(ndarray(float))) – Array of integration times for each time in obsTimeArray, has shape nx50 where n is the number of stars in sInds
mode (dict) – Selected observing mode for detection
- Returns:
- sInds (numpy.ndarray(int)):
Indices of next target star
- slewTimes (astropy.units.Quantity(numpy.ndarray(float))):
slew times to all stars (must be indexed by sInds)
- intTimes (astropy.units.Quantity(numpy.ndarray(float))):
Integration times for detection in units of day
- dV (astropy.units.Quantity(numpy.ndarray(float))):
Delta-V used to transfer to new star line of sight in unis of m/s
- Return type:
- find_known_plans()[source]
Find and return list of known RV stars and list of stars with earthlike planets based on info from David Plavchan dated 12/24/2018
- genOutSpec(tofile: str | None = None, starting_outspec: Dict[str, Any] | None = None, modnames: bool = False) Dict[str, Any] [source]
Join all _outspec dicts from all modules into one output dict and optionally write out to JSON file on disk.
- Parameters:
tofile (str, optional) – Name of the file containing all output specifications (outspecs). Defaults to None.
starting_outspec (dict, optional) – Initial outspec (from MissionSim). Defaults to None.
modnames (bool) – If True, populate outspec dictionary with the module it originated from, instead of the actual value of the keyword. Defaults False.
- Returns:
Dictionary containing the full Input Specification, including all filled-in default values. Combination of all individual module _outspec attributes.
- Return type:
- generateHashfName(specs)[source]
Generate cached file Hashname
Requires a .XXX appended to end of hashname for each individual use case
- Parameters:
specs (dict) – Input Specification
- Returns:
Unique indentifier string for cahce products from this set of modules and inputs
- Return type:
- next_target(old_sInd, mode)[source]
Finds index of next target star and calculates its integration time.
This method chooses the next target star index based on which stars are available, their integration time, and maximum completeness. Returns None if no target could be found.
- Parameters:
- Returns:
- DRM (dict):
Design Reference Mission, contains the results of one complete observation (detection and characterization)
- sInd (int):
Index of next target star. Defaults to None.
- intTime (astropy.units.Quantity):
Selected star integration time for detection in units of day. Defaults to None.
- waitTime (astropy.units.Quantity):
a strategically advantageous amount of time to wait in the case of an occulter for slew times
- Return type:
- observation_characterization(sInd, mode)[source]
Finds if characterizations are possible and relevant information
- Parameters:
- Returns:
- characterized (list(int)):
Characterization status for each planet orbiting the observed target star including False Alarm if any, where 1 is full spectrum, -1 partial spectrum, and 0 not characterized
- fZ (astropy.units.Quantity(numpy.ndarray(float))):
Surface brightness of local zodiacal light in units of 1/arcsec2
- systemParams (dict):
Dictionary of time-dependant planet properties averaged over the duration of the integration
- SNR (numpy.ndarray(float)):
Characterization signal-to-noise ratio of the observable planets. Defaults to None.
- intTime (astropy.units.Quantity(numpy.ndarray(float))):
Selected star characterization time in units of day. Defaults to None.
- Return type:
- observation_detection(sInd, intTime, mode)[source]
Determines SNR and detection status for a given integration time for detection. Also updates the lastDetected and starRevisit lists.
- Parameters:
- Returns:
- detected (numpy.ndarray(int)):
Detection status for each planet orbiting the observed target star: 1 is detection, 0 missed detection, -1 below IWA, and -2 beyond OWA
- fZ (astropy.units.Quantity(numpy.ndarray(float))):
Surface brightness of local zodiacal light in units of 1/arcsec2
- systemParams (dict):
Dictionary of time-dependant planet properties averaged over the duration of the integration
- SNR (numpy.darray(float)):
Detection signal-to-noise ratio of the observable planets
- FA (bool):
False alarm (false positive) boolean
- Return type:
- refineOcculterSlews(old_sInd, sInds, slewTimes, obsTimes, sd, mode)[source]
Refines/filters/chooses occulter slews based on time constraints
Refines the selection of occulter slew times by filtering based on mission time constraints and selecting the best slew time for each star. This method calls on other occulter methods within SurveySimulation depending on how slew times were calculated prior to calling this function (i.e. depending on which implementation of the Observatory module is used).
- Parameters:
old_sInd (int) – Index of the previous target star
slewTimes (astropy quantity array) – slew times to all stars (must be indexed by sInds)
obsTimes (Quantity(ndarray(float))) – A binary array with TargetList.nStars rows and (missionFinishAbs-missionStart)/dt columns where dt is 1 day by default. A value of 1 indicates the star is in keepout (and therefore cannot be observed). A value of 0 indicates the star is not in keepout and may be observed.
sd (Quantity(ndarray(float))) – Angular separation between stars in rad
mode (dict) – Selected observing mode for detection
- Returns:
- sInds (int):
Indeces of next target star
- slewTimes (astropy.units.Quantity(numpy.ndarray(float))):
slew times to all stars (must be indexed by sInds)
- intTimes (astropy.units.Quantity(numpy.ndarray(float))):
Integration times for detection in units of day
- dV (astropy.units.Quantity(numpy.ndarray(float))):
Delta-V used to transfer to new star line of sight in unis of m/s
- Return type:
- reset_sim(genNewPlanets=True, rewindPlanets=True, seed=None)[source]
Performs a full reset of the current simulation.
This will reinitialize the TimeKeeping, Observatory, and SurveySimulation objects with their own outspecs.
- Parameters:
genNewPlanets (bool) – Generate all new planets based on the original input specification. If False, then the original planets will remain. Setting to True forces
rewindPlanets
to be True as well. Defaults True.rewindPlanets (bool) – Reset the current set of planets to their original orbital phases. If both genNewPlanets and rewindPlanet are False, the original planets will be retained and will not be rewound to their initial starting locations (i.e., all systems will remain at the times they were at the end of the last run, thereby effectively randomizing planet phases. Defaults True.
seed (int, optional) – Random seed to use for all random number generation. If None (default) a new random seed will be generated when re-initializing the SurveySimulation.
- revisitFilter(sInds, tmpCurrentTimeNorm)[source]
Helper method for Overloading Revisit Filtering
- Parameters:
sInds (ndarray(int)) – Indices of stars still in observation list
tmpCurrentTimeNorm (astropy.units.Quantity) – The simulation time after overhead was added in MJD form
- Returns:
indices of stars still in observation list
- Return type:
- scheduleRevisit(sInd, smin, det, pInds)[source]
A Helper Method for scheduling revisits after observation detection
Updates self.starRevisit attribute only
- update_occulter_mass(DRM, sInd, t_int, skMode)[source]
Updates the occulter wet mass in the Observatory module, and stores all the occulter related values in the DRM array.
- Parameters:
DRM (dict) – Design Reference Mission, contains the results of one complete observation (detection and characterization)
sInd (int) – Integer index of the star of interest
t_int (Quantity(ndarray(float))) – Selected star integration time (for detection or characterization) in units of day
skMode (str) – Station keeping observing mode type (‘det’ or ‘char’)
- Returns:
Design Reference Mission dictionary, contains the results of one complete observation
- Return type:
- EXOSIMS.Prototypes.SurveySimulation.array_encoder(obj)[source]
Encodes numpy arrays, astropy Times, and astropy Quantities, into JSON.
Called from json.dump for types that it does not already know how to represent, like astropy Quantity’s, numpy arrays, etc. The json.dump() method encodes types like ints, strings, and lists itself, so this code does not see these types. Likewise, this routine can and does return such objects, which is OK as long as they unpack recursively into types for which encoding is known
- Parameters:
obj (Any) – Object to encode.
Returns –
- Any:
Encoded object
EXOSIMS.Prototypes.TargetList module
- class EXOSIMS.Prototypes.TargetList.TargetList(missionStart=60634, staticStars=True, keepStarCatalog=False, fillPhotometry=False, fillMissingBandMags=False, explainFiltering=False, filterBinaries=True, cachedir=None, filter_for_char=False, earths_only=False, getKnownPlanets=False, int_WA=None, int_dMag=25, scaleWAdMag=False, int_dMag_offset=1, popStars=None, **specs)[source]
Bases:
object
TargetList Prototype
Instantiation of an object of this class requires the instantiation of the following class objects:
StarCatalog
OpticalSystem
ZodiacalLight
Completeness
PostProcessing
- Parameters:
missionStart (float) – Mission start time (MJD)
staticStars (bool) – Do not apply proper motions to stars during simulation. Defaults True.
keepStarCatalog (bool) – Retain the StarCatalog object as an attribute after the target list is populated (defaults False)
fillPhotometry (bool) – Attempt to fill in missing photometric data for targets from available values (primarily spectral type and luminosity). Defaults False.
fillMissingBandMags (bool) –
If
fillPhotometry
is True, also fill in missing band magnitudes. Ignored iffillPhotometry
is False. Defaults False.Warning
This can be used for generating more complete target data for other uses but is not recommended for use in integration time calculations.
explainFiltering (bool) – Print informational messages at each target list filtering step. Defaults False.
filterBinaries (bool) – Remove all binary stars or stars with known close companions from target list. Defaults True.
cachedir (str or None) – Full path to cache directory. If None, use default.
filter_for_char (bool) – Use spectroscopy observation mode (rather than the default detection mode) for all calculations. Defaults False.
earths_only (bool) – Used in upstream modules. Alias for filter_for_char. Defaults False.
getKnownPlanets (bool) –
Retrieve information about which stars have known planets along with all known (to the NASA Exoplanet Archive) target aliases. Defaults False.
Warning
This can take a very long time for large star catalogs if starting from scratch. For this reason, the cache comes pre-loaded with all entries coresponding to EXOCAT1.
int_WA (float or numpy.ndarray or None) – Working angle (arcsec) at which to caluclate integration times for default observations. If input is scalar, all targets will get the same value. If input is an array, it must match the size of the input catalog. If None, a default value of halway between the inner and outer working angle of the default observing mode will be used. If the OWA is infinite, twice the IWA is used.
int_dMag (float or numpy.ndarray) – \(\\Delta\\textrm{mag}\) to assume when calculating integration time for default observations. If input is scalar, all targets will get the same value. If input is an array, it must match the size of the input catalog. Defaults to 25
scaleWAdMag (bool) – If True, rescale int_dMag and int_WA for all stars based on luminosity and to ensure that WA is within the IWA/OWA. Defaults False.
int_dMag_offset (float) – Offset applied to int_dMag when scaleWAdMag is True.
popStars (list, optional) – Remove given stars (by exact name matching) from target list. Defaults None.
**specs – Input Specification
- _outspec
-
- Type:
- BackgroundSources
BackgroundSources object
- Type:
- BC
Bolometric correction (V band)
- Type:
- Binary_Cut
Boolean - True is target has close companion.
- Type:
- Bmag
B band magniutde
- Type:
- BV
B-V color
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- Completeness
Completeness object
- Type:
- coords
Target coordinates
- dist
Target distances
- fillPhotometry
Attempt to fill in missing target photometric values using interpolants of tabulated values for the stellar type. See MeanStars documentation for more details.
- Type:
- fillMissingBandMags
If
self.fillPhotometry
is True, also fill in missing band magnitudes. Ignored ifself.fillPhotometry
is False.- Type:
- filter_for_char
Use spectroscopy observation mode (rather than the default detection mode) for all calculations.
- Type:
- filterBinaries
Remove all binary stars or stars with known close companions from target list.
- Type:
- getKnownPlanets
Grab the list of known planets and target aliases from the NASA Exoplanet Archive
- Type:
- hasKnownPlanet
bool array indicating whether a target has known planets. Only populated if attribute
getKnownPlanets
is True. Otherwise all entries are False.- Type:
- Hmag
H band magnitudes
- Type:
- I
Inclinations of target system orbital planes
- Imag
I band magnitudes
- Type:
- int_comp
Completeness value for each target star for default observation WA and \(\Delta{\\textrm{mag}}\).
- Type:
- int_dMag
\(\Delta{\\textrm{mag}}\) used for default observation integration time calculation
- Type:
- int_WA
Working angle used for integration time calculation (angle)
- intCutoff_comp
Completeness values of all targets corresponding to the cutoff integration time set in the optical system.
- Type:
- intCutoff_dMag
\(\Delta{\\textrm{mag}}\) of all targets corresponding to the cutoff integration time set in the optical system.
- Type:
- Jmag
J band magnitudes
- Type:
- Kmag
K band mangitudes
- Type:
- L
Luminosities in solar luminosities (linear scale!)
- Type:
- ms
MeanStars object
- Type:
MeanStars.MeanStars.MeanStars
- MsEst
‘approximate’ stellar masses
- MsTrue
‘true’ stellar masses
- MV
Absolute V band magnitudes
- Type:
- Name
Target names (str array)
- Type:
- OpticalSystem
OpticalSystem object
- Type:
- parx
Parallaxes
- PlanetPhysicalModel
PlanetPhysicalModel object
- Type:
- PlanetPopulation
PlanetPopulation object
- Type:
- pmdec
Proper motion in declination
- pmra
Proper motion in right ascension
- PostProcessing
PostProcessing object
- Type:
- Rmag
R band magnitudes
- Type:
- rv
Radial velocities
- saturation_comp
Maximum possible completeness values of all targets.
- Type:
- saturation_dMag
\(\Delta{\\textrm{mag}}\) at which completness stops increasing for all targets.
- Type:
- scaleWAdMag
Rescale int_dMag and int_WA for all stars based on luminosity and to ensure that WA is within the IWA/OWA.
- Type:
- Spec
Spectral type strings. Will be strictly in G0V format.
- Type:
- spectral_class
nStars x 3. First column is spectral class, second is spectral subclass and third is luminosity class.
- Type:
- spectypenum
Numerical value of spectral type for matching
- Type:
- star_fluxes
Internal storage of pre-computed star flux values that is populated each time a flux is requested for a particular target. Keyed by observing mode hex attribute.
- Type:
- staticStars
Do not apply proper motions to stars. Stars always at mission start time positions.
- Type:
- Teff
Stellar effective temperature.
- Type:
- Umag
U band magnitudes
- Type:
- Vmag
V band magnitudes
- Type:
- ZodiacalLight
ZodiacalLight object
- Type:
- calc_EEID(sInds, arcsec=False)[source]
Finds the earth equivalent insolation distance (EEID)
- arcsec (bool):
If True returns result arcseconds instead of AU
- calc_HZ(sInds, S, A, B, C, arcsec=False)[source]
finds the inner or outer edge of the habitable zone
This method uses the empirical fit from Kaltinegger et al (2018) and references therein, https://arxiv.org/pdf/1903.11539.pdf
- calc_HZ_inner(sInds, S_inner=1.7665, A_inner=0.00013351, B_inner=3.1515e-09, C_inner=-3.3488e-12, **kwargs)[source]
Convenience function to find the inner edge of the habitable zone using the emperical approach in calc_HZ().
Default contstants: Recent Venus limit Inner edge” , Kaltinegger et al 2018, Table 1.
- calc_HZ_outer(sInds, S_outer=0.324, A_outer=5.3221e-05, B_outer=1.4288e-09, C_outer=-1.1049e-12, **kwargs)[source]
Convenience function to find the inner edge of the habitable zone using the emperical approach in calc_HZ().
The default outer limit constants are the Early Mars outer limit, Kaltinegger et al (2018) Table 1.
- calc_IWA_AU(sInds, **kwargs)[source]
Convenience function to find the separation from the star of the IWA
- calc_saturation_and_intCutoff_vals()[source]
Calculates the saturation and integration cutoff time dMag and completeness values, saves them as attributes, refines the dMag used to calculate integration times so it does not exceed the integration cutoff time dMag, and handles any orbit scaling necessary
- dump_catalog()[source]
Creates a dictionary of stellar properties for archiving use.
- Parameters:
None –
- Returns:
Dictionary of star catalog properties
- Return type:
- fillPhotometryVals()[source]
Attempts to determine the spectral class and luminosity class of each target star. If
self.fillPhotometry
is True, attempts to reconstruct any missing spectral types from other avaialable information, and then fill missing L, B, V and BC information from spectral type.Uses the MeanStars object for regexps and data filling. This explicitly treats all stars as dwarfs. TODO: Update to use spectra for other luminosity classes.
The data is from: “A Modern Mean Dwarf Stellar Color and Effective Temperature Sequence” http://www.pas.rochester.edu/~emamajek/EEM_dwarf_UBVIJHK_colors_Teff.txt Eric Mamajek (JPL/Caltech, University of Rochester)
See MeanStars documentation for futher details.
TODO: only use MeanStars for dwarfs. Otherwise use spectra.
- filter_target_list(**specs)[source]
This function is responsible for filtering by any required metrics.
- The prototype implementation removes the following stars:
Stars with NAN values in their parameters
Binary stars
Systems with planets inside the OpticalSystem fundamental IWA
Systems where minimum integration time is longer than OpticalSystem cutoff
Systems not meeting the Completeness threshold
Additional filters can be provided in specific TargetList implementations.
- get_template_spectrum(spec)[source]
Helper method for loading/retrieving spectra from the spectral catalog
- Parameters:
spec (str) – Spectral type string. Must be a keys in self.spectral_catalog_index
- Returns:
Template pectrum from file.
- Return type:
synphot.SourceSpectrum
- load_spectral_catalog()[source]
Helper method for generating a cache of available template spectra and loading them as attributes
Creates the following attributes:
spectral_catalog_index
: A dictionary of spectral types (keys) and the associated spectra files on disk (values)spectral_catalog_types
: An nx4 ndarray (n is the number of teplate spectra avaiable). First three columns are spectral class (str), subclass (int), and luinosity class (str). The fourth column is a spectral class numeric representation, equaling specdict[specclass]*10 + subclass.
- load_standard_bands()[source]
Helper method that defines standard photometric bandpasses
This method defines the following class attributes:
standard_bands_letters
: String with standard band letters (nominally UVBRI)standard_bands
: A dictionary (key of band letter) whose values are synphot SpectralElement objects for that bandpass.standard_bands_lam
: An array of band central wavelengths (same order as standard_bands_lettersstandard_bands_deltaLam
: An array of band bandwidths (same order as standard_bands_letters.
- max_dmag_filter()[source]
Includes stars if maximum delta mag is in the allowed orbital range
Removed from prototype filters. Prototype is already calling the completeness_filter with self.intCutoff_dMag
- populate_target_list(**specs)[source]
This function is responsible for populating values from the star catalog into the target list attributes and enforcing attribute requirements.
- Parameters:
**specs – Input Specification
- queryNEAsystems()[source]
Queries NASA Exoplanet Archive system alias service to check for stars in the target list that have known planets.
Note
These queries take a long time, so rather than caching individual target lists, we’ll keep everything we query and initially seed from a starting list that’s part of the repository.
- radiusFromMass(sInds)[source]
Estimates the star radius based on its mass Table 2, ZAMS models pg321 STELLAR MASS-LUMINOSITY AND MASS-RADIUS RELATIONS OSMAN DEMIRCAN and GOKSEL KAHRAMAN 1991
- revise_lists(sInds)[source]
Replaces Target List catalog attributes with filtered values, and updates the number of target stars.
- set_catalog_attributes()[source]
Hepler method that sets possible and required catalog attributes.
- Sets attributes:
- catalog_atts (list):
Attributes to try to copy from star catalog. Missing ones will be ignored and removed from this list.
- required_catalog_atts(list):
Attributes that cannot be missing or nan.
Note
This is a separate method primarily for downstream implementations that wish to modify the catalog attributes. Overloaded methods can first call this method to get the base values, or overwrite them entirely.
- starFlux(sInds, mode)[source]
Return the total spectral flux of the requested stars for the given observing mode. Caches results internally for faster access in subsequent calls.
- starprop(sInds, currentTime, eclip=False)[source]
Finds target star positions vector in heliocentric equatorial (default) or ecliptic frame for current time (MJD).
This method uses ICRS coordinates which is approximately the same as equatorial coordinates.
- Parameters:
- Returns:
Target star positions vector in heliocentric equatorial (default) or ecliptic frame in units of pc. Will return an m x n x 3 array where m is size of currentTime, n is size of sInds. If either m or n is 1, will return n x 3 or m x 3.
- Return type:
Note: Use eclip=True to get ecliptic coordinates.
- stellar_Teff()[source]
Calculate the effective stellar temperature based on B-V color.
This method uses the empirical fit from [Ballesteros2012] doi:10.1209/0295-5075/97/34008
Updates/creates attribute
Teff
, as needed.
- stellar_diameter()[source]
Populates target list with approximate stellar diameters
Stellar radii are computed using the BV target colors according to the model from [Boyajian2014]. This model has a standard deviation error of 7.8%.
Updates/creates attribute
diameter
, as needed.
- stellar_mass()[source]
Populates target list with ‘true’ and ‘approximate’ stellar masses
Approximate stellar masses are calculated from absolute magnitudes using the model from [Henry1993]. “True” masses are generated by a uniformly distributed, 7%-mean error term to the apprxoimate masses.
All values are in units of solar mass.
Function called by reset sim.
EXOSIMS.Prototypes.TimeKeeping module
- class EXOSIMS.Prototypes.TimeKeeping.TimeKeeping(missionStart=60634, missionLife=0.1, missionPortion=1, OBduration=inf, missionSchedule=None, cachedir=None, **specs)[source]
Bases:
object
TimeKeeping Prototype
This class keeps track of the current mission elapsed time for exoplanet mission simulation. It is initialized with a mission duration, and throughout the simulation, it allocates temporal intervals for observations. Eventually, all available time has been allocated, and the mission is over. Time is allocated in contiguous windows of size “duration”. If a requested interval does not fit in the current window, we move to the next one.
- Parameters:
missionStart (float) – Mission start date in MJD. Defaults to 60634 (11-20-2024)
missionLife (float) – Mission duration (in years). Defaults to 0.1
missionPortion (float) – Fraction of mission devoted to exoplanet imaging science. Must be between 0 and 1. Defaults to 1
OBduration (float) – Observing block length (in days). If infinite, do not define observing blocks. Defaults to np.inf
missionSchedule (str, optional) – Full path to mission schedule file stored on disk. Defaults None.
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
**specs – Input Specification
- _outspec
-
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- currentTimeAbs
Current absolute mission time in MJD
- Type:
- currentTimeNorm
Current mission time minus mission start time.
- exoplanetObsTime
How much time has been used so far on exoplanet science.
- missionFinishAbs
Mission end time in MJD
- Type:
- missionLife
Total mission duration
- missionStart
Start time of mission in MJD
- Type:
- OBduration
Observing block length
- OBendTimes
Array containing the normalized end times of each observing block throughout the mission
- OBnumber
Index of the current observing block (OB). Each observing block has a duration, a start time, an end time, and can host one or multiple observations
- Type:
- OBstartTimes
Array containing the normalized start times of each observing block throughout the mission
- advanceToAbsTime(tAbs, addExoplanetObsTime=True)[source]
Advances the current mission time to tAbs. Updates attributes currentTimeNorma dn currentTimeAbs
- advancetToStartOfNextOB()[source]
Advances to Start of Next Observation Block This method is called in the allocate_time() method of the TimeKeeping class object, when the allocated time requires moving outside of the current OB. If no OB duration was specified, a new Observing Block is created for each observation in the SurveySimulation module. Updates attributes OBnumber, currentTimeNorm and currentTimeAbs.
- allocate_time(dt, addExoplanetObsTime=True)[source]
Allocate a temporal block of width dt
Advance the mission time by dt units. Updates attributes currentTimeNorm and currentTimeAbs
- Parameters:
- Returns:
a flag indicating the time allocation was successful or not successful
- Return type:
- get_ObsDetectionMaxIntTime(Obs, mode, currentTimeNorm=None, OBnumber=None)[source]
Tells you the maximum Detection Observation Integration Time you can pass into observation_detection(X,intTime,X)
- Parameters:
Obs (Observatory) – Observatory object
mode (dict) – Selected observing mode for detection
- Returns:
- maxIntTimeOBendTime (astropy.units.Quantity):
The maximum integration time bounded by Observation Block end Time
- maxIntTimeExoplanetObsTime (astropy.units.Quantity):
The maximum integration time bounded by exoplanetObsTime
- maxIntTimeMissionLife (astropy.units.Quantity):
The maximum integration time bounded by MissionLife
- Return type:
- init_OB(missionSchedule, OBduration)[source]
Initializes mission Observing Blocks from file or missionDuration, missionLife, and missionPortion. Updates attributes OBstartTimes, OBendTimes, and OBnumber
- mission_is_over(OS, Obs, mode)[source]
Are the mission time, or any other mission resources, exhausted?
- Parameters:
OS (OpticalSystem) – Optical System object
Obs (Observatory) – Observatory object
mode (dict) – Selected observing mode for detection (uses only overhead time)
- Returns:
True if the mission time or fuel are used up, else False.
- Return type:
EXOSIMS.Prototypes.ZodiacalLight module
- class EXOSIMS.Prototypes.ZodiacalLight.ZodiacalLight(magZ=23, magEZ=22, varEZ=0, cachedir=None, commonSystemfEZ=False, **specs)[source]
Bases:
object
ZodiacalLight Prototype
- Parameters:
magZ (float) – Local zodi brightness (magnitudes per square arcsecond). Defaults to 23
magEZ (float) – Exozodi brightness (mangitudes per square arcsecond). Defaults to 22
varEZ (float) – Variance of exozodi brightness. If non-zero treat as the variance of a log-normal distribution. If zero, do not randomly distribute exozodi brightnesses. Defaults to 0
cachedir (str, optional) – Full path to cachedir. If None (default) use default (see Cache Directory)
commonSystemfEZ (bool) – Assume same zodi for planets in the same system. Defaults to False. TODO: Move to SimulatedUniverse
**specs – Input Specification
- _outspec
-
- Type:
- cachedir
Path to the EXOSIMS cache directory (see Cache Directory)
- Type:
- fEZ0
Default surface brightness of exo-zodiacal light in units of 1/arcsec2
- fZ0
Default surface brightness of zodiacal light in units of 1/arcsec2
- fZMap
For each starlight suppression system (dict key), holds an array of the surface brightness of zodiacal light in units of 1/arcsec2 for each star over 1 year at discrete points defined by resolution
- Type:
- varEZ
Variance of exozodi brightness. If non-zero treat as the variance of a log-normal distribution. If zero, do not randomly distribute exozodi brightnesses.
- Type:
- zodi_Blam
Local zodi table data (W/m2/sr/um)
- Type:
- zodi_lam
Local zodi table data wavelengths (micrometers)
- Type:
- calcfZmax(sInds, Obs, TL, TK, mode, hashname, koTimes=None)[source]
Finds the maximum zodiacal light values for each star over an entire orbit of the sun not including keeoput angles.
- Parameters:
sInds (ndarray(int)) – the star indicies we would like fZmax and fZmaxInds returned for
Obs (Observatory) – Observatory class object
TL (TargetList) – TargetList class object
TK (TimeKeeping) – TimeKeeping object
mode (dict) – Selected observing mode
hashname (str) – hashname describing the files specific to the current json script
koTimes (Time(ndarray(float)), optional) – Absolute MJD mission times from start to end in steps of 1 d
- Returns:
- valfZmax[sInds] (~astropy.units.Quantity(~numpy.ndarray(float))):
the maximum fZ (for the prototype, these all have the same value) with units 1/arcsec**2
- absTimefZmax[sInds] (astropy.time.Time):
returns the absolute Time the maximum fZ occurs (for the prototype, these all have the same value)
- Return type:
- calcfZmin(sInds, Obs, TL, TK, mode, hashname, koMap=None, koTimes=None)[source]
Finds the minimum zodiacal light values for each star over an entire orbit of the sun not including keeoput angles.
- Parameters:
sInds (ndarray(int)) – the star indicies we would like fZmins and fZtypes returned for
Obs (Observatory) – Observatory class object
TL (TargetList) – TargetList class object
TK (TimeKeeping) – TimeKeeping object
mode (dict) – Selected observing mode
hashname (str) – hashname describing the files specific to the current json script
koMap (ndarray(bool), optional) – True is a target unobstructed and observable, and False is a target unobservable due to obstructions in the keepout zone.
koTimes (Time(ndarray(float)), optional) – Absolute MJD mission times from start to end, in steps of 1 d as default
- Returns:
- fZmins[n, TL.nStars] (~astropy.units.Quantity(~numpy.ndarray(float))):
fZMap, but only fZmin candidates remain. All other values are set to the maximum floating number. Units are 1/arcsec2
- fZtypes [n, TL.nStars] (~numpy.ndarray(float)):
ndarray of flags for fZmin types that map to fZmins 0 - entering KO 1 - exiting KO 2 - local minimum max float - not a fZmin candidate
- Return type:
- extractfZmin(fZmins, sInds, koTimes=None)[source]
Extract the global fZminimum from fZmins
- Parameters:
fZmins[n (Quantity(ndarray(float))) – fZMap, but only fZmin candidates remain. All other values are set to the maximum floating number. Units are 1/arcsec2.
TL.nStars] (Quantity(ndarray(float))) – fZMap, but only fZmin candidates remain. All other values are set to the maximum floating number. Units are 1/arcsec2.
sInds (ndarray(int)) – the star indicies we would like valfZmin and absTimefZmin returned for
koTimes (Time(ndarray(float)), optional) – Absolute MJD mission times from start to end, in steps of 1 d as default
- Returns:
- valfZmin[sInds] (~astropy.units.Quantity(~numpy.ndarray(float))):
the minimum fZ (for the prototype, these all have the same value) with units 1/arcsec**2
- absTimefZmin[sInds] (astropy.time.Time):
returns the absolute Time the maximum fZ occurs (for the prototype, these all have the same value)
- Return type:
- fEZ(MV, I, d, alpha=2, tau=1)[source]
Returns surface brightness of exo-zodiacal light
- Parameters:
MV (ndarray(int)) – Absolute magnitude of the star (in the V band)
I (Quantity(ndarray(float))) – Inclination of the planets of interest in units of deg
d (Quantity(ndarray(float))) – nx3 Distance to star of the planets of interest in units of AU
alpha (float) – power applied to radial distribution, default=2
tau (float) – disk morphology dependent throughput correction factor, default =1
- Returns:
Surface brightness of exo-zodiacal light in units of 1/arcsec2
- Return type:
- fZ(Obs, TL, sInds, currentTimeAbs, mode)[source]
Returns surface brightness of local zodiacal light
- Parameters:
Obs (Observatory) – Observatory class object
TL (TargetList) – TargetList class object
sInds (ndarray(int)) – Integer indices of the stars of interest
currentTimeAbs (Time) – absolute time to evaluate fZ for
mode (dict) – Selected observing mode
- Returns:
Surface brightness of zodiacal light in units of 1/arcsec2
- Return type:
- generate_fZ(Obs, TL, TK, mode, hashname, koTimes=None)[source]
Calculates fZ values for all stars over an entire orbit of the sun
- Parameters:
Obs (Observatory) – Observatory class object
TL (TargetList) – TargetList class object
TK (TimeKeeping) – TimeKeeping object
mode (dict) – Selected observing mode
hashname (str) – hashname describing the files specific to the current json script
koTimes (Time(ndarray(float)), optional) – Absolute MJD mission times from start to end in steps of 1 d
- Returns:
None
- Updates Attributes:
- fZMap[n, TL.nStars] (~astropy.units.Quantity(~numpy.ndarray(float))):
Surface brightness of zodiacal light in units of 1/arcsec2 for every star for every ko_dtStep
- fZTimes (~astropy.time.Time(~numpy.ndarray(float)), optional):
Absolute MJD mission times from start to end, updated if koTimes does not exist
- global_zodi_min(mode)[source]
This is used to determine the minimum zodi value globally, for the prototype it simply returns the same value that fZ always does
- load_zodi_spatial_data()[source]
Zodi spatial variation data from Table 17 of [Leinert1998]
Zodiacal Light brightness as function of solar LON (rows) and LAT (columns) Values are given in 10^-8 W m−2 sr−1 μm−1 at a wavelength of 500 nm
- zodi_points
nx2 lat,lon pairs
- Type:
numpy.ndarry
- zodi_values
n intensity values (units of W/m2/sr/um)
- Type:
- load_zodi_wavelength_data()[source]
Zodi wavelength dependence, from Table 19 of [Leinert1998] interpolated w/ a quadratic in log-log space
Creates an interpolant (scipy.interpolate.interp1d) assigned to attribute
logf
which takes as an argument log_10(wavelength in um) and returns log10(specific intensity in W/m^2/um/sr)
- zodi_color_correction_factor(lam, photon_units=False)[source]
Compute zodiacal light color correction factor. This is a multiplicative factor to apply to zodiacal light intensity computed at a reference wavelength (500 nm for the Leinert data used in this prototype).
- Parameters:
lam (astropy.units.Quantity) – Wavelength(s) of interest
photon_units (bool) – Convert all quantities to photon units before computing ratio. Defaults False (leave all quantities in power units).
- Returns:
Specific intensity of zodiacal light at requested wavelength(s) scaled by the value at the reference wavelength (500 nm). Has same dimension as input.
- Return type:
- zodi_intensity_at_location(lons, lats, photon_units=False)[source]
Compute zodiacal light specific intensity as a function of look vector at reference wavelength (500 nm)
- Parameters:
lons (astropy.units.Quantity) – Ecliptic longitude minus solar ecliptic longitude
lats (astropy.units.Quantity) – Ecliptic latitude. Must be of same dimension as lons.
photon_units (bool) – Convert all quantities to photon units before computing ratio. Defaults False (leave all quantities in power units).
- Returns:
Specific intensity of zodiacal light at requested wavelength(s). Has same dimension as input. Default units of W m-2 um-1 sr-1 if
photon_units
is False, otherwise ph s-1 m-2 um-1 sr-1- Return type:
- zodi_intensity_at_wavelength(lam, photon_units=False)[source]
Compute zodiacal light specific intensity as a function of wavelength
- Parameters:
lam (astropy.units.Quantity) – Wavelength(s) of interest
photon_units (bool) – Convert all quantities to photon units before computing ratio. Defaults False (leave all quantities in power units).
- Returns:
Specific intensity of zodiacal light at requested wavelength(s). Has same dimension as input. Default units of W m-2 um-1 sr-1 if
photon_units
is False, otherwise ph s-1 m-2 um-1 sr-1- Return type:
- zodi_latitudinal_correction_factor(theta, model=None, interp_at=135)[source]
Compute zodiacal light latitudinal correction factor. This is a multiplicative factor to apply to zodiacal light intensity to account for the orientation of the dust disk with respect to the observer.
- Parameters:
theta (astropy.units.Quantity) – Angle of disk. For local zodi, this is equivalent to the absolute value of the ecliptic latitude of the look vector. For exozodi, this is 90 degrees minus the inclination of the orbital plane.
model (str, optional) – Model to use. Options are Lindler2006, Stark2014, or interp (case insensitive). See Zodiacal and Exozodiacal Light for details. Defaults to None
interp_at (float) – If
model
is ‘interp’, interpolate Leinert Table 17 at this longitude. Defaults to 135.
- Returns:
Correction factor of zodiacal light at requested angles. Has same dimension as input.
- Return type:
Note
Unlike the color correction factor, this quantity is wavelength independent and thus does not change if using power or photon units.