Skip to content

Commit

Permalink
restore branch entropy blending values
Browse files Browse the repository at this point in the history
Restores values to those set in commit 8a00a23 (see there for the rationale)
  • Loading branch information
jameshadfield committed Mar 24, 2020
1 parent 55a8535 commit 8d0edd2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/util/colorHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ export const calcNodeColor = (tree, colorScale) => {
// scale entropy such that higher entropy maps to a grayer less-certain branch
const branchInterpolateColour = "#BBB";
const branchOpacityConstant = 0.6;
const branchOpacityLowerBound = 0.4;
export const branchOpacityFunction = scalePow()
.exponent([0.3])
.domain([0, 1])
.range([branchOpacityLowerBound, 1])
.exponent([0.6])
.domain([0, 2.0])
.range([0.4, 1])
.clamp(true);


// entropy calculation precomputed in augur
// export const calcEntropyOfValues = (vals) =>
// vals.map((v) => v * Math.log(v + 1E-10)).reduce((a, b) => a + b, 0) * -1 / Math.log(vals.length);
Expand Down

0 comments on commit 8d0edd2

Please sign in to comment.