IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31027


Ignore:
Timestamp:
Mar 23, 2011, 12:10:30 PM (15 years ago)
Author:
bills
Message:

add new option to the skycells program -projection-number. This takes a numeric value that may be used when
using -mode LOCAL. If for example you pass -projection-number 03 it will create skycells with names
skycell.03.XX where XX is the usual values 0 to nx * ny. This allows one to use multiple skycells -local
commands build a tessellation directory with multiple local projections. This was needed to create
a better STS tessellation: STS.V3

Location:
trunk/Ohana/src/addstar
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/include/skycells.h

    r28673 r31027  
    6969double CELLSIZE;
    7070int    LEVEL;
     71char   PROJECTION_NUMBER[8];
    7172
    7273double CENTER_RA, CENTER_DEC;
  • trunk/Ohana/src/addstar/src/args_skycells.c

    r28673 r31027  
    9393      remove_argument (N, &argc, argv);
    9494      OVERLAP_DEC  = atof (argv[N]);
     95      remove_argument (N, &argc, argv);
     96    }
     97    PROJECTION_NUMBER[0] = 0;
     98    if ((N = get_argument (argc, argv, "-projection-number"))) {
     99      remove_argument (N, &argc, argv);
     100      int projection_number = atoi(argv[N]);
     101      // We store projection number as a string, but range check as a number
     102      if (projection_number > 10000) {
     103        fprintf (stderr, "maximum projection-number value is 10000\n");
     104        help();
     105      } else if (projection_number < 0) {
     106        fprintf (stderr, "projection-number value must be > 0\n");
     107        help();
     108      }
     109      strcpy(PROJECTION_NUMBER, argv[N]);
    95110      remove_argument (N, &argc, argv);
    96111    }
     
    208223  fprintf (stderr, "  -nx Nx                      : subdivide skycell projection in x by Nx\n");
    209224  fprintf (stderr, "  -ny Ny                      : subdivide skycell projection in y by Ny\n");
     225  fprintf (stderr, "  -projection-number Np       : set projection-number (local mode only)\n");
    210226  fprintf (stderr, "  -help                       : this list\n");
    211227  fprintf (stderr, "  -h                          : this list\n\n");
  • trunk/Ohana/src/addstar/src/sky_tessalation.c

    r30613 r31027  
    208208  sky_rectangle_local (&rectangle);
    209209  strcpy (rectangle.name, "skycell");
     210
     211  if (strlen(PROJECTION_NUMBER) > 0) {
     212    // We store projection number as a string so one can pass in
     213    // values like 00, 01, etc.
     214    strcat(rectangle.name, ".");
     215    strcat(rectangle.name, PROJECTION_NUMBER);
     216  }
    210217
    211218  // subdivide each image (Nx x Ny subcells)
Note: See TracChangeset for help on using the changeset viewer.