Open gully opened 8 years ago
The local kernel has been rewritten to be much more plug-and-playable, so it is possible to use like
model = SpectrumModel(...)
mu, cov = model()
cov += k_local_matrix(...)
Something we could end up providing are a function for populating this matrix with kernels that are subclasses of some LocalKernel
class.
As for the actual detection of these outliers, that would require some more advanced signal processing know-how than I have. I'll defer to the PhDs...
This is a great strategy. In particular, I think the local kernels are something that benefit from being API-friendly, since I think every user is going to want to instantiate them a bit differently as they are playing around with various fits. For example, maybe someone knows that a particular line is always problematic for some temperature range and they just want to instantiate a kernel at that location directly. Or, maybe someone wants to use a sigma-clipping version. Etc. These type of decisions are probably best addressed in code the user will write themselves.
The problem: Not all residual spectrum outliers originate solely from line strength mismatches. In general, line width mismatches or line center shifts will be present in the residual spectrum as non Gaussian correlated structures. Small mismatches can mostly be absorbed by the global kernel. But large mismatches will have conspicuous p-Cygni type profiles, or double peaked profiles.
Suggested solution: As noted in Czekala et al. 2015 and elsewhere, different local kernels can be designed and instantiated.
Practical Considerations and Costs: How will these local kernels be instantiated? Can the instatiation be done automatically? Right now the local kernels are placed with a sigma clipping strategy. Such a strategy alone would not be able to distinguish different kernels.