Changeset 41962 for branches/eam_branches/ipp-20211108
- Timestamp:
- Dec 21, 2021, 1:50:09 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20211108/Ohana/src/opihi/cmd.astro/imfit.c
r41916 r41962 18 18 Insert = TRUE; 19 19 if (Save) { gprint (GP_ERR, "-save and -insert are mutually exclusive\n"); free (Save); return (FALSE); } 20 } 21 22 int minIter = 5; 23 if ((N = get_argument (argc, argv, "-min-iter"))) { 24 remove_argument (N, &argc, argv); 25 minIter = atoi (argv[N]); 26 remove_argument (N, &argc, argv); 20 27 } 21 28 … … 131 138 if (i + sx < 0) continue; 132 139 if (i + sx >= Nx) continue; 133 if (*V > SatThreshold) goto next; 140 if (*V > SatThreshold) goto next; // skip pixels above threshold 141 if (!isfinite(*V)) goto next; // skip nan pixels 134 142 dz[N] = (SQ(RDnoise) + MAX(0.0, *V/Gain)); // treat negative pixels as pure read noise 135 143 if (dz[N] <= 0) goto next; … … 154 162 155 163 // keep iterating if chisq is increasing or 156 for (Niter = 0; (Niter < 25) && (( dchisq <= 0.0) || (dchisq > 0.1*(Npts - Npar))); Niter++) {164 for (Niter = 0; (Niter < 25) && ((Niter < minIter) || ((dchisq <= 0.0) || (dchisq > 0.1*(Npts - Npar)))); Niter++) { 157 165 chisq = mrq2dmin (x, y, z, dz, Npts, par, Npar, fitfunc, VERBOSE); 158 166 dchisq = ochisq - chisq;
Note:
See TracChangeset
for help on using the changeset viewer.
