[1] "Created: Wed Sep 3 16:19:24 2014"
Load in the data and helper functions:
load("lcdb.rda")
source("funcs.R")
library(ggplot2,quietly=TRUE)
Create Figure 1. Dataset is small so we create it in code:
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:
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:
head(lcdbi)
id type nobs
1 CSS071216:110407-045134 agn 237
2 CSS080314:141858+144617 agn 141
3 CSS080403:170550+265903 agn 23
4 CSS081031:013628+311031 agn 40
5 CSS081220:034643+142027 agn 32
6 CSS090202:105407+010236 agn 49
table(lcdbi$type)
agn blazar cv downes flare nv rrlyr sn
140 124 461 376 66 1971 292 536
The curves are stored as a list in lcdb. We look at the 12th member of the list which is a short curve:
lcdb[[12]]
ra dec mjd mag magerr measgrp
3 22.46 -6.874 54355 20.80 0.4743 0
5 22.46 -6.874 55060 19.04 0.1922 1
9 22.46 -6.874 55060 19.58 0.2513 1
6 22.46 -6.874 55060 19.58 0.2511 1
4 22.46 -6.874 55090 19.61 0.2577 2
1 22.46 -6.874 55090 19.45 0.2358 2
8 22.46 -6.874 55098 20.00 0.3210 3
2 22.46 -6.873 55857 19.84 0.2466 4
7 22.46 -6.873 55857 19.68 0.2230 4
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:
lcobj <- "CSS071216:110407-045134"
lcs <- lcdb[[which(lcobj == lcdbi$id)]]
p1 <- lcplot(lcs, title="AGN")
p1
lcobj <- "CSS110405:141104+011153"
lcs <- lcdb[[which(lcobj == lcdbi$id)]]
p2 <- lcplot(lcs, title="Supernova")
p2
lcobj <- "CSS111103:230309+400608"
lcs <- lcdb[[which(lcobj == lcdbi$id)]]
p3 <- lcplot(lcs, title="Flare")
p3
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:
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)
}
}