IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34693


Ignore:
Timestamp:
Nov 24, 2012, 4:07:40 PM (14 years ago)
Author:
eugene
Message:

delstar seems to work now for images and measures

Location:
branches/eam_branches/ipp-20120905/Ohana/src/delstar
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905/Ohana/src/delstar/Makefile

    r34686 r34693  
    2929$(SRC)/delete_imagename.$(ARCH).o \
    3030$(SRC)/delete_imagefile.$(ARCH).o \
     31$(SRC)/delete_image_photcodes.$(ARCH).o \
    3132$(SRC)/delete_photcodes.$(ARCH).o \
    3233$(SRC)/delete_times.$(ARCH).o     \
  • branches/eam_branches/ipp-20120905/Ohana/src/delstar/include/delstar.h

    r34690 r34693  
    9393void SortAveMeasMatch (off_t *MEAS, off_t *AVE, off_t N);
    9494
    95 int delete_photcodes (SkyList *skylist, int hostID, char *hostpath);
     95int delete_photcodes (int hostID, char *hostpath);
    9696int delete_photcodes_parallel (SkyList *sky);
    9797int delete_photcodes_catalog (Catalog *catalog, PhotCode **photcodes, int Nphotcodes);
     98int delete_image_photcodes (FITS_DB *db);
  • branches/eam_branches/ipp-20120905/Ohana/src/delstar/src/delete_image_photcodes.c

    r34691 r34693  
    11# include "delstar.h"
    22
    3 void delete_image_photcodes (FITS_DB *db) {
     3int delete_image_photcodes (FITS_DB *db) {
    44
    55  off_t i, j;
    6   off_t  Nimage, Noutimage;
     6  off_t  Nimage;
    77  Image *image;
    88  Image *outimage;
     
    1919
    2020  /* delete the identified images */
    21   int Noutimage = 0;
     21  off_t Noutimage = 0;
    2222  ALLOCATE (outimage, Image, Nimage);
    2323  for (i = 0; i < Nimage; i++) {
     
    3232  free (image);
    3333 
    34   if (VERBOSE) fprintf (stderr, "removing "OFF_T_FMT" images (leaving "OFF_T_FMT" of "OFF_T_FMT")\n",  Noutimage - Nimage, Noutimage, Nimage);
     34  if (VERBOSE) fprintf (stderr, "removing "OFF_T_FMT" images (leaving "OFF_T_FMT" of "OFF_T_FMT")\n",  Nimage - Noutimage, Noutimage, Nimage);
    3535  // gfits_table_set_Image (&db[0].ftable, outimage, Noutimage);
    3636
     
    4040  db[0].ftable.buffer = (char *) outimage;
    4141
    42   dvo_image_save (db, VERBOSE);
    43   dvo_image_unlock (db);
     42  if (!dvo_image_save (db, VERBOSE)) return FALSE;
     43  if (!dvo_image_unlock (db)) return FALSE;
    4444
    45   fprintf (stderr, "SUCCESS\n");
    46   exit (0);
     45  return TRUE;
    4746}
  • branches/eam_branches/ipp-20120905/Ohana/src/delstar/src/delete_photcodes.c

    r34690 r34693  
    11# include "delstar.h"
    22
    3 int delete_photcodes (SkyList *skylist, int hostID, char *hostpath) {
     3int delete_photcodes (int hostID, char *hostpath) {
    44
    55  int i;
    66  Catalog catalog;
     7
     8  // load the current sky table (layout of all SkyRegions)
     9  SkyTable *sky = SkyTableLoadOptimal (CATDIR, NULL, NULL, TRUE, -1, VERBOSE);
     10  if (!sky) {
     11    fprintf (stderr, "ERROR running loading sky table from %s\n", CATDIR);
     12    exit (2);
     13  }
     14  SkyTableSetFilenames (sky, CATDIR, "cpt");
     15
     16  SkyList *skylist = SkyListByPatch (sky, -1, &UserPatch);
     17  if (!skylist) {
     18    fprintf (stderr, "ERROR setting up skylist for %s\n", CATDIR);
     19    exit (2);
     20  }
    721
    822  // launch the remote jobs
  • branches/eam_branches/ipp-20120905/Ohana/src/delstar/src/delstar.c

    r34691 r34693  
    2929      break;
    3030    case MODE_PHOTCODES: {
    31       delete_image_photcodes (&db);
     31      if (!delete_image_photcodes (&db)) exit (1);
    3232
    33       // load the current sky table (layout of all SkyRegions)
    34       SkyTable *sky = SkyTableLoadOptimal (CATDIR, NULL, NULL, TRUE, -1, VERBOSE);
    35       if (!sky) {
    36           fprintf (stderr, "ERROR running loading sky table from %s\n", CATDIR);
    37           exit (2);
     33      if (!delete_photcodes (0, NULL)) {
     34        fprintf (stderr, "failure deleting measurements\n");
     35        exit (1);
    3836      }
    39       SkyTableSetFilenames (sky, CATDIR, "cpt");
    40 
    41       SkyList *skylist = SkyListByPatch (sky, -1, &UserPatch);
    42       if (!skylist) {
    43           fprintf (stderr, "ERROR setting up skylist for %s\n", CATDIR);
    44           exit (2);
    45       }
    46 
    47       delete_photcodes (skylist, 0, NULL);
    48       break;
     37      exit (0);
    4938    }
    5039    case MODE_ORPHAN:
  • branches/eam_branches/ipp-20120905/Ohana/src/delstar/src/delstar_client.c

    r34686 r34693  
    3232      break;
    3333    case MODE_PHOTCODES:
    34       delete_photcodes (skylist, HOST_ID, HOSTDIR);
     34      delete_photcodes (HOST_ID, HOSTDIR);
    3535      break;
    3636    case MODE_ORPHAN:
Note: See TracChangeset for help on using the changeset viewer.