Open adrn opened 4 years ago
@astrosong: Yes, what you have should almost work. But a few notes:
JokerPrior
. In the second pm.Model()
block it doesn't even use the parameters you define because you rejection sample from a cache file, so I guess it should be possible to initialize a JokerPrior
under the assumption that you will sample from a pre-cached file.pm.Model
block, you still have to specify sigma_K0
and sigma_v
. You can either set them to arbitrary values, or (since they aren't used to generate the prior cache) you could set them to nan
like: sigma_v=np.nan*u.km/u.s, sigma_K0=np.nan*u.km/u.s
.dv0_1
is only needed if you are working with data that comes from two different sources, with a possible constant offset between the two sources (e.g., telescopes). If you have data from one source, you can ignore that parameter.
As originally asked by @astrosong:
If the sigma_K0 and sigma_v (and P_min, P_max) are different for each object, which means a different prior for each object, then can we still use the same prior_samples?
@adrn: Yes. The prior cache only contains the non-linear parameters (P, e, omega, M0, and optionally the extra variance parameter), so you can use different K and v priors with the same prior cache.
@astrosong: > @AstroSong
@adrn Sorry I am still a little confused. Do you mean that I use one prior to generate the shared prior cache, and input another prior to TheJoker for each star? The latter prior includes the parameter set same for the prior cache and the values for each star (sigma_K0, sigma_v0, P0, and v0_offsets).
Like Follows?