--- ray/src/util/rttree_reduce.c 2017/05/31 03:26:46 2.17 +++ ray/src/util/rttree_reduce.c 2020/05/11 20:26:12 2.19 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rttree_reduce.c,v 2.17 2017/05/31 03:26:46 greg Exp $"; +static const char RCSid[] = "$Id: rttree_reduce.c,v 2.19 2020/05/11 20:26:12 greg Exp $"; #endif /* * A utility called by genBSDF.pl to reduce tensor tree samples and output @@ -19,8 +19,8 @@ int log2g = 4; /* log2 of grid resolution */ int infmt = 'a'; /* input format ('a','f','d') */ double pctcull = 95.; /* target culling percentile */ -#define dval3(ix,ox,oy) datarr[((((ix)<vmax - (tp)->vmin) / \ +#define var_measure(tp) sqrt( ((tp)->vmax - (tp)->vmin) / \ (sqrt((tp)->vavg) + .03) ) #define above_threshold(tp) (var_measure(tp) > tthresh)