1.1 Choosing an Aperture

1.2 Adding or Removing Flux Correction Terms

1.3 Running eleanor Locally

1.4 Targets Without TIC IDs

1.5 Handling Saturated Targets

1.6 Example: Rediscovering $\pi$ Mensae c

1.1 Choosing an Aperture

Let's begin with the same WASP-100 we used in the quickstart tutorial. I'm going to hide warnings too, just to make it easier to see what's going on.

What if you're not satisfied with $\texttt{eleanor}$'s default choice of aperture? Well, we provide you with three ways to explore different apertures.

(1) All of the apertures $\texttt{eleanor}$ tries behind the scenes are saved! So are their raw and corrected light curves. These are stored as data.all_apertures, data.all_raw_flux, and data.all_corr_flux, respectively. We can explore these options by calling the following, for example.

(2) $\texttt{eleanor}$ can help you create your own mask. By calling eleanor.custom_aperture(), we can choose from a circular or rectangular aperture. We can also choose the size (radius or length x width) and the pixel the aperture is centered on by passing in a list of $\textit{(x,y)}$ to pos. The aperture will only be created on pixels within the TPF (it won't spill over to other pixels). Calling eleanor.custom_aperture() overwrites eleanor.TargetData.aperture, eleanor.TargetData.raw_flux, and eleanor.TargetData.corr_flux.

(3) We can pass in our own mask by creating a 2D array of the same shape as the TPF and calling eleanor.TargetData.get_lightcurve(aperture=mask)

1.2 Adding or Removing Flux Correction Terms

When we call eleanor.TargetData(), some simple systematics corrections are automatically performed on the light curve. Let's apply those explicitly to the newly created raw light curve from the custom aperture and see how we can change them.

1.2.1 Changing quality flags

If we think certain data are bad, but not quality flagged, we can give them a different quality label and re-run this function, causing them to be ignored so they do not influence other cadences. By default, all highest quality data have flag zero and all other flags are positive. Let's throw out a four-day chunk temporarily:

1.2.2 Removing terms from the model

By default, the corrected_flux function removes signals that are correlated with the position of the star on the detector, with common modes of nearby stars, and with the background. We can stop these from being a part of corrected_flux by setting them to zero.

In this case, we have a noisier light curve that looks more like the raw flux.

We can always get back to where we started by just re-running eleanor.TargetData() with the same call we used initially.

1.3 Running eleanor locally/without internet

With the default settings, eleanor will attempt to find the proper postcard for your target, as well as other data about your system, through MAST. If you don't have internet access, but have downloaded your postcard already (if you've made a light curve for your star of interest previously, you may already have the postcard in your ~/.eleanor directory), you can avoid all need for the internet with a few simple tricks.

All you need to do are pass through local = True in your call to eleanor.Source() and give the directory of your postcard and pointing model. By default, these are downloaded to the same directory. If you don't pass through a pointing model directory, it will assume it's in the same place as your postcard. I've put mine in ../../testdir1 and ../../testdir2, respectively.

You also need to pass through your star's coordinates. Normally you can pass through one of a name, TIC ID, Gaia DR2, ID, or coordinates. In these cases, behind the scenes eleanor will use any one of these to get the rest of this information, but behind the scenes relies on the coordinates. You need to pass through the other values as well, but just so they're set to something so eleanor doesn't try to look them up. You can set them to zero, that's fine.

The only thing that will be missing is star.tess_mag, but you can set that yourself too before you run data.save() and it will be recorded properly.

1.4 Targets without TIC IDs

When you pass through coords into eleanor.Source(), it will use these coordinates to find the TIC entry at that location. However, some targets (often very faint or non-stellar in nature) do not appear in the TIC. This will produce an error that inhibits eleanor.Source() from running successfully. However, as we noted in the previous section, eleanor does not use the TIC ID behind the scenes. Passing through a false TIC ID and the proper coordinates will work just fine.

1.5 Saturated targets

eleanor tests a variety of apertures and selects the one with the lowest CDPP. Very saturated targets ($T < 6-7$, depending on location on the detector) have many pixels at the saturation limit. Choosing a small number of saturated pixels will then produce a very stable light curve, leading eleanor to choose very small apertures that do not represent the true astrophysical variability from these sources. To make light curves from these, we need to use larger apertures. This is possible!

Yes, that's a saturated target. Let's define our own aperture and go forth.

Alpha draconis, with $V=3.7$, has a deep secondary eclipse as reported in Bedding et al. (2020), and the star is so bright the photon noise is at the few ppm level on 30-minute timescales.

It often works very well for bright, saturated targets to use additional regressors, drawing on the corner pixels of the TPF to use on the detrending. An example of this is below.

1.6 Putting it all together: recovering $\pi$ Men c

Let's make sure we can recover the planet discovered with TESS data around the bright star $\pi$ Mensae, combining what we have learned about saturated targets with the addition of regressing against corner pixels in the TPF for improved background subtraction.

It looks like there's a planet here! Let's fold on the known period and phase:

There it is!