1. Generalities
1.1. The documentation
… consists of several parts:
Runnable Example notebooks, for a quick introduction on how to measure time delays with PyCS3. You might want to start from this if you just want a quick overlook of PyCS3’s key functionality.
A tutorial that covers the main objects/functions in details. (You are here !)
A README, for the documentation of the automated pipeline described in Millon et al. (2020).
The autogenerated full API documentation: pycs3 package
1.2. Importing PyCS3
If PyCS3 is installed, simply use import pycs3 at the beginning of your script.
A minimal script (just to check that it works):
import pycs3.gen.lc
lca = pycs3.gen.lc.LightCurve(object="A", plotcolour="red")
lcb = pycs3.gen.lc.LightCurve(object="B", plotcolour="blue")
lcb.shifttime(1.0)
pycs3.gen.lc_func.display([lca, lcb])
1.3. Interacting with PyCS3
PyCS3 is now using a logger for its output message. Make sure you include these lines at the beginning of all your scripts if you want to print the info messages in the terminal
import logging
loggerformat='%(message)s'
logging.basicConfig(format=loggerformat,level=logging.INFO)
1.4. Nomenclature
For simplicity we call “microlensing” (abreviated ML) any form of extrinsic variability.
1.5. About dates : JD, MJD, HJD, …
To represent observing epochs, we use the same convention as cosmouline, that is a “Modified Heliocentric Julian Date”.
The “modification” is defined by : mjd = jd - 2400000.5 . In the same way, mhjd = hjd - 2400000.5 .
Note
Despite this, in the code we simply use jd or jds (it’s a plural s) to refer to mhjd. For instance, the numpy array that stores the observing epochs of a light curve l is l.jds.
Note that in principle, it is perfectly OK to use PyCS3 with any time axis, as long as the latter is linear, and can be stored as floats. Any advanced interpretations of the observing epochs are only used for uncritical stuff like plots and exports.