marshallEngine.lightcurves.marshall_lightcurves module ∞
Generate the standard multi-survey lightcurve plots for the marshall transients
- Author
David Young
-
class
marshall_lightcurves
(log, dbConn, settings=False, transientBucketIds=[])[source] ∞ Bases:
object
The worker class for the marshall_lightcurves module
Key Arguments
log
– loggersettings
– the settings dictionarydbConn
– the database connection for the mrshalltransientBucketIds
– the transientBucketId(s) requiring lightcurves to be regenerated. (int or list)
Usage
To setup your logger, settings and database connections, please use the
fundamentals
package (see tutorial here).To initiate a marshall_lightcurves object, use the following:
from marshallEngine.lightcurves import marshall_lightcurves lc = marshall_lightcurves( log=log, dbConn=dbConn, settings=settings, transientBucketIds=[28421489, 28121353, 4637952, 27409808] ) lc.plot()
-
_select_data_for_transient
(transientBucketId)[source] ∞ get the transient lightcurve data from the marshall database
Key Arguments
transientBucketId
– the transientBucketId of source to get data for
-
_create_lightcurve_plot_file
(dataset, flatdata, flatLimits, objectNames, saveLocation, saveFileName)[source] ∞ Generate the lightcurve and save to file
Key Arguments
log
– loggerdataset
– the observational dataset split into filters (and then mags, limits etc)flatdata
– a flattened dataset to determine current magnitudeflatLimits
– a flattened dataset of non-detection limitsobjectNames
– a single name or a list of namessaveLocation
– the folder to save the plot file tosaveFileName
– the filename to give the plot file (without extension)
Return
filepath
– path to the lightcurve filecurrentMag
– a prediction of the current magnitude if there is enough recent datagradient
– a prediction of the gradient of recent data (on rise or decline?)
-
plot
()[source] ∞ generate a batch of lightcurves using multiprocessing given their transientBucketIds
Return
filepath
– path to the last generated plot file
Usage
from marshallEngine.lightcurves import marshall_lightcurves lc = marshall_lightcurves( log=log, dbConn=dbConn, settings=settings, transientBucketIds=[28421489, 28121353, 4637952, 27409808] ) lc.plot()
-
_plot_one
(transientBucketId, log, settings)[source] ∞ plot a single transeint lightcurve
Key Arguments
transientBucketId
– the id of the single transient to plot.settings
– dictionary of settingsdbConn
– marshall database connection
Return
filepath
– path to the plot filecurrentMag
– an estimate of the current magnitude (from slope of recent LC). -9999 if inaccurate.gradient
– gradient of slope of the recent LC. -9999 if inaccurate.