Skip to content

Commit d18cf4a

Browse files
authored
Merge pull request #135 from danschef/specadjust-mods
Add some debug output to the spectral harmonization.
2 parents b3a8efe + dfe0aae commit d18cf4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/higher-level/spec-adjust-hl.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int spectral_predict(ard_t ard, small *mask_, int nc, int sid);
4343
#define _SPECHOMO_N_SIM_ 10 // max. number of close clusters to be used for kNN
4444
#define _SPECHOMO_GOOD_SAM_ 0.0698132 // good clusters are closer than this angle (4°)
4545
#define _SPECHOMO_MEDI_SAM_ 0.2094395 // ok'ish clusters are closer than this angle (12°)
46-
#define _SPECHOMO_POOR_SAM_ 0.2617995 // clusters further away from this angle (15°) should not be uses
46+
#define _SPECHOMO_POOR_SAM_ 0.2617995 // clusters further away from this angle (15°) should not be used
4747
// also used to compute a weight for each cluster
4848
#define _SPECHOMO_MIN_WEIGHT_ 1.0 - _SPECHOMO_GOOD_SAM_/_SPECHOMO_POOR_SAM_
4949
#define _SPECHOMO_MED_WEIGHT_ 1.0 - _SPECHOMO_MEDI_SAM_/_SPECHOMO_POOR_SAM_
@@ -747,13 +747,14 @@ double pred, wpred[_SPECHOMO_N_DST_], wsum;
747747
#ifdef FORCE_DEBUG
748748
printf("\n");
749749
printf("on/off: %d\n", ard.msk[p]);
750+
printf("cluster number: %d\n", s);
750751
printf("ard: ");
751752
for (b=0; b<_SPECHOMO_N_SRC_; b++) printf("%05d ", ard.dat[b_src[b]][p]);
752753
printf("\n");
753754
printf("lib: ");
754755
for (b=0; b<_SPECHOMO_N_SRC_; b++) printf("%05d ", _SPECHOMO_CENTER_[sid][b][s]);
755756
printf("\n");
756-
printf("xx: %.2f, yy: %.2f, xy: %.2f, sam: %.5f, weight: %.5f\n", xx, yy, xy, sam, weight[s]);
757+
printf("xx: %.2f, yy: %.2f, xy: %.2f, sam: %.8f, sam_deg: %.8f, weight: %.8f\n", xx, yy, xy, sam, sam*_R2D_CONV_, weight[s]);
757758
#endif
758759

759760
// maximum weight of close clusters (-1 if no close cluster)

0 commit comments

Comments
 (0)