Changeset 16593
- Timestamp:
- Feb 21, 2008, 6:48:35 PM (18 years ago)
- Location:
- trunk/pstamp/src
- Files:
-
- 1 added
- 8 edited
-
. (modified) (1 prop)
-
.cvsignore (modified) (1 diff)
-
Makefile.am (modified) (4 diffs)
-
ppstampMakeStamp.c (modified) (1 diff)
-
ppstampParseCamera.c (modified) (1 diff)
-
pstamp.h (modified) (1 diff)
-
pstampfinish.c (added)
-
pstampparse.c (modified) (4 diffs)
-
pstamprequest.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/src
- Property svn:ignore
-
old new 1 1 ppstamp 2 pstampparse 3 pstamprequest 2 4 Makefile 3 5 Makefile.in
-
- Property svn:ignore
-
trunk/pstamp/src/.cvsignore
r16239 r16593 1 1 ppstamp 2 pstampparse 3 pstamprequest 2 4 Makefile 3 5 Makefile.in -
trunk/pstamp/src/Makefile.am
r16132 r16593 1 bin_PROGRAMS = ppstamp pstamprequest pstampparse 1 bin_PROGRAMS = ppstamp pstamprequest pstampparse pstampfinish 2 2 3 3 noinst_HEADERS = \ … … 7 7 ppstamp_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) 8 8 pstamprequest_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) 9 #pstampparse_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(IPPDB_CFLAGS)10 9 pstampparse_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) 10 pstampfinish_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(IPPDB_CFLAGS) 11 11 12 12 # $(PSASTRO_CFLAGS) $(PPSTATS_CFLAGS) $(ppstamp_CFLAGS) … … 14 14 ppstamp_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) 15 15 pstamprequest_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) 16 #pstampparse_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(IPPDB_LIBS) 17 pstamp parse_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS)16 pstampparse_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) 17 pstampfinish_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(IPPDB_LIBS) 18 18 19 19 ppstamp_SOURCES = \ … … 38 38 pstampparse.c 39 39 40 pstampfinish_SOURCES = \ 41 pstampfinish.c 42 43 40 44 clean-local: 41 45 -rm -f TAGS -
trunk/pstamp/src/ppstampMakeStamp.c
r16239 r16593 426 426 PS_ASSERT_PTR_NON_NULL(hdu->header, 1) 427 427 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 428 435 if (!pmAstromReadWCS(input->fpa, chip, hdu->header, 1.0)) { 429 436 // we can live without WCS if the ROI is specified in pixels -
trunk/pstamp/src/ppstampParseCamera.c
r16132 r16593 55 55 } 56 56 57 // TODO: only do the workaround if the file level is chip, skycells should be fine 57 58 if (!strcmp(config->cameraName, "MEGACAM")) { 58 59 // workaround bug 986 and related -
trunk/pstamp/src/pstamp.h
r16239 r16593 36 36 #define STAMP_REQUEST_VERSION "1.0" 37 37 38 #define STAMP_RESULTS_EXTNAME "PS1_PS_RESULTS" 39 #define STAMP_RESULTS_VERSION "1.0" 40 38 41 #endif -
trunk/pstamp/src/pstampparse.c
r16278 r16593 11 11 pmConfig *config; 12 12 psString fileName; 13 psString outputDirectory; 13 14 psMetadata *md; 14 15 psString roiString; … … 88 89 if ((argnum = psArgumentGet(argc, argv, "-simple"))) { 89 90 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]; 90 100 psArgumentRemove(argnum, &argc, argv); 91 101 } … … 538 548 static psArray * parseByCoord(pspOptions *options) 539 549 { 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"); 541 551 return NULL; 542 552 } … … 591 601 psString cmd = NULL; 592 602 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 595 611 if (options->verbose) { 596 612 fprintf(stderr, "excuting system(%s)\n", cmd); -
trunk/pstamp/src/pstamprequest.c
r16239 r16593 371 371 table->data[0] = options->md; 372 372 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 } 376 382 377 383 return true; … … 415 421 } 416 422 417 //psMetadataPrint(stderr, options->md, 0);423 // psMetadataPrint(stderr, options->md, 0); 418 424 419 425 if (writeTable(options)) { 420 426 return 0; 421 427 } else { 428 psErrorStackPrint(stderr, "failed to create request table"); 422 429 // XXX: we should have variable status codes that indicate what the problem was 423 430 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.
