eLSST OpSim Lightcurve Sampling Tool
- The Lightcurve Sampling Tool
Please note that these python scripts require the following python modules: numpy, scipy and mysqldb.
- Sample Field Centers
Note that the lightcurve interpolator calculates asinh magnitudes, as described here.
What is it?
The lightcurve sampling tool is a collection of python scripts which will run on your computer, query the opsim databases at UW, and uses a template lightcurve (which you provide), to generate an observed lightcurve consisting of exposure MJD, magnitudes and magnitude errors for an object at a particular RA/Dec location.
You, the user, must provide a lightcurve template (either periodic or nonperiodic). This template must be specified in each filter you want to query in, in the 2-column format "time mag". The time steps can be whatever is adequate to specify your light curve -- the scripts will interpolate to calculate a magnitude at intermediate times.
This script could be run multiple times to test multiple pointings. Note that the current default opsim is based on a fixed field pointing set. There are various 'classes' of pointings - examples of these would be the field centers of the universal cadence fields, the overlap regions between universal cadence fields, and the supernova fields. You can find a short list of a sample of these various field pointings in fieldsamples. Please note this is intended to be a useful starting point, not a comprehensive list of various pointings you should consider testing. You can also test your lightcurve against our dithered pointings.
If you plan on using this script extensively, it may be better for you to download the database and modify the scripts to point at your local copy of the database. Please see the download database link (with directions).
The scripts we have provided here are examples. You should look carefully at the examples, and with a few modifications, you would be able to write a light curve query script which will work for the light curve you wish to test. In our example, nonper.py (for non periodic light curves) uses the lightcurve template data in sn1a_lc.v1.1.dat to calculate magnitudes measured at pointings of 220, -30 and 210, 60. While sn1a_lc.v1.1.dat contains information on template brightnesses in filter U,B,V,R,I,J,H,and K, the query only uses the lightcurve data coming from the B and V data, along with a 'dmod' variable which could be changed to test supernova light curves at various distances (brightnesses). Similarly, per.py uses the lightcurve template in periodic.dat (only time and r_mag), to calculate the observed magnitudes at pointings of 220,-30 and 210, -20. Again, a potentially variable offset (here, =38) has been added to the periodic.dat values in order to place the variable object at a particular distance modulus.
If you have questions about the above code, please contact Simon Krughoff.