diff --git a/src/RVmodel.cpp b/src/RVmodel.cpp index 6a515d2f..5a41ead1 100644 --- a/src/RVmodel.cpp +++ b/src/RVmodel.cpp @@ -28,8 +28,8 @@ extern ContinuousDistribution *log_eta4_prior; void RVmodel::from_prior(RNG& rng) { - objects.from_prior(rng); - objects.consolidate_diff(); + planets.from_prior(rng); + planets.consolidate_diff(); background = Cprior->rvs(rng); extra_sigma = Jprior->rvs(rng); @@ -153,12 +153,12 @@ void RVmodel::calculate_mu() const vector& t = Data::get_instance().get_t(); // Update or from scratch? - bool update = (objects.get_added().size() < objects.get_components().size()) && + bool update = (planets.get_added().size() < planets.get_components().size()) && (staleness <= 10); // Get the components - const vector< vector >& components = (update)?(objects.get_added()): - (objects.get_components()); + const vector< vector >& components = (update)?(planets.get_added()): + (planets.get_components()); // at this point, components has: // if updating: only the added planets' parameters // if from scratch: all the planets' parameters @@ -227,8 +227,8 @@ double RVmodel::perturb(RNG& rng) if(rng.rand() <= 0.5) { - logH += objects.perturb(rng); - objects.consolidate_diff(); + logH += planets.perturb(rng); + planets.consolidate_diff(); calculate_mu(); } @@ -442,7 +442,7 @@ void RVmodel::print(std::ostream& out) const if(GP) out<0) + if (planets.get_components().size()>0) desc += "P\tK\tphi\tecc\tchi\t"; desc += "staleness\tvsys"; diff --git a/src/RVmodel.h b/src/RVmodel.h index f4a7077a..c821d500 100644 --- a/src/RVmodel.h +++ b/src/RVmodel.h @@ -23,7 +23,7 @@ extern const bool trend; class RVmodel { private: - DNest4::RJObject objects; + DNest4::RJObject planets; double background; //std::vector offsets; diff --git a/src/main.cpp b/src/main.cpp index d6e6801d..fb70d7a1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,6 +8,8 @@ using namespace std; using namespace DNest4; +/* edit from here on */ + #include "default_priors.h" const bool obs_after_HARPS_fibers = false; @@ -16,7 +18,7 @@ const bool hyperpriors = false; const bool trend = false; RVmodel::RVmodel() -:objects(5, 1, true, RVConditionalPrior()) +:planets(5, 0, true, RVConditionalPrior()) ,mu(Data::get_instance().get_t().size()) ,C(Data::get_instance().get_t().size(), Data::get_instance().get_t().size()) {