bioverse.survey module
- class bioverse.survey.Survey(label: Optional[str] = None, diameter: float = 15.0, t_max: float = 3652.5, t_slew: float = 0.1, T_st_ref: float = 5788.0, R_st_ref: float = 1.0, D_ref: float = 15.0, d_ref: float = 10.0)
Bases:
dict
,Object
Describes an exoplanet survey, including methods for creating simulated datasets. This class should not be called directly; instead use ImagingSurvey or TransitSurvey.
- label: str = None
- diameter: float = 15.0
- t_max: float = 3652.5
- t_slew: float = 0.1
- T_st_ref: float = 5788.0
- R_st_ref: float = 1.0
- D_ref: float = 15.0
- d_ref: float = 10.0
- add_measurement(key, idx=None, **kwargs)
Adds a Measurement to the Survey.
- Parameters:
key (str) – Name of the measured parameter.
idx (int) – Position in the measurement sequence. By default, it is placed at the end.
**kwargs – Keyword arguments passed to Measurement.__init__().
- move_measurement(key, idx)
Moves a Measurement to the designated position in the sequence.
- Parameters:
key (str) – Name of the measured parameter.
idx (int) – Position in the measurement sequence to which to move the Measurement.
- quickrun(generator, t_total=None, N_sim=1, **kwargs)
Convenience function that generates a sample, computes the detection yield, and returns a simulated data set.
- Parameters:
generator (Generator) – Generator used to generate the planet population.
t_total (float, optional) – Total amount of observing time for any measurements with a limited observing time.
N_sim (int, optional) – If greater than 1, simulate the survey this many times and return the combined result.
**kwargs – Keyword arguments passed to Generator.generate().
- Returns:
sample (Table) – Table of all simulated planets.
detected (Table) – Table of planets detected by the Survey.
data (Table) – Simulated data set produced by the Survey.
error (Table) – Uncertainties on the measurements in data.
- observe(y, t_total=None, data=None, error=None, demographics=True)
Returns a simulated data set for a Table of simulated planets.
- Parameters:
y (Table) – Table containing the set of planets to be observed, usually the detection yield of the survey.
t_total (float, optional) – Sets the total time allocated to all Measurements.
data (Table, optional) – Pre-existing Table in which to store the new measurements.
error (Table, optional) – Pre-existing Table containing uncertainties on data values.
demographics (Bool, optional) – compute some population-level statistics after taking all measurements
- Returns:
data – Table of measurements made by the Survey, with one row for each planet observed.
- Return type:
- class bioverse.survey.ImagingSurvey(label: str = None, diameter: float = 15.0, t_max: float = 3652.5, t_slew: float = 0.1, T_st_ref: float = 5788.0, R_st_ref: float = 1.0, D_ref: float = 15.0, d_ref: float = 10.0, inner_working_angle: float = 3.5, outer_working_angle: float = 64, contrast_limit: float = -10.6, mode: str = 'imaging')
Bases:
Survey
- inner_working_angle: float = 3.5
- outer_working_angle: float = 64
- contrast_limit: float = -10.6
- mode: str = 'imaging'
- compute_yield(d, wl_eff=0.5, A_g=0.3)
Computes a simple estimate of the detection yield for an imaging survey. Compares the contrast ratio and projected separation of each planet when observed at quadrature to the contrast limit and inner/outer working angles of the survey. Planets that satisfy these criteria are considered to be detected.
- Parameters:
d (Table) – Table of all simulated planets which the survey could attempt to observe.
wl_eff (float, optional) – Effective wavelength of observation in microns (used for calculating the IWA/OWA).
A_g (float, optional) – Geometric albedo of each planet, ignored if ‘A_g’ is already assigned.
- Returns:
yield – Copy of the input Table containing only planets which were detected by the survey.
- Return type:
- compute_scaling_factor(d)
Computes the scaling factor for the reference exposure time in imaging mode for all planets in d.
- class bioverse.survey.TransitSurvey(label: str = None, diameter: float = 15.0, t_max: float = 3652.5, t_slew: float = 0.1, T_st_ref: float = 5788.0, R_st_ref: float = 1.0, D_ref: float = 15.0, d_ref: float = 10.0, N_obs_max: int = 1000, mode: str = 'transit')
Bases:
Survey
- N_obs_max: int = 1000
- mode: str = 'transit'
- compute_yield(d)
Computes a simple estimate of the detection yield for a transit survey. All transiting planets are considered to be detected.
- compute_scaling_factor(d)
Computes the scaling factor for the reference exposure time in transit mode for all planets in d.
- class bioverse.survey.Measurement(key, survey, precision=0.0, t_total=None, t_ref=None, priority={}, wl_eff=0.5, debias=True)
Bases:
object
Class describing a simple measurement to be applied to a set of planets detected by a Survey.
- Parameters:
key (str) – Name of the parameter that will be measured.
survey (Survey) – Survey associated with this Measurement.
precision (str or float, optional) – Precision of measurement, e.g. ‘10%’ or 0.10 units. Default is zero.
t_ref (float, optional) – Amount of time required to perform the measurement for a typical target, in days.
t_total (float, optional) – Total amount of time allocated for this measurement, in days.
priority (dict, optional) – Describes how target weights are assigned based on target properties. For example {‘R’:[[1, 2, 5]]} assigns weight = 5 to planets with 1 < R < 2.
wl_eff (float, optional) – Effective wavelength of observation, used to estimate SNR.
debias (bool, optional) – (Transit mode) If True, weight targets by a/R_* to cancel the transit detection bias.
- measure(detected, data=None, error=None, t_total=None)
Produces the measurement for planets in a Table and places them into a data Table.
- Parameters:
detected (Table) – Table containing detected planets.
data (Table, optional) – Table in which to store the measured values for each planet. If not given, then a new table is created.
error (Table, optional) – Table in which to store the measurement uncertainties. Must be given if data is given.
t_total (float, optional) – Total amount of time allocated to this Measurement. If None, use self.t_total.
- Returns:
data (Table) – Table containing the measured values for each planet.
error (Table) – Table containing the measurement uncertainties for each planet.
- set_weight(key, weight, min=None, max=None, value=None)
Adds a new rule for determining target weight. weight can be set for targets whose parameter fall within (min, max) or exactly match value.
- Parameters:
key (str) – Name of the parameter being checked.
weight (float) – Weight of targets that meet the conditions.
min (float, optional) – Minimum value of range. Default is -inf.
max (float, optional) – Maximum value of range. Default is +inf.
value (int or str or bool, optional) – Exact value with which to compare.
- compute_observable_targets(data, t_total=None)
Determines which planets are observable based on the total allotted observing time.
- Parameters:
data (Table) – Table of data values already measured for these planets.
t_total (float, optional) – Total observing time for this measurement. If None, use self.t_total.
- Returns:
observable – Specifies which planets in the table are observable within the allotted time.
- Return type:
bool array
- compute_exposure_time(d)
Computes the exposure time and number of observations required to characterize each planet in d.
- compute_overhead_time(d, N_obs=1)
Computes the overheads associated with each observation.
- compute_weights(d)
Computes the priority weight of each planet in d.
- compute_debias(d)
Removes detection biases from the data set (transit mode only).
- perform_measurement(x)
Simulates measurements of the parameter from a set of true values. Measurements are clipped to +- 5 sigma of the true value to avoid non-physical results.
- Parameters:
x (array) – Array of true values on which to perform the measurement.
- Returns:
xm – Array of measured values with the same length and type as x.
- Return type:
array
- bioverse.survey.reset_imaging_survey()
Re-creates the default imaging survey.
- bioverse.survey.reset_transit_survey()
Re-creates the default transit survey.