IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12


Ignore:
Timestamp:
Jan 6, 2003, 6:51:42 AM (23 years ago)
Author:
eugene
Message:

fixed 'unique' determination

Location:
trunk/Ohana/src/imregister/detrend
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/imregister/detrend/args.detsearch.c

    r9 r12  
    172172  output.Close = FALSE;
    173173  if (N = get_argument (argc, argv, "-close")) {
    174     if (!base.TimeSelect) {       
    175       fprintf (stderr, "ERROR: syntax error in -close requires -time or -trange\n");
     174    if (!base.TimeSelect && !ImageSelect && !MosaicSelect) {       
     175      fprintf (stderr, "ERROR: syntax error in -close requires one of: -time -trange -image -mosaic\n");
    176176      exit (1);
    177177    }
  • trunk/Ohana/src/imregister/detrend/criteria.c

    r9 r12  
    2323    if (criteria[i].NameSelect   && (strstr (image[0].filename, criteria[i].Name) == (char *) NULL)) continue;
    2424
    25     if (criteria[i].TimeSelect   && (image[0].tstart           > criteria[i].tstop))   continue;
     25    /* looking for the best 'close' match: minimum |dt| */
     26    if (criteria[i].TimeSelect   && (image[0].tstart           > criteria[i].tstop))  {
     27      close = TRUE;
     28      crit  = i;
     29      continue;
     30    }
    2631    if (criteria[i].TimeSelect   && (image[0].tstop            < criteria[i].tstart)) {
    2732      close = TRUE;
     
    163168      if (match[j].crit  != i) continue;
    164169      entry = match[j].image;
    165       dmin = MIN (dmin, criteria[i].tstart - image[entry].tstop);
     170      dtime = (image[entry].tstop < criteria[i].tstart) ?  criteria[i].tstart - image[entry].tstop : image[entry].tstart - criteria[i].tstop;
     171      dmin = MIN (dmin, dtime);
    166172    }
    167173
     
    170176      if (match[j].crit  != i) continue;
    171177      entry = match[j].image;
    172       dtime = criteria[i].tstart - image[entry].tstop;
     178      dtime = (image[entry].tstop < criteria[i].tstart) ?  criteria[i].tstart - image[entry].tstop : image[entry].tstart - criteria[i].tstop;
    173179      if (dtime <= dmin) {
    174180        new[Nnew] = match[j];
  • trunk/Ohana/src/imregister/detrend/unique.c

    r3 r12  
    9393  if (crit[0].CCD     != image[0].ccd    ) return (FALSE);
    9494  if (crit[0].Type    != image[0].type   ) return (FALSE);
    95   if (crit[0].Exptime != image[0].exptime) return (FALSE);
     95  /* if (crit[0].Exptime != image[0].exptime) return (FALSE); */
    9696
    9797  if (crit[0].tstart  > image[0].tstop) return (FALSE);
Note: See TracChangeset for help on using the changeset viewer.