IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 7, 2005, 10:21:59 PM (21 years ago)
Author:
eugene
Message:

added mosaic astrometry functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/gimages.c

    r2598 r3393  
    7171  if (!str_to_radec (&Ra, &Dec, argv[1], argv[2])) return (FALSE);
    7272
    73   image = LoadImages (&Nimage);
    74   if (Nimage == 0) {
    75     return (FALSE);
    76   }
     73  if ((image = LoadImages (&Nimage)) == NULL) return (FALSE);
    7774  image_subset (image, Nimage, &subset, &Nsubset, (Graphdata *) NULL, FALSE, tzero, trange, TimeSelect);
     75  BuildChipMatch (image, Nimage);
    7876
    7977  Nfound = 0;
    8078  for (j = 0; j < Nsubset; j++) {
    8179    i = subset[j];
    82     status = RD_to_XY (&X, &Y, Ra, Dec, &image[i].coords);
    83     if (!status || (X < 0) || (X > image[i].NX) || (Y < 0) || (Y > image[i].NY)) continue;
    84     XY_to_RD (&ra, &dec, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords);
    85     Mcal = applyMcal (&image[i], 2048.0, 2048.0);
    86     /* t = TimeValue (image[i].tzero, TimeReference, TimeFormat); */
    87     date = sec_to_date (image[i].tzero);
    8880    if (PhotCodeSelect) {
    8981      if ((code[0].type == PHOT_REF) || (code[0].type == PHOT_DEP)) {
     
    9486      }
    9587    }     
     88    if (!FindMosaicForImage (image, Nimage, i)) continue;
     89
     90    status = RD_to_XY (&X, &Y, Ra, Dec, &image[i].coords);
     91    if (!status) continue;
     92    if (X < 0) continue;
     93    if (Y < 0) continue;
     94    if (X > image[i].NX) continue;
     95    if (Y > image[i].NY) continue;
     96
     97    Mcal = applyMcal (&image[i], 2048.0, 2048.0);
     98    date = sec_to_date (image[i].tzero);
     99
    96100    if (PixelCoords) {
    97101      fprintf (GetOutfile(), "%3d %s %6.1f %6.1f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n",
    98102               Nfound, image[i].name, X, Y, date, image[i].nstar, image[i].source, 0.001*image[i].secz, 0.001*Mcal, 0.001*image[i].dMcal, image[i].exptime, image[i].code);
    99103    } else {
     104      XY_to_RD (&ra, &dec, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords);
    100105      fprintf (GetOutfile(), "%3d %s %8.4f %8.4f %20s %5d %2d %4.2f %6.3f %5.3f %5.3f %4x\n",
    101106               Nfound, image[i].name, ra, dec, date, image[i].nstar, image[i].source, 0.001*image[i].secz, 0.001*Mcal, 0.001*image[i].dMcal, image[i].exptime, image[i].code);
Note: See TracChangeset for help on using the changeset viewer.