Load our usual libraries.

library(ProSpect)
library(magicaxis)

BC03 SSPs

Make a colour vector.

colvec=hsv(h=magmap(BC03lr$Age,lo=1e6,hi=1e10,range=c(0,2/3), stretch = 'log', flip=T, type='num', bad=2/3)$map, v=0.7, alpha=0.5)

We can check how much luminosity is generated by different age stellar populations for the individual simple stellar populations provided by BC03.

for(j in 1:6){
  par(mar=c(3.1,3.1,1.1,1.1))
  magplot(BC03lr$Wave, BC03lr$Zspec[[j]][1,], type='l', log='xy', col=colvec[1], xlim=c(3e2,1e5), ylim=c(1e-7,10), majorn=c(5,8), xlab=BC03lr$Labels$Wavelab, ylab=BC03lr$Labels$Lumlab, grid=TRUE)
  for(i in 2:221){lines(BC03lr$Wave, BC03lr$Zspec[[j]][i,], col=colvec[i])}
  legend('topleft', legend=paste('Z=',BC03lr$Z[j]))
  magbar('topright',range = c(1e6,1e10),log = TRUE, col = hsv(h = seq(2/3, 0, len = 10), v=0.7), title = 'Age / Yrs', titleshift = 0.5)
}

We can check how much luminosity is generated by different age stellar populations for a constant 1 solar mass per year star formation rate for BC03.

for(j in 1:6){
  par(mar=c(3.1,3.1,1.1,1.1))
  magplot(BC03lr$Wave, BC03lr$Zspec[[j]][1,]*BC03lr$AgeWeights[1], type='l', log='xy', col=colvec[1], xlim=c(3e2,1e5), ylim=c(1e-7,10)*1e6, majorn=c(5,8), xlab=BC03lr$Labels$Wavelab, ylab=BC03lr$Labels$LumAgelab, grid=TRUE)
  for(i in 2:221){lines(BC03lr$Wave, BC03lr$Zspec[[j]][i,]*BC03lr$AgeWeights[i], col=colvec[i])}
  magbar('topright',range = c(1e6,1e10),log = TRUE, col = hsv(h = seq(2/3, 0, len = 10), v=0.7), title = 'Age / Yrs', titleshift = 0.5)
  legend('topleft', legend=paste('Z=',BC03lr$Z[j]))
}

Finally, for a constant star formation rate we can see what the age weighted contribution is to different components of the spectrum. Basically younger populations dominate the bluer (UV) end, and older populations dominate the redder (NIR) end.

for(j in 1:6){
  fluxwtage={}
  for(i in 1:max(which(BC03lr$Age<13.8e9))){
    fluxwtage=rbind(BC03lr$Zspec[[j]][i,]*BC03lr$AgeWeights[i],fluxwtage)
  }

  AgeWeightWave={}
  for(i in 1:1221){
    AgeWeightWave=c(sum(fluxwtage[,i]*BC03lr$Age[1:max(which(BC03lr$Age<13.8e9))])/sum(fluxwtage[,i]),AgeWeightWave)
  }

  par(mar=c(3.1,3.1,1.1,1.1))
  magplot(BC03lr$Wave, AgeWeightWave,log='xy',type='l',xlab=BC03lr$Labels$Wavelab, ylab='Mean Flux Weighted Age (Const SFR) / Yrs', ylim=c(1e7,2e10), grid=TRUE)
  legend('topleft', legend=paste('Z=',BC03lr$Z[j]))
}

EMILES SSPs

Make a colour vector.

colvec=hsv(h=magmap(EMILES$Age,lo=1e6,hi=1e10,range=c(0,2/3), stretch = 'log', flip=T, type='num', bad=2/3)$map, v=0.7, alpha=0.5)

We can check how much luminosity is generated by different age stellar populations for the individual simple stellar populations provided by EMILES.

for(j in 1:12){
  par(mar=c(3.1,3.1,1.1,1.1))
  magplot(EMILES$Wave, EMILES$Zspec[[j]][1,], type='l', log='xy', col=colvec[1], xlim=c(3e2,1e5), ylim=c(1e-7,10), majorn=c(5,8), xlab=EMILES$Labels$Wavelab, ylab=EMILES$Labels$Lumlab, grid=TRUE)
  for(i in 2:53){lines(EMILES$Wave, EMILES$Zspec[[j]][i,], col=colvec[i])}
  legend('topleft', legend=paste('Z=',EMILES$Z[j]))
  magbar('topright',range = c(1e6,1e10),log = TRUE, col = hsv(h = seq(2/3, 0, len = 10), v=0.7), title = 'Age / Yrs', titleshift = 0.5)
}

We can check how much luminosity is generated by different age stellar populations for a constant 1 solar mass per year star formation rate for EMILES.

for(j in 1:12){
  par(mar=c(3.1,3.1,1.1,1.1))
  magplot(EMILES$Wave, EMILES$Zspec[[j]][1,]*EMILES$AgeWeights[1], type='l', log='xy', col=colvec[1], xlim=c(3e2,1e5), ylim=c(1e-7,10)*1e6, majorn=c(5,8), xlab=EMILES$Labels$Wavelab, ylab=EMILES$Labels$LumAgelab, grid=TRUE)
  for(i in 2:53){lines(EMILES$Wave, EMILES$Zspec[[j]][i,]*EMILES$AgeWeights[i], col=colvec[i])}
  legend('topleft', legend=paste('Z=',EMILES$Z[j]))
  magbar('topright',range = c(1e6,1e10),log = TRUE, col = hsv(h = seq(2/3, 0, len = 10), v=0.7), title = 'Age / Yrs', titleshift = 0.5)
}


asgr/ProSpect documentation built on Feb. 21, 2025, 1:43 a.m.