IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21299


Ignore:
Timestamp:
Feb 4, 2009, 2:51:37 PM (17 years ago)
Author:
Paul Price
Message:

Attempt to propagate covariances.

Location:
branches/pap_branch_20090128/ppStack/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_20090128/ppStack/src/ppStackLoop.c

    r21236 r21299  
    411411    psList *fpaList = psListAlloc(NULL); // List of input FPAs, for concept averaging
    412412    psList *cellList = psListAlloc(NULL); // List of input cells, for concept averaging
     413    psArray *covariances = psArrayAlloc(num); // Covariance matrices
    413414    for (int i = 0; i < num; i++) {
    414415        psTrace("ppStack", 2, "Convolving input %d of %d to target PSF....\n", i, num);
     
    425426            psFree(fpaList);
    426427            psFree(cellList);
     428            psFree(covariances);
    427429            return false;
    428430        }
     
    444446            psFree(fpaList);
    445447            psFree(cellList);
     448            psFree(covariances);
    446449            return false;
    447450        }
     
    457460            continue;
    458461        }
     462        covariances->data[i] = psMemIncrRefCounter(readout->covariance);
    459463
    460464        if (stats) {
     
    492496            psFree(fpaList);
    493497            psFree(cellList);
     498            psFree(covariances);
    494499            return false;
    495500        }
     
    511516        psFree(fpaList);
    512517        psFree(cellList);
     518        psFree(covariances);
    513519        return false;
    514520    }
     
    558564            psFree(matchChi2);
    559565            psFree(values);
     566            psFree(covariances);
    560567            return false;
    561568        }
     
    599606        psFree(inputMask);
    600607        psFree(matchChi2);
     608        psFree(covariances);
    601609        return false;
    602610    }
     
    632640            psFree(matchChi2);
    633641            psFree(cells);
     642            psFree(covariances);
    634643            return false;
    635644        }
     
    645654            psFree(matchChi2);
    646655            psFree(cells);
     656            psFree(covariances);
    647657            return false;
    648658        }
     
    663673            psFree(outRO);
    664674            psFree(cells);
     675            psFree(covariances);
    665676            return false;
    666677        }
     
    682693                psFree(view);
    683694                psFree(outRO);
     695                psFree(covariances);
    684696                return false;
    685697            }
     
    708720                psFree(view);
    709721                psFree(outRO);
     722                psFree(covariances);
    710723                return false;
    711724            }
     
    722735            psFree(view);
    723736            psFree(outRO);
     737            psFree(covariances);
    724738            return false;
    725739        }
     
    789803                psFree(inspect);
    790804                psFree(rejected);
     805                psFree(covariances);
    791806                return false;
    792807            }
     
    804819            psFree(inspect);
    805820            psFree(rejected);
     821            psFree(covariances);
    806822            return false;
    807823        }
     
    898914            psFree(view);
    899915            psFree(outRO);
     916            psFree(covariances);
    900917            return false;
    901918        }
     
    926943                psFree(view);
    927944                psFree(outRO);
     945                psFree(covariances);
    928946                return false;
    929947            }
     
    947965                psFree(view);
    948966                psFree(outRO);
     967                psFree(covariances);
    949968                return false;
    950969            }
     
    959978            psFree(view);
    960979            psFree(outRO);
     980            psFree(covariances);
    961981            return false;
    962982        }
     
    964984
    965985    memDump("final");
     986
     987    // Sum covariance matrices
     988    for (int i = 0; i < num; i++) {
     989        if (inputMask->data.U8[i]) {
     990            psFree(covariances->data[i]);
     991            covariances->data[i] = NULL;
     992        }
     993    }
     994    outRO->covariance = psImageCovarianceSum(covariances);
     995    psFree(covariances);
    966996
    967997    if (stats) {
  • branches/pap_branch_20090128/ppStack/src/ppStackMatch.c

    r21236 r21299  
    580580    psFree(bg);
    581581
     582#if 0
     583
    582584#define RADIUS 10                       // Radius of photometry
    583585#define MIN_ERR 0.05                    // Minimum photometric error, mag
     
    632634    psFree(ratio);
    633635    psFree(ratioMask);
     636#endif
    634637
    635638#ifdef TESTING
Note: See TracChangeset for help on using the changeset viewer.