This commit is contained in:
Roman Krivonos
2024-09-27 19:46:24 +03:00
parent 462133ce2e
commit 0839938594
149 changed files with 157799 additions and 157347 deletions

View File

@@ -4,12 +4,11 @@
# then split file to four parts as lecr1/2/3/4
#
key="lecr"
#key="pow"
keymo="model2"
library(sfsmisc)
up=1.0
up=2.0
#xgrid <- c(30,50,70,100);
Emin=25.0
Emax=180.0
@@ -27,13 +26,24 @@ ylim <- c(0.2,2)
cl="black"
a <- read.table('../cutoffpl_gc06_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="GC (cutoffpl+powerlaw)",ylab=expression("keV"^"2"~"(Phot. keV"^"-1"~"cm"^"-2"~"s"^"-1"*")"),type="p",xaxt = 'n',xlab="",log="xy")
plot(a$x, a$y, pch=3, bg="white", col="white", ylim=ylim, xlim=xlim, 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 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")
#
# Plot upper limits
#
@@ -54,26 +64,17 @@ 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")
text(100, 1.5, "GB",cex=2.5)
###################################################################################
par(mar=c(4.5, leftx, 0.1, 1))
ylim <- c(-2.5,2.5)
ylim <- c(-3.1,3.1)
cl="black"
a <- read.table("../cutoffpl_gc06_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')
grid()
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)
@@ -83,11 +84,15 @@ segments(a$x-a$dx,a$y,a$x+a$dx,a$y,col=cl)
#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))
#axis(1, mgp=c(3, 1.5, 0))
### 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")
###
dev.off()