aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/multispec/_msfindspec3.cl
blob: d8150a90ca8d59a537df4e85da377539a016c4ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#{ _MSFINDSPEC3 -- Refine the model and fit a position function.

#image,f,a,,,,Image
#width,r,a,10,,,Width of spectra
#naverage,i,a,20,1,,Number of lines to average
#verbose,b,a,no,,,Verbose output?

{
	# Verbose message.
	if (verbose) {
	    time
	    print ("  Refit the spectra in ", image, ".")
	}

	# Refit the model.
	fitgauss5 (image, 1, lower=-width/2, upper=width/2,
	    lines="*", spectra="*", naverage=naverage, track=no,
	    algorithm=2)

	# Fit the default interpolation function to the positions.
	fitfunction (image, parameter="x0", lines="*", spectra="*")
}