IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31092


Ignore:
Timestamp:
Mar 30, 2011, 9:46:36 AM (15 years ago)
Author:
eugene
Message:

merging changes from trunk

Location:
branches/eam_branches/ipp-20110213/Ohana/src
Files:
8 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/Ohana/src/addstar/include/skycells.h

    r28673 r31092  
    6969double CELLSIZE;
    7070int    LEVEL;
     71char   PROJECTION_NUMBER[8];
    7172
    7273double CENTER_RA, CENTER_DEC;
  • branches/eam_branches/ipp-20110213/Ohana/src/addstar/src/args_skycells.c

    r28673 r31092  
    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");
  • branches/eam_branches/ipp-20110213/Ohana/src/addstar/src/sky_tessalation.c

    r30613 r31092  
    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)
  • branches/eam_branches/ipp-20110213/Ohana/src/gcompare/Makefile

    r12842 r31092  
    2424$(SRC)/compare.$(ARCH).o                        $(SRC)/sort.$(ARCH).o                   \
    2525$(SRC)/count_neighbors.$(ARCH).o                $(SRC)/nextline.$(ARCH).o               \
    26 $(SRC)/nextword.$(ARCH).o                       $(SRC)/gcompare.$(ARCH).o
     26$(SRC)/nextword.$(ARCH).o                       $(SRC)/gcompare.$(ARCH).o               \
     27$(SRC)/gc_compare.$(ARCH).o
    2728
    2829$(GCOMPARE): $(INC)/gcompare.h
  • branches/eam_branches/ipp-20110213/Ohana/src/gcompare/include/gcompare.h

    r21153 r31092  
    2626data_type          input             PROTO((char *, int, int, int));
    2727match_type        *compare           PROTO((data_type, data_type, int *, double, double, double, double));
     28match_type        *gc_compare        PROTO((data_type, data_type, int *, double, double, double, double));
    2829int                get_argument      PROTO((int, char **, char *));
    2930int                remove_argument   PROTO((int, int *, char **));
  • branches/eam_branches/ipp-20110213/Ohana/src/gcompare/src/gcompare.c

    r16040 r31092  
    66 
    77  int Nskip1, Nskip2, Nmatches, N;
    8   int X1, X2, Y1, Y2, deltas, match, nomatch1, nomatch2;
     8  int X1, X2, Y1, Y2, deltas, match, nomatch1, nomatch2, greatcircle;
    99  data_type data1, data2;
    1010  match_type *matches;
     
    1212
    1313  DX = DY = Nskip1 = Nskip2 = 0;
    14   noauto = match = nomatch1 = nomatch2 = deltas = FALSE;
     14  noauto = match = nomatch1 = nomatch2 = deltas = greatcircle = FALSE;
    1515
    1616  if (remove_argument(get_argument (argc, argv, "-d"), &argc, argv))
     
    2626  if (remove_argument(get_argument (argc, argv, "-n2"), &argc, argv))
    2727    nomatch2 = TRUE;
     28  if (remove_argument(get_argument (argc, argv, "-C"), &argc, argv))
     29    greatcircle = TRUE;
    2830  if (!(match || deltas || nomatch1 || nomatch2)) {
    2931    fprintf (stderr, "no output mode, use at least one of -d, -m, -n1, or -n2\n");
     
    7577
    7678  fprintf (stderr, "noauto: %e\n", noauto);
    77   matches = compare (data1, data2, &Nmatches, radius, DX, DY, noauto);
     79  if (greatcircle) {
     80    matches = gc_compare (data1, data2, &Nmatches, radius, DX, DY, noauto);
     81  }
     82  else {
     83    matches = compare (data1, data2, &Nmatches, radius, DX, DY, noauto);
     84  }
     85
    7886
    7987  output (data1, data2, matches, Nmatches, match, deltas, nomatch1, nomatch2);
     
    9098  fprintf (stderr, "  -d      return delta coords\n");
    9199  fprintf (stderr, "  -m      return matched lines\n");
     100  fprintf (stderr, "  -C      uses great circle calculation\n");
    92101  fprintf (stderr, "  -n1     return unmatched lines, file 1\n");
    93102  fprintf (stderr, "  -n2     return unmatched lines, file 2\n");
  • branches/eam_branches/ipp-20110213/Ohana/src/opihi/cmd.astro/Makefile

    r25757 r31092  
    2222$(SRC)/coords.$(ARCH).o    \
    2323$(SRC)/cdot.$(ARCH).o              \
     24$(SRC)/cline.$(ARCH).o             \
    2425$(SRC)/cplot.$(ARCH).o             \
    2526$(SRC)/csystem.$(ARCH).o           \
  • branches/eam_branches/ipp-20110213/Ohana/src/opihi/cmd.astro/init.c

    r25757 r31092  
    66int coords                  PROTO((int, char **));
    77int cdot                    PROTO((int, char **));
     8int cline                   PROTO((int, char **));
    89int cplot                   PROTO((int, char **));
    910int csystem                 PROTO((int, char **));
     
    5354  {1, "coords",      coords,       "load coordinates for buffer from file"},
    5455  {1, "cdot",        cdot,         "plot point in sky coordinates"},
     56  {1, "cline",       cline,        "plot line connecting two sky coordinates"},
    5557  {1, "cplot",       cplot,        "plot vectors in sky coordinates"},
    5658  {1, "csystem",     csystem,      "convert between coordinate systems"},
Note: See TracChangeset for help on using the changeset viewer.