Changeset 24244 for branches/cnb_branches/cnb_branch_20090301/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- May 26, 2009, 1:59:32 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/psModules
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/psModules/src/imcombine/pmSubtraction.c
r21470 r24244 822 822 psFree(mask); 823 823 824 // XXX raise an error? 825 if (isnan(stats->sampleMean)) { 826 psFree(stats); 827 return -1; 828 } 829 824 830 double mean, rms; // Mean and RMS of deviations 825 831 if (numStamps < MIN_SAMPLE_STATS) { … … 849 855 float limit = sigmaRej * rms; // Limit on maximum deviation 850 856 psTrace("psModules.imcombine", 1, "Deviation limit: %f\n", limit); 857 858 859 psString ds9name = NULL; // Filename for ds9 region file 860 static int ds9num = 0; // File number for ds9 region file 861 psStringAppend(&ds9name, "stamps_reject_%d.ds9", ds9num); 862 FILE *ds9 = pmSubtractionStampsFile(stamps, ds9name, "rejected stamps"); 863 psFree(ds9name); 864 ds9num++; 851 865 852 866 int numRejected = 0; // Number of stamps rejected … … 872 886 } 873 887 } 888 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "red"); 874 889 875 890 // Set stamp for replacement … … 897 912 numGood++; 898 913 newMean += deviations->data.F32[i]; 914 pmSubtractionStampPrint(ds9, stamp->x, stamp->y, stamps->footprint, "green"); 899 915 } 900 916 } 901 917 } 902 918 newMean /= numGood; 919 920 if (ds9) { 921 fclose(ds9); 922 } 903 923 904 924 if (numRejected > 0) { … … 1385 1405 } 1386 1406 1407 // Data exists on the outputs now 1408 if (out1) { 1409 out1->data_exists = true; 1410 if (out1->parent) { 1411 out1->parent->data_exists = out1->parent->parent->data_exists = true; 1412 } 1413 } 1414 if (out2) { 1415 out2->data_exists = true; 1416 if (out2->parent) { 1417 out2->parent->data_exists = out2->parent->parent->data_exists = true; 1418 } 1419 } 1420 1421 1387 1422 psLogMsg("psModules.imcombine", PS_LOG_INFO, "Convolve image: %f sec", 1388 1423 psTimerClear("pmSubtractionConvolve"));
Note:
See TracChangeset
for help on using the changeset viewer.
