IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31239


Ignore:
Timestamp:
Apr 7, 2011, 3:46:32 PM (15 years ago)
Author:
bills
Message:

add parameter -skyparity which causes the skycells to be created with
East to the left

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

Legend:

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

    r31027 r31239  
    6565int    NMAX;
    6666int    NX_SUB, NY_SUB;
     67int    X_PARITY;
    6768double SCALE;
    6869double PADDING;
  • trunk/Ohana/src/addstar/src/args_skycells.c

    r31177 r31239  
    188188    remove_argument (N, &argc, argv);
    189189    OVERLAP_DEC  = atof (argv[N]);
     190    remove_argument (N, &argc, argv);
     191  }
     192  X_PARITY = 1;
     193  if ((N = get_argument (argc, argv, "-skyparity"))) {
     194    X_PARITY = -1;
    190195    remove_argument (N, &argc, argv);
    191196  }
     
    224229  fprintf (stderr, "  -nx Nx                      : subdivide skycell projection in x by Nx\n");
    225230  fprintf (stderr, "  -ny Ny                      : subdivide skycell projection in y by Ny\n");
     231  fprintf (stderr, "  -overlap Or Od              : overlap between skycells (arcseconds)\n");
    226232  fprintf (stderr, "  -projection-number Np       : set projection-number (local mode only)\n");
     233  fprintf (stderr, "  -skyparity                  : set wcs for skycells so that east is to the left\n");
    227234  fprintf (stderr, "  -help                       : this list\n");
    228235  fprintf (stderr, "  -h                          : this list\n\n");
  • trunk/Ohana/src/addstar/src/sky_tessalation.c

    r31027 r31239  
    318318  memset (image, 0, sizeof(Image));
    319319  image[0].coords = *refcoords;
    320   image[0].coords.pc1_1 = image[0].coords.pc2_2 = 1.0;
     320  image[0].coords.pc1_1 = 1.0 * X_PARITY;
     321  image[0].coords.pc2_2 = 1.0;
    321322  image[0].coords.pc1_2 = image[0].coords.pc2_1 = 0.0;
    322323
     
    468469
    469470  if (FIX_NS) {
    470     rectangle[0].coords.pc1_1 = +1.0;
     471    rectangle[0].coords.pc1_1 = +1.0 * X_PARITY;
    471472    rectangle[0].coords.pc1_2 = +0.0;
    472473    rectangle[0].coords.pc2_1 = -0.0;
     
    475476    ycr = yc*cos(angle) + xc*sin(angle);
    476477  } else {
    477     rectangle[0].coords.pc1_1 = +cos(angle);
     478    rectangle[0].coords.pc1_1 = +cos(angle) * X_PARITY;
    478479    rectangle[0].coords.pc1_2 = +sin(angle);
    479     rectangle[0].coords.pc2_1 = -sin(angle);
     480    rectangle[0].coords.pc2_1 = -sin(angle) * X_PARITY;
    480481    rectangle[0].coords.pc2_2 = +cos(angle);
    481482    xcr = xc;
     
    514515  angle = 0.0;
    515516  if (FIX_NS) {
    516     rectangle[0].coords.pc1_1 = +1.0;
     517    rectangle[0].coords.pc1_1 = +1.0 * X_PARITY;
    517518    rectangle[0].coords.pc1_2 = +0.0;
    518519    rectangle[0].coords.pc2_1 = -0.0;
    519520    rectangle[0].coords.pc2_2 = +1.0;
    520521  } else {
    521     rectangle[0].coords.pc1_1 = +cos(angle);
     522    rectangle[0].coords.pc1_1 = +cos(angle) * X_PARITY;
    522523    rectangle[0].coords.pc1_2 = +sin(angle);
    523     rectangle[0].coords.pc2_1 = -sin(angle);
     524    rectangle[0].coords.pc2_1 = -sin(angle) * X_PARITY;
    524525    rectangle[0].coords.pc2_2 = +cos(angle);
    525526  }
     
    626627    ring[i].coords.crval2 = dec;
    627628
    628     ring[i].coords.pc1_1 = +1.0;
     629    ring[i].coords.pc1_1 = +1.0 * X_PARITY;
    629630    ring[i].coords.pc1_2 = +0.0;
    630631    ring[i].coords.pc2_1 = -0.0;
Note: See TracChangeset for help on using the changeset viewer.