IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41163


Ignore:
Timestamp:
Nov 27, 2019, 11:13:56 AM (7 years ago)
Author:
eugene
Message:

support changed API to WriteVectorTableFITS; remove some cruft from images command; add cimages command to fill in images with a color

Location:
trunk/Ohana/src/opihi/dvo
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/Makefile

    r40523 r41163  
    6767$(SRC)/gstar.$(ARCH).o                  \
    6868$(SRC)/hosts.$(ARCH).o          \
     69$(SRC)/cimages.$(ARCH).o                \
    6970$(SRC)/images.$(ARCH).o         \
    7071$(SRC)/imbox.$(ARCH).o                  \
  • trunk/Ohana/src/opihi/dvo/avextract.c

    r40574 r41163  
    272272  // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
    273273  if (RESULT_FILE && !SKIP_RESULTS) {
    274     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, FALSE, NULL, 0);
     274    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", NULL, vec, Nreturn, FALSE, FALSE, NULL, 0);
    275275    if (!status) {
    276276      goto escape;
  • trunk/Ohana/src/opihi/dvo/avmatch.c

    r40523 r41163  
    114114
    115115      CoordsFile = abspath("coords.fits", 1024);
    116       int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, FALSE, NULL, 0);
     116      int status = WriteVectorTableFITS (CoordsFile, "COORDS", NULL, vec, 2, FALSE, FALSE, NULL, 0);
    117117      if (!status) goto escape;
    118118    }
     
    301301      vec[i][0].Nelements = Nfound;
    302302    }
    303     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nfields + 1, FALSE, FALSE, NULL, 0);
     303    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", NULL, vec, Nfields + 1, FALSE, FALSE, NULL, 0);
    304304    free (vec[Nfields]->elements.Int);
    305305    free (vec[Nfields]);
  • trunk/Ohana/src/opihi/dvo/avperiodomatch.c

    r40523 r41163  
    9999
    100100      CoordsFile = abspath("coords.fits", 1024);
    101       int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, FALSE, NULL, 0);
     101      int status = WriteVectorTableFITS (CoordsFile, "COORDS", NULL, vec, 2, FALSE, FALSE, NULL, 0);
    102102      if (!status) goto escape;
    103103      free (vec);
  • trunk/Ohana/src/opihi/dvo/avselect.c

    r40575 r41163  
    132132
    133133      CoordsFile = abspath("coords.fits", 1024);
    134       int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, FALSE, NULL, 0);
     134      int status = WriteVectorTableFITS (CoordsFile, "COORDS", NULL, vec, 2, FALSE, FALSE, NULL, 0);
    135135      if (!status) goto escape;
    136136    }
     
    327327      vec[NfieldsOut-1] = RADvec;
    328328    }
    329     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, NfieldsOut, FALSE, FALSE, NULL, 0);
     329    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", NULL, vec, NfieldsOut, FALSE, FALSE, NULL, 0);
    330330    if (!status) goto escape;
    331331  }
  • trunk/Ohana/src/opihi/dvo/dvo_host_utils.c

    r40549 r41163  
    233233  // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
    234234  if (ResultFile) {
    235     int status = WriteVectorTableFITS (ResultFile, "RESULT", vec, Nvec, FALSE, FALSE, NULL, 0);
     235    int status = WriteVectorTableFITS (ResultFile, "RESULT", NULL, vec, Nvec, FALSE, FALSE, NULL, 0);
    236236    if (!status) {
    237237      gprint (GP_ERR, "failed to write result file %s\n", ResultFile);
  • trunk/Ohana/src/opihi/dvo/images.c

    r40165 r41163  
    1212
    1313  off_t i, Nimage, Nmosaic;
    14   int j, status, InPic, leftside, *plist, TimeSelect, ByName;
     14  int j, status, InPic, leftside, TimeSelect, ByName;
     15  // int *plist, n, npts; -- what is/was plist?
    1516  int WITH_MOSAIC, SOLO_MOSAIC;
    1617  time_t tzero, tend;
    17   int N, NPTS, n, npts, Npts, kapa, *foundMosaic;
     18  int n, N, NPTS, Npts, kapa, *foundMosaic;
    1819  Vector Xvec, Yvec;
    1920  double r[8], d[8], x[8], y[8], Rmin, Rmax, Rmid, trange, Radius;
     
    148149  int TrianglePts  = wordhash ("TRI-");
    149150
    150   npts = NPTS = 200;
     151  // npts = 200
     152  NPTS = 200;
    151153  SetVector (&Xvec, OPIHI_FLT, NPTS);
    152154  SetVector (&Yvec, OPIHI_FLT, NPTS);
     
    154156  Image *mosaic = NULL;
    155157
    156   ALLOCATE (plist, int, NPTS);
    157   n = N = 0;
     158  /******** stage 1 : find the images to plot *********/
     159
     160  // ALLOCATE (plist, int, NPTS);
     161  n = 0; // tracks number of images
     162  N = 0; // tracks number of vertices
    158163  for (i = 0; i < Nimage; i++) {
    159164    if (ByName && strncmp (image[i].name, name, strlen(name))) continue;
     
    335340    if (!InPic) continue;
    336341
    337     plist[n] = i;
    338     n++;
    339     if (n > npts - 1) {
    340       npts += 200;
    341       REALLOCATE (plist, int, npts);
    342     }
    343     N+=2*Npts;
     342    // plist[n] = i;
     343    // n++;
     344    // if (n > npts - 1) {
     345    //   npts += 200;
     346    //   REALLOCATE (plist, int, npts);
     347    // }
     348    n ++;
     349    N += 2*Npts;
    344350    if (N + 16 >= NPTS) {  /* need to leave room for 8 point image */
    345351      NPTS += 400;
  • trunk/Ohana/src/opihi/dvo/init.c

    r40523 r41163  
    1414int catdir_define   PROTO((int, char **));
    1515int ccd             PROTO((int, char **));
     16int cimages         PROTO((int, char **));
    1617int cmatch          PROTO((int, char **));
    1718int cmd             PROTO((int, char **));
     
    8081  {1, "catdir",      catdir_define,"re-define CATDIR"},
    8182//  {1, "ccd",         ccd,          "plot color-color diagram"},
     83  {1, "cimages",     cimages,      "fill image boxes with a color"},
    8284  {1, "cmatch",      cmatch,       "match two catalogs"},
    8385//  {1, "cmd",         cmd,          "plot cmd of stars in current region"},
  • trunk/Ohana/src/opihi/dvo/mextract.c

    r40574 r41163  
    352352  // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
    353353  if (RESULT_FILE && !SKIP_RESULTS) {
    354     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, FALSE, NULL, 0);
     354    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", NULL, vec, Nreturn, FALSE, FALSE, NULL, 0);
    355355    if (!status) goto escape;
    356356  }
  • trunk/Ohana/src/opihi/dvo/mmatch.c

    r40523 r41163  
    148148      // XXX this is now set for both cases...
    149149      CoordsFile = abspath("coords.fits", 1024);
    150       int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, FALSE, NULL, 0);
     150      int status = WriteVectorTableFITS (CoordsFile, "COORDS", NULL, vec, 2, FALSE, FALSE, NULL, 0);
    151151      if (!status) goto escape;
    152152    }
     
    349349      vec[Nfields-1] = IDXvec;
    350350    }
    351     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nfields, FALSE, FALSE, NULL, 0);
     351    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", NULL, vec, Nfields, FALSE, FALSE, NULL, 0);
    352352    if (!status) goto escape;
    353353  }
Note: See TracChangeset for help on using the changeset viewer.