Open low-sky opened 9 years ago
Do we need to create a special model within pyspeckit for each line we want to fit? Or, would it be better to add that as an option to the pyspeckit fitter itself? Adding Adam to the discussion @keflavich
Could you clarify "channel response"? Do you mean, fractional sensitivity of each spectral channel? Or the more convoluted issue that channels have limited sensitivity to neighboring frequencies?
Sure, I want to also take into account the spectral response, e.g. sinc(x), of the channels obtained that have some sensitivity to frequencies nearby. This is important to obtain a good velocity dispersion determination when we have quite narro lines.
In the IDL implementation what we used in the past (initially written by @low-sky ) was to oversample the spectra, then convolve with the sinc() function, and then sample everything back in the observed spectral channels.
On Wed, Jun 17, 2015 at 1:15 PM Adam Ginsburg notifications@github.com wrote:
Could you clarify "channel response"? Do you mean, fractional sensitivity of each spectral channel? Or the more convoluted issue that channels have limited sensitivity to neighboring frequencies?
— Reply to this email directly or view it on GitHub https://github.com/jpinedaf/GAS/issues/38#issuecomment-112758044.
OK. I think, then, we could just incorporate a convolve(sinc)
function into the ammonia model. Is the oversampling-then-downsampling step really necessary? @low-sky and I talked about this a few years ago, I think, but I don't recall the conclusion.
I think that the problem arises from the observed spectra with sampling worst than Nyquist. I think that is why we need to oversample a bit before convolving.
On Wed, Jun 17, 2015 at 1:42 PM Adam Ginsburg notifications@github.com wrote:
OK. I think, then, we could just incorporate a convolve(sinc) function into the ammonia model. Is the oversampling-then-downsampling step really necessary? @low-sky https://github.com/low-sky and I talked about this a few years ago, I think, but I don't recall the conclusion.
— Reply to this email directly or view it on GitHub https://github.com/jpinedaf/GAS/issues/38#issuecomment-112763238.
A good solution would be to use the convolved sinc and gaussian function in the line generating model, instead of the gaussian alone.
This function, http://math.stackexchange.com/questions/98176/convolution-of-gaussian-and-sinc-function, could be calculated just once and then used in all the line profile calculations.
Leaving this documented waiting for a hero to implement it in pyspeckit, or wait until I have some time (must be after release 1 of the data)
Only in the optically thin case. If the profiles become thick, the exp(-tau) part of the function will make convolve then transfer not the same as transfer then convolve.
I bet the right route here is to just do the FT convolution after the model is generated. FTs of 1e3 elements aren't terribly expensive.
Yes you are right!
On Thu, Jul 23, 2015 at 5:36 PM Erik Rosolowsky notifications@github.com wrote:
Only in the optically thin case. If the profiles become thick, the exp(-tau) part of the function will make convolve then transfer not the same as transfer then convolve.
I bet the right route here is to just do the FT convolution after the model is generated. FTs of 1e3 elements aren't terribly expensive.
— Reply to this email directly or view it on GitHub https://github.com/GBTAmmoniaSurvey/GAS/issues/38#issuecomment-124142634 .
@low-sky: they can be pretty expensive when you're doing 1000's of them, which is expected when running lmfit. Still, we should try it.
Maybe a two stage fitting then: without convolution and then with once most of the other parameters are well constrained?
That's a good idea - we should already have the Gaussian-derived parameter maps to use as input guesses at that stage.
+1 On Do., 23. Juli 2015 at 18:27 Adam Ginsburg notifications@github.com wrote:
That's a good idea - we should already have the Gaussian-derived parameter maps to use as input guesses at that stage.
— Reply to this email directly or view it on GitHub https://github.com/GBTAmmoniaSurvey/GAS/issues/38#issuecomment-124159811 .
We need to decide if the channel response is important and adapt pyspeckit fitting accordingly.