IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28184 for trunk


Ignore:
Timestamp:
Jun 1, 2010, 4:40:37 PM (16 years ago)
Author:
eugene
Message:

add feature to find high-speed proper-motion objects

Location:
trunk/Ohana/src/relastro
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relastro/Makefile

    r27581 r28184  
    5656$(SRC)/save_catalogs.$(ARCH).o       \
    5757$(SRC)/write_coords.$(ARCH).o        \
    58 $(SRC)/CoordOps.$(ARCH).o        \
    59 $(SRC)/FixProblemImages.$(ARCH).o        \
     58$(SRC)/CoordOps.$(ARCH).o            \
     59$(SRC)/FixProblemImages.$(ARCH).o    \
     60$(SRC)/high_speed_catalogs.$(ARCH).o  \
     61$(SRC)/high_speed_objects.$(ARCH).o  \
    6062$(SRC)/relastroVisual.$(ARCH).o
    6163
  • trunk/Ohana/src/relastro/include/relastro.h

    r27581 r28184  
    1414typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode;
    1515
    16 typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS} FitTarget;
     16typedef enum {TARGET_NONE, TARGET_OBJECTS, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED} FitTarget;
    1717
    1818typedef struct {
     
    8989int SRC_MEAS_TOOFEW; //catalog objects wich fewer detections then this are ignored
    9090double MIN_ERROR;
     91
     92double RADIUS; // match radius for high-speed objects
    9193
    9294int    VERBOSE;
     
    112114int           NphotcodesKeep,      NphotcodesSkip;
    113115PhotCode     **photcodesKeep,     **photcodesSkip;
     116
     117char          *PHOTCODE_A_LIST,  *PHOTCODE_B_LIST;
     118int           NphotcodesGroupA,  NphotcodesGroupB;
     119PhotCode     **photcodesGroupA, **photcodesGroupB;
    114120
    115121int AreaSelect;
     
    321327int saveCoords (Coords *coords, off_t N);
    322328void resetImageRaw (Catalog *catalog, int Ncatalog, off_t im);
     329
     330int high_speed_catalogs ();
     331int high_speed_objects (SkyRegion *region, Catalog *catalog);
     332int MeasMatchesPhotcode(Measure *measure, PhotCode **photcodeSet, int Nset);
  • trunk/Ohana/src/relastro/src/args.c

    r27581 r28184  
    2828    }
    2929  }
     30  if ((N = get_argument (argc, argv, "-high-speed"))) {
     31    // XXX include a parallax / no-parallax option
     32    if (N >= argc - 3) usage();
     33    FIT_TARGET = TARGET_HIGH_SPEED;
     34    remove_argument (N, &argc, argv);
     35    PHOTCODE_A_LIST = strcreate(argv[N]);
     36    remove_argument (N, &argc, argv);
     37    PHOTCODE_B_LIST = strcreate(argv[N]);
     38    remove_argument (N, &argc, argv);
     39    RADIUS = atof(argv[N]);
     40    remove_argument (N, &argc, argv);
     41  }
     42
    3043  if ((N = get_argument (argc, argv, "-update-simple"))) {
    3144    remove_argument (N, &argc, argv);
     
    271284void usage () {
    272285  fprintf (stderr, "ERROR: USAGE: relastro -region RA RA DEC DEC\n");
    273   fprintf (stderr, "       OR:    relastro -catalog (ra) (dec)\n");
    274   fprintf (stderr, "  working options: \n");
     286  fprintf (stderr, "       OR:    relastro -catalog (ra) (dec)\n\n");
     287  fprintf (stderr, "  specify one of the following modes: \n");
    275288  fprintf (stderr, "  -update-objects\n");
    276289  fprintf (stderr, "    -pm\n");
     
    280293  fprintf (stderr, "  -update-chips\n");
    281294  fprintf (stderr, "  -update-mosaics\n");
     295  fprintf (stderr, "  -high-speed (code[,code,code]) (code[,code,code]) (radius)\n\n");
     296  fprintf (stderr, "  additional options: \n");
    282297  fprintf (stderr, "  -time (start)(stop)\n");
    283298  fprintf (stderr, "  +photcode (code)[,code,code...]\n");
  • trunk/Ohana/src/relastro/src/initialize.c

    r27551 r28184  
    5656  }
    5757
     58  NphotcodesGroupA = 0;
     59  photcodesGroupA = NULL;
     60  if (PHOTCODE_A_LIST != NULL) {
     61    NPHOTCODES = 10;
     62    ALLOCATE (photcodesGroupA, PhotCode *, NPHOTCODES);
     63
     64    /* parse the comma-separated list of photcodesGroupA */
     65    list = PHOTCODE_A_LIST;
     66    while ((codename = strtok_r (list, ",", &ptr)) != NULL) {
     67      list = NULL; // pass NULL on successive strtok_r calls
     68      fprintf (stderr, "PHOTCODE_A_LIST: %s\n", PHOTCODE_A_LIST);
     69      fprintf (stderr, "codename: %s\n", codename);
     70      if ((photcodesGroupA[NphotcodesGroupA] = GetPhotcodebyName (codename)) == NULL) {
     71        fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename);
     72        exit (1);
     73      }
     74      NphotcodesGroupA ++;
     75      CHECK_REALLOCATE (photcodesGroupA, PhotCode *, NPHOTCODES, NphotcodesGroupA, 10);
     76    }
     77  }
     78
     79  NphotcodesGroupB = 0;
     80  photcodesGroupB = NULL;
     81  if (PHOTCODE_B_LIST != NULL) {
     82    NPHOTCODES = 10;
     83    ALLOCATE (photcodesGroupB, PhotCode *, NPHOTCODES);
     84
     85    /* parse the comma-separated list of photcodesGroupB */
     86    list = PHOTCODE_B_LIST;
     87    while ((codename = strtok_r (list, ",", &ptr)) != NULL) {
     88      list = NULL; // pass NULL on successive strtok_r calls
     89      fprintf (stderr, "PHOTCODE_B_LIST: %s\n", PHOTCODE_B_LIST);
     90      fprintf (stderr, "codename: %s\n", codename);
     91      if ((photcodesGroupB[NphotcodesGroupB] = GetPhotcodebyName (codename)) == NULL) {
     92        fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename);
     93        exit (1);
     94      }
     95      NphotcodesGroupB ++;
     96      CHECK_REALLOCATE (photcodesGroupB, PhotCode *, NPHOTCODES, NphotcodesGroupB, 10);
     97    }
     98  }
     99
    58100  initstats (STATMODE);
    59101
  • trunk/Ohana/src/relastro/src/relastro.c

    r27581 r28184  
    2323  if (FIT_TARGET == TARGET_OBJECTS) {
    2424    relastro_objects ();
     25    exit (0);
     26  }
     27
     28  /* the object analysis is a separate process iterating over catalogs */
     29  if (FIT_TARGET == TARGET_HIGH_SPEED) {
     30    high_speed_catalogs ();
    2531    exit (0);
    2632  }
Note: See TracChangeset for help on using the changeset viewer.