diff --git a/DESCRIPTION b/DESCRIPTION index 3f091e8..15c7671 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ProSpect Type: Package Title: Professional Spectral Analysis Package -Version: 1.9.11 +Version: 1.9.12 Date: 2026-04-16 Author: Aaron Robotham Maintainer: Aaron Robotham diff --git a/R/ProSpect.R b/R/ProSpect.R index 6f90d6a..f8d2fb8 100644 --- a/R/ProSpect.R +++ b/R/ProSpect.R @@ -594,19 +594,23 @@ ProSpectSEDlike = function(parm = c(8, 9, 10, 10, 0, -0.5, 0.2), Data) { } if(is.null(Data$arglist$ref)){ - agemax_new = (celestial::cosdistUniAgeAtz(ztest, H0 = Data$arglist$HO, OmegaM = Data$arglist$OmegaM, OmegaL = Data$arglist$OmegaL))*1e9 ##need to be in years - if(!is.null(z_genSF)){ - agemax_new = (celestial::cosdistUniAgeAtz(ztest, H0 = Data$arglist$HO, OmegaM = Data$arglist$OmegaM, OmegaL = Data$arglist$OmegaL) - celestial::cosdistUniAgeAtz(z_genSF, H0 = Data$arglist$HO, OmegaM = Data$arglist$OmegaM, OmegaL = Data$arglist$OmegaL))*1e9 ##need to be in years - } - LumDist_Mpc_new = celestial::cosdistLumDist(z = ztest, H0 = Data$arglist$HO, OmegaM = Data$arglist$OmegaM, OmegaL = Data$arglist$OmegaL) - }else{ - agemax_new = (celestial::cosdistUniAgeAtz(ztest, ref = Data$arglist$ref))*1e9 ##need to be in years - if(!is.null(z_genSF)){ - agemax_new = (celestial::cosdistUniAgeAtz(ztest, ref = Data$arglist$ref) - celestial::cosdistUniAgeAtz(z_genSF, ref = Data$arglist$ref))*1e9 ##need to be in years + if(!is.null(z_genSF)){ + agemax_new = (celestial::cosdistUniAgeAtz(ztest, H0 = Data$arglist$HO, OmegaM = Data$arglist$OmegaM, OmegaL = Data$arglist$OmegaL) - + celestial::cosdistUniAgeAtz(z_genSF, H0 = Data$arglist$HO, OmegaM = Data$arglist$OmegaM, OmegaL = Data$arglist$OmegaL))*1e9 ##need to be in years + }else{ + agemax_new = (celestial::cosdistUniAgeAtz(ztest, H0 = Data$arglist$HO, OmegaM = Data$arglist$OmegaM, OmegaL = Data$arglist$OmegaL))*1e9 ##need to be in years + } + LumDist_Mpc_new = celestial::cosdistLumDist(z = ztest, H0 = Data$arglist$HO, OmegaM = Data$arglist$OmegaM, OmegaL = Data$arglist$OmegaL) + }else{ + if(!is.null(z_genSF)){ + agemax_new = (celestial::cosdistUniAgeAtz(ztest, ref = Data$arglist$ref) - + celestial::cosdistUniAgeAtz(z_genSF, ref = Data$arglist$ref))*1e9 ##need to be in years + }else{ + agemax_new = (celestial::cosdistUniAgeAtz(ztest, ref = Data$arglist$ref))*1e9 ##need to be in years + } + LumDist_Mpc_new = celestial::cosdistLumDist(z = ztest, ref = Data$arglist$ref) } - LumDist_Mpc_new = celestial::cosdistLumDist(z = ztest, ref = Data$arglist$ref) - } - + magemax_new = agemax_new/1e9 ## need to be in Gyr Zagemax_new = agemax_new/1e9