as-500/hw3/.Rhistory

513 lines
17 KiB
R

axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
plot(lambda,lfl_T1,main="Planck's Law for a Blackbody",log="xy",xlab=expression(paste("Wavelength (",mu,"m)")),ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),type="l",col="red",xlim=c(0.01,10),xaxt='n',yaxt='n')
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="blue")
legend(0.1,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("red","green","blue"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
line(v=1)
?line
line(h=1)
?line
abline(h=1)
abline(v=1)
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="red",
xlim=c(0.01,10),
ylim=c(1e5,1e15),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="blue")
legend(0.1,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("red","green","blue"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
line(h=1)
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="red",
xlim=c(0.01,10),
ylim=c(1e6,1e16),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="blue")
legend(0.1,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("red","green","blue"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="red",
xlim=c(0.01,10),
ylim=c(1e6,1e16),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="blue")
legend(0.1,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("red","green","blue"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^15,label=expression("10"^16))
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="red",
xlim=c(0.01,10),
ylim=c(1e6,1e16),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="blue")
legend(0.1,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("red","green","blue"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^16,label=expression("10"^16))
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="blue",
xlim=c(0.01,10),
ylim=c(1e6,1e16),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="red")
legend(0.1,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("blue","green","red"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^16,label=expression("10"^16))
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="blue",
xlim=c(0.01,10),
ylim=c(1e6,1e16),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="red")
legend(0.1,1e8,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("blue","green","red"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^16,label=expression("10"^16))
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="blue",
xlim=c(0.01,10),
ylim=c(1e6,1e16),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="red")
legend(1,1e8,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("blue","green","red"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^16,label=expression("10"^16))
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
?pdf
pdf("planck.pdf")
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="blue",
xlim=c(0.01,10),
ylim=c(1e6,1e16),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="red")
legend(1,1e8,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("blue","green","red"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^16,label=expression("10"^16))
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
dev.off()
pdf("planck.pdf")
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="blue",
xlim=c(0.01,10),
ylim=c(1e6,1e16),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="red")
legend(.65,1e8,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("blue","green","red"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^16,label=expression("10"^16))
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
dev.off()
pdf("planck.pdf")
plot(lambda,lfl_T1,
main="Planck's Law for a Blackbody",
log="xy",
xlab=expression(paste("Wavelength (",mu,"m)")),
ylab=expression(paste(lambda,'F'[lambda]," (erg cm"^-2," s"^-1,")")),
type="l",
col="blue",
xlim=c(0.01,10),
ylim=c(1e6,1e16),
xaxt='n',
yaxt='n'
)
lines(lambda,lfl_T2,col="green")
lines(lambda,lfl_T3,col="red")
legend(.5,1e8,legend = c("T = 150000 K","T = 40000 K","T = 5800 K"),lty=c(1,1,1),col=c("blue","green","red"))
axis(1,at=0.01,label="0.01")
axis(1,at=0.02,label="0.02")
axis(1,at=0.05,label="0.05")
axis(1,at=0.1,label="0.1")
axis(1,at=0.2,label="0.2")
axis(1,at=0.5,label="0.5")
axis(1,at=1,label="1")
axis(1,at=2,label="2")
axis(1,at=5,label="5")
axis(1,at=10,label="10")
axis(2,at=10^16,label=expression("10"^16))
axis(2,at=10^15,label=expression("10"^15))
axis(2,at=10^14,label=expression("10"^14))
axis(2,at=10^13,label=expression("10"^13))
axis(2,at=10^12,label=expression("10"^12))
axis(2,at=10^11,label=expression("10"^11))
axis(2,at=10^10,label=expression("10"^10))
axis(2,at=10^9,label=expression("10"^9))
axis(2,at=10^8,label=expression("10"^8))
axis(2,at=10^7,label=expression("10"^7))
axis(2,at=10^6,label=expression("10"^6))
axis(2,at=10^5,label=expression("10"^5))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^4,label=expression("10"^4))
axis(2,at=10^3,label=expression("10"^3))
axis(2,at=10^2,label=expression("10"^2))
axis(2,at=10^1,label=expression("10"^1))
axis(2,at=1,label=expression("1"))
dev.off()
3.828/6.417
4*pi()
pi()
%pi
pi
4*pi
5.965e22
5.965e22/12.5664
sqrt(5.965e22/12.5664)
14959790000000*14959790000000
3.828/12.5664/2.2380/1e26*1e33
1.361e6 / 29979245800
(4.54e-5 * 29979245800)/(5.6704e-5)
(4.54e-5 * 29979245800)/(5.6704e-5)^(-4)
(4.54e-5 * 29979245800)/(5.6704e-5)^(1/4)
1.568e7^4
(1.568e7)^4
(4.54e-5 * 29979245800)
(4.54e-5 * 29979245800)/(5.6704e-5)
pow((4.54e-5 * 29979245800)/(5.6704e-5),1/4)
power
power((4.54e-5 * 29979245800)/(5.6704e-5),1/4)
?power
?exp
?pow
power((4.54e-5 * 29979245800)/(5.6704e-5),1/4)
(4.54e-5 * 29979245800)/(5.6704e-5)
((4.54e-5 * 29979245800)/(5.6704e-5))^(1/4)
393^4
393.6 - 289.15
0.28979/5800
quit()