IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7757


Ignore:
Timestamp:
Jun 29, 2006, 10:47:55 AM (20 years ago)
Author:
eugene
Message:

fixed up focus

Location:
trunk/ppImage/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppFocus.c

    r7749 r7757  
    4040        // Image Arithmetic Loop
    4141        // XXX ppFocus REQUIRES photom: for it to be true?
     42        //
    4243        if (!ppImageLoop(config, options)) {
    4344            psErrorStackPrint(stderr, "");
     
    5859
    5960    // Cleaning up
     61    psFree (focus);
     62    psFree (fwhm);
    6063    ppImageCleanup(config, NULL);
    6164    return EXIT_SUCCESS;
  • trunk/ppImage/src/ppFocusFitFWHM.c

    r7738 r7757  
    77    psPolynomial1D *poly = psPolynomial1DAlloc (PS_POLYNOMIAL_ORD, 2);
    88
    9     psVectorFitPolynomial1D (poly, NULL, 0, fwhm, NULL, focus);
     9    poly = psVectorFitPolynomial1D (poly, NULL, 0, fwhm, NULL, focus);
     10    if (!poly) {
     11        psError (PS_ERR_UNKNOWN, false, "failed to fit focus/fwhm trend; invalid image data?");
     12        return false;
     13    }
    1014
    1115    if (poly->coeff[2] <= 0.0) {
     
    1923    psLogMsg ("ppFocus", 3, "fwhm @ min: %f\n", psPolynomial1DEval (poly, minFocus));
    2024   
     25    psFree (poly);
    2126    return true;
    2227}
  • trunk/ppImage/src/ppFocusGetFWHM.c

    r7749 r7757  
    3737
    3838                // get average FWHM
    39                 // XXX one option is to use the PSF model to determine the FWHM somewhere
    40                 # if 0
    41                 psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF");
    42                 if (psf == NULL) continue;
    43                 # endif
    44 
    45                 // in this example, we use the supplied PSPHOT.HEADER data in which FWHM_X,Y are supplied
     39                // psphotReadout writes the FWHM values into the PSPHOT.HEADER table
     40                // the source of this value depends on the psphot options.
     41                // - if breakPoint is set to PEAKS, the value will not be defined
     42                // - if breakPoint is set to MOMENTS, the PSFSTAR moments are used
     43                // - in all other cases, the psf model is used
    4644                header = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.HEADER");
    4745                if (header == NULL) {
     
    6361    FWHM = FWHMsum / FWHMnum;
    6462
    65     // FOCUS = pmConcepts (&status, input->fpa, "FOCUS");
    66     FOCUS = 0;
     63    FOCUS = psMetadataLookupF32 (&status, input->fpa->concepts, "FPA.FOCUS");
    6764
    6865    fwhm->data.F32[fwhm->n] = FWHM;
Note: See TracChangeset for help on using the changeset viewer.