IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17243


Ignore:
Timestamp:
Mar 31, 2008, 12:34:56 PM (18 years ago)
Author:
eugene
Message:

split object update by catalog; update measurements one catalog at a time

Location:
trunk/Ohana/src/relastro
Files:
2 added
4 edited

Legend:

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

    r17206 r17243  
    2121
    2222RELASTRO = \
    23 $(SRC)/ConfigInit.$(ARCH).o      \
    24 $(SRC)/FitChip.$(ARCH).o         \
    25 $(SRC)/FitMosaic.$(ARCH).o       \
    26 $(SRC)/FitPM.$(ARCH).o           \
    27 $(SRC)/FitPar.$(ARCH).o          \
    28 $(SRC)/FitPMandPar.$(ARCH).o     \
    29 $(SRC)/FitSimple.$(ARCH).o       \
    30 $(SRC)/ImageOps.$(ARCH).o        \
    31 $(SRC)/MosaicOps.$(ARCH).o       \
    32 $(SRC)/ParFactor.$(ARCH).o       \
    33 $(SRC)/SetSignals.$(ARCH).o      \
    34 $(SRC)/Shutdown.$(ARCH).o        \
    35 $(SRC)/UpdateChips.$(ARCH).o     \
    36 $(SRC)/UpdateMosaic.$(ARCH).o    \
    37 $(SRC)/UpdateObjects.$(ARCH).o   \
    38 $(SRC)/UpdateSimple.$(ARCH).o    \
    39 $(SRC)/UpdateMeasures.$(ARCH).o  \
    40 $(SRC)/GetAstromError.$(ARCH).o  \
    41 $(SRC)/args.$(ARCH).o            \
    42 $(SRC)/bcatalog.$(ARCH).o        \
    43 $(SRC)/dvo_astrom_ops.$(ARCH).o  \
    44 $(SRC)/fitpoly.$(ARCH).o         \
    45 $(SRC)/initialize.$(ARCH).o      \
    46 $(SRC)/liststats.$(ARCH).o       \
    47 $(SRC)/load_catalogs.$(ARCH).o   \
    48 $(SRC)/load_images.$(ARCH).o     \
    49 $(SRC)/mkpolyterm.$(ARCH).o      \
    50 $(SRC)/plot_scatter.$(ARCH).o    \
    51 $(SRC)/plotstuff.$(ARCH).o       \
    52 $(SRC)/select_images.$(ARCH).o   \
    53 $(SRC)/relastro.$(ARCH).o        \
    54 $(SRC)/save_catalogs.$(ARCH).o   \
     23$(SRC)/ConfigInit.$(ARCH).o          \
     24$(SRC)/FitChip.$(ARCH).o             \
     25$(SRC)/FitMosaic.$(ARCH).o           \
     26$(SRC)/FitPM.$(ARCH).o               \
     27$(SRC)/FitPar.$(ARCH).o              \
     28$(SRC)/FitPMandPar.$(ARCH).o         \
     29$(SRC)/FitSimple.$(ARCH).o           \
     30$(SRC)/ImageOps.$(ARCH).o            \
     31$(SRC)/MosaicOps.$(ARCH).o           \
     32$(SRC)/ParFactor.$(ARCH).o           \
     33$(SRC)/SetSignals.$(ARCH).o          \
     34$(SRC)/Shutdown.$(ARCH).o            \
     35$(SRC)/UpdateChips.$(ARCH).o         \
     36$(SRC)/UpdateMosaic.$(ARCH).o        \
     37$(SRC)/UpdateObjects.$(ARCH).o       \
     38$(SRC)/UpdateObjectOffsets.$(ARCH).o \
     39$(SRC)/UpdateSimple.$(ARCH).o        \
     40$(SRC)/UpdateMeasures.$(ARCH).o      \
     41$(SRC)/GetAstromError.$(ARCH).o      \
     42$(SRC)/args.$(ARCH).o                \
     43$(SRC)/bcatalog.$(ARCH).o            \
     44$(SRC)/dvo_astrom_ops.$(ARCH).o      \
     45$(SRC)/fitpoly.$(ARCH).o             \
     46$(SRC)/initialize.$(ARCH).o          \
     47$(SRC)/liststats.$(ARCH).o           \
     48$(SRC)/load_catalogs.$(ARCH).o       \
     49$(SRC)/load_images.$(ARCH).o         \
     50$(SRC)/mkpolyterm.$(ARCH).o          \
     51$(SRC)/plot_scatter.$(ARCH).o        \
     52$(SRC)/plotstuff.$(ARCH).o           \
     53$(SRC)/select_images.$(ARCH).o       \
     54$(SRC)/relastro.$(ARCH).o            \
     55$(SRC)/relastro_objects.$(ARCH).o    \
     56$(SRC)/save_catalogs.$(ARCH).o       \
    5557$(SRC)/write_coords.$(ARCH).o
    5658
  • trunk/Ohana/src/relastro/include/relastro.h

    r17215 r17243  
    289289
    290290float GetAstromError (Measure *measure, int mode);
     291int relastro_objects ();
     292int UpdateObjectOffsets (SkyList *skylist);
  • trunk/Ohana/src/relastro/src/ImageOps.c

    r17204 r17243  
    229229      // ???? inconsistently hitting this????
    230230      fprintf (stderr, "!");
    231       abort ();
     231      // abort ();
    232232    }
    233233    if (fabs(catalog[c].measure[m].dD - dD) > 10.0) {
    234234      fprintf (stderr, "*");
    235       abort ();
     235      // abort ();
    236236    }
    237237
  • trunk/Ohana/src/relastro/src/relastro.c

    r16810 r17243  
    1212  initialize (argc, argv);
    1313
     14  /* the object analysis is a separate process iterating over catalogs */
     15  if (FIT_TARGET == TARGET_OBJECTS) {
     16    relastro_objects ();
     17    exit (0);
     18  }
     19
    1420  /* register database handle with shutdown procedure */
    1521  set_db (&db);
     
    2127  if (!dvo_image_load (&db, VERBOSE, FALSE)) Shutdown ("can't read image catalog %s", db.filename);
    2228
    23   /* load regions and images based on specified sky patch */
     29  /* load regions and images based on specified sky patch (default depth) */
    2430  skylist = load_images (&db, &UserPatch);
    2531
    26   /* load catalog data from region files : subselect only if we are not doing the objects */
    27   catalog = load_catalogs (skylist, &Ncatalog, (FIT_TARGET != TARGET_OBJECTS));
     32  /* load catalog data from region files : subselect high-quality measurements */
     33  catalog = load_catalogs (skylist, &Ncatalog, TRUE);
    2834
    2935  /* match measurements with images */
     
    3844  /* major modes */
    3945  switch (FIT_TARGET) {
    40     case TARGET_OBJECTS:
    41       UpdateObjects (catalog, Ncatalog);
    42       break;
    43 
    4446    case TARGET_SIMPLE:
    4547      UpdateSimple (catalog, Ncatalog);
     
    6163  if (!UPDATE) exit (0);
    6264
    63   if (FIT_TARGET == TARGET_OBJECTS) {
    64     save_catalogs (catalog, Ncatalog);
    65   } else {
    66     // XXX for now, reload all catalogs at once; as memory use gets large, reload one-at-a-time
     65  // free the image / measurement pointers
     66  freeImageBins (1);
    6767
    68     // load catalog data from region files : do not subselect
    69     catalog = load_catalogs (skylist, &Ncatalog, FALSE);
    70    
    71     // match measurements with images
    72     initImageBins (catalog, Ncatalog);
    73     findImages (catalog, Ncatalog);
     68  // iterate over catalogs to make detection coordinates consistant
     69  UpdateObjectOffsets (skylist);
    7470
    75     // update the detection coordinates using the new image parameters
    76     UpdateMeasures (catalog, Ncatalog);
    77 
    78     // write the updated detections to disk
    79     save_catalogs (catalog, Ncatalog);
    80 
    81     // save the updated image parameters
    82     dvo_image_update (&db, VERBOSE);
    83     dvo_image_unlock (&db);
    84   }
     71  // save the updated image parameters
     72  dvo_image_update (&db, VERBOSE);
     73  dvo_image_unlock (&db);
    8574
    8675  exit (0);
    8776}
    88 
Note: See TracChangeset for help on using the changeset viewer.