Lightcurve¶
- class daschlab.lightcurves.Lightcurve(data=None, *, time=None, time_start=None, time_delta=None, n_samples=None, **kwargs)[source]¶
Bases:
Photometry
,TimeSeries
A DASCH lightcurve data table.
A
Lightcurve
is a specialized form ofastropy.table.Table
. It is a subclass of bothastropy.timeseries.TimeSeries
anddaschlab.photometry.Photometry
, equipping it with the methods associated with both of those specializations. You can use all of the usual methods and properties made available by these parent classes; items they provide are not documented here.The actual data contained in these tables — the columns — are documented elsewhere, on the main DASCH website.
You should not construct
Lightcurve
instances directly. Instead, obtain lightcurves using thedaschlab.Session.lightcurve()
method.See the module-level documentation for a summary of the filtering and subsetting functionality provided by this class.
Cheat sheet:
time
is HJD midpointmagcal_magdep
is preferred calibrated phot measurementlegacy plotter error bar is
magcal_local_rms` * `error_bar_factor
, the latter being set to match the error bars to the empirical RMS, if this would shrink the error bars
Methods Summary
mean_pos
()Obtain the mean source position from the lightcurve points.
plot
([x_axis, callout])Plot the lightcurve using default settings.
Methods Documentation
- mean_pos() SkyCoord [source]¶
Obtain the mean source position from the lightcurve points.
- Returns:
astropy.coordinates.SkyCoord
The mean position of the non-rejected detections
Notes
Average is done in degrees naively, so if your source has RA values of both 0 and 360, you might get seriously bogus results.
- plot(x_axis: str = 'year', callout: ndarray | None = None) figure [source]¶
Plot the lightcurve using default settings.
- Parameters:
- x_axisoptional
str
, default"year"
The name of the column to use for the X axis.
"year"
is a synthetic column calculated on-the-fly from the"time"
column, corresponding to thejyear
property of theastropy.time.Time
object.- calloutoptional
numpy.ndarray
, defaultNone
If provided, this should be a boolean array of the same size as the lightcurve table. Points (both detections and nondetections) for which the array is true will be visually “called out” in the plot, highlighted in red.
- x_axisoptional
- Returns:
bokeh.plotting.figure
A plot.
Notes
The function
bokeh.io.show
(imported asbokeh.plotting.show
) is called on the figure before it is returned, so you don’t need to do that yourself.Examples
The
match
selector combines conveniently with the callout functionality in constructs like this:# Call out points in the lightcurve with the "suspected defect" flag lc.plot(callout=lc.match.any_aflags(AFlags.SUSPECTED_DEFECT))