IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35249


Ignore:
Timestamp:
Mar 6, 2013, 4:00:16 PM (13 years ago)
Author:
eugene
Message:

trying to set up remote image metadata

Location:
branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/dvo_client.c

    r33963 r35249  
    3939    remove_argument (N, argc, argv);
    4040  }
     41  if (!HOST_ID) {
     42    fprintf (stderr, "ERROR: dvo_client requires a -hostID value\n");
     43    exit (3);
     44  }
    4145
    4246  HOSTDIR = NULL;
     
    4549    HOSTDIR = strcreate (argv[N]);;
    4650    remove_argument (N, argc, argv);
     51  }
     52  if (!HOSTDIR) {
     53    fprintf (stderr, "ERROR: dvo_client requires a -hostdir value\n");
     54    exit (3);
    4755  }
    4856
  • branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mextract.c

    r35246 r35249  
    11# include "dvoshell.h"
    2 
    3 int SaveImageMetadata () {
    4 
    5 }
    62
    73int field_needs_images (dbField *field) {
     
    2016    if (field->ID == MEAS_CENTER_OFFSET)  return TRUE; // 0.5*NX, 0.5*NY
    2117    if (field->ID == MEAS_EXPNAME_AS_INT) return TRUE; // expname (or as int)
    22     mean airmass;
     18    if (field->ID == MEAS_AIRMASS)        return TRUE; // airmass
    2319    return FALSE;
    2420}
     
    5652    remove_argument (N, &argc, argv);
    5753    VERBOSE = TRUE;
     54  }
     55
     56  char *imageMetadataFile = FALSE;
     57  if ((N = get_argument (argc, argv, "-image-metadata"))) {
     58    remove_argument (N, &argc, argv);
     59    imageMetadataFile = strcreate (argv[N]);
     60    remove_argument (N, &argc, argv);
    5861  }
    5962
     
    8992
    9093  // init locally static variables (time refs)
    91   dbExtractMeasuresInit();
     94  // HOST_ID tells library if operation is on remote client or not
     95  dbExtractMeasuresInit(HOST_ID);
    9296
    9397  // command-line is of the form: mextract field,field, field [where (field op value)...]
     
    149153
    150154      char *filename = abspath("image.metadata.fits", DVO_MAX_PATH);
    151       SaveImageMetadata (filename, image, Nimage);
     155      ImageMetadataSave (filename, image, Nimage);
    152156      argc += 2;
    153157      argv[argc-2] = strcreate ("-image-metadata");
     
    171175  }
    172176
    173   if (REMOTE_CLIENT) {
    174     if (loadImages) {
    175       ImageMetadata = *imageMetadata = LoadImageMetadata (filename, &Nimages);
    176       if (!imageMetadata) goto escape;
    177       SetImageMetadata (imageMetadata, Nimages);
    178   } else {
    179     if (loadImages && !SetImageSelection (TRUE, selection)) goto escape;
     177  if (loadImages) {
     178    if (HOST_ID) {
     179      if (!SetImageMetadataSelection (imageMetadataFile)) goto escape;
     180    } else {
     181      if (!SetImageSelection (TRUE, selection)) goto escape;
     182    }
    180183  }
    181184
     
    294297  free (stack);
    295298  FreeImageSelection ();
     299  FreeImageMetadataSelection ();
    296300  SkyListFree (skylist);
    297301  FreeSkyRegionSelection (selection);
     
    307311  free (stack);
    308312  FreeImageSelection ();
     313  FreeImageMetadataSelection ();
    309314  SkyListFree (skylist);
    310315  FreeSkyRegionSelection (selection);
  • branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mmatch.c

    r35244 r35249  
    7373
    7474  // init locally static variables (time refs)
    75   dbExtractMeasuresInit();
     75  // HOST_ID tells library if operation is on remote client or not
     76  dbExtractMeasuresInit(HOST_ID);
    7677
    7778  // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results
  • branches/eam_branches/ipp-20130306/Ohana/src/opihi/dvo/mmextract.c

    r35244 r35249  
    4646 
    4747  // init locally static variables (time refs)
    48   dbExtractMeasuresInit();
     48  dbExtractMeasuresInit(HOST_ID);
    4949
    5050  // parse skyregion options
Note: See TracChangeset for help on using the changeset viewer.