IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2009, 3:11:32 PM (17 years ago)
Author:
eugene
Message:

check in changes from genes development branch : extensive changes to moments calculation, psf model generation, aperture residuals

Location:
trunk/psModules/src/camera
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPARead.c

    r24792 r25754  
    387387                psFree(regionString);
    388388                psFree(readout);
     389                psFree(iter);
    389390                return false;
    390391            }
  • trunk/psModules/src/camera/pmHDUGenerate.c

    r24769 r25754  
    611611            if (cells->n == 0) {
    612612                // Nothing to do
     613                psFree (cells);
    613614                return true;
    614615            }
     
    660661            if (cells->n == 0) {
    661662                // Nothing to do
     663                psFree (cells);
    662664                return true;
    663665            }
     
    707709            if (cells->n == 0) {
    708710                // Nothing to do
     711                psFree (cells);
    709712                return true;
    710713            }
    711 
    712             return generateHDU(hdu, cells);
     714           
     715            bool status = generateHDU(hdu, cells);
     716            psFree (cells);
     717            return status;
    713718        }
    714719    default:
  • trunk/psModules/src/camera/pmReadoutFake.c

    r25738 r25754  
    9797                continue;
    9898            }
     99            // check that all params are valid:
     100            bool validParams = true;
     101            for (int n = 0; validParams && (n < normModel->params->n); n++) {
     102                if (n == PM_PAR_SKY) continue;
     103                if (n == PM_PAR_I0) continue;
     104                if (n == PM_PAR_XPOS) continue;
     105                if (n == PM_PAR_YPOS) continue;
     106                if (!isfinite(normModel->params->data.F32[n])) validParams = false;
     107            }
     108            if (!validParams) {
     109                psFree(normModel);
     110                continue;
     111            }           
    99112            if (circularise && !circulariseModel(normModel)) {
    100113                psError(PS_ERR_UNKNOWN, false, "Unable to circularise PSF model.");
     
    112125            continue;
    113126        }
     127        // check that all params are valid:
     128        bool validParams = true;
     129        for (int n = 0; validParams && (n < fakeModel->params->n); n++) {
     130            if (n == PM_PAR_SKY) continue;
     131            if (n == PM_PAR_I0) continue;
     132            if (n == PM_PAR_XPOS) continue;
     133            if (n == PM_PAR_YPOS) continue;
     134            if (!isfinite(fakeModel->params->data.F32[n])) validParams = false;
     135        }
     136        if (!validParams) {
     137            psFree(fakeModel);
     138            continue;
     139        }               
    114140        if (circularise && !circulariseModel(fakeModel)) {
    115141            psError(PS_ERR_UNKNOWN, false, "Unable to circularise PSF model.");
Note: See TracChangeset for help on using the changeset viewer.