generated from erosita/uds
84 lines
2.0 KiB
R
84 lines
2.0 KiB
R
#
|
|
# 2 data sets
|
|
# in Xspec make ipl->wdata
|
|
# then split file
|
|
#
|
|
|
|
|
|
|
|
library(sfsmisc)
|
|
|
|
|
|
|
|
|
|
up=-10.0
|
|
|
|
Emin=25.0
|
|
Emax=180.0
|
|
postscript('galplane.eps', horizontal = FALSE, onefile = FALSE, paper = "special",width = 9.0, height = 6.0)
|
|
par(oma=c(1,1,1,1))
|
|
par(lwd=2)
|
|
|
|
#layout(matrix(c(1,2), 2, 1, byrow = TRUE), heights = c(1.5,1), TRUE)
|
|
|
|
leftx=4.5
|
|
par(mar=c(4., leftx, 0.1, 0.1))
|
|
par(cex.lab=1.6)
|
|
par(cex.axis=1.6)
|
|
xlim <- c(Emin,Emax)
|
|
|
|
cl="black"
|
|
|
|
sc=1000.0
|
|
|
|
ylim <- c(-0.005,0.09)*sc
|
|
|
|
a <- read.table("./galplane_1.dat", col.names=c("x","dx","y","dy"))
|
|
b <- read.table("./galplane_3.dat", col.names=c("x","dx","y","dy"))
|
|
c <- read.table("./galplane_2.dat", col.names=c("x","dx","y","dy"))
|
|
d <- read.table("./galplane_4.dat", col.names=c("x","dx","y","dy"))
|
|
|
|
|
|
plot(a$x, a$y*sc, pch=0, ylim=ylim, xlim=xlim, ylab=expression("mCrab keV"^"-1"~"FOV"^"-1"), xaxt="no",log="x",xlab="",type="n")
|
|
|
|
### Log axis using sfsmisc ###
|
|
atx=c(8,30,50,80,100,150)
|
|
eaxis(1, at = atx, labels = pretty10exp(atx, sub10=c(1,100), drop.1=TRUE), las=0)
|
|
abline(v=atx, col="lightgray", lty="dotted")
|
|
###
|
|
|
|
grid()
|
|
|
|
cex=1.5
|
|
|
|
cl="black"
|
|
segments(a$x,(a$y-a$dy)*sc,a$x,(a$y+a$dy)*sc,col=cl)
|
|
segments(a$x-a$dx,(a$y)*sc,a$x+a$dx,a$y*sc,col=cl)
|
|
points(a$x,a$y*sc,pch=21,col=cl,bg="white",cex=cex)
|
|
|
|
# L-20
|
|
cl="blue"
|
|
bias=1.01
|
|
segments(c$x*bias,(c$y-c$dy)*sc,c$x*bias,(c$y+c$dy)*sc,col=cl)
|
|
segments((c$x-c$dx)*bias,c$y*sc,(c$x+c$dx)*bias,c$y*sc,col=cl)
|
|
points(c$x*bias,c$y*sc,pch=22,col=cl,bg="white",cex=cex)
|
|
|
|
# L+20
|
|
cl="red"
|
|
segments(b$x,(b$y-b$dy)*sc,b$x,(b$y+b$dy)*sc,col=cl)
|
|
segments(b$x-b$dx,b$y*sc,b$x+b$dx,b$y*sc,col=cl)
|
|
points(b$x,b$y*sc,pch=23,col=cl,bg="white",cex=cex)
|
|
|
|
# BKG
|
|
cl="magenta"
|
|
segments(d$x,(d$y-d$dy)*sc,d$x,(d$y+d$dy)*sc,col=cl)
|
|
segments(d$x-d$dx,(d$y)*sc,d$x+d$dx,d$y*sc,col=cl)
|
|
points(d$x,d$y*sc,pch=24,col=cl,bg="white", ,cex=cex)
|
|
|
|
|
|
mtext(side = 1, text = "Energy, keV", line = 3, cex=1.6)
|
|
|
|
legend( 85.0,0.09*sc,c("GB","L+20","L-20","3C 273/Coma"), pch=c(21,22,23,24),bg=c("white","white","white","white"), col=c("black","blue","red","magenta"),cex=1.7)
|
|
|
|
dev.off()
|