Giter Club home page Giter Club logo

thejoker's Introduction

The Joker [YO-ker]

image

image

A custom Monte Carlo sampler for the two-body problem.

Authors

  • Adrian Price-Whelan (Flatiron Institute)
  • David W. Hogg (NYU, MPIA, & Flatiron Institute)
  • Dan Foreman-Mackey (Flatiron Institute)

Installation

To install the latest stable release, use `pip`:

pip install thejoker

To install the development version:

pip install git+https://github.com/adrn/thejoker

Attribution

image

image

image

If you make use of this code, please cite the paper describing the method: Price-Whelan et al. 2017

Documentation

image

See the documentation for information on how to install and use The Joker.

License

image

thejoker's People

Contributors

adrn avatar davidwhogg avatar pllim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

thejoker's Issues

Is there an experiment 3.5?

I think maybe there are some \ref{} issues; there are experiments and there are section numbers, but these aren't the same.

Add an OrbitalParameters class

To keep track of units, transform to / from emcee sampling parameters (e.g., e,\omega <=> \sqrt{e},\cos\omega, \sqrt{e},\sin\omega)

discuss hierarchical inferences

  • these outputs are perfect inputs for a hierarchical model (see DFM; Hogg)
  • even very poor observations might strongly constrain a hierarchical model (as per Rix email)

Comment on broad prior for v0

We should make a comment that we actually have a prior belief about v0 even though we don't impose it -- if disk star, v0 ~ N(0,30) km/s; halo star, v0 ~ N(0,150) km/s, etc.

Is the title too specific?

A slightly more general version is:

"The Joker: A custom Monte Carlo sampler for periodic radial velocity data"

but that is boring as hell and doesn't catch the eye as well as explicitly mentioning binary stars and exoplanets. I don't have a strong opinion, but want to raise the point for discussion.

Convince DFM that this is useful

OK, not exactly, but we need to add more words to the intro and discussion to explain why this is more desirable than using DNest. We want to explicitly state that you don't have to do any 2nd order tests of your samples to try to assess whether you are converged / have a true sampling from the posterior pdf. Starting with a dense enough (define) prior sampling, if The Joker returns many samples, you "just know" that you are done.

New experiment structure:

  • Experiment 1: generate fake data with e=0.643, P=100.09 day, asini = 0.42 R_sun (or some reasonable set of parameters with high eccentricity) - 4 observation times uniformly sampled in a ~3 year window
  • Experiment 2: (what is currently Experiment 1) Run on a Troup star with few observations
  • Experiment 3: (what is currently Experiment 2) Run on a Troup star with many observations, downsample successively. Highlight switchover to emcee
  • Experiment 4: Run with full set of observations from Experiment 3 with uncertainties * [2,4,8,16]
  • Experiment 5: motivated by the fact that some data points seem to carry a lot of information (demonstrated in Exp 3), repeat analysis from Experiment 1, but move the observation time of data point 4 through 1 cycle in period (in 8 steps). At certain phases, this point is very informative - we can use our tools to develop scheduling priorities.

You don't always need 2^28 samples

In the discussion we should raise the issue that if you have (a) crappy, sparse data, or (b) a lot of good quality data, and all you want to do is learn about the system, you don't need to start with so many prior samples (many will pass the rejection step). It's really the intermediate regime where it is important.

But, if you want to do hierarchical modeling, or if you want to assess whether or not your posterior is multi-modal, you need to sample the hell out of your priors.

Only effectively unimodal

Technically, the posterior will always be multimodal. All we are asking for is effective unimodality. This requires an audit of the text

Add a paragraph of discussion to each experiment

Add some conclusions to each experiment because the discussion section is too late!

Experiment 1 - we do get samples at truth, yes more weight at short periods, but we're actually sampling.

run-sampler.py should be able to use cached prior samples

Right now run-sampler.py generates new batches of prior samples each time it is run because it only takes minutes (low incentive to optimize). But for the experiments, I should just generate a massive file of samples and use chunks of the same samples for all experiments.

Use K instead of a_1 sin i

Switch to using velocity semi-amplitude, but still put prior on asini

This requires some text changes as well.

latex build broken (missing figure?)

! Package pdftex.def Error: File `figures/exp2-corner-0.pdf' not found.

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.574 ....9\textheight]{figures/exp2-corner-0.pdf}

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on sampler.log.
make: *** [sampler.pdf] Error 1

Try adding scatter term; still okay?

I want a parameter s-squared, such that the noise variances become

sigma^2 + s-squared

This has to be sampled along with the other non-linear parameters, so we have to go to 5-d sampling (and probably 2 ** 29 samples).

Put a prior on s-squared that is Gaussian in the LOG of s-squared.

@adrn, can you try doing this and see if everything still works? I only ask because all our customers want this.

a crazy experiment: The null experiment

We could make data with ZERO signal, and then:

  • analyze it straightforwardly and correctly, to see what a "null" looks like
  • analyze it in the case that we have accidentally underestimated the error bars by a factor of three!

In the latter case, we should find some kind of posterior pdf... What?

bibtex issues

Warning--I didn't find a database entry for "TODO"
Warning--I didn't find a database entry for "hoggeccentricity"
Warning--I didn't find a database entry for "dfmexopop"
Warning--I didn't find a database entry for "skilling"
Warning--I didn't find a database entry for "brewer"
Warning--I didn't find a database entry for "proximab"
Warning--I didn't find a database entry for "fittingalline"
Warning--empty publisher in Kepler:1609
Warning--can't use both author and editor fields in Murray:2010
Warning--empty publisher in Murray:2010

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.