Changeset 7677 for trunk/ppImage/src/ppTest.c
- Timestamp:
- Jun 23, 2006, 5:33:37 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppTest.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppTest.c
r7494 r7677 11 11 // ppImageConfig.c 12 12 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 13 pmConfig *config = pmConfigRead( &argc, argv);13 pmConfig *config = pmConfigRead(argc, argv); 14 14 if (! config) { 15 15 psErrorStackPrint(stderr, "Can't find site configuration!\n"); … … 27 27 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-chip", 0, "Chip number to process (if positive)", -1); 28 28 29 if (! psArgumentParse(config->arguments, & argc,argv) || argc != 3) {29 if (! psArgumentParse(config->arguments, &config->argc, config->argv) || argc != 3) { 30 30 printf("\nPan-STARRS Phase 2 processing\n\n"); 31 printf("Usage: %s INPUT.fits OUTPUT.fits\n\n", argv[0]);31 printf("Usage: %s INPUT.fits OUTPUT.fits\n\n", config->argv[0]); 32 32 psArgumentHelp(config->arguments); 33 33 psFree(config->arguments); … … 36 36 37 37 // Add the input and output images (which remain on the command-line) to the arguments list 38 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-input", 0, "Name of the input image", argv[1]); 39 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", argv[2]); 38 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-input", 0, "Name of the input image", 39 config->argv[1]); 40 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", 41 config->argv[2]); 40 42 41 43 // Define database handle, if used … … 103 105 pmFPAview *mosaicView = pmFPAviewAlloc(0); 104 106 pmFPAAddSourceFromView(mosaicFPA, mosaicView, mosaicFormat); 107 psFree(mosaicView); 105 108 #endif 106 109 … … 110 113 #if 0 111 114 psArray *chips = fpa->chips; 112 //pmFPAWrite(fpa, outFile, NULL, false);115 pmFPAWrite(fpa, outFile, NULL, false, false); 113 116 for (int i = 0; i < chips->n; i++) { 117 printf("Chip %d\n", i); 114 118 pmChip *chip = chips->data[i]; 119 pmChipRead(chip, inFile, NULL); 120 #if 0 115 121 //pmChipRead(chip, inFile, NULL); 116 122 //pmChipWrite(chip, outFile, NULL, false); … … 129 135 psFree(readout); 130 136 } 131 pmChipMosaic(mosaicFPA->chips->data[0], chip); 137 #endif 138 pmChipMosaic(mosaicFPA->chips->data[i], chip); 139 pmChipWrite(mosaicFPA->chips->data[i], outFile, NULL, true, true); 140 pmChipFreeData(chip); 141 pmChipFreeData(mosaicFPA->chips->data[i]); 132 142 } 133 143 #endif 134 144 145 #if 1 135 146 pmFPAMosaic(mosaicFPA, fpa); 136 137 #if 1138 147 pmFPAWrite(mosaicFPA, outFile, NULL, true, true); 139 pmFPAPrint(stdout, mosaicFPA, true, true);148 //pmFPAPrint(stdout, mosaicFPA, true, true); 140 149 psFree(mosaicCamera); 141 150 psFree(mosaicFormat); 142 151 psFree(mosaicView); 143 psFree(mosaicFPA);152 //psFree(mosaicFPA); 144 153 #endif 145 154
Note:
See TracChangeset
for help on using the changeset viewer.
