IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16593


Ignore:
Timestamp:
Feb 21, 2008, 6:48:35 PM (18 years ago)
Author:
bills
Message:

Various updates and additions

Location:
trunk/pstamp/src
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/src

    • Property svn:ignore
      •  

        old new  
        11ppstamp
         2pstampparse
         3pstamprequest
        24Makefile
        35Makefile.in
  • trunk/pstamp/src/.cvsignore

    r16239 r16593  
    11ppstamp
     2pstampparse
     3pstamprequest
    24Makefile
    35Makefile.in
  • trunk/pstamp/src/Makefile.am

    r16132 r16593  
    1 bin_PROGRAMS = ppstamp pstamprequest pstampparse
     1bin_PROGRAMS = ppstamp pstamprequest pstampparse pstampfinish
    22
    33noinst_HEADERS = \
     
    77ppstamp_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS)
    88pstamprequest_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS)
    9 #pstampparse_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS)  $(IPPDB_CFLAGS)
    109pstampparse_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS)
     10pstampfinish_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(IPPDB_CFLAGS)
    1111
    1212# $(PSASTRO_CFLAGS) $(PPSTATS_CFLAGS) $(ppstamp_CFLAGS)
     
    1414ppstamp_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
    1515pstamprequest_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
    16 #pstampparse_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(IPPDB_LIBS)
    17 pstampparse_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
     16pstampparse_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)
     17pstampfinish_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(IPPDB_LIBS)
    1818
    1919ppstamp_SOURCES = \
     
    3838        pstampparse.c
    3939
     40pstampfinish_SOURCES = \
     41        pstampfinish.c
     42
     43
    4044clean-local:
    4145        -rm -f TAGS
  • trunk/pstamp/src/ppstampMakeStamp.c

    r16239 r16593  
    426426    PS_ASSERT_PTR_NON_NULL(hdu->header, 1)
    427427
     428    // for some reason these are getting initialized to garbag
     429    input->fpa->fromTPA = 0;
     430    input->fpa->toTPA = 0;
     431    input->fpa->toSky = 0;
     432    chip->toFPA = 0;
     433    chip->fromFPA = 0;
     434
    428435    if (!pmAstromReadWCS(input->fpa, chip, hdu->header, 1.0)) {
    429436        // we can live without WCS if the ROI is specified in pixels
  • trunk/pstamp/src/ppstampParseCamera.c

    r16132 r16593  
    5555    }
    5656
     57    // TODO: only do the workaround if the file level is chip, skycells should be fine
    5758    if (!strcmp(config->cameraName, "MEGACAM")) {
    5859        // workaround bug 986 and related
  • trunk/pstamp/src/pstamp.h

    r16239 r16593  
    3636#define STAMP_REQUEST_VERSION "1.0"
    3737
     38#define STAMP_RESULTS_EXTNAME "PS1_PS_RESULTS"
     39#define STAMP_RESULTS_VERSION "1.0"
     40
    3841#endif
  • trunk/pstamp/src/pstampparse.c

    r16278 r16593  
    1111    pmConfig    *config;
    1212    psString    fileName;
     13    psString    outputDirectory;
    1314    psMetadata  *md;
    1415    psString    roiString;
     
    8889    if ((argnum = psArgumentGet(argc, argv, "-simple"))) {
    8990        options->simple = true;
     91        psArgumentRemove(argnum, &argc, argv);
     92    }
     93    if ((argnum = psArgumentGet(argc, argv, "-out_dir"))) {
     94        psArgumentRemove(argnum, &argc, argv);
     95        if (argnum == argc) {
     96            fprintf(stderr, "value required for out_dir\n");
     97            usage();
     98        }
     99        options->outputDirectory = argv[argnum];
    90100        psArgumentRemove(argnum, &argc, argv);
    91101    }
     
    538548static psArray * parseByCoord(pspOptions *options)
    539549{
    540     psError(PS_ERR_UNKNOWN, true, "REQ_TYPE: bycoord not implemented yet");
     550    psError(PSTAMP_ERR_NOT_IMPLEMENTED, true, "REQ_TYPE: bycoord not implemented yet");
    541551    return NULL;
    542552}
     
    591601    psString cmd = NULL;
    592602
    593     psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -uri %s -outputBase %s -args '%s' >/dev/null",
    594                                 options->req_id, uri, outputBase, commandArgs);
     603    psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -uri %s -outputBase ", options->req_id, uri);
     604   
     605    if (options->outputDirectory) {
     606        psStringAppend(&cmd, "%s/", options->outputDirectory);
     607    }
     608   
     609    psStringAppend(&cmd, "%s -args '%s' >/dev/null", outputBase, commandArgs);
     610
    595611    if (options->verbose) {
    596612        fprintf(stderr, "excuting system(%s)\n", cmd);
  • trunk/pstamp/src/pstamprequest.c

    r16239 r16593  
    371371    table->data[0] = options->md;
    372372
    373     psFitsWriteTable(fitsFile, NULL, table, STAMP_REQUEST_EXTNAME);
    374 
    375     psFitsClose(fitsFile);
     373    if (!psFitsWriteTable(fitsFile, NULL, table, STAMP_REQUEST_EXTNAME)) {
     374        psError(PS_ERR_IO, false, "failed to write fits table");
     375        return false;
     376    }
     377
     378    if (!  psFitsClose(fitsFile)) {
     379        psError(PS_ERR_IO, false, "failed to close fits table");
     380        return false;
     381    }
    376382
    377383    return true;
     
    415421    }
    416422
    417 //    psMetadataPrint(stderr, options->md, 0);
     423    // psMetadataPrint(stderr, options->md, 0);
    418424
    419425    if (writeTable(options)) {
    420426        return 0;
    421427    } else {
     428        psErrorStackPrint(stderr, "failed to create request table");
    422429        // XXX: we should have variable status codes that indicate what the problem was
    423430        return 1;
Note: See TracChangeset for help on using the changeset viewer.