--- title: Exploratory look at the lightcurves author: Julian Faraway output: html_document: toc: true theme: cosmo --- ```{r global_options, include=FALSE} library(knitr) opts_chunk$set(comment=NA, fig.path='/tmp/Figs/', warning=FALSE, message=FALSE) ``` ```{r echo=FALSE} paste("Created:",date()) ``` Load in the data and helper functions: ```{r} load("lcdb.rda") source("funcs.R") library(ggplot2,quietly=TRUE) ``` Create Figure 1. Dataset is small so we create it in code: ```{r} eglco <- structure(list(mag = c(16.086072, 16.069502, 16.077044, 16.041818, 16.293768, 19.422619, 19.393279, 18.047673, 18.923392, 18.583543 ), magerr = c(0.0697555975990846, 0.0696261830512544, 0.069760157493194, 0.0693726807224113, 0.0730024749645618, 0.222866958691984, 0.198915754273044, 0.121596853985125, 0.176581268240101, 0.151394544333253), mjd = c(55323.1398805091, 55323.1444230904, 55323.149035845, 55323.1536520487, 55323.158246852, 55544.3732165624, 55679.1372606134, 55984.0921198726, 55984.0971821761, 55984.1080515971)), .Names = c("mag", "magerr", "mjd"), row.names = c(2L, 3L, 4L, 5L, 6L, 7L, 8L, 10L, 11L, 12L), class = "data.frame") eglcu <- structure(list(mag = c(20.218671, 20.215383), magerr = c(0.257789646738158, 0.256095571363926), mjd = c(55130.3877009605, 55867.3710062266 )), .Names = c("mag", "magerr", "mjd"), row.names = c(1L, 9L), class = "data.frame") ``` We construct the plot: ```{r} p <- ggplot(eglco, aes(x=mjd, y=mag), ylim=c(15.5, 20.5)) + xlab("Mean Julian Date") + ylab("Magnitude") p <- p + scale_y_reverse() + geom_errorbar(aes(ymin=mag-magerr, ymax=mag+magerr), color=gray(0.75)) + geom_point() p <- p + geom_point(data = eglcu, aes(y=mag), pch=4) p ``` An index for the curves is found in *lcdbi*. We reproduce Table 1: ```{r} head(lcdbi) table(lcdbi$type) ``` The curves are stored as a list in *lcdb*. We look at the 12th member of the list which is a short curve: ```{r} lcdb[[12]] ``` The last column, measgrp, is an indicator of cluster of measurements occuring within a 30 minute timespan as explained in the paper. We reproduce the four example cases as seen in the paper: ```{r} lcobj <- "CSS071216:110407-045134" lcs <- lcdb[[which(lcobj == lcdbi$id)]] p1 <- lcplot(lcs, title="AGN") p1 ``` ```{r} lcobj <- "CSS110405:141104+011153" lcs <- lcdb[[which(lcobj == lcdbi$id)]] p2 <- lcplot(lcs, title="Supernova") p2 ``` ```{r} lcobj <- "CSS111103:230309+400608" lcs <- lcdb[[which(lcobj == lcdbi$id)]] p3 <- lcplot(lcs, title="Flare") p3 ``` ```{r} lcobj <- "3019048007678" lcs <- lcdb[[which(lcobj == lcdbi$id)]] p4 <- lcplot(lcs, title = "Non Transient") p4 ``` Here is random sampling of four curves from each type: ```{r} types <- levels(lcdbi$type) for(i in seq(along=types)){ ilc <- sample(lcdbi$id[lcdbi$type == types[i]],size=4) for(j in 1:4){ lcs <- lcdb[[which(ilc[j] == lcdbi$id)]] p <- lcplot(lcs, title = paste(types[i],ilc[j])) print(p) } } ```