IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37593


Ignore:
Timestamp:
Nov 12, 2014, 3:59:32 PM (12 years ago)
Author:
eugene
Message:

updates to relphot

Location:
branches/eam_branches/ipp-20140904/Ohana/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/imlist.c

    r37571 r37593  
    3838  }
    3939
    40   // int RegionSelect = FALSE;
    41   // if ((N = get_argument (argc, argv, "-region"))) {
    42   //   remove_argument (N, &argc, argv);
    43   //   RegionSelect = TRUE;
    44   // }
    45 
    4640  PhotcodeValue = NULL;
    4741  PhotcodeSelect = FALSE;
     
    7670  }
    7771
     72  int MAX_LIST = -1;
     73  if ((N = get_argument (argc, argv, "-max-list"))) {
     74    remove_argument (N, &argc, argv);
     75    MAX_LIST = atoi (argv[N]);
     76    remove_argument (N, &argc, argv);
     77  }
     78
    7879  if (argc != 1) {
    79     gprint (GP_ERR, "USAGE: image [-time start range] [-region] [-name string]\n");
     80    gprint (GP_ERR, "USAGE: image [-time start range] [-region] [-name string] [-photcode code] [-Nphotcode N] [-max-list N]\n");
    8081    return (FALSE);
    8182  }
     
    8384  if ((image = LoadImagesDVO (&Nimage)) == NULL) return (FALSE);
    8485  image_subset (image, Nimage, &subset, &Nsubset, selection, tzero, trange, TimeSelect);
    85   // BuildChipMatch (image, Nimage);
     86  MAX_LIST = MAX_LIST < 0 ? Nsubset : MIN(MAX_LIST, Nsubset);
    8687
    8788  GetTimeFormat (&TimeReference, &TimeFormat);
    8889
    89   for (j = 0; j < Nsubset; j++) {
     90  for (j = 0; j < MAX_LIST; j++) {
    9091    i = subset[j];
    9192    if (NameSelect && (strstr (image[i].name, name) == (char *) NULL)) continue;
  • branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/ImageTable.c

    r36630 r37593  
    3232  }
    3333
     34  // XXX do not make the chip match -- we have not loaded the PHU entries
     35  // BuildChipMatch (image, Nimage);
     36
    3437  *nimage = Nimage;
    3538  return image;
  • branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/MosaicOps.c

    r37531 r37593  
    620620      NY = image[m].NY;
    621621      dS += hypot (image[m].coords.cdelt1*image[m].coords.pc1_1, image[m].coords.cdelt1*image[m].coords.pc2_1);
    622       XY_to_RD (&R, &D, 0.0, 0.0, &image[m].coords);
     622
     623      OhanaProjection proj = GetProjection (image[m].coords.ctype);
     624      if ((proj == PROJ_WRP) && !image[m].coords.mosaic) {
     625        XY_to_LM (&R, &D, 0.0, 0.0, &image[m].coords);
     626      } else {
     627        XY_to_RD (&R, &D, 0.0, 0.0, &image[m].coords);
     628      }
    623629      Rmin = MIN (Rmin, R);
    624630      Rmax = MAX (Rmax, R);
    625631      Dmin = MIN (Dmin, D);
    626632      Dmax = MAX (Dmax, D);
    627       XY_to_RD (&R, &D, (double) NX, 0.0, &image[m].coords);
     633
     634      if ((proj == PROJ_WRP) && !image[m].coords.mosaic) {
     635        XY_to_LM (&R, &D, (double) NX, 0.0, &image[m].coords);
     636      } else {
     637        XY_to_RD (&R, &D, (double) NX, 0.0, &image[m].coords);
     638      }
    628639      Rmin = MIN (Rmin, R);
    629640      Rmax = MAX (Rmax, R);
    630641      Dmin = MIN (Dmin, D);
    631642      Dmax = MAX (Dmax, D);
    632       XY_to_RD (&R, &D, (double) NX, (double) NY, &image[m].coords);
     643
     644      if ((proj == PROJ_WRP) && !image[m].coords.mosaic) {
     645        XY_to_LM (&R, &D, (double) NX, (double) NY, &image[m].coords);
     646      } else {
     647        XY_to_RD (&R, &D, (double) NX, (double) NY, &image[m].coords);
     648      }
    633649      Rmin = MIN (Rmin, R);
    634650      Rmax = MAX (Rmax, R);
    635651      Dmin = MIN (Dmin, D);
    636652      Dmax = MAX (Dmax, D);
    637       XY_to_RD (&R, &D, 0.0, (double) NY, &image[m].coords);
     653
     654      if ((proj == PROJ_WRP) && !image[m].coords.mosaic) {
     655        XY_to_LM (&R, &D, 0.0, (double) NY, &image[m].coords);
     656      } else {
     657        XY_to_RD (&R, &D, 0.0, (double) NY, &image[m].coords);
     658      }
    638659      Rmin = MIN (Rmin, R);
    639660      Rmax = MAX (Rmax, R);
  • branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/assign_images.c

    r37378 r37593  
    117117
    118118    if (MOSAIC_ZEROPT) {
    119       // use the coords of the associated mosaic to select
     119      // use the coords of the associated mosaic to select (only for chips; stacks use their own center)
    120120      Mosaic *mosaic = getMosaicForImage (j);
    121       Rc = mosaic->coords.crval1;
    122       Dc = mosaic->coords.crval2;
    123       // NOTE : have defined mosaic Rc,Dc to choose the side of 0,360 on which most of the
    124       // chips are located.  but, for host assignment, we rationalize to 0.0 - 360.0
    125       Rc = ohana_normalize_angle_to_midpoint (Rc, 180.0);
     121      if (mosaic) {
     122        Rc = mosaic->coords.crval1;
     123        Dc = mosaic->coords.crval2;
     124        // NOTE : have defined mosaic Rc,Dc to choose the side of 0,360 on which most of the
     125        // chips are located.  but, for host assignment, we rationalize to 0.0 - 360.0
     126        Rc = ohana_normalize_angle_to_midpoint (Rc, 180.0);
     127      }
    126128    }
    127129
  • branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/reload_catalogs.c

    r36630 r37593  
    165165    free (BOUNDARY_TREE);
    166166    BOUNDARY_TREE = tmppath;
    167    
    168167  }
    169168
  • branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/relphot_objects.c

    r35104 r37593  
    3636    if (!HostTableTestHost(skylist[0].regions[i], hostID)) continue;
    3737
    38     // set up the basic catalog info
    3938    // set up the basic catalog info
    4039    char hostfile[1024];
  • branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/relphot_parallel_regions.c

    r37037 r37593  
    4242  if (!dvo_image_load (&db, VERBOSE, FALSE)) Shutdown ("can't read image catalog %s", db.filename);
    4343  MARKTIME("-- load image data: %f sec\n", dtime);
     44
     45  // save Images.dat using the copied structure
     46  if (UPDATE_CATFORMAT) {
     47    // ensure the db format is updated
     48    db.format = dvo_catalog_catformat (UPDATE_CATFORMAT);
     49  }
    4450
    4551  /* assign the images to the different region hosts */
Note: See TracChangeset for help on using the changeset viewer.