IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3402 for trunk/Ohana/src/opihi


Ignore:
Timestamp:
Mar 9, 2005, 9:23:49 PM (21 years ago)
Author:
eugene
Message:

adding mosaic astrom support

Location:
trunk/Ohana/src/opihi/dvo
Files:
3 edited

Legend:

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

    r3393 r3402  
    4444        while (flipped && (r > Rmid)) r-= 360.0;
    4545        status = RD_to_XY (&X, &Y, r, d, &graph[0].coords);
    46 
    4746        if (!status) continue;
    4847        if (X < graph[0].xmin) continue;
     
    5049        if (Y < graph[0].ymin) continue;
    5150        if (Y > graph[0].ymax) continue;
    52         subset[n] = i;
    53         n++;
    54         if (n > npts - 1) {
    55           npts += 200;
    56           REALLOCATE (subset, int, npts);
    57         }
    58         break;
     51        goto in_region;
     52        /** we miss any images which surround the region.  we are also
     53            missing the DIS images for which the corners don't touch
     54            the region, but which are needed for WRP images with
     55            corners touching the region **/
    5956      }
    60       /** we miss any images which surround the region.  we are also
    61           missing the DIS images for which the corners don't touch
    62           the region, but which are needed for WRP images with
    63           corners touching the region **/
     57      continue;
     58    }
     59  in_region:
     60    subset[n] = i;
     61    n++;
     62    if (n > npts - 1) {
     63      npts += 200;
     64      REALLOCATE (subset, int, npts);
    6465    }
    6566  }
  • trunk/Ohana/src/opihi/dvo/LoadImages.c

    r3393 r3402  
    11# include "dvo.h"
    22
    3 Image *LoadImages (int *Nimage) {
     3Image *LoadImages (int *nimage) {
    44
    55  char filename[256];
    6   int nimage, NIMAGE;
     6  int Nimage, NIMAGE;
    77  FILE *f;
    88  Header header;
     
    1111  VarConfig ("IMAGE_CATALOG", "%s", filename);
    1212
     13  *nimage = 0;
    1314  NIMAGE = 0;
    1415  Nimage = 0;
     
    3738  ALLOCATE (image, Image, NIMAGE);
    3839  fseek (f, header.size, SEEK_SET);
    39   nimage = Fread (image, sizeof(Image), NIMAGE, f, "image");
    40   if (nimage != NIMAGE) {
    41     fprintf (stderr, "failed to read in all images (%d of %d)\n", nimage, NIMAGE);
     40  Nimage = Fread (image, sizeof(Image), NIMAGE, f, "image");
     41  if (Nimage != NIMAGE) {
     42    fprintf (stderr, "failed to read in all images (%d of %d)\n", Nimage, NIMAGE);
    4243  }
    4344
    4445  fclose (f);
    45   *Nimage = nimage;
     46  *nimage = Nimage;
    4647  return (image);
    4748}
  • trunk/Ohana/src/opihi/dvo/images.c

    r3393 r3402  
    8686
    8787    /* project this image to screen display coords */
    88     x[0] = 0;           y[0] = 0;
    89     x[1] = image[i].NX; y[1] = 0;
    90     x[2] = image[i].NX; y[2] = image[i].NY;
    91     x[3] = 0;           y[3] = image[i].NY;
     88    /* DIS images represent a field, not a chip */
     89    if (!strcmp(&image[i].coords.ctype[4], "-DIS")) {
     90      x[0] = -0.5*image[i].NX; y[0] = -0.5*image[i].NY;
     91      x[1] = +0.5*image[i].NX; y[1] = -0.5*image[i].NY;
     92      x[2] = +0.5*image[i].NX; y[2] = +0.5*image[i].NY;
     93      x[3] = -0.5*image[i].NX; y[3] = +0.5*image[i].NY;
     94    } else {
     95      x[0] = 0;           y[0] = 0;
     96      x[1] = image[i].NX; y[1] = 0;
     97      x[2] = image[i].NX; y[2] = image[i].NY;
     98      x[3] = 0;           y[3] = image[i].NY;
     99    }
    92100    status = FALSE;
    93101
Note: See TracChangeset for help on using the changeset viewer.