IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 15, 2009, 3:37:38 PM (17 years ago)
Author:
Paul Price
Message:

Removing debugging parts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_20090108/ppStack/src/ppStackSources.c

    r21118 r21122  
    6767        pmCell *cell = pmFPAviewThisCell(view, file->fpa); // Cell of interest
    6868
    69 #if 1
    70         // Excise bright sources that might be saturated
    71         psArray *sources = sourceLists->data[i]; // Sources for image
    72         for (int j = 0; j < sources->n; j++) {
    73             pmSource *source = sources->data[j]; // Source of interest
    74             if (source && source->psfMag < MIN_MAG) {
    75                 psFree(source);
    76                 sources->data[j] = NULL;
    77             }
    78         }
    79 #endif
    80 
    81 
    82 #if 0
     69#ifdef TESTING
    8370        pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout
    8471        pmPSF *psf = psMetadataLookupPtr(NULL, config->arguments, "PSF.TARGET"); // PSF for fake image
     
    184171                continue;
    185172            }
    186 
    187 #if 1
    188             float x = source->modelPSF->params->data.F32[PM_PAR_XPOS],
    189                 y = source->modelPSF->params->data.F32[PM_PAR_YPOS]; // Coordinates of source
    190             if (x > 2187 && x < 2191 && y > 2280 && y < 2284) {
    191                 fprintf(stderr, "Image %d source: (%f,%f) %f --> %f\n",
    192                         i, x, y, source->psfMag, source->psfMag + magCorr);
    193             }
    194 #endif
    195 
    196173            source->psfMag += magCorr;
    197174        }
    198 
    199 #if 0
    200 // Size of fake image; set by hand because it's trouble to get it from other places
    201         pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout
    202         pmPSF *psf = psMetadataLookupPtr(NULL, config->arguments, "PSF.TARGET"); // PSF for fake image
    203         pmReadoutFakeFromSources(fake, FAKE_COLS, FAKE_ROWS, sources, NULL, NULL, psf, 5, 0, false, true);
    204         psString name = NULL;
    205         psStringAppend(&name, "corrected_%03d.fits", i);
    206         psFits *fits = psFitsOpen(name, "w");
    207         psFree(name);
    208         psFitsWriteImage(fits, NULL, fake->image, 0, NULL);
    209         psFitsClose(fits);
    210         psFree(fake);
    211 #endif
    212 
    213175    }
    214176    psFree(trans);
Note: See TracChangeset for help on using the changeset viewer.