adrn / thejoker

A custom Monte Carlo sampler for the (gravitational) two-body problem
MIT License
30 stars 8 forks source link

Can Joker handle multiple instruments within a dataset? #116

Closed zhexingli closed 3 years ago

zhexingli commented 3 years ago

Can Joker distinguish datasets from different instruments and apply the vertical offsets to each of them? If so, is there any particular way I should load in the data so that Joker knows they're from different instruments.

adrn commented 3 years ago

Yes! Start with this tutorial https://thejoker.readthedocs.io/en/latest/examples/5-Calibration-offsets.html and see if you can adapt it to your case, but happy to answer questions if you come across any specific issues.

zhexingli commented 3 years ago

Thanks. Somehow I negelcted this part of the tutorial. Not a fan of the astropy table, but I managed to find a work around with pandas.

When we specify the priors for the offset, the tutorial gives an example of one offset term between two datasets and named it 'dv_01' . If I have more than 2 different datasets (for example dataset 0,1,2) , should I specify all three offsets among the three datasets or just two offsets between 0 and 1, and 1 and 2 (ignore offsets between 0 and 2)? And in the prior, I guess I just add the additional offset terms in the v0_offset list? e.g. v0_offset = [dv_01,dv_02...]?

adrn commented 3 years ago

Three offsets -- they are offsets from v0 (which is not tied to a particular dataset but is the "true" systemic velocity of the system), so for 3 datasets, you would need [dv_00, dv_01, dv_02].

zhexingli commented 3 years ago

Hmm, why in the tutorial there's only one offset term for the two datasets?

adrn commented 3 years ago

Oh whoops - I confused myself looking at the source code!

It looks like the parameters specify the offset relative to the mean velocity of the first dataset you pass in. So, there should be "(N datasets) - 1" offset parameters.

zhexingli commented 3 years ago

Oh I see. Thanks you so much!