hfs_nh3 is an interactive graphic procedure for fitting simultaneously up to 9 velocity components of a pair of NH3(1,1) and (2,2) spectra.
Example of a hfs_nh3 run:
$ hfs_nh3 test11.dat test22.dat
___________________________________________________
NH3 (1,1) and (2,2) multicomponent fit and analysis
Robert Estalella. 2015/12
___________________________________________________
****** Use a terminal with at least 145 columns ******
Date: 2016/01/11 Time: 11:48:37
Data file 1: test11.dat
N. of data points read: 124
Reference channel (V=0): 120.2468
Channel width (km s^-1): 0.3089
Data file 2: test22.dat
N. of data points read: 120
Reference channel (V=0): 119.3172
Channel width (km s^-1): 0.3085
Fit rms 1, 2: 0.0014 0.0011
Present values and search ranges (Ncomp= 1)
(J,K): (1,1)&(2,2) (1,1) (1,1) (1,1) (2,2) (2,2)
Param: Delta_V V_lsr A(1-e^-tau_m) 1-e^-tau_m V_lsr A(1-e^-tau_m)
Comp: 1 _________________________________________________________________________________________
Value: 1.0134 -18.6089 0.0239 0.5000 -18.6085 0.0181
Range: 1.0134 1.0134 0.0014 0.5000 1.0134 0.0011
HfS NH3(1,1)&(2,2) fit menu________________________
0. Quit
1. Help
2. Read data files: test11.dat, test22.dat
3. Physical parameter estimation
4. Hanning smoothing
5. Select plot (1:data +2:comp +4:res +8:synt): 15
6. Change Nksample, Final_Range: 400 0.050
7. Change Ncomp= 1 and make initial guess
8. Change initial values or ranges
9. Fit 1 component(s) and estimate errors
Choose option (0-9):
$ hfs_nh3 <source_11>.dat <source_22>.dat
with the additional constraints
For each set of fit parameters, the optical depth of the (2,2) transition, τ2m, is obtained from
[1-e-τ2m] = [1-e-τ1m] × [A(1-e-τ2m)] / [A(1-e-τ1m)],
and used to evaluate the (2,2) synthetic spectrum.
Ncomp
(the number of components) using a Sobol pseudo-random sequence and finding the minimum residual rms. The parameter space is defined by a search range for each parameter, centered on the initial values (and taking into account the constraints given above).hfs_nh3.log
.<source_11>.synt
and <source_22>.synt
. The files have a header (lines beginning with "!") with the values of the parameters of the fitted spectrum for each velocity component. The file is readable by GREG. The file is overwritten for every new fit.<source>.eps
. The file is overwritten for every new fit. See an example (data in black, synthetic in magenta, residual in green, residual rms = 0.0015):