/****************************************************************************\ * This subroutine looks for strong parameter couplings and sets the * * fitting flag to 2 for all except the first component. This way, they * * are not all treated as free parameters when calculating the covariance * * matrix. * \****************************************************************************/ #include "structs.h" void check_constraints (struct cons *constr, float a[], int ia[]) { int i; while (constr != NULL) { if (constr->op == 'o') { for (i=2; i <= constr->ncomp; i++) { if (ia[constr->par[i]] >= 1) { ia[constr->par[i]] = 2; constr->cval[i] = a[constr->par[i]] - a[constr->par[1]]; }; }; } else if (constr->op == 'r') { for (i=2; i <= constr->ncomp; i++) { if (ia[constr->par[i]] >= 1) { ia[constr->par[i]] = 2; constr->cval[i] = a[constr->par[i]] / a[constr->par[1]]; }; }; }; constr = constr->next; }; }