IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

add option to report image corners

File:
1 edited

Legend:

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

    r39225 r39310  
    8080  }
    8181
     82  int showUL = FALSE;
     83  if ((N = get_argument (argc, argv, "-show-ul"))) {
     84    remove_argument (N, &argc, argv);
     85    showUL = TRUE;
     86  }
     87  int showUR = FALSE;
     88  if ((N = get_argument (argc, argv, "-show-ur"))) {
     89    remove_argument (N, &argc, argv);
     90    showUR = TRUE;
     91  }
     92  int showLL = FALSE;
     93  if ((N = get_argument (argc, argv, "-show-ll"))) {
     94    remove_argument (N, &argc, argv);
     95    showLL = TRUE;
     96  }
     97  int showLR = FALSE;
     98  if ((N = get_argument (argc, argv, "-show-lr"))) {
     99    remove_argument (N, &argc, argv);
     100    showLR = TRUE;
     101  }
     102
    82103  int MAX_LIST = -1;
    83104  if ((N = get_argument (argc, argv, "-max-list"))) {
     
    116137      XY_to_RD (&r, &d, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords);
    117138    }
    118     if (VERBOSE) gprint (GP_LOG, "%3lld %s %8lld %8.4f %8.4f %f %5d %2d %4.2f %5.3f %5.3f\n",
     139
     140
     141    if (VERBOSE) {
     142      gprint (GP_LOG, "%3lld %s %8lld %8.4f %8.4f %f %5d %2d %4.2f %5.3f %5.3f",
    119143                         (long long) i, image[i].name, (long long) image[i].imageID, r, d, t, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal);
     144
     145      if (showUR) {
     146        if (!strcmp(&image[i].coords.ctype[4], "-DIS")) {
     147          XY_to_RD (&r, &d, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords);
     148        } else {
     149          XY_to_RD (&r, &d, image[i].NX, image[i].NY, &image[i].coords);
     150        }
     151        gprint (GP_LOG, " %8.4f %8.4f", r, d);
     152      }
     153      if (showUL) {
     154        if (!strcmp(&image[i].coords.ctype[4], "-DIS")) {
     155          XY_to_RD (&r, &d, -0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords);
     156        } else {
     157          XY_to_RD (&r, &d, 0.0, image[i].NY, &image[i].coords);
     158        }
     159        gprint (GP_LOG, " %8.4f %8.4f", r, d);
     160      }
     161      if (showLL) {
     162        if (!strcmp(&image[i].coords.ctype[4], "-DIS")) {
     163          XY_to_RD (&r, &d, -0.5*image[i].NX, -0.5*image[i].NY, &image[i].coords);
     164        } else {
     165          XY_to_RD (&r, &d, 0.0, 0.0, &image[i].coords);
     166        }
     167        gprint (GP_LOG, " %8.4f %8.4f", r, d);
     168      }
     169      if (showLR) {
     170        if (!strcmp(&image[i].coords.ctype[4], "-DIS")) {
     171          XY_to_RD (&r, &d, 0.5*image[i].NX, -0.5*image[i].NY, &image[i].coords);
     172        } else {
     173          XY_to_RD (&r, &d, image[i].NX, 0.0, &image[i].coords);
     174        }
     175        gprint (GP_LOG, " %8.4f %8.4f", r, d);
     176      }
     177      gprint (GP_LOG, "\n");
     178    }
    120179
    121180    char name[80];
Note: See TracChangeset for help on using the changeset viewer.