Changeset 19475 for trunk/ppStack/src/ppStackLoop.c
- Timestamp:
- Sep 10, 2008, 2:59:24 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackLoop.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackLoop.c
r19411 r19475 771 771 } 772 772 773 psThreadPoolFinalize(); 774 773 775 memDump("final"); 774 776 … … 786 788 // Close up 787 789 bool wcsDone = false; // Have we done the WCS? 790 psList *fpaList = psListAlloc(NULL); // List of input FPAs, for concept averaging 791 psList *cellList = psListAlloc(NULL); // List of input cells, for concept averaging 792 float totExposure = 0.0; // Total exposure time 788 793 for (int i = 0; i < num; i++) { 789 794 if (!inputMask->data.U8[i]) { 790 795 continue; 791 796 } 797 ppStackThread *thread = stack->threads->data[0]; // Representative stack 798 pmReadout *inRO = thread->readouts->data[i]; // Template readout 799 if (!inRO) { 800 continue; 801 } 802 float exposure = psMetadataLookupF32(NULL, inRO->parent->concepts, "CELL.EXPOSURE"); // Exposure time 803 if (!isfinite(exposure)) { 804 psWarning("CELL.EXPOSURE not set for readout %d", i); 805 } else { 806 totExposure += exposure; 807 } 808 809 psListAdd(cellList, PS_LIST_TAIL, inRO->parent); 810 psListAdd(fpaList, PS_LIST_TAIL, inRO->parent->parent->parent); 811 792 812 if (!wcsDone) { 793 813 // Copy astrometry over 794 814 wcsDone = true; 795 ppStackThread *thread = stack->threads->data[0]; // Representative stack796 pmReadout *inRO = thread->readouts->data[i]; // Template readout797 815 if (inRO) { 798 816 pmHDU *inHDU = pmHDUFromCell(inRO->parent); // Template HDU … … 838 856 psFree(weightNames); 839 857 858 // Copy concepts 859 pmCell *outCell = outRO->parent; // Output cell 860 pmChip *outChip = outCell->parent; // Output chip 861 pmFPA *outFPA = outChip->parent; // Output FPA 862 psMetadataAddF32(outCell->concepts, PS_LIST_TAIL, "CELL.EXPOSURE", PS_META_REPLACE, 863 "Summed exposure time (sec)", totExposure); 864 psMetadataAddF32(outFPA->concepts, PS_LIST_TAIL, "FPA.EXPOSURE", PS_META_REPLACE, 865 "Summed exposure time (sec)", totExposure); 866 867 pmConceptsAverageFPAs(outFPA, fpaList); 868 pmConceptsAverageCells(outCell, cellList, NULL, NULL, true); 869 psFree(fpaList); 870 psFree(cellList); 871 840 872 psFree(inputMask); 841 873 psFree(stack);
Note:
See TracChangeset
for help on using the changeset viewer.
