sherlockpipe.system_stability.mr_forecast.MrForecast
- class sherlockpipe.system_stability.mr_forecast.MrForecast
Bases:
objectMass-radius forecasting model based on the probabilistic broken power-law relation of Chen & Kipping (2017, ApJ, 834, 17).
Provides methods to convert between mass and radius distributions for planets across four populations: Terran, Neptunian, Jovian, and Stellar.
- __init__()
Methods
Mpost2R(mass[, classify])Forecast the Radius distribution given the mass distribution.
Mstat2R(mean, std[, sample_size, classify])Forecast the mean and standard deviation of radius given the mena and standard deviation of the mass.
Rpost2M(radius[, grid_size, classify])Forecast the mass distribution given the radius distribution.
Rstat2M(mean, std[, sample_size, grid_size, ...])Forecast the mean and standard deviation of mass given the mean and standard deviation of the radius.
__init__()Read the M-R forecaster hyperparameter file.
Attributes
M_LOWERM_UPPERN_POPS- static Mpost2R(mass: float, classify='No')
Forecast the Radius distribution given the mass distribution.
Parameters
- mass: one dimensional array
The mass distribution in earth radii
- classify: string (optional)
If you want the object to be classifed. Options are ‘Yes’ and ‘No’. Default is ‘No’. Result will be printed, not returned.
Returns
- radius: one dimensional array
Predicted radius distribution in the input unit.
- static Mstat2R(mean: float, std: float, sample_size: int = 1000, classify='No')
Forecast the mean and standard deviation of radius given the mena and standard deviation of the mass. Assuming normal distribution with the mean and standard deviation truncated at the mass range limit of the model.
Parameters
- mean: float
Mean (average) of mass in earth radii
- std: float
Standard deviation of mass.
- sample_size: int (optional)
Number of mass samples to draw with the mean and std provided.
Returns
- mean: float
Predicted mean of radius in the input unit.
- std: float
Predicted standard deviation of radius.
- static Rpost2M(radius: float, grid_size: int = 1000.0, classify='No')
Forecast the mass distribution given the radius distribution.
Parameters
- radius: one dimensional array
The radius distribution in earth radii
- grid_size: int (optional)
Number of grid in the mass axis when sampling mass from radius. The more the better results, but slower process.
- classify: string (optional)
If you want the object to be classifed. Options are ‘Yes’ and ‘No’. Default is ‘No’. Result will be printed, not returned.
Returns
- mass: one dimensional array
Predicted mass distribution in the input unit.
- static Rstat2M(mean: float, std: float, sample_size: int = 1000.0, grid_size: int = 1000.0, classify='No')
Forecast the mean and standard deviation of mass given the mean and standard deviation of the radius.
Parameters
- mean: float
Mean (average) of radius in earth radii
- std: float
Standard deviation of radius.
- sample_size: int (optional)
Number of radius samples to draw with the mean and std provided.
- grid_size: int (optional)
Number of grid in the mass axis when sampling mass from radius. The more the better results, but slower process.
Returns
- mean: float
Predicted mean of mass in the input unit.
- std: float
Predicted standard deviation of mass.