IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30524


Ignore:
Timestamp:
Feb 8, 2011, 1:54:25 PM (15 years ago)
Author:
eugene
Message:

add option to do a check of images against just the user region

Location:
branches/eam_branches/ipp-20101205/Ohana/src/relastro
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/include/relastro.h

    r30523 r30524  
    146146int FlagOutlier;
    147147int    CLIP_THRESH;
     148int USE_BASIC_CHECK;
    148149
    149150FitMode FIT_MODE;
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/src/args.c

    r30509 r30524  
    9393      usage ();
    9494    }
     95  }
     96
     97  USE_BASIC_CHECK = FALSE;
     98  if ((N = get_argument (argc, argv, "-basic-image-search"))) {
     99    remove_argument (N, &argc, argv);
     100    USE_BASIC_CHECK = TRUE;
    95101  }
    96102
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/src/select_images.c

    r30511 r30524  
    202202    if (RmaxImage < RminSkyRegion) continue;
    203203
     204    // image overlaps region, keep it
     205    if (USE_BASIC_CHECK) goto found_it;
     206
    204207    // RA(nStart) is guaranteed to be < RminImage:
    205208    nStart = getRegionStartByRA (RminImage, RmaxSky, skylist[0].Nregions);
     
    224227      for (j = 0; (j < 4) && !found; j++) {
    225228        found = corner_check (&Xi[j], &Yi[j], &skycoords[m].Xc[0], &skycoords[m].Yc[0]);
     229        if (found) goto found_it;
    226230      }
    227231      /* check if catalog corner inside image */
    228232      for (j = 0; (j < 4) && !found; j++) {
    229233        found = corner_check (&skycoords[m].Xc[j], &skycoords[m].Yc[j], &Xi[0], &Yi[0]);
     234        if (found) goto found_it;
    230235      }
    231236      /* check if edges cross */
     
    233238        for (k = 0; (k < 4) && !found; k++) {
    234239          found = edge_check (&Xi[j], &Yi[j], &skycoords[m].Xc[k], &skycoords[m].Yc[k]);
     240        if (found) goto found_it;
    235241        }
    236242      }
    237       if (!found) continue;
    238 
    239       image[nimage] = timage[i];
    240       /* always allow 'few' images to succeed, if possible */
    241       if (image[nimage].flags & ID_IMAGE_ASTROM_FEW) {
    242         image[nimage].flags &= ~ID_IMAGE_ASTROM_FEW;
    243       }
    244       if (RESET) {
    245         // XXX do we need / want to do this in relastro?
    246         // assignMcal (&image[nimage], (double *) NULL, -1);
    247         // image[nimage].Mcal = NAN;
    248         // image[nimage].dMcal = NAN;
    249         image[nimage].flags &= ~badImage;
    250       }
    251       line_number[nimage] = i;
    252       nimage ++;
    253       if (nimage == NIMAGE) {
    254         NIMAGE += 100;
    255         REALLOCATE (image, Image, NIMAGE);
    256         REALLOCATE (line_number, off_t, NIMAGE);
    257       }
     243    }
     244    if (!found) continue;
     245
     246  found_it:
     247    image[nimage] = timage[i];
     248    /* always allow 'few' images to succeed, if possible */
     249    if (image[nimage].flags & ID_IMAGE_ASTROM_FEW) {
     250      image[nimage].flags &= ~ID_IMAGE_ASTROM_FEW;
     251    }
     252    if (RESET) {
     253      // XXX do we need / want to do this in relastro?
     254      // assignMcal (&image[nimage], (double *) NULL, -1);
     255      // image[nimage].Mcal = NAN;
     256      // image[nimage].dMcal = NAN;
     257      image[nimage].flags &= ~badImage;
     258    }
     259    line_number[nimage] = i;
     260    nimage ++;
     261    if (nimage == NIMAGE) {
     262      NIMAGE += 100;
     263      REALLOCATE (image, Image, NIMAGE);
     264      REALLOCATE (line_number, off_t, NIMAGE);
    258265    }
    259266  }
Note: See TracChangeset for help on using the changeset viewer.