Simulate Target

Generate a forward model of a telescope detector with sensitivity variation, and simulate stellar targets with motion relative to the CCD.

class scope.simulatetarget.Target(fpix, flux, ferr, target, t, mag=12.0, roll=1.0, neighbor_magdiff=1.0, ncadences=1000, apsize=7, transit=False, variable=False, neighbor=False, ccd_args=[], psf_args=[], xpos=None, ypos=None)

A simulated stellar object with a forward model of a telescope detector’s sensitivity variation

add_neighbor(fpix=[], magdiff=1.0, dist=1.7)

Add a neighbor star with given difference in magnitude and distance at a randomized location.

fpix :

Pixel-level light curve of dimemsions (apsize, apsize, ncadences). Automatically set to fpix generated in GenerateLightCurve() unless a different light curve is passed.

magdiff :

Difference in stellar magnitude between target and neighbor. Positive magdiff corresponds to higher values for the neighbor star’s magnitude.

dist :

Distance (in pixels) between cetroid position of target and neighbor. The (x, y) coordinates of the neighbor are chosen arbitrarily to result in the given distance.

add_transit(fpix=[], rprs=0.01, period=15.0, t0=5.0, i=90, ecc=0, m_star=1.0)

Injects a transit into light curve.

fpix :

Pixel-level light curve of dimemsions (apsize, apsize, ncadences). Automatically set to fpix generated in GenerateLightCurve() unless a different light curve is passed.

rprs :

R_planet / R_star. Ratio of the planet’s radius to the star’s radius.

period :

Period of transit in days.

t0 :

Initial transit time in days.

add_variability(fpix=[], var_amp=0.0005, freq=0.25, custom_variability=[])

Add a sinusoidal variability model to the given light curve.

fpix :

Pixel-level light curve of dimemsions (apsize, apsize, ncadences). Automatically set to fpix generated in GenerateLightCurve() unless a different light curve is passed.

var_amp :

Amplitude of sin wave, which is multiplied by the light curve.

freq :

Frequency of sin wave in days.

custom_variability :

A custom 1-dimensional array of length ncadences can be passed into the AddVariability() function, which will be multiplied by the light curve.

create_aperture(fpix=[])

Create an aperture including all pixels containing target flux.

fpix :

Pixel-level light curve of dimemsions (apsize, apsize, ncadences). Automatically set to fpix generated in GenerateLightCurve() unless a different light curve is passed.

detrend(fpix=[])

Runs 2nd order PLD with a Gaussian Proccess on a given light curve.

fpix :

Pixel-level light curve of dimemsions (apsize, apsize, ncadences). Automatically set to fpix generated in GenerateLightCurve() unless a different light curve is passed.

display_aperture()

Displays aperture overlaid over the first cadence target pixel file.

display_detector()

Returns matrix of dimensions (apsize, apsize) for CCD pixel sensitivity.

estimate_CDPP(flux=[])
Quick function to calculate and return Combined Differential Photometric Precision (CDPP) of a given light curve.

If no light curve is passed, this funtion returns the CDPP of the light curve generated in GenerateLightCurve().

flux :

1-dimensional flux light curve for which CDPP is calculated. If nothing is passed into FindCDPP(), it returns the CDPP of the light curve generated in GenerateLightCurve()

cdppfloat

Combined Differential Photometric Precision (CDPP) of given flux light curve

plot()

Simple plotting function to view first cadence tpf, and both raw and de-trended flux light curves.

to_lightkurve_lc(aperture_mask='all')

Integration with the lightkurve package.

lclightkurve.KeplerLightCurve object

A KeplerLightCurve object from the lightkurve package

to_lightkurve_tpf(target_id='Simulated Target')

Integration with the lightkurve package.

target_idstr

Name of the simulated target. Defaults to “Simulated Target”

tpflightkurve.KeplerTargetPixelFile object

A KeplerTargetPixelFile object from the lightkurve package

scope.simulatetarget.generate_target(mag=12.0, roll=1.0, coords=None, background_level=0.0, neighbor_magdiff=1.0, ncadences=1000, apsize=7, ID=205998445, transit=False, variable=False, neighbor=False, tpf_path=None, no_sensitivity_variation=False, signal=None, **kwargs)
mag :

Magnitude of primary target PSF.

roll :

Coefficient on K2 motion vectors of target. roll=1 corresponds to current K2 motion.

coordstuple

Coordinates of the PSF centroid.

background_level :

Constant background signal in each pixel. Defaults to 0.

neighbor_magdiff :

Difference between magnitude of target and neighbor. Only accessed if neighbor initialized as True or if AddNeighbor() function is called.

photnoise_conversion :

Conversion factor for photon noise, defaults to 0.000625 for consistency with benchmark.

ncadences :

Number of cadences in simulated light curve.

apsize :

Dimension of aperture on each side.

Target: Target object

A simulated CCD observation