Here we show the minimal working example of full multi-band simultaneous ProFit and ProSpect fitting, this has been nick-named ProFuse, but this is not really the official name (yet…). The idea is that rather than fitting ProFit for each image individually, or even with priors informed by earlier fits and/or a forced smooth relationship of the ProFit parameters as a function of wavelength (which might look nice, but could well be unphysical) we use ProSpect to fit a true star formation and dust attenuation law etc along with certain ProFit properties. The end result is that the likelihood is computed at the per band-image level, and the outcome is we compute a separate star formation / metallicity history etc for the bulge and disk components.
Doing all of this is fairly expensive (example below takes about an hour), but it is actually substantially cheaper when using e.g. 9-band photometry (example below) than running normal ProFit 9 times and then ProSpect twice (on the bulge and disk outputs), and in any case this certainly would not let guarantee the output is physically meaningful.
To keep things feasible (both in terms of coding and fitting) only a restrictive subset of ProFit component combinations are possible- basically the most popular and useful subset of bulge and disk fitting (with flexibility of free Sersic bulge and/or disk etc). My experience has been nobody uses the more complicated and flexible profiling options (sad-face) so until these are under serious demand this will probably be the limit of profiling options.
Set global evaluate:
= TRUE evalglobal
Load the required packages (ProTools basically load all of my packages in one go):
library(ProFuse)
library(ProTools)
## Loading required package: celestial
## Loading required package: RANN
## Loading required package: NISTunits
## Loading required package: pracma
## Loading required package: Highlander
## Loading required package: hyper.fit
## Loading required package: magicaxis
## Loading required package: MASS
## Loading required package: rgl
## Loading required package: LaplacesDemon
##
## Attaching package: 'LaplacesDemon'
## The following objects are masked from 'package:pracma':
##
## logit, loglog, Mode
## Loading required package: ProFit
## Loading required package: FITSio
## Loading required package: ProFound
## Loading required package: Rcpp
## Loading required package: ProSpect
## Loading required package: Rfits
## Loading required package: Rwcs
## Loading required package: sphereplot
## Loading required package: checkmate
##
## Attaching package: 'sphereplot'
## The following objects are masked from 'package:celestial':
##
## car2sph, sph2car
library(ParmOff)
Minimal setup information. note we need to know the true redshift of our source (so this will change with every galaxy) and the cutout location.
= 0.0447
redshift data('BC03lr')
data('Dale_NormTot')
data('AGN_UnOb_Sparse')
data('Dale_M2L_func')
=c('u_VST', 'g_VST', 'r_VST', 'i_VST', 'Z_VISTA',
filters'Y_VISTA', 'J_VISTA', 'H_VISTA', 'Ks_VISTA')
={}
filtoutfor(i in filters){filtout=c(filtout,list(approxfun(getfilt(i))))}
= c(1200,480)
loc = -299:300
cut
= cenwave[match(c('u_VST', 'g_VST', 'r_VST', 'i_VST', 'Z_VISTA', 'Y_VISTA', 'J_VISTA', 'H_VISTA', 'Ks_VISTA'), cenwave$filter),'cenwave']
cenwaves
= 13.3e9 - cosdistTravelTime(z=redshift, H0 = 67.8, OmegaM = 0.308)*1e9 agemax
Cutout all of our images:
= list(
image_list u = Rfits_read_image(system.file("extdata", 'MultiBand/u.fits', package="ProFound"),ext=2)$imDat[loc[1] + cut, loc[2] + cut],
g = Rfits_read_image(system.file("extdata", 'MultiBand/g.fits', package="ProFound"),ext=2)$imDat[loc[1] + cut, loc[2] + cut],
r = Rfits_read_image(system.file("extdata", 'MultiBand/r.fits', package="ProFound"),ext=2)$imDat[loc[1] + cut, loc[2] + cut],
i = Rfits_read_image(system.file("extdata", 'MultiBand/i.fits', package="ProFound"),ext=2)$imDat[loc[1] + cut, loc[2] + cut],
Z = Rfits_read_image(system.file("extdata", 'MultiBand/Z.fits', package="ProFound"),ext=2)$imDat[loc[1] + cut, loc[2] + cut],
Y = Rfits_read_image(system.file("extdata", 'MultiBand/Y.fits', package="ProFound"),ext=2)$imDat[loc[1] + cut, loc[2] + cut],
J = Rfits_read_image(system.file("extdata", 'MultiBand/J.fits', package="ProFound"),ext=2)$imDat[loc[1] + cut, loc[2] + cut],
H = Rfits_read_image(system.file("extdata", 'MultiBand/H.fits', package="ProFound"),ext=2)$imDat[loc[1] + cut, loc[2] + cut],
Ks = Rfits_read_image(system.file("extdata", 'MultiBand/Ks.fits', package="ProFound"),ext=2)$imDat[loc[1] + cut, loc[2] + cut]
)
The reasonably minimal run of MultiBandFound2Fit, which sets everything up for later fitting. Here we are mostly setting the ProSpect related inputs (most of the ProFit ones are either reasonable to assume, or can be estimated from the ProFound outputs). Note this takes a few minutes to run, because we are also fitting the PSF per band by automatically extracting stars from the image and fitting them. If you already have PSFs for some bands you can provide them in psf_list, leaving unknown PSF entries as NULL.
= profuseMultiBandFound2Fit(image_list=image_list,
MF2F magzero=c(0,0,0,0,30,30,30,30,30),
tolerance=20,
parm_global = c("sersic.xcen1", "sersic.ycen1",
"sersic.re1", "sersic.re2",
"sersic.ang2", "sersic.axrat2"),
parm_ProSpect = list(
mSFR_1 = 0,
mpeak_1 = 10,
mperiod_1 = 0.3,
mskew_1 = 0,
#tau_screen_1 = -0.5,
#alpha_SF_screen_1 = 3,
Zfinal_1 = -2,
mSFR_2 = 0,
mpeak_2 = 1,
mperiod_2 = 0.3,
mskew_2 = 0,
#tau_screen_2 = -0.5,
#alpha_SF_screen_2 = 3
Zfinal_2 = -2
),logged_ProSpect = c(
TRUE, # mSFR_1 = 0,
FALSE, # mpeak_1 = 5,
TRUE, # mperiod_1 = 0.3,
FALSE, # mskew_1 = 0,
#TRUE, # tau_screen_1 = -0.5,
#FALSE, # alpha_SF_screen_1 = 3,
TRUE, # Zfinal_1 = -2,
TRUE, # mSFR_2 = 0,
FALSE, # mpeak_2 = 5,
TRUE, # mperiod_2 = 0.3,
FALSE, # mskew_2 = 0,
#TRUE, # tau_screen_2 = -0.5,
#FALSE # alpha_SF_screen_2 = 3
TRUE # Zfinal_2 = -2,
),intervals_ProSpect = list(
lo=c(
-4, # mSFR_1 = 0,
0, # mpeak_1 = 5,
-0.5, # mperiod_1 = 0.3,
-1, # mskew_1 = 0,
#-2.5, # tau_screen_1 = -0.5,
#0, # alpha_SF_screen_1 = 3,
-4, # Zfinal_1 = -2,
-4, # mSFR_2 = 0,
0, # mpeak_2 = 5,
-0.5, # mperiod_2 = 0.3,
-1, # mskew_2 = 0,
#-2.5, # tau_screen_2 = -0.5,
#0 # alpha_SF_screen_2 = 3
-4 # Zfinal_2 = -2,
),hi=c(
3, # mSFR_1 = 0,
10, # mpeak_1 = 5,
1, # mperiod_1 = 0.3,
1, # mskew_1 = 0,
#1, # tau_screen_1 = -0.5,
#4, # alpha_SF_screen_1 = 3,
-1.3, # Zfinal_1 = -2,
3, # mSFR_2 = 0,
10, # mpeak_2 = 5,
1, # mperiod_2 = 0.3,
1, # mskew_2 = 0,
#1, # tau_screen_2 = -0.5,
#4 # alpha_SF_screen_2 = 3
-1.3 # Zfinal_2 = -2,
)
),data_ProSpect = list(massfunc=massfunc_snorm_trunc,
speclib=BC03lr,
Dale=Dale_NormTot,
filtout=filtout,
z=redshift,
Z=Zfunc_massmap_lin,
agemax=agemax
) )
##
## Laplace's Demon was called on Tue Sep 7 13:38:29 2021
##
## Performing initial checks...
## WARNING: Matrix image may be rank-deficient.
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -1677.8
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:38:31 2021
##
## Performing initial checks...
## WARNING: Matrix image may be rank-deficient.
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -1677.6
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:38:36 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -4798.7
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:38:40 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -4799.2
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:38:47 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -7178.6
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:38:52 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -7179.3
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:38:58 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -4348.2
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:03 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -4343.5
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:09 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -7126.8
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:14 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -7125.9
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:21 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -4783.2
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:26 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -4785.7
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:32 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -4750.7
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:37 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -4750.6
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:44 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -5433.7
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:49 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -5434
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:55 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -1489.1
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
##
## Laplace's Demon was called on Tue Sep 7 13:39:58 2021
##
## Performing initial checks...
## WARNING: Matrix mask may be rank-deficient.
## WARNING: Matrix sigma may be rank-deficient.
## WARNING: Matrix segim may be rank-deficient.
## WARNING: Matrix region may be rank-deficient.
## WARNING: Matrix calcregion may be rank-deficient.
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -1487.3
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
For convenience we can also just pass our MF2F object into the profuseMultiBandDoFit function. This will still run Highlander (with slightly restricted options available), but it has the advantage that it will properly pass all of the fitting limits through (a non-trivial task with many image and complex combinations of logged parameters).
= profuseMultiBandDoFit(MF2F=MF2F) highfit
## Running Highander on multi-band data
## Iteration 1
## CMA 1: -186111.846 91.812 57.962 1.141 1.508 100.758 -0.198 0.623 9.872 -0.349 0.414 -1.308 0.206 4.753 0.668 -0.096 -2.824
##
## Laplace's Demon was called on Tue Sep 7 14:37:32 2021
##
## Performing initial checks...
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -186117
## Iteration: 200, Proposal: Componentwise, LP: -186115.3
## Iteration: 300, Proposal: Componentwise, LP: -186113.8
## Iteration: 400, Proposal: Componentwise, LP: -186120.9
## Iteration: 500, Proposal: Componentwise, LP: -186115.1
## Iteration: 600, Proposal: Componentwise, LP: -186115.8
## Iteration: 700, Proposal: Componentwise, LP: -186116.6
## Iteration: 800, Proposal: Componentwise, LP: -186114.6
## Iteration: 900, Proposal: Componentwise, LP: -186113.7
## Iteration: 1000, Proposal: Componentwise, LP: -186118.5
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
## Iteration 2
##
## Laplace's Demon was called on Tue Sep 7 16:51:08 2021
##
## Performing initial checks...
## Algorithm: Componentwise Hit-And-Run Metropolis
##
## Laplace's Demon is beginning to update...
## Iteration: 100, Proposal: Componentwise, LP: -186112.8
## Iteration: 200, Proposal: Componentwise, LP: -186115.6
## Iteration: 300, Proposal: Componentwise, LP: -186114
## Iteration: 400, Proposal: Componentwise, LP: -186116.2
## Iteration: 500, Proposal: Componentwise, LP: -186117
## Iteration: 600, Proposal: Componentwise, LP: -186116.3
## Iteration: 700, Proposal: Componentwise, LP: -186119.8
## Iteration: 800, Proposal: Componentwise, LP: -186114.4
## Iteration: 900, Proposal: Componentwise, LP: -186112.4
## Iteration: 1000, Proposal: Componentwise, LP: -186114.3
##
## Assessing Stationarity
## Assessing Thinning and ESS
## Creating Summaries
## Creating Output
##
## Laplace's Demon has finished.
We can now extract the star formation histories for the bulge and the disk separately:
magcurve(massfunc_snorm_trunc(age=x,mSFR=10^highfit$parm["mSFR_1"],mpeak=highfit$parm["mpeak_1"],mperiod=10^highfit$parm["mperiod_1"],
mskew=highfit$parm["mskew_1"], magemax=agemax/1e9),0,13e9,add=FALSE,col='red', ylim=c(0,10),xlab='Age (Yr)', ylab='SFR (Msol / Yr)')
magcurve(massfunc_snorm_trunc(age=x,mSFR=10^highfit$parm["mSFR_2"],mpeak=highfit$parm["mpeak_2"],mperiod=10^highfit$parm["mperiod_2"],
mskew=highfit$parm["mskew_2"], magemax=agemax/1e9),0,13e9,add=TRUE,col='blue')
legend('topright', legend=c('Bulge', 'Disk'), col=c('red', 'blue'), lty=1)
And we can check the final model image per band:
profitLikeModel(highfit$parm, MF2F, makeplots = TRUE)
## [1] "Summary of used sample:"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -3.784429 -0.712392 -0.005079 -0.006690 0.680631 5.189514
## [1] "sd / MAD / 1-sig / 2-sig range:"
## [1] 1.048876 1.031699 1.042993 2.078781
## [1] "Using 12554 out of 12554"
## [1] "Summary of used sample:"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -5.4869 -0.6950 0.1679 0.1723 1.0007 6.3879
## [1] "sd / MAD / 1-sig / 2-sig range:"
## [1] 1.380626 1.259903 1.273089 2.847481
## [1] "Using 12554 out of 12554"
## [1] "Summary of used sample:"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -6.53220 -0.85557 0.03031 0.12691 0.99067 9.95174
## [1] "sd / MAD / 1-sig / 2-sig range:"
## [1] 1.621541 1.366743 1.424743 3.398718
## [1] "Using 12554 out of 12554"
## [1] "Summary of used sample:"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -3.9755 -0.6175 0.1232 0.1102 0.8396 5.6999
## [1] "sd / MAD / 1-sig / 2-sig range:"
## [1] 1.109071 1.078778 1.084129 2.238909
## [1] "Using 12554 out of 12554"
## [1] "Summary of used sample:"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -5.70903 -0.96080 -0.11879 -0.07988 0.71914 6.65613
## [1] "sd / MAD / 1-sig / 2-sig range:"
## [1] 1.378680 1.245433 1.265767 2.877462
## [1] "Using 12554 out of 12554"
## [1] "Summary of used sample:"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -4.13203 -0.71664 0.03055 0.02462 0.71920 5.04022
## [1] "sd / MAD / 1-sig / 2-sig range:"
## [1] 1.098398 1.062519 1.052671 2.202919
## [1] "Using 12554 out of 12554"
## [1] "Summary of used sample:"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -4.545100 -0.673304 0.002597 -0.003706 0.667259 4.850330
## [1] "sd / MAD / 1-sig / 2-sig range:"
## [1] 1.0342466 0.9928282 0.9911726 2.0945537
## [1] "Using 12554 out of 12554"
## [1] "Summary of used sample:"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -3.944836 -0.716136 -0.006159 -0.041871 0.646884 3.563437
## [1] "sd / MAD / 1-sig / 2-sig range:"
## [1] 0.9990899 1.0092665 0.9914504 1.9898435
## [1] "Using 12554 out of 12554"
## [1] "Summary of used sample:"
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -4.3987 -0.6764 0.0153 -0.0213 0.6757 3.3273
## [1] "sd / MAD / 1-sig / 2-sig range:"
## [1] 1.000988 1.000415 1.001857 2.009898
## [1] "Using 12554 out of 12554"
## $LP
## [1] -186111.8
##
## $Dev
## [1] 372223.7
##
## $Monitor
## LL LP tend.elapsed
## -186111.8 -186111.8 145143.6
##
## $yhat
## [1] 1
##
## $parm
## sersic.xcen1 sersic.ycen1 sersic.re1 sersic.re2 sersic.ang2
## 91.81226066 57.96243426 1.14072459 1.50840313 100.75823400
## sersic.axrat2 mSFR_1 mpeak_1 mperiod_1 mskew_1
## -0.19800989 0.62310565 9.87201589 -0.34903845 0.41355760
## Zfinal_1 mSFR_2 mpeak_2 mperiod_2 mskew_2
## -1.30821339 0.20614868 4.75337038 0.66820313 -0.09623924
## Zfinal_2
## -2.82412847
We can also look at the SED per component, where as we might expect the bulge light is ‘redder’ than the disk light.
if(highfit$parm[11] > log10(0.05)){highfit$parm[11] = log10(0.05)}
if(highfit$parm[16] > log10(0.05)){highfit$parm[16] = log10(0.05)}
= ParmOff(ProSpectSED, .args = c(as.list(highfit$parm[7:11]), MF2F$data_ProSpect), .strip = '_1', .logged=c('mSFR', 'mperiod', 'Zfinal'))
bulgeSED = ParmOff(ProSpectSED, .args = c(as.list(highfit$parm[7:11+5]), MF2F$data_ProSpect), .strip = '_2', .logged=c('mSFR', 'mperiod', 'Zfinal'))
diskSED
magplot(cenwaves, Jansky2magAB(bulgeSED$Photom), log='', col='red', ylim=c(22,15), type='l', xlab='Wave / Ang', ylab='Mag')
lines(cenwaves, Jansky2magAB(diskSED$Photom), col='blue')