IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40574 for trunk


Ignore:
Timestamp:
Dec 5, 2018, 11:39:29 AM (8 years ago)
Author:
eugene
Message:

add option to accept motions from incoming dvo database; respect -region in avextract, mextract, avperiodogram

Location:
trunk/Ohana/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvomerge/src/Shutdown.c

    r24745 r40574  
    44int Shutdown (char *format, ...) { 
    55  va_list argp;
    6   char *formatplus;
     6  char formatplus[1024];
    77 
    8   ALLOCATE (formatplus, char, strlen(format) + 2);
    9   strcpy (formatplus, format);
    10   strcat (formatplus, "\n");
     8  snprintf (formatplus, 1024, "%s\n", format);
    119
    1210  va_start (argp, format);
    1311  vfprintf (stderr, formatplus, argp);
    14   free (formatplus);
    1512  va_end (argp);
    1613
  • trunk/Ohana/src/dvomerge/src/args.c

    r40377 r40574  
    112112    remove_argument (N, argc, argv);
    113113    ACCEPT_MOTION = TRUE;
    114     remove_argument (N, argc, argv);
    115114  }
    116115
     
    330329    remove_argument (N, argc, argv);
    331330    ACCEPT_MOTION = TRUE;
    332     remove_argument (N, argc, argv);
    333331  }
    334332
  • trunk/Ohana/src/dvomerge/src/merge_catalogs_old.c

    r40377 r40574  
    386386    // we can choose to accept the proper-motion and parallax from the reference tgtcat
    387387    if (ACCEPT_MOTION) {
    388       output[0].average[Nave].dR         = input[0].average[N].dR;
    389       output[0].average[Nave].dD         = input[0].average[N].dD;
    390       output[0].average[Nave].uR         = input[0].average[N].uR;
    391       output[0].average[Nave].uD         = input[0].average[N].uD;
    392       output[0].average[Nave].duR        = input[0].average[N].duR;
    393       output[0].average[Nave].duD        = input[0].average[N].duD;
    394       output[0].average[Nave].P          = input[0].average[N].P;
    395       output[0].average[Nave].dP         = input[0].average[N].dP;
    396       output[0].average[Nave].Tmean      = input[0].average[N].Tmean;
     388      output[0].average[n].dR         = input[0].average[N].dR;
     389      output[0].average[n].dD         = input[0].average[N].dD;
     390      output[0].average[n].uR         = input[0].average[N].uR;
     391      output[0].average[n].uD         = input[0].average[N].uD;
     392      output[0].average[n].duR        = input[0].average[N].duR;
     393      output[0].average[n].duD        = input[0].average[N].duD;
     394      output[0].average[n].P          = input[0].average[N].P;
     395      output[0].average[n].dP         = input[0].average[N].dP;
     396      output[0].average[n].Tmean      = input[0].average[N].Tmean;
    397397    }
    398398
  • trunk/Ohana/src/libdvo/src/dbCmdlineFields.c

    r34088 r40574  
    125125  // get the ra,dec limits...
    126126  if (selection->useDisplay) {
    127     return (TRUE);
     127    // return (TRUE);
    128128    // XXX fix this: be more careful with the projection & limits
    129129
     
    134134    }
    135135   
     136    double Radius = MAX (fabs(graphsky.xmax), fabs(graphsky.ymax));
     137    Dmin = graphsky.coords.crval2 - Radius;
     138    Dmax = graphsky.coords.crval2 + Radius;
     139   
     140    if ((Dmin <= -89) || (Dmax >= 89)) {
     141      Rmin = 0;
     142      Rmax = 360;
     143    } else {
     144      double Rmod = MAX (Radius / (cos(Dmin*RAD_DEG)), Radius / (cos(Dmax*RAD_DEG)));
     145      Rmin = graphsky.coords.crval1 - Rmod;
     146      Rmax = graphsky.coords.crval1 + Rmod;
     147    }
    136148    // XXX the ra and dec range depend on the projection.
    137149    // XXX this is wrong...
    138150    // int status;
    139     XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);
    140     XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);
     151    // XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);
     152    // XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);
    141153  }
    142154
  • trunk/Ohana/src/opihi/cmd.data/write_vectors.c

    r40291 r40574  
    271271    gprint (GP_ERR, "      J : 4 byte int\n");   
    272272    gprint (GP_ERR, "      K : 8 byte int\n");   
    273     gprint (GP_ERR, "      D : 4 byte float\n");   
    274     gprint (GP_ERR, "      E : 8 byte float\n");   
     273    gprint (GP_ERR, "      E : 4 byte float\n");   
     274    gprint (GP_ERR, "      D : 8 byte float\n");   
    275275    gprint (GP_ERR, "   -h : this help listing\n");
    276276    gprint (GP_ERR, "   --h : this help listing\n");
  • trunk/Ohana/src/opihi/dvo/avextract.c

    r39574 r40574  
    137137  // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results
    138138  if (PARALLEL && !HOST_ID) {
     139
     140    if (!SetSkyRegions (selection)) {
     141      FreeSkyRegionSelection (selection);
     142      dbFreeFields (fields, Nfields);
     143      dvo_catalog_free (&catalog);
     144      goto help;
     145    }
     146
    139147    int status = HostTableParallelOps (skylist, argc, argv, RESULT_FILE, TRUE, 0, VERBOSE);
    140148
  • trunk/Ohana/src/opihi/dvo/avperiodogram.c

    r40408 r40574  
    5151  // the result files are left behind for the user to access (no automatic re-merge)
    5252  if (PARALLEL && !HOST_ID) {
     53
     54    // check for -region and apply to current sky region
     55    if (!SetSkyRegions (selection)) {
     56      FreeSkyRegionSelection (selection);
     57      dbFreeFields (fields, Nfields);
     58      goto help;
     59    }
     60
    5361    int status = HostTableParallelOps (skylist, argc, argv, NULL, FALSE, 0, VERBOSE);
    5462    SkyListFree (skylist);
  • trunk/Ohana/src/opihi/dvo/mextract.c

    r39569 r40574  
    143143  // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results
    144144  if (PARALLEL && !HOST_ID) {
     145
     146    // check for -region and apply to current sky region
     147    if (!SetSkyRegions (selection)) {
     148      FreeSkyRegionSelection (selection);
     149      dbFreeFields (fields, Nfields);
     150      dvo_catalog_free (&catalog);
     151      goto help;
     152    }
    145153
    146154    // Image Metadata for remote queries:
  • trunk/Ohana/src/opihi/lib.shell/parse.c

    r40330 r40574  
    291291    val = dvomath (1, &L, &size, -1);
    292292    if (val == NULL) {
     293      gprint (GP_ERR, "cannot evaluate expression in brackets: %s\n", L);
    293294      print_error ();
    294295      goto error;
Note: See TracChangeset for help on using the changeset viewer.