Commit 2f523d8b authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

index.html, model.js: rename normalization methods, default to 'constant'

parent 1ada9e66
...@@ -218,8 +218,9 @@ ...@@ -218,8 +218,9 @@
<div class="menu_box"> <div class="menu_box">
normalization method</br> normalization method</br>
<div class="buttonSelector" onclick="m.changeNormMethod('quantitative')" ><input type="radio" name="normalize_method" value="quantitative" checked>quantitative</input></div> <div class="buttonSelector" onclick="m.changeNormMethod('constant')" ><input type="radio" name="normalize_method" value="constant" checked >constant</input></div>
<div class="buttonSelector" onclick="m.changeNormMethod('rescale')" ><input type="radio" name="normalize_method" value="rescale" >rescale</input></div> <div class="buttonSelector" onclick="m.changeNormMethod('to-100')" ><input type="radio" name="normalize_method" value="to-100">to 100%</input></div>
</div> </div>
<div class="menu_box"> <div class="menu_box">
......
...@@ -76,7 +76,7 @@ Model.prototype = { ...@@ -76,7 +76,7 @@ Model.prototype = {
this.norm = false; this.norm = false;
this.normalization = { this.normalization = {
"method" : "quantitative", "method" : "constant",
"A" : [], "A" : [],
"B" : 0, "B" : 0,
"id" : -1 "id" : -1
...@@ -730,7 +730,7 @@ Model.prototype = { ...@@ -730,7 +730,7 @@ Model.prototype = {
var A = this.normalization.A[time] /* standard/spike at point time */ var A = this.normalization.A[time] /* standard/spike at point time */
var B = this.normalization.B /* standard/spike expected value */ var B = this.normalization.B /* standard/spike expected value */
if (this.normalization.method=="rescale" || original_size <= A){ if (this.normalization.method=="constant" || original_size <= A){
normalized_size = (original_size * B) / A normalized_size = (original_size * B) / A
}else{ }else{
normalized_size = B + ( (original_size - A) * ( (1 - B) / (1 - A) ) ) normalized_size = B + ( (original_size - A) * ( (1 - B) / (1 - A) ) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment