Closed jdtsmith closed 2 years ago
One option that is currently in the prototype base class is that each model (e.g., bb_cont, h2_model, etc.) is saved in the class as a separate compound model. Will need code to update the parameters after the fitting is done, but otherwise you can just use the separate component models for this. Will need to provide an example of this (docs!).
Interesting. But for many components, you need to blend them together to be useful. For example: total dust continuum (vs. the per-T continua, which are not very physically meaningful).
Two separate but related parts of original PAHFIT
pertain to this:
;+
; NAME:
;
; PAHFIT_FEATURE_STRENGTH_COMBINE
;
; PURPOSE:
;
; Combine feature strengths as produced by PAHFIT, taking care of
; covariance among the features being combined when computing the
; uncertainty.
;+
; NAME:
;
; PAHFIT_MAIN_FEATURE_POWER
;
; PURPOSE:
;
; Compute the power of the main dust features from a decoded PAHFIT
; structure.
These together combine PAH band strengths for PAH "Complexes". Since they are all correlated, propagating errors is tricky.
Good point.
In our discussion of flexible input formats I’m reminded we need a general approach to correlated uncertainties. Worth discussing at some point.
Correlated uncertainties are a good topic.
Do you mean on the input spectra? If so, we could use mulit-variate Gaussians and a large covariance matrix (# wavelength by # wavelength) to give the correlated observational uncertainties. The likelihood function can then directly use the covariance matrix in the chisqr calculation (I've done this in other contexts - e.g., the BEAST).
Or do you mean on the fitted model parameters? MCMC can capture this information. And we could assume multi-variate Gaussians again to give a measure of the covariance between parameters. Although the full sampler chains could also be saved to give the full correlations between parameters (w/o assumptions on the functional form).
I mean correlated uncertainties for the fitted parameters. So that if you want to add 5 parameters together, but they are 100% correlated, you don't add their uncertainties in quadrature. In IDL PAHFIT I had this hard coded for the case of combining feature powers for PAH Complexes, but if there is a more general approach, I'd be in favor of building it in.
I agree that such functionality is very useful and I'd be in favour to include it.
One of the most useful (and under-used) features of the original
PAHFIT
is thepahfit_components
function, which looks like this:This code allows you to take a
decoded_params
structure, which is output from aPAHFIT
run, and selectively pull pieces from it: the total continuum, all due features, each features separately, etc. This is used to produce the canonical multi-colored plots we all known and love, but it's also essential for using model results more deeply than just examining the parameters output. We need something similar.