Closed hematthi closed 6 years ago
Good point Glad I asked first.
On Feb 26, 2018 3:16 PM, "hematthi" notifications@github.com wrote:
@hematthi commented on this pull request.
In examples/clusters/model.jl https://github.com/eford/ExoplanetsSysSim.jl/pull/10#discussion_r170721859 :
@@ -110,9 +112,7 @@ function generate_planet_periods_sizes_masses_in_cluster( star::StarAbstract, si log_mean_P = 0.0 # log(generate_periods_power_law(star,sim_param))
Note: Currently, drawing all periods within a cluster at once and either keeping or rejecting the whole cluster
Should we instead draw periods one at a time?
- const min_period::Float64 = get_real(sim_param,"min_period")
- const max_period::Float64 = get_real(sim_param,"max_period")
- Pdist = Truncated(LogNormal(log_mean_P,sigma_logperiod_per_pl_in_cluster*n),min_period,max_period)
- Pdist = LogNormal(log_mean_P,sigma_logperiod_per_pl_in_cluster*n)
When I ran the model with those lines, it produced too few planets and too many long period planets. Then I realized that it doesn't make sense to truncate Pdist between min and max period because at that point, the periods have not been scaled by a period_scale yet.
The cuts in min and max period are applied after multiplying by period_scale.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/eford/ExoplanetsSysSim.jl/pull/10#discussion_r170721859, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQywqGK-Dy8tst0QiEYl3DTWFtLNovrks5tYxEugaJpZM4SSziG .
This is a request to merge all of our updates together to form the most up-to-date version of ExoplanetsSysSim.
I first did a pull request (to myself) from eford/ExoplanetsSysSim.jl/master to a branch in my forked version, hematthi/ExoplanetsSysSim.jl/Clustered_P_R, about two days ago to get your latest updates in src/setup.jl. I then went through and updated all the files where I had made changes, cloned the repo to my Mac, tested and fixed things until my model worked normally again (i.e. made "generate_systems.jl" and "optimize.jl" work), and updated the files in this branch to include these fixes.
As you can see, almost all of the changes are made to files in ExoplanetsSysSim.jl/examples/clusters/, except for a function added to ExoplanetsSysSim.jl/src/planetary_system.jl (to draw from a broken power-law), so these changes shouldn't break anything.
Matthias