daschlab.lightcurves Module¶
DASCH lightcurve data.
The main class provided by this module is Lightcurve
, instances of which can
be obtained with the daschlab.Session.lightcurve()
method.
Rejecting Data Points¶
Lightcurve
tables come with a uint64 column named "reject"
that is always
initialized with zeros. If you are analyzing a lightcurve and wish to discard
various bad data points from it, you should set their "reject"
values to
something non-zero. Most lightcurve analysis functions will automatically drop
points with non-zero "reject"
values.
Filtering and Subsetting¶
Lightcurve
objects are instances of the astropy.timeseries.TimeSeries
class,
which in turn are instances of the astropy.table.Table
class. In your data
analysis you can use all of the usual methods and functions that these
superclasses provide. In addition, the Lightcurve
class provides a convenient
set of tools for subsetting and filtering data.
These tools take the form of paired “actions” and “selections”. The syntax for using them is as follows:
lc = sess.lightcurve(some_local_id)
# Get a subset of the data containing only the detections
# brighter than 13th mag. The action is `keep_only` and
# the selection is `brighter`.
bright = lc.keep_only.brighter(13)
# From that subset, remove points from the "ai" series.
# The action is `drop` and the selection is `series`.
no_ai = bright.drop.series("ai")
# Count remaining points not from narrow-field telescopes.
# The action is `count` and the selection is `narrow`, and
# `not_` is a modifier with the intuitive behavior.
n = no_ai.count.not_.narrow()
These operations can be conveniently chained together. More complex boolean
logic can be implemented with the where
selection and the
match
action.
In terms of implementation, an item like lc.keep_only
is a property that
returns a helper LightcurveSelector
object, which is what actually implements
methods such as brighter()
. The selector object helps pair
the desired action with the desired selection while maintaining a convenient
code syntax.
DASCH lightcurves often contain many nondetections (upper limits), which means that you may need to be careful about selection logic. For instance:
lc = sess.lightcurve(some_local_id)
n1 = lc.count.brighter(13)
n2 = lc.count.not_.detected_and_fainter(13)
# This will NOT generally hold, because n2 will include
# nondetections while n1 will not.
assert n1 == n2
Classes¶
|
DASCH photometry data quality warning flags. |
|
DASCH photometry data processing flags. |
|
A DASCH lightcurve data table. |
|
A single row from a |
|
A helper object that supports |
|
DASCH photometry data processing warning flags regarding the "local bin" calibration. |
|
DASCH photometry data processing warning flags based on plate-level diagnostics. |