IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33657


Ignore:
Timestamp:
Apr 1, 2012, 3:10:26 PM (14 years ago)
Author:
eugene
Message:

use SkyTableFilename to get filename

Location:
trunk/Ohana/src/dvomerge
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvomerge/include/dvomerge.h

    r29938 r33657  
    1616# include <arpa/inet.h>
    1717# include <glob.h>
    18 
    19 # define myAbort(MSG) { fprintf (stderr, "%s\n", MSG); abort(); }
    20 # define myAssert(LOGIC,MSG) { if (!(LOGIC)) { fprintf (stderr, "%s\n", MSG); abort(); } }
    2118
    2219int    VERBOSE;
  • trunk/Ohana/src/dvomerge/src/args.c

    r29938 r33657  
    1414  if ((N = get_argument (*argc, argv, "-photcode-file"))) {
    1515    remove_argument (N, argc, argv);
    16     ALTERNATE_PHOTCODE_FILE = strdup(argv[N]);
     16    ALTERNATE_PHOTCODE_FILE = strcreate(argv[N]);
    1717    remove_argument (N, argc, argv);
    1818  }
  • trunk/Ohana/src/dvomerge/src/dvoconvert.c

    r29938 r33657  
    100100
    101101  // save the output sky table copy
    102   sprintf (filename, "%s/SkyTable.fits", output);
    103   check_file_access (filename, TRUE, TRUE, VERBOSE);
    104   if (!SkyTableSave (outsky, filename)) {
     102  char *skyfile = SkyTableFilename (output);
     103  check_file_access (skyfile, TRUE, TRUE, VERBOSE);
     104  if (!SkyTableSave (outsky, skyfile)) {
    105105    fprintf (stderr, "ERROR: failed to save sky table for %s\n", output);
    106106    exit (1);
  • trunk/Ohana/src/dvomerge/src/dvomergeContinue.c

    r29938 r33657  
    150150
    151151  // save the output sky table copy
    152   sprintf (filename, "%s/SkyTable.fits", output);
    153   check_file_access (filename, TRUE, TRUE, VERBOSE);
    154   if (!SkyTableSave (outsky, filename)) {
     152  char *skyfile = SkyTableFilename (output);
     153  check_file_access (skyfile, TRUE, TRUE, VERBOSE);
     154  if (!SkyTableSave (outsky, skyfile)) {
    155155    fprintf (stderr, "ERROR: failed to save sky table for %s\n", output);
    156156    exit (1);
  • trunk/Ohana/src/dvomerge/src/dvomergeContinue_threaded.c

    r29938 r33657  
    277277
    278278  // save the output sky table copy
    279   sprintf (filename, "%s/SkyTable.fits", output);
    280   check_file_access (filename, TRUE, TRUE, VERBOSE);
    281   if (!SkyTableSave (outsky, filename)) {
     279  char *skyfile = SkyTableFilename  (output);
     280  check_file_access (skyfile, TRUE, TRUE, VERBOSE);
     281  if (!SkyTableSave (outsky, skyfile)) {
    282282    fprintf (stderr, "ERROR: failed to save sky table for %s\n", output);
    283283    exit (1);
  • trunk/Ohana/src/dvomerge/src/dvomergeCreate.c

    r31173 r33657  
    183183
    184184  // save the output sky table copy
    185   sprintf (filename, "%s/SkyTable.fits", output);
    186   check_file_access (filename, TRUE, TRUE, VERBOSE);
    187   if (!SkyTableSave (outsky, filename)) {
     185  char *skyfile = SkyTableFilename (output);
     186  check_file_access (skyfile, TRUE, TRUE, VERBOSE);
     187  if (!SkyTableSave (outsky, skyfile)) {
    188188    fprintf (stderr, "ERROR: failed to save sky table for %s\n", output);
    189189    exit (1);
  • trunk/Ohana/src/dvomerge/src/dvomergeUpdate.c

    r29938 r33657  
    33int dvomergeUpdate (int argc, char **argv) {
    44
    5   int depth, CONTINUE;
    6   off_t i, j, Ns, Ne;
     5  int CONTINUE;
     6  off_t i, j;
    77  SkyTable *outsky, *insky;
    88  SkyList *outlist, *inlist;
     
    101101  // loop over the populatable output tables; check for data in input in the corresponding regions
    102102
    103   SkyListPopulatedRange (&Ns, &Ne, inlist, 0);
    104   depth = inlist[0].regions[Ns][0].depth;
     103  // XXX this is not really used...
     104  // SkyListPopulatedRange (&Ns, &Ne, inlist, 0);
     105  // depth = inlist[0].regions[Ns][0].depth;
    105106 
    106107  SetPhotcodeTable(NULL);
     
    126127    // compare to a slightly reduced footprint
    127128    float dPos = 2.0/3600.0;
    128     outlist = SkyListByBounds (outsky, depth, inlist[0].regions[i][0].Rmin + dPos, inlist[0].regions[i][0].Rmax - dPos, inlist[0].regions[i][0].Dmin + dPos, inlist[0].regions[i][0].Dmax - dPos);
     129    outlist = SkyListByBounds (outsky, inlist[0].regions[i][0].depth, inlist[0].regions[i][0].Rmin + dPos, inlist[0].regions[i][0].Rmax - dPos, inlist[0].regions[i][0].Dmin + dPos, inlist[0].regions[i][0].Dmax - dPos);
    129130    for (j = 0; j < outlist[0].Nregions; j++) {
    130131      if (VERBOSE) fprintf (stderr, "output : %s\n", outlist[0].regions[j][0].name);
     
    158159
    159160  // save the output sky table copy
    160   sprintf (filename, "%s/SkyTable.fits", output);
    161   check_file_access (filename, TRUE, TRUE, VERBOSE);
    162   if (!SkyTableSave (outsky, filename)) {
     161  char *skyfile = SkyTableFilename (output);
     162  check_file_access (skyfile, TRUE, TRUE, VERBOSE);
     163  if (!SkyTableSave (outsky, skyfile)) {
    163164    fprintf (stderr, "ERROR: failed to save sky table for %s\n", output);
    164165    exit (1);
  • trunk/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c

    r29938 r33657  
    6161    // compare to a slightly reduced footprint
    6262    float dPos = 2.0/3600.0;
     63    // XXX probably need to use threadData->region->depth
    6364    outlist = SkyListByBounds (threadData->outsky, threadData->depth, threadData->region->Rmin + dPos, threadData->region->Rmax - dPos, threadData->region->Dmin + dPos, threadData->region->Dmax - dPos);
    6465    for (j = 0; (j < outlist[0].Nregions) && (threadData->state != TS_FAIL); j++) {
     
    277278
    278279  // save the output sky table copy
    279   sprintf (filename, "%s/SkyTable.fits", output);
    280   check_file_access (filename, TRUE, TRUE, VERBOSE);
    281   if (!SkyTableSave (outsky, filename)) {
     280  char *skyfile = SkyTableFilename (output);
     281  check_file_access (skyfile, TRUE, TRUE, VERBOSE);
     282  if (!SkyTableSave (outsky, skyfile)) {
    282283    fprintf (stderr, "ERROR: failed to save sky table for %s\n", output);
    283284    exit (1);
  • trunk/Ohana/src/dvomerge/src/dvorepairCPT.c

    r29938 r33657  
    11# include "dvomerge.h"
    2 
    3 # define myAbort(MSG) { fprintf (stderr, "%s\n", MSG); abort(); }
    4 # define myAssert(LOGIC,MSG) { if (!(LOGIC)) { fprintf (stderr, "%s\n", MSG); abort(); } }
    52
    63// broken cpt file, valid cpm file: we can recover everything in the cpt file from the cpm file:
  • trunk/Ohana/src/dvomerge/src/dvorepairImageVsMeasure.c

    r29938 r33657  
    11# include "dvomerge.h"
    2 
    3 # define myAbort(MSG) { fprintf (stderr, "%s\n", MSG); abort(); }
    4 # define myAssert(LOGIC,MSG) { if (!(LOGIC)) { fprintf (stderr, "%s\n", MSG); abort(); } }
    52
    63// find images which are missing detections:
  • trunk/Ohana/src/dvomerge/src/dvoverify.c

    r31450 r33657  
    8484
    8585    // check the skytable
    86     sprintf (filename, "%s/SkyTable.fits", catdir);
    87     if (!VerifyTableFile (filename)) {
     86    char *skyfile = SkyTableFilename (catdir);
     87    if (!VerifyTableFile (skyfile)) {
    8888      Nbad ++;
    8989    }
Note: See TracChangeset for help on using the changeset viewer.