generated from erosita/uds
na Kubani
This commit is contained in:
@@ -10,7 +10,7 @@ keymo="model2"
|
||||
|
||||
|
||||
up=1.0
|
||||
xgrid <- c(30,50,70,100);
|
||||
#xgrid <- c(30,50,70,100);
|
||||
Emin=25.0
|
||||
Emax=180.0
|
||||
postscript('cutoffpl_gc06.eps', horizontal = FALSE, onefile = FALSE, paper = "special",width = 9.0, height = 6.0)
|
||||
@@ -23,7 +23,7 @@ par(mar=c(0.1, leftx, 1, 1))
|
||||
par(cex.lab=1.6)
|
||||
par(cex.axis=1.6)
|
||||
xlim <- c(Emin,Emax)
|
||||
ylim <- c(0.1,2)
|
||||
ylim <- c(0.2,2)
|
||||
|
||||
cl="black"
|
||||
a <- read.table('../cutoffpl_gc06_eeuf.dat', col.names=c("x","dx","y","dy","total","cutoffpl","pow"))
|
||||
@@ -62,14 +62,14 @@ segments(px-pdx,py,px+pdx,py,col=cl)
|
||||
##
|
||||
###################################################################################
|
||||
|
||||
lines(a$x,a$total,pch=1,bg=cl,col="black")
|
||||
lines(a$x,a$cutoffpl,pch=1,bg=cl,col="blue")
|
||||
lines(a$x,a$pow,pch=1,bg=cl,col="red")
|
||||
lines(a$x,a$total,pch=1,bg=cl,col="black")
|
||||
|
||||
###################################################################################
|
||||
|
||||
par(mar=c(4.5, leftx, 0.1, 1))
|
||||
ylim <- c(-3.5,3.5)
|
||||
ylim <- c(-2.5,2.5)
|
||||
|
||||
cl="black"
|
||||
a <- read.table("../cutoffpl_gc06_delchi.dat", col.names=c("x","dx","y","dy"))
|
||||
|
93
Spectra/figures/cutoffpl_gp.r
Normal file
93
Spectra/figures/cutoffpl_gp.r
Normal file
@@ -0,0 +1,93 @@
|
||||
#
|
||||
# 2 data sets
|
||||
# in Xspec make ipl->wdata
|
||||
# then split file to four parts as lecr1/2/3/4
|
||||
#
|
||||
|
||||
key="lecr"
|
||||
#key="pow"
|
||||
keymo="model2"
|
||||
|
||||
|
||||
up=1.0
|
||||
#xgrid <- c(30,50,70,100);
|
||||
Emin=25.0
|
||||
Emax=180.0
|
||||
postscript('cutoffpl_gp.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=5.3
|
||||
par(mar=c(0.1, leftx, 1, 1))
|
||||
par(cex.lab=1.6)
|
||||
par(cex.axis=1.6)
|
||||
xlim <- c(Emin,Emax)
|
||||
ylim <- c(0.2,1)
|
||||
|
||||
cl="black"
|
||||
a <- read.table('../cutoffpl_gp_eeuf.dat', col.names=c("x","dx","y","dy","total","cutoffpl","pow"))
|
||||
plot(a$x, a$y, pch=3, bg="white", col="white", ylim=ylim, xlim=xlim,main="GP (cutoffpl+powerlaw)",ylab=expression("keV"^"2"~"(Phot. keV"^"-1"~"cm"^"-2"~"s"^"-1"*")"),type="p",xaxt = 'n',xlab="",log="xy")
|
||||
|
||||
#axis(side=2, at=c(1e-6,1e-5, 1e-4, 1e-3, 1e-2), labels=expression('-6','-5','-4','-3','-2'))
|
||||
|
||||
#abline(v=xgrid, col="lightgray", lty="dotted")
|
||||
grid()
|
||||
|
||||
#
|
||||
# Plot upper limits
|
||||
#
|
||||
upx=a$x[(a$y/a$dy)<up]
|
||||
upy=a$y[(a$y/a$dy)<up]
|
||||
updx=a$dx[(a$y/a$dy)<up]
|
||||
updy=a$dy[(a$y/a$dy)<up]
|
||||
|
||||
segments(upx-updx,updy*up,upx+updx,updy*up,col=cl)
|
||||
segments(upx,updy*up/2,upx,updy*up,col=cl)
|
||||
points(upx,updy*up/2,pch=25,bg=cl,col=cl)
|
||||
|
||||
px=a$x[(a$y/a$dy)>=up]
|
||||
py=a$y[(a$y/a$dy)>=up]
|
||||
pdx=a$dx[(a$y/a$dy)>=up]
|
||||
pdy=a$dy[(a$y/a$dy)>=up]
|
||||
|
||||
segments(px,py-pdy,px,py+pdy,col=cl)
|
||||
segments(px-pdx,py,px+pdx,py,col=cl)
|
||||
|
||||
#legend( 35.0,1e-2,c("FPMA","FPMB"), lty=c(1,1), lwd=c(2.5,2.5),col=c("black","red"),cex=1.7)
|
||||
|
||||
###################################################################################
|
||||
##
|
||||
## Plot model components
|
||||
##
|
||||
###################################################################################
|
||||
|
||||
lines(a$x,a$cutoffpl,pch=1,bg=cl,col="blue")
|
||||
lines(a$x,a$pow,pch=1,bg=cl,col="red")
|
||||
lines(a$x,a$total,pch=1,bg=cl,col="black")
|
||||
|
||||
###################################################################################
|
||||
|
||||
par(mar=c(4.5, leftx, 0.1, 1))
|
||||
ylim <- c(-2.5,2.5)
|
||||
|
||||
cl="black"
|
||||
a <- read.table("../cutoffpl_gp_delchi.dat", col.names=c("x","dx","y","dy"))
|
||||
plot(a$x, a$y, pch=3, ylim=ylim, xlim=xlim, ylab=expression(Delta~chi), xlab="",type="p",log="x",xaxt = 'n')
|
||||
segments(a$x,a$y-a$dy,a$x,a$y+a$dy,col=cl)
|
||||
segments(a$x-a$dx,a$y,a$x+a$dx,a$y,col=cl)
|
||||
|
||||
#abline(v=xgrid, col="lightgray", lty="dotted")
|
||||
#grid()
|
||||
#abline(h=0, col = "black",lty=2)
|
||||
#dev.off()
|
||||
|
||||
#abline(v=xgrid, col="lightgray", lty="dotted")
|
||||
grid()
|
||||
abline(h=0, col = "black",lty=2)
|
||||
|
||||
mtext(side = 1, text = "Energy, keV", line = 4, cex=1.6)
|
||||
|
||||
axis(1, mgp=c(3, 1.5, 0))
|
||||
|
||||
dev.off()
|
@@ -10,7 +10,7 @@ keymo="model2"
|
||||
|
||||
|
||||
up=1.0
|
||||
xgrid <- c(30,50,70,100);
|
||||
#xgrid <- c(30,50,70,100);
|
||||
Emin=25.0
|
||||
Emax=180.0
|
||||
postscript('cutoffpl_lon+20.eps', horizontal = FALSE, onefile = FALSE, paper = "special",width = 9.0, height = 6.0)
|
||||
@@ -23,7 +23,7 @@ par(mar=c(0.1, leftx, 1, 1))
|
||||
par(cex.lab=1.6)
|
||||
par(cex.axis=1.6)
|
||||
xlim <- c(Emin,Emax)
|
||||
ylim <- c(0.01,1)
|
||||
ylim <- c(0.1,1.5)
|
||||
|
||||
cl="black"
|
||||
a <- read.table('../cutoffpl_lon+20_eeuf.dat', col.names=c("x","dx","y","dy","total","cutoffpl","pow"))
|
||||
@@ -62,14 +62,14 @@ segments(px-pdx,py,px+pdx,py,col=cl)
|
||||
##
|
||||
###################################################################################
|
||||
|
||||
lines(a$x,a$total,pch=1,bg=cl,col="black")
|
||||
lines(a$x,a$cutoffpl,pch=1,bg=cl,col="blue")
|
||||
lines(a$x,a$pow,pch=1,bg=cl,col="red")
|
||||
lines(a$x,a$total,pch=1,bg=cl,col="black")
|
||||
|
||||
###################################################################################
|
||||
|
||||
par(mar=c(4.5, leftx, 0.1, 1))
|
||||
ylim <- c(-3.5,3.5)
|
||||
ylim <- c(-2.5,2.5)
|
||||
|
||||
cl="black"
|
||||
a <- read.table("../cutoffpl_lon+20_delchi.dat", col.names=c("x","dx","y","dy"))
|
||||
|
93
Spectra/figures/cutoffpl_lon-20.r
Normal file
93
Spectra/figures/cutoffpl_lon-20.r
Normal file
@@ -0,0 +1,93 @@
|
||||
#
|
||||
# 2 data sets
|
||||
# in Xspec make ipl->wdata
|
||||
# then split file to four parts as lecr1/2/3/4
|
||||
#
|
||||
|
||||
key="lecr"
|
||||
#key="pow"
|
||||
keymo="model2"
|
||||
|
||||
|
||||
up=1.0
|
||||
#xgrid <- c(30,50,70,100);
|
||||
Emin=25.0
|
||||
Emax=180.0
|
||||
postscript('cutoffpl_lon-20.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=5.3
|
||||
par(mar=c(0.1, leftx, 1, 1))
|
||||
par(cex.lab=1.6)
|
||||
par(cex.axis=1.6)
|
||||
xlim <- c(Emin,Emax)
|
||||
ylim <- c(0.1,1)
|
||||
|
||||
cl="black"
|
||||
a <- read.table('../cutoffpl_lon-20_eeuf.dat', col.names=c("x","dx","y","dy","total","cutoffpl","pow"))
|
||||
plot(a$x, a$y, pch=3, bg="white", col="white", ylim=ylim, xlim=xlim,main="LON-20 (cutoffpl+powerlaw)",ylab=expression("keV"^"2"~"(Phot. keV"^"-1"~"cm"^"-2"~"s"^"-1"*")"),type="p",xaxt = 'n',xlab="",log="xy")
|
||||
|
||||
#axis(side=2, at=c(1e-6,1e-5, 1e-4, 1e-3, 1e-2), labels=expression('-6','-5','-4','-3','-2'))
|
||||
|
||||
#abline(v=xgrid, col="lightgray", lty="dotted")
|
||||
grid()
|
||||
|
||||
#
|
||||
# Plot upper limits
|
||||
#
|
||||
upx=a$x[(a$y/a$dy)<up]
|
||||
upy=a$y[(a$y/a$dy)<up]
|
||||
updx=a$dx[(a$y/a$dy)<up]
|
||||
updy=a$dy[(a$y/a$dy)<up]
|
||||
|
||||
segments(upx-updx,updy*up,upx+updx,updy*up,col=cl)
|
||||
segments(upx,updy*up/2,upx,updy*up,col=cl)
|
||||
points(upx,updy*up/2,pch=25,bg=cl,col=cl)
|
||||
|
||||
px=a$x[(a$y/a$dy)>=up]
|
||||
py=a$y[(a$y/a$dy)>=up]
|
||||
pdx=a$dx[(a$y/a$dy)>=up]
|
||||
pdy=a$dy[(a$y/a$dy)>=up]
|
||||
|
||||
segments(px,py-pdy,px,py+pdy,col=cl)
|
||||
segments(px-pdx,py,px+pdx,py,col=cl)
|
||||
|
||||
#legend( 35.0,1e-2,c("FPMA","FPMB"), lty=c(1,1), lwd=c(2.5,2.5),col=c("black","red"),cex=1.7)
|
||||
|
||||
###################################################################################
|
||||
##
|
||||
## Plot model components
|
||||
##
|
||||
###################################################################################
|
||||
|
||||
lines(a$x,a$cutoffpl,pch=1,bg=cl,col="blue")
|
||||
lines(a$x,a$pow,pch=1,bg=cl,col="red")
|
||||
lines(a$x,a$total,pch=1,bg=cl,col="black")
|
||||
|
||||
###################################################################################
|
||||
|
||||
par(mar=c(4.5, leftx, 0.1, 1))
|
||||
ylim <- c(-2.5,2.5)
|
||||
|
||||
cl="black"
|
||||
a <- read.table("../cutoffpl_lon-20_delchi.dat", col.names=c("x","dx","y","dy"))
|
||||
plot(a$x, a$y, pch=3, ylim=ylim, xlim=xlim, ylab=expression(Delta~chi), xlab="",type="p",log="x",xaxt = 'n')
|
||||
segments(a$x,a$y-a$dy,a$x,a$y+a$dy,col=cl)
|
||||
segments(a$x-a$dx,a$y,a$x+a$dx,a$y,col=cl)
|
||||
|
||||
#abline(v=xgrid, col="lightgray", lty="dotted")
|
||||
#grid()
|
||||
#abline(h=0, col = "black",lty=2)
|
||||
#dev.off()
|
||||
|
||||
#abline(v=xgrid, col="lightgray", lty="dotted")
|
||||
grid()
|
||||
abline(h=0, col = "black",lty=2)
|
||||
|
||||
mtext(side = 1, text = "Energy, keV", line = 4, cex=1.6)
|
||||
|
||||
axis(1, mgp=c(3, 1.5, 0))
|
||||
|
||||
dev.off()
|
69
Spectra/figures/galplane.r
Normal file
69
Spectra/figures/galplane.r
Normal file
@@ -0,0 +1,69 @@
|
||||
#
|
||||
# 2 data sets
|
||||
# in Xspec make ipl->wdata
|
||||
# then split file to four parts as lecr1/2/3/4
|
||||
#
|
||||
|
||||
key="lecr"
|
||||
#key="pow"
|
||||
keymo="model2"
|
||||
|
||||
|
||||
up=-10.0
|
||||
#xgrid <- c(30,50,70,100);
|
||||
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(5., leftx, 0.1, 0.1))
|
||||
par(cex.lab=1.6)
|
||||
par(cex.axis=1.6)
|
||||
xlim <- c(Emin,Emax)
|
||||
|
||||
cl="black"
|
||||
|
||||
|
||||
ylim <- c(-0.005,0.09)
|
||||
|
||||
a <- read.table("../galplane_bkg.dat", col.names=c("x","dx","y","dy"))
|
||||
b <- read.table("../galplane_gc06.dat", col.names=c("x","dx","y","dy"))
|
||||
c <- read.table("../galplane+20.dat", col.names=c("x","dx","y","dy"))
|
||||
d <- read.table("../galplane-20.dat", col.names=c("x","dx","y","dy"))
|
||||
|
||||
|
||||
plot(a$x, a$y, pch=3, ylim=ylim, xlim=xlim, ylab=expression("Crab keV"^"-1"~"FOV"^"-1"), xlab="",type="p",log="x",xaxt = 'n')
|
||||
|
||||
grid()
|
||||
|
||||
cl="red"
|
||||
segments(b$x,b$y-b$dy,b$x,b$y+b$dy,col=cl)
|
||||
segments(b$x-b$dx,b$y,b$x+b$dx,b$y,col=cl)
|
||||
|
||||
cl="blue"
|
||||
bias=1.01
|
||||
segments(c$x*bias,c$y-c$dy,c$x*bias,c$y+c$dy,col=cl)
|
||||
segments((c$x-c$dx)*bias,c$y,(c$x+c$dx)*bias,c$y,col=cl)
|
||||
|
||||
cl="green"
|
||||
segments(d$x,d$y-d$dy,d$x,d$y+d$dy,col=cl)
|
||||
segments(d$x-d$dx,d$y,d$x+d$dx,d$y,col=cl)
|
||||
|
||||
# background
|
||||
cl="black"
|
||||
segments(a$x,a$y-a$dy,a$x,a$y+a$dy,col=cl)
|
||||
segments(a$x-a$dx,a$y,a$x+a$dx,a$y,col=cl)
|
||||
|
||||
|
||||
mtext(side = 1, text = "Energy, keV", line = 4, cex=1.6)
|
||||
|
||||
legend( 90.0,0.08,c("GC","LON+20","LON-20","BGD"), lty=c(1,1,1,1), lwd=c(2.5,2.5,2.5,2.5),col=c("red","blue","green","black"),cex=1.7)
|
||||
|
||||
|
||||
axis(1, mgp=c(3, 1.5, 0))
|
||||
|
||||
dev.off()
|
Reference in New Issue
Block a user