1. Generalities

1.1. The documentation

… consists of several parts:

  • A tutorial that covers the main objects/functions. (You are here !)
  • Some demonstration scripts around the “trial curves” and the figures of the PyCS paper.
    These scripts are covered here: Demonstration scripts
  • The autogenerated full API documentation: pycs package

1.2. Importing pycs

If pycs is installed, simply use import pycs at the beginning of your script. A minimal script (just to check that it works):

import pycs
lca = pycs.gen.lc.lightcurve(object="A", plotcolour="red")
lcb = pycs.gen.lc.lightcurve(object="B", plotcolour="blue")
lcb.shifttime(1.0)
pycs.gen.lc.display([lca, lcb])

1.3. Nomenclature

  • For simplicity we call “microlensing” (abreviated ML) any form of extrinsic variability.

1.4. 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 perflectly OK to use pycs 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.