SLTimer

SLTimer is an aggregator to enable several different strong lens time delay estimation algorithms to be run on the same dataset, principally by the Strong Lens Time Delay Challenge Evil Team as part of their work preparing and analyzing the second Time Delay Challenge.

API

class desc.sltimer.worker.SLTimer

Worker class for ingesting strongly lensed image light curves, and measuring the time delays between them.

add_polynomial_microlensing()

Adds polynomial microlensing to each lightcurve.

add_spline_microlensing()

Adds spline microlensing to each light curve.

compute_chisq(delay, batch=False, getlcs=False)

return chisquare of spline fitting given time delay

Parameters:
  • delay (1D array) – array contains time delays for each light curve. The convention is [dt_AB, dt_AC, dt_AD]
  • batch (bool) – if batch==True, then delay can be a two dimensional array with each row contains a set of time delay sample.
compute_likelihood_simpleMC(nsample=1000, nprocess=5, rangeList=None, outName='', save_file=True, samples=None)

Compute the likelihood by Monte Carlo method

delete_old_files()

Deletes the old files from previous error simulations.

display_light_curves(filename=None, jdrange=None, title=None, given_curve=None)

Displays the lightcurves in a single panel plot.

download(url, format='rdb', and_read=False)

Downloads the datafile from a url.

Parameters:
  • url (string) – Web address of datafile.
  • format (string) – Data format, ‘rdb’ or ‘tdc2’
  • and_read (boolean) – Read in data after downloading file?

Notes

Don’t forget to set and_read=True if you want to use the data!

estimate_time_delays(method='pycs', microlensing='spline', agn='spline', error=None, quietly=False)

Measures time delays between images, by modeling all the light curves.

Parameters:
  • method (string) – Modeling package to use.
  • microlensing (string) – Choice of microlensing model to use.
  • agn (string) – Choice of intrinsic AGN variability model to use.
  • error (string) – Error estimation options [None, ‘complete’, ‘intrinsic variance’]

Notes

Provides both polynomial and spline time delays.

Parameters:
  • method (string) – Modeling package to use (currently only pycs is available)
  • microlensing (string) – Model choice for microlensing light curves
  • agn (string) – Model choice for intrinsic AGN variability
  • error (boolean) – Estimate errors?
  • quietly (boolean) – Redirect output to /dev/null?
initialize_time_delays(method=None, pars=None)

Initializes the curve shifts by specifying 1 or 3 time delays.

make_mock_light_curves(n=None, npkl=None)

Make mock lightcurves to help estimate uncertainties.

make_plain_copies(n=None, npkl=None)

Makes copies of the data.

optimize_spline_model()

Optimizes a spline model for the intrinsic variability.

read_in(datafile='self', format=None)

Reads in light curve data from a file.

select_bands(bands)

select bands you want to keep

Warning

this function will change the light curve in SLTimer

whiten()

Whitens a set of multi-filter light curves to a single fictitious band.