IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34825


Ignore:
Timestamp:
Dec 15, 2012, 6:49:04 AM (14 years ago)
Author:
eugene
Message:

adding notes on projection cell / skycell mapping

Location:
branches/eam_branches/ipp-20121130/Ohana/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121130/Ohana/src/addstar/src/findskycell.c

    r34291 r34825  
    1515
    1616void usage (void) {
    17   fprintf (stderr, "USAGE: findcell -mktree (tree) (catdir)\n");
     17  fprintf (stderr, "USAGE: findcell -mktree (tree) (catdir) [-nx Nx] [-ny Ny]\n");
    1818  fprintf (stderr, "USAGE: findcell -tree (tree) (datafile)\n");
    1919  fprintf (stderr, "   (datafile) should contain a list of RA,DEC pairs\n");
     
    2626int main (int argc, char **argv) {
    2727
    28   int N;
     28  int N, NX_SUB, NY_SUB;
    2929  char *treefile = NULL;
    3030
     
    3737  if (get_argument (argc, argv, "-help")) usage ();
    3838  if (get_argument (argc, argv, "-h")) usage ();
     39
     40  NX_SUB = NY_SUB = 1;
     41  if ((N = get_argument (argc, argv, "-nx"))) {
     42    remove_argument (N, &argc, argv);
     43    NX_SUB = atof (argv[N]);
     44    remove_argument (N, &argc, argv);
     45  }
     46  if ((N = get_argument (argc, argv, "-ny"))) {
     47    remove_argument (N, &argc, argv);
     48    NY_SUB = atof (argv[N]);
     49    remove_argument (N, &argc, argv);
     50  }
    3951
    4052  /* extra error messages */
     
    326338
    327339    fprintf (stdout, "%10.6f %10.6f  %3d %3d  %s\n", ra, dec, zone, band, tree->name[zone][band]);
     340
     341    // I know the projection cell (band,zone), but I need to find the skycell within that projection cell.
     342    // the proj cell is divided into Nx, Ny bits.
     343    // (ra,dec) for (Ro,Do) -> (x,y).  given (Xo,Yo),(dX,dY) I can find ix,iy
     344    // I currently track Ro,Do (tree->RA_origin[zone], tree->...)
     345
     346
    328347  }
    329348
  • branches/eam_branches/ipp-20121130/Ohana/src/relphot/src/BoundaryTreeOps.c

    r34260 r34825  
    2222 
    2323  snprintf (primaryCellName, DVO_MAX_PATH, "RINGS.V3.%s", tree->name[zone][band]);
     24
     25  // I have ra, dec, and the primary projection cell.  In order to choose the primary skycell,
     26  // I just need to project to ra,dec to X,Y based on the center of the cell and then get the subdivision right.
     27
    2428  return TRUE;
    2529}
Note: See TracChangeset for help on using the changeset viewer.