hist.py

Histograms of the occultation events as a function of mean longitude, duration, and impact parameter for each of the seven TRAPPIST-1 planets, as well as a marginalized histogram of the total number of potentially detectable planet-planet occultations in one Earth year.

Note

When I sample too many times from the prior in a single run, the code often hangs. There may be a memory leak somewhere, but I haven’t been able to find it yet. If you want to run large ensembles, I recommend using the parallelization scheme I implemented below. Alternatively, a brain-dead way of doing it is to instantiate a bunch of screen sessions: screen -dm python -c "import hist; hist.Compute(nsamp = 100)"

The figures below show the distributions for the eyeball planet case (left) and the limb-darkened planet case (right). Click on them to enlarge.

TRAPPIST-1b

../_images/b_corner_eyeball.jpg ../_images/b_corner_limbdark.jpg

TRAPPIST-1c

../_images/c_corner_eyeball.jpg ../_images/c_corner_limbdark.jpg

TRAPPIST-1d

../_images/d_corner_eyeball.jpg ../_images/d_corner_limbdark.jpg

TRAPPIST-1e

../_images/e_corner_eyeball.jpg ../_images/e_corner_limbdark.jpg

TRAPPIST-1f

../_images/f_corner_eyeball.jpg ../_images/f_corner_limbdark.jpg

TRAPPIST-1g

../_images/g_corner_eyeball.jpg ../_images/g_corner_limbdark.jpg

TRAPPIST-1h

../_images/h_corner_eyeball.jpg ../_images/h_corner_limbdark.jpg

Marginal distributions

../_images/hist_eyeball.jpg ../_images/hist_limbdark.jpg ../_images/snr_eyeball.jpg ../_images/snr_limbdark.jpg
scripts.hist.Compute(nsamp=300, minsnr=1.0, nbody=True, progress_bar=True, eyeball=True, **kwargs)

Compute occultation histograms by drawing nsamp draws from the system prior. Saves the results to data/histXXX.npz.

Parameters:
  • nsamp (int) – The number of prior samples to draw. Default 300
  • minsnr (float) – The minimum SNR to include in the tally. Default 1.
  • nbody (bool) – Use the N-Body solver? Default True
  • progress_bar (bool) – Display a progress bar? Default True
  • eyeball (bool) – Assume eyeball planets? Default True. If False, uses the limb darkened surface map.
scripts.hist.MakeFigures(jpg=False)

Plots all histogram figures for the paper.

scripts.hist.MergeFiles()

Merge all the npz savesets into a single one for faster plotting.

scripts.hist.Plot(eyeball=True, zorder=[6, 5, 4, 3, 2, 1, 0])

Plots the results of a Compute() run and returns several figures.

scripts.hist.Submit(queue=None, email=None, walltime=8, nodes=5, ppn=12, mpn=None, nsamp=50000, eyeball=True, batch_size=100, nproc=None)

Submits a PBS cluster job to run Compute() in parallel.

Parameters:
  • queue (str) – The name of the queue to submit to. Default None
  • email (str) – The email to send job status notifications to. Default None
  • walltime (int) – The number of hours to request. Default 8
  • nodes (int) – The number of nodes to request. Default 5
  • ppn (int) – The number of processors per node to request. Default 12
  • nsamp (int) – The number of prior samples to draw. Default 50,000
  • eyeball (bool) – Use the radiative equilibrium surface map? Default True
  • batch_size (int) – Size of each batch used in the parallelization. Default 100
  • mpn (int) – Memory per node in gb to request. Default no setting.
  • nproc (int) – Number of processes to spawn. Default is the number of core.
scripts.hist.histogram(system, tstart, tend, dt=0.0001)

Computes statistical properties of planet-planet occultations that occur over a given interval. Computes the frequency of occultations as a function of orbital phase, duration, and signal-to-noise ratio, as well as the fully marginalized occultation frequency for each planet in the system. Occultations by the star are not included, nor are occultations occuring behind the star, which are not visible to the observer.

Parameters:
  • system (planetplanet.structs.System) – A system instance.
  • tstart (float) – The integration start time (BJD − 2,450,000)
  • tend (float) – The integration end time (BJD − 2,450,000)
  • dt (float) – The time resolution in days. Occultations shorter than this will not be registered.
Returns:

A list of (phase, impact, duration, signal, noise, snr) tuples for each planet in the system. The phase angle is measured in degrees and the duration is measured in days. The signal and noise are measured in ppm.

Warning

This routine computes the orbital phase angle, which is measured from transit. This is different from the mean longitude by \(\pi/2\)