Closed Marcel6telle closed 6 years ago
Dear @Marcel6telle,
I'm sorry because it is not clearly explained in the documentation. By default broadening values are 'free'
parameters, i.e. if you don't specify the definition of the broadening with sigma_def
you will end up in your example script with 5 different broadening values, each line having its own broadening. In this case it is very likely that the SNR of each individual line will not be high enough to measure a reliable broadening as explained in #13. It is thus very likely that the curvature of the objective function (see https://en.wikipedia.org/wiki/Loss_function) along the broadening parameter axis will be very flat (no much change in the quality of the fit at the vicinity of the initial guess value - 10 km/s in your case defined by sigma_cov
). And the minimization algorithm will eventually return the initial value as nothing better could be found.
You should also fix the FWHM (fwhm_def='fixed'
), as, this is not really an unknown parameter. In fact it is perfectly known as it only depends on the resolution of the cube. So that, when fitting a sinc
or a sincgauss
you should fix the fwhm. When fitting a gaussian
this is different as this model does not really correspond to an emission line for small broadening values and should only be used when fitting models with very large broadening values (e.g. an AGN).
In your case, a possible solution could be:
axis, spec, fit = cube.fit_lines_in_region(
"region_test.reg", ['[NII]6548', 'Halpha', '[NII]6583', '[SII]6716', '[SII]6731'],
fmodel='sincgauss',
pos_def=['1','2','1','3','3'],
pos_cov=[200,200,200],
amp_def=['1', '2', '1', '3', '3'],
amp_guess=[1,1,amp_ratio,2,2],
fwhm_def = 'fixed',
sigma_def= '1',
sigma_cov=10,
nofilter = True)
You can try it on a high SNR region to get a better initial estimate of the broadening. Also don't forget that not all the regions of you object have a measurable broadening in which case a simple sinc
model is the best choice (and the fastest too).
Good luck in your analyses !
I consider this issue as closed unless something else does not work.
I tried to obtain the broadening (sigma) map of a specific region and every time, the map that I obtain only contain one value, which is 0.01.
After realizing that I need to specify a better default value for sigma (
sigma_cov=10
) , the problem still persist.Here's my code for my data reduction :
amp_ratio = cube.get_amp_ratio_from_flux_ratio('[NII]6583', '[NII]6548', 3)
axis, spec, fit = cube.fit_lines_in_region("region_test.reg", ['[NII]6548', 'Halpha', '[NII]6583', '[SII]6716', '[SII]6731'],
Thank you for your help !
Have a great day !