IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33229


Ignore:
Timestamp:
Feb 10, 2012, 7:28:13 AM (14 years ago)
Author:
eugene
Message:

fixing "update" function names

Location:
branches/eam_branches/ipp-20111122/Ohana/src/uniphot
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/Makefile

    r33228 r33229  
    5353$(SRC)/match_zpts_to_images.$(ARCH).o       \
    5454$(SRC)/match_flatcorr_to_images.$(ARCH).o           \
     55$(SRC)/update_dvo_setphot.$(ARCH).o \
    5556$(SRC)/update_catalog_setphot.$(ARCH).o \
    5657$(SRC)/SetSignals.$(ARCH).o         \
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/include/uniphot.h

    r33228 r33229  
    134134Image        *load_images_setphot    PROTO((FITS_DB *db, off_t *Nimage));
    135135int           match_zpts_to_images   PROTO((Image *image, off_t Nimage, ZptTable *zpts, int Nzpts));
    136 int           update_setphot         PROTO((Image *image, off_t Nimage, FlatCorrectionTable *flatcorr));
     136int           update_dvo_setphot     PROTO((Image *image, off_t Nimage, FlatCorrectionTable *flatcorr));
    137137void          update_catalog_setphot PROTO((Catalog *catalog, Image *image, off_t *index, off_t Nimage, FlatCorrectionTable *flatcorr));
    138138
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/setphot.c

    r33180 r33229  
    4141  }
    4242
    43   update_setphot(image, Nimage, &flatcorrTable);
     43  update_dvo_setphot (image, Nimage, &flatcorrTable);
    4444
    4545  // write image table
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_catalog_setphot.c

    r33169 r33229  
    11# include "uniphot.h"
    22# include <glob.h>
    3 
    4 int update_setphot (Image *image, off_t Nimage, FlatCorrectionTable *flatcorr) {
    5 
    6   SkyRegion UserPatch;
    7   SkyTable *sky = NULL;
    8   SkyList *skylist = NULL;
    9   Catalog catalog;
    10   off_t i, maxID, *index;
    11 
    12   // create an index for the image IDs
    13   maxID = 0;
    14   for (i = 0; i < Nimage; i++) {
    15     maxID = MAX(maxID, image[i].imageID);
    16   }
    17   ALLOCATE (index, off_t, maxID + 1);
    18   for (i = 0; i < Nimage; i++) {
    19     if (!image[i].imageID) continue; // images with ID == 0 are virtual
    20     index[image[i].imageID] = i;
    21   }
    22  
    23 
    24   // load the current sky table (layout of all SkyRegions)
    25   sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, TRUE, SKY_DEPTH, VERBOSE);
    26   SkyTableSetFilenames (sky, CATDIR, "cpt");
    27  
    28   // determine the populated SkyRegions overlapping the requested area (default depth)
    29   UserPatch.Rmin = 0;
    30   UserPatch.Rmax = 360;
    31   UserPatch.Dmin = -90;
    32   UserPatch.Dmax = +90;
    33   skylist = SkyListByPatch (sky, -1, &UserPatch);
    34 
    35   // update measurements for each populated catalog
    36   for (i = 0; i < skylist[0].Nregions; i++) {
    37 
    38     // set up the basic catalog info
    39     catalog.filename  = skylist[0].filename[i];
    40     catalog.catformat = dvo_catalog_catformat (CATFORMAT);    // set the default catformat from config data
    41     catalog.catmode   = dvo_catalog_catmode (CATMODE);        // set the default catmode from config data
    42     catalog.catflags  = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
    43     catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
    44 
    45     if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "w")) {
    46       fprintf (stderr, "ERROR: failure reading catalog %s\n", catalog.filename);
    47       exit (1);
    48     }
    49     if (!catalog.Naves_disk) {
    50       if (VERBOSE) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
    51       dvo_catalog_unlock (&catalog);
    52       dvo_catalog_free (&catalog);
    53       continue;
    54     }
    55 
    56     update_catalog_setphot (&catalog, image, index, Nimage, flatcorr);
    57 
    58     if (!UPDATE) {
    59       dvo_catalog_unlock (&catalog);
    60       dvo_catalog_free (&catalog);
    61       continue;
    62     }
    63    
    64     if (VERBOSE) fprintf (stderr, "saving catalog %s\n", catalog.filename);
    65    
    66     dvo_catalog_save (&catalog, VERBOSE);
    67     dvo_catalog_unlock (&catalog);
    68     dvo_catalog_free (&catalog);
    69   }
    70   return (TRUE);
    71 }     
    723
    734void update_catalog_setphot (Catalog *catalog, Image *image, off_t *index, off_t Nimage, FlatCorrectionTable *flatcorr) {
Note: See TracChangeset for help on using the changeset viewer.