IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27509


Ignore:
Timestamp:
Mar 29, 2010, 1:46:26 PM (16 years ago)
Author:
eugene
Message:

adding timing marks

Location:
branches/eam_branches/20100225/Ohana/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20100225/Ohana/src/relastro/src/relastro.c

    r17243 r27509  
    11# include "relastro.h"
     2
     3# define MARKTIME(MSG,...) { \
     4  float dtime; \
     5  gettimeofday (&stop, (void *) NULL); \
     6  dtime = DTIME (stop, start); \
     7  fprintf (stderr, MSG, __VA_ARGS__); }
    28
    39int main (int argc, char **argv) {
     
    612  Catalog *catalog;
    713  FITS_DB db;
     14  struct timeval start, stop;
    815
    916  SkyList *skylist = NULL;
     17
     18  gettimeofday (&start, (void *) NULL);
    1019
    1120  /* get configuration info, args */
     
    2635  if (db.dbstate == LCK_EMPTY) Shutdown ("ERROR: No images in catalog %s (1)", db.filename);
    2736  if (!dvo_image_load (&db, VERBOSE, FALSE)) Shutdown ("can't read image catalog %s", db.filename);
     37  MARKTIME("load image data: %f sec\n", dtime);
    2838
    2939  /* load regions and images based on specified sky patch (default depth) */
    3040  skylist = load_images (&db, &UserPatch);
     41  MARKTIME("load images: %f sec\n", dtime);
    3142
    3243  /* load catalog data from region files : subselect high-quality measurements */
    3344  catalog = load_catalogs (skylist, &Ncatalog, TRUE);
     45  MARKTIME("load catalog data: %f sec\n", dtime);
    3446
    3547  /* match measurements with images */
    3648  initImageBins (catalog, Ncatalog);
     49  MARKTIME("make image bins: %f sec\n", dtime);
     50
    3751  findImages (catalog, Ncatalog);
     52  MARKTIME("set up image indexes: %f sec\n", dtime);
    3853
    3954  if (PLOTSTUFF) {
  • branches/eam_branches/20100225/Ohana/src/relphot/src/relphot.c

    r21153 r27509  
    11# include "relphot.h"
    22# define USE_DIRECT 0
     3
     4# define MARKTIME(MSG,...) { \
     5  float dtime; \
     6  gettimeofday (&stop, (void *) NULL); \
     7  dtime = DTIME (stop, start); \
     8  fprintf (stderr, MSG, __VA_ARGS__); }
    39
    410int main (int argc, char **argv) {
     
    713  Catalog *catalog;
    814  FITS_DB db;
     15  struct timeval start, stop;
     16  SkyList *skylist = NULL;
    917
    10   SkyList *skylist = NULL;
     18  gettimeofday (&start, (void *) NULL);
    1119
    1220  /* get configuration info, args */
     
    3947    if (!dvo_image_load (&db, VERBOSE, FALSE)) Shutdown ("can't read image catalog %s", db.filename);
    4048  }
     49  MARKTIME("load image data: %f sec\n", dtime);
    4150
    4251  /* load regions and images based on specified sky patch */
     
    4554  // XXX this is fairly lame: argv[1] is photcode if UserPatchSelect is true
    4655  skylist = load_images (&db, argv[1], &UserPatch, UserPatchSelect);
     56  MARKTIME("load images: %f sec\n", dtime);
    4757
    4858  /* unlock, if we can (else, unlocked below) */
     
    5161  /* load catalog data from region files */
    5262  catalog = load_catalogs (skylist, &Ncatalog);
     63  MARKTIME("load catalog data: %f sec\n", dtime);
    5364 
    5465  /* add in a loop over the catalogs calling dvo_catalog_chipcoords */
     
    5667  /* match measurements with images, mosaics */
    5768  initImageBins  (catalog, Ncatalog);
     69  MARKTIME("make image bins: %f sec\n", dtime);
     70
    5871  initMosaicBins (catalog, Ncatalog);
    5972  initGridBins   (catalog, Ncatalog);
     
    6174
    6275  findImages (catalog, Ncatalog);
     76  MARKTIME("set up image indexes: %f sec\n", dtime);
     77
    6378  findMosaics (catalog, Ncatalog);  /* also sets Grid values */
     79  MARKTIME("set up mosaic indexes: %f sec\n", dtime);
     80
    6481  SAVEPLOT = FALSE;
    6582
Note: See TracChangeset for help on using the changeset viewer.