IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33503


Ignore:
Timestamp:
Mar 13, 2012, 1:49:44 PM (14 years ago)
Author:
eugene
Message:

attempts to reduce memory footprint : allocate only 30 idx entries per pass on Image index; pass -update flag to relphot_client -update-objects; change relphot_client -update mode ot relphot_client -update-catalogs; modification of the mosaic time range to match image time range

Location:
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/BrightCatalog.c

    r33483 r33503  
    635635    if (catalogs->Ncatalog >= catalogs->NCATALOG) {
    636636      catalogs->NCATALOG += D_NCATALOG;
    637       D_NCATALOG = MAX(2000, 2*D_NCATALOG);
    638637
    639638      // fprintf (stderr, "realloc catalogs->catalog: old: %llx  ", (long long) catalogs->catalog);
     
    652651
    653652      int j;
    654       for (j = catalogs->NCATALOG - 16; j < catalogs->NCATALOG; j++) {
     653      for (j = catalogs->NCATALOG - D_NCATALOG; j < catalogs->NCATALOG; j++) {
    655654        dvo_catalog_init (&catalogs->catalog[j], TRUE);
    656655        catalogs->catIDs[j] = 0;
     
    663662        ALLOCATE (catalogs->catalog[j].secfilt,  SecFilt,     catalogs->NAVERAGE[j]*Nsecfilt);
    664663      }
     664      D_NCATALOG = MAX(2000, 2*D_NCATALOG);
    665665    }
    666666  }
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/ImageOps.c

    r33406 r33503  
    154154    for (i = 0; i < Nimage; i++) {
    155155      N_onImage[i] = 0;
    156       N_ONIMAGE[i] = 100;
     156      N_ONIMAGE[i] = 30;
    157157      ALLOCATE (ImageToCatalog[i], off_t, N_ONIMAGE[i]);
    158158      ALLOCATE (ImageToMeasure[i], off_t, N_ONIMAGE[i]);
     
    288288
    289289    if (N_onImage[idx] == N_ONIMAGE[idx]) {
    290       N_ONIMAGE[idx] += 100;
     290      N_ONIMAGE[idx] += 30;
    291291      REALLOCATE (ImageToCatalog[idx], off_t, N_ONIMAGE[idx]);
    292292      REALLOCATE (ImageToMeasure[idx], off_t, N_ONIMAGE[idx]);
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/MosaicOps.c

    r33481 r33503  
    527527  {
    528528    Image *image = getimage(idx);
    529     unsigned int imageStart = image[0].tzero - MAX(0.01*image[0].trate*image[0].NY, 1);
     529    // XXX we are now matching with just tzero.  be careful for cameras with drift
     530    // unsigned int imageStart = image[0].tzero - MAX(0.01*image[0].trate*image[0].NY, 1);
     531    unsigned int imageStart = image[0].tzero;
    530532    if (imageStart != mosaic[mosID].start) {
    531533      fprintf (stderr, "error in image to mosaic match\n");
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/args.c

    r33472 r33503  
    349349    remove_argument (N, &argc, argv);
    350350  }
    351   if ((N = get_argument (argc, argv, "-update"))) {
     351  if ((N = get_argument (argc, argv, "-update-catalogs"))) {
    352352    if (MODE) {
    353       fprintf (stderr, "ERROR: cannot use both -load and -update options!\n");
     353      fprintf (stderr, "ERROR: cannot mix modes (-load, -update-catalogs, -update-objects)\n");
    354354      relphot_client_usage();
    355355    }
     
    361361  if ((N = get_argument (argc, argv, "-update-objects"))) {
    362362    if (MODE) {
    363       fprintf (stderr, "ERROR: cannot mix modes (-load, -update, -update-objects)\n");
     363      fprintf (stderr, "ERROR: cannot mix modes (-load, -update-catalogs, -update-objects)\n");
    364364      relphot_client_usage();
    365365    }
     
    451451  } 
    452452
     453  UPDATE = FALSE;
     454  if ((N = get_argument (argc, argv, "-update"))) {
     455    remove_argument (N, &argc, argv);
     456    UPDATE = TRUE;
     457  }
     458
    453459  UPDATE_CATFORMAT = NULL;
    454460  if ((N = get_argument (argc, argv, "-update-catformat"))) {
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c

    r33480 r33503  
    143143
    144144    char command[1024];
    145     snprintf (command, 1024, "relphot_client %s -update %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -D CAMERA %s -D STAR_TOOFEW %d -minerror %f",
     145    snprintf (command, 1024, "relphot_client %s -update-catalogs %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -D CAMERA %s -D STAR_TOOFEW %d -minerror %f",
    146146              PhotcodeList, imageFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, CAMERA, STAR_TOOFEW, MIN_ERROR);
    147147
    148     // options & configs which affect relphot_client -update 
     148    // options & configs which affect relphot_client -update-catalogs
    149149    // VERBOSE, VERBOSE2
    150150    // RESET
     
    159159    if (VERBOSE2)         { snprintf (tmpline, 1024, "%s -vv",                  command);                                         strcpy (command, tmpline); }
    160160    if (RESET)            { snprintf (tmpline, 1024, "%s -reset",               command);                                         strcpy (command, tmpline); }
     161    if (UPDATE)           { snprintf (tmpline, 1024, "%s -update",              command);                                         strcpy (command, tmpline); }
    161162    if (!KEEP_UBERCAL)    { snprintf (tmpline, 1024, "%s -reset-ubercal",       command);                                         strcpy (command, tmpline); }
    162163    if (UPDATE_CATFORMAT) { snprintf (tmpline, 1024, "%s -update-catformat %s", command, UPDATE_CATFORMAT);                       strcpy (command, tmpline); }
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot_objects.c

    r33480 r33503  
    150150    if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
    151151    if (RESET)         { snprintf (tmpline, 1024, "%s -reset",          command);                    strcpy (command, tmpline); }
     152    if (UPDATE)        { snprintf (tmpline, 1024, "%s -update",         command);                    strcpy (command, tmpline); }
    152153    if (!KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -reset-ubercal",  command);                    strcpy (command, tmpline); }
    153154
Note: See TracChangeset for help on using the changeset viewer.