aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/multispec/setfitparams.x
blob: 780572c3f42fb1f3af331de5d8bc07a3efdb808a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
include "ms.h"

# SET_FITPARAMS -- Set the fitparams array from the spectra range array
# and the parameters array.

procedure set_fitparams (spectra, parameters, nspectra, nparams, fitparams)

int	spectra[ARB]
int	parameters[nparams]
int	nspectra
int	nparams
int	fitparams[nspectra, nparams]

int	i, j

bool	is_in_range()

begin
	do i = 1, nspectra {
	    do j = 1, nparams {
	        if (is_in_range (spectra, i) && (parameters[j] == YES))
		    fitparams[i, j] = YES
		else
		    fitparams[i, j] = NO
	    }
	}
end