IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39313 for trunk


Ignore:
Timestamp:
Jan 13, 2016, 4:36:11 PM (11 years ago)
Author:
eugene
Message:

fix error in image naming; abort on duplicate images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/delstar/src/delete_duplicate_images.c

    r39307 r39313  
    3737
    3838  fprintf (stderr, "deleting measures for "OFF_T_FMT" duplicate images in this database\n", Nduplicates);
     39  myAbort ("do not attempt to delete detections");
    3940
    4041  if (!IMAGE_ONLY) {
     
    513514      int length2 = strlen(image[pair2[i]].name);
    514515
    515       // names should be of the form: foo.cmf, foo.inv.cmf
     516      // names should be of the form: foo.cmf[SkyChip.hdr], foo.inv.cmf[SkyChip.hdr]
    516517      valid = (length1 == length2 + 4) || (length1 == length2 - 4);
    517518      if (!valid) continue;
    518519
    519       int baselength = MIN(length1, length2) - 4;
     520      int baselength = MIN(length1, length2) - 17;
    520521      valid = !strncmp (image[pair1[i]].name, image[pair2[i]].name, baselength);
    521522      if (!valid) continue;
     
    523524      valid = TRUE;
    524525      if (length1 > length2) {
    525         valid = valid && !strcmp (&image[pair1[i]].name[baselength], ".inv.cmf");
    526         valid = valid && !strcmp (&image[pair2[i]].name[baselength], ".cmf");
     526        valid = valid && !strcmp (&image[pair1[i]].name[baselength], ".inv.cmf[SkyChip.hdr]");
     527        valid = valid && !strcmp (&image[pair2[i]].name[baselength], ".cmf[SkyChip.hdr]");
    527528      } else {
    528         valid = valid && !strcmp (&image[pair1[i]].name[baselength], ".cmf");
    529         valid = valid && !strcmp (&image[pair2[i]].name[baselength], ".inv.cmf");
     529        valid = valid && !strcmp (&image[pair1[i]].name[baselength], ".cmf[SkyChip.hdr]");
     530        valid = valid && !strcmp (&image[pair2[i]].name[baselength], ".inv.cmf[SkyChip.hdr]");
    530531      }
    531532      if (!valid) continue;
Note: See TracChangeset for help on using the changeset viewer.