Statistical Cartoons

We built in a few toy models to help us understand photon-counting noise.

Making a Fake Light Curve

Let’s make a really boring light curve, just so we can understand what we should expect for the noise properties of a star of a given brightness.

In [ ]:
import henrietta as hsl
In [ ]:
# create a fake light curve, where we expect 100 photons per exposure
lc = hsl.create_photon_lightcurve(N=100, duration=1)

# plot that fake light curve
lc.plot(marker='.', normalize=False, linewidth=0);

Remember, we can always pull out the flux values from a light curve. For example, if we want to compute the RMS of the light curve, we can use:

In [ ]:
import numpy as np
np.std(lc.flux)

Catching Photons in a Bucket

In some ways, we can think of the Kepler telescope just as a big light bucket. It collects photons that are raining down from particular locations on the sky. We can simulate how many photons a telescope will gather from the sky using the following:

In [ ]:
N = hsl.catch_photons_in_bucket(rate=1, diameter=2, time=3)

If we want to use this function without generating a plot (let’s imagine we want to run it millions of times), then we can call it with the visualize keyword set to False:

In [ ]:
N = hsl.catch_photons_in_bucket(rate=1,
                                diameter=2,
                                time=3,
                                visualize=False)
print(N)