Changeset 12526
- Timestamp:
- Mar 21, 2007, 1:29:55 PM (19 years ago)
- Location:
- trunk/pswarp/src
- Files:
-
- 6 edited
-
pswarpCleanup.c (modified) (1 diff)
-
pswarpDataLoad.c (modified) (1 diff)
-
pswarpDefine.c (modified) (2 diffs)
-
pswarpMatchRange.c (modified) (5 diffs)
-
pswarpParseCamera.c (modified) (2 diffs)
-
pswarpTransformReadout_Opt.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpCleanup.c
r12505 r12526 11 11 pmConceptsDone (); 12 12 pmConfigDone (); 13 fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "pswarp");14 //fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "pswarp");13 // fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "pswarp"); 14 fprintf (stderr, "found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "pswarp"); 15 15 16 16 return; -
trunk/pswarp/src/pswarpDataLoad.c
r12523 r12526 24 24 pmFPAfile *astrom = psMetadataLookupPtr (NULL, config->files, "PSWARP.ASTROM"); 25 25 if (!astrom) { 26 fprintf (stderr, "*** using header astrometry\n");27 26 astrom = input; 28 27 } -
trunk/pswarp/src/pswarpDefine.c
r12523 r12526 18 18 } 19 19 20 // open the full skycell file; no need to defer different depths 20 // open the full skycell file; no need to defer different depths. only load the header data 21 // XXX force fileLevel and view to be chip. is this right? 22 // skycell->type = PM_FPA_FILE_HEADER; 23 // skycell->fileLevel = PM_FPA_LEVEL_CHIP; 21 24 pmFPAview *view = pmFPAviewAlloc (0); 22 25 pmFPAfileOpen (skycell, view, config); … … 49 52 return false; 50 53 } 54 // output->fileLevel = PM_FPA_LEVEL_CHIP; 51 55 52 56 pmFPAfileCreate(output, view, config); 57 58 # if 0 59 // XXX This function should only load the skycell headers and create the output based 60 // on that file. I'm going to ask paul to look into this 61 pmFPACopyStructure (output->fpa, skycell->fpa, 1, 1); 62 63 // XXX can I just create the needed readout? 64 // create the needed readouts 65 for (int i = 0; i < output->fpa->chips->n; i++) { 66 pmChip *chip = output->fpa->chips->data[i]; 67 for (int j = 0; j < chip->cells->n; j++) { 68 pmCell *cell = chip->cells->data[j]; 69 pmReadout *readout; 70 if (cell->readouts->n == 0) { 71 readout = pmReadoutAlloc (cell); 72 } 73 bool mdok1 = false; 74 bool mdok2 = false; 75 pmHDU *hdu = pmHDUGetLowest (output->fpa, chip, cell); 76 int Nx = psMetadataLookupS32(&mdok1, hdu->header, "NAXIS1"); // Trim section 77 int Ny = psMetadataLookupS32(&mdok2, hdu->header, "NAXIS2"); // Trim section 78 if (!mdok1 || !mdok2) { 79 psError(PS_ERR_IO, true, "NAXIS1 or NAXIS2 not set --- unable to create output image.\n"); 80 return false; 81 } 82 readout->image = psImageAlloc (Nx, Ny, PS_TYPE_F32); 83 psFree (readout); 84 } 85 } 86 # endif 53 87 54 88 psFree (view); -
trunk/pswarp/src/pswarpMatchRange.c
r12523 r12526 8 8 psPlaneTransformApply (srcFP, fpaSrc->fromTPA, srcTP); \ 9 9 psPlaneTransformApply (srcPix, chipSrc->fromFPA, srcFP); \ 10 fprintf (stderr, "%6.1f,%6.1f -> ", srcPix->x, srcPix->y); \11 10 *minX = PS_MIN (*minX, srcPix->x); \ 12 11 *minY = PS_MIN (*minY, srcPix->y); \ 13 12 *maxX = PS_MAX (*maxX, srcPix->x); \ 14 *maxY = PS_MAX (*maxY, srcPix->y); \ 15 fprintf (stderr, "%4d,%4d - %4d,%4d\n", *minX, *minY, *maxX, *maxY); 13 *maxY = PS_MAX (*maxY, srcPix->y); 16 14 17 15 // we are warping from src to dest. find the max overlapping pixels in the INPUT (src) … … 37 35 *maxX = src->image->col0; 38 36 *maxY = src->image->row0; 39 fprintf (stderr, "%4d,%4d - %4d,%4d\n", *minX, *minY, *maxX, *maxY);40 37 41 38 // XXX save these as static for speed? … … 88 85 89 86 // demo forward and backward transformation 87 # if (0) 90 88 srcPix->x = *minX; 91 89 srcPix->y = *minY; … … 96 94 psPlaneTransformApply (destFP, fpaDest->fromTPA, destTP); 97 95 psPlaneTransformApply (destPix, chipDest->fromFPA, destFP); 98 99 96 fprintf (stderr, "%f,%f -> %f,%f ", srcPix->x, srcPix->y, destPix->x, destPix->y); 100 97 … … 105 102 psPlaneTransformApply (srcFP, fpaSrc->fromTPA, srcTP); 106 103 psPlaneTransformApply (srcPix, chipSrc->fromFPA, srcFP); 107 108 104 fprintf (stderr, "-> %f,%f ", srcPix->x, srcPix->y); 105 # endif 109 106 110 107 psFree (srcPix); -
trunk/pswarp/src/pswarpParseCamera.c
r12505 r12526 19 19 pmFPAfileDefineFromArgs (&status, config, "PSWARP.ASTROM", "ASTROM"); 20 20 if (status) { 21 fprintf (stderr, "using supplied astrometry\n");21 psLogMsg ("pswarp", 3, "using supplied astrometry\n"); 22 22 } else { 23 fprintf (stderr, "using header astrometry\n");23 psLogMsg ("pswarp", 3, "using header astrometry\n"); 24 24 } 25 25 26 26 // the mask is not required - but must conform to input camera 27 27 if (!pmFPAfileBindFromArgs (NULL, input, config, "PSWARP.MASK", "MASK")) { 28 fprintf (stderr, "no mask supplied\n");28 psLogMsg ("pswarp", 3, "no mask supplied\n"); 29 29 } 30 30 31 31 if (!pmFPAfileBindFromArgs (NULL, input, config, "PSWARP.WEIGHT", "WEIGHT")) { 32 fprintf (stderr, "no weight supplied\n");32 psLogMsg ("pswarp", 3, "no weight supplied\n"); 33 33 } 34 34 … … 42 42 43 43 // these calls bind the I/O handle to the specified fpa 44 // NOTE: output file could be binned relative to sky cell... 45 // if (!pmFPAfileDefineFromFPA (skyConfig, skycell->fpa, 1, 1, "PSWARP.OUTPUT")) { 44 46 if (!pmFPAfileDefineOutput (skyConfig, skycell->fpa, "PSWARP.OUTPUT")) { 45 47 psError(PSWARP_ERR_CONFIG, false, "Failed to build FPA from PSWARP.OUTPUT"); -
trunk/pswarp/src/pswarpTransformReadout_Opt.c
r12523 r12526 37 37 // XXX need to modify the grid based on this result and force the maxError < XXX 38 38 double maxError = pswarpMapGridMaxError (grid); 39 fprintf (stderr, "maximum error using this grid sampling: %f\n", maxError);39 psLogMsg ("pswarp", 3, "maximum error using this grid sampling: %f\n", maxError); 40 40 41 41 pswarpMapGridSetGrid (grid, minX, minY, &gridX, &gridY);
Note:
See TracChangeset
for help on using the changeset viewer.
