Skip to content

Commit

Permalink
Merge branch 'kirandeol-plankton-updates' into plankton-filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
kirandeol authored May 9, 2024
2 parents 10bbe3c + afbabed commit 0d8e66b
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
var opacityCache = [];
var resetBool = true;


// actual calls
init();
animate();
Expand Down Expand Up @@ -530,6 +531,7 @@
// }



visualFolder.add(GUIparam, 'opacityTuning', 0, 1).name('Opacity').onChange(function(){
opacityTuning = GUIparam.opacityTuning;
updatePtsColor();
Expand Down Expand Up @@ -690,6 +692,7 @@

gui.add(lonController);


if (colorMapBool && dataDirectory === "data/plankton/") {
colorModeList.push("lat", "lon", "t", "s", "H1", "H2", "H3");
colorMapDropDown = visualFolder.add(GUIparam, 'colorMode', colorModeList).name('Color Mode').onChange(function(){
Expand Down Expand Up @@ -2190,6 +2193,127 @@
}
}

if (dataDirectory === "data/plankton/") {
if (planktonTThreshold !== 0){
for (var cutoff = 0; cutoff < planktonTThreshold; cutoff++) {
var pos_point = planktonTFilter[cutoff - 1];
var neg_point = planktonTFilter[-cutoff];

particleColor[ pos_point * 3 ] = 0.0;
particleColor[ pos_point * 3 + 1 ] = 0.0;
particleColor[ pos_point * 3 + 2] = 0.0;
particleOpacity[pos_point] = 0.0;

particleColor[ neg_point * 3 ] = 0.0;
particleColor[ neg_point * 3 + 1 ] = 0.0;
particleColor[ neg_point * 3 + 2] = 0.0;
particleOpacity[neg_point] = 0.0;
}
}
if (planktonSThreshold !== 0) {
for (var cutoff = 0; cutoff < planktonSThreshold; cutoff++) {
var pos_point = planktonSFilter[cutoff - 1];
var neg_point = planktonSFilter[planktonSThreshold.length - cutoff];

particleColor[ pos_point * 3 ] = 0.0;
particleColor[ pos_point * 3 + 1 ] = 0.0;
particleColor[ pos_point * 3 + 2] = 0.0;
particleOpacity[pos_point] = 0.0;

particleColor[ neg_point * 3 ] = 0.0;
particleColor[ neg_point * 3 + 1 ] = 0.0;
particleColor[ neg_point * 3 + 2] = 0.0;
particleOpacity[neg_point] = 0.0;
}

}
if (planktonLatitudeThreshold !== 0) {
for (var cutoff = 0; cutoff < planktonLatitudeThreshold; cutoff++) {
var pos_point = planktonLatFilter[cutoff - 1];
var neg_point = planktonLatFilter[planktonLatFilter.length - cutoff];

particleColor[ pos_point * 3 ] = 0.0;
particleColor[ pos_point * 3 + 1 ] = 0.0;
particleColor[ pos_point * 3 + 2] = 0.0;
particleOpacity[pos_point] = 0.0;

particleColor[ neg_point * 3 ] = 0.0;
particleColor[ neg_point * 3 + 1 ] = 0.0;
particleColor[ neg_point * 3 + 2] = 0.0;
particleOpacity[neg_point] = 0.0;
}

}
if (planktonLongitudeThreshold !== 0) {
for (var cutoff = 0; cutoff < planktonLongitudeThreshold; cutoff++) {
var pos_point = planktonLonFilter[cutoff - 1];
var neg_point = planktonLonFilter[planktonLonFilter.length - cutoff];

particleColor[ pos_point * 3 ] = 0.0;
particleColor[ pos_point * 3 + 1 ] = 0.0;
particleColor[ pos_point * 3 + 2] = 0.0;
particleOpacity[pos_point] = 0.0;

particleColor[ neg_point * 3 ] = 0.0;
particleColor[ neg_point * 3 + 1 ] = 0.0;
particleColor[ neg_point * 3 + 2] = 0.0;
particleOpacity[neg_point] = 0.0;
}

}
if (planktonH1Threshold !== 0) {
for (var cutoff = 0; cutoff < planktonH1Threshold; cutoff++) {
var pos_point = planktonH1Filter[cutoff - 1];
var neg_point = planktonH1Filter[planktonH1Filter.length - cutoff];

particleColor[ pos_point * 3 ] = 0.0;
particleColor[ pos_point * 3 + 1 ] = 0.0;
particleColor[ pos_point * 3 + 2] = 0.0;
particleOpacity[pos_point] = 0.0;

particleColor[ neg_point * 3 ] = 0.0;
particleColor[ neg_point * 3 + 1 ] = 0.0;
particleColor[ neg_point * 3 + 2] = 0.0;
particleOpacity[neg_point] = 0.0;
}
}
if (planktonH2Threshold !== 0) {
for (var cutoff = 0; cutoff < planktonH2Threshold; cutoff++) {
var pos_point = planktonH2Filter[cutoff - 1];
var neg_point = planktonH2Filter[planktonH2Filter.length - cutoff];

particleColor[ pos_point * 3 ] = 0.0;
particleColor[ pos_point * 3 + 1 ] = 0.0;
particleColor[ pos_point * 3 + 2] = 0.0;
particleOpacity[pos_point] = 0.0;

particleColor[ neg_point * 3 ] = 0.0;
particleColor[ neg_point * 3 + 1 ] = 0.0;
particleColor[ neg_point * 3 + 2] = 0.0;
particleOpacity[neg_point] = 0.0;
}

}
if (planktonH3Threshold !== 0) {
for (var cutoff = 0; cutoff < planktonH3Threshold; cutoff++) {
var pos_point = planktonH3Filter[cutoff - 1];
var neg_point = planktonH3Filter[planktonH3Filter.length -cutoff];

particleColor[ pos_point * 3 ] = 0.0;
particleColor[ pos_point * 3 + 1 ] = 0.0;
particleColor[ pos_point * 3 + 2] = 0.0;
particleOpacity[pos_point] = 0.0;

particleColor[ neg_point * 3 ] = 0.0;
particleColor[ neg_point * 3 + 1 ] = 0.0;
particleColor[ neg_point * 3 + 2] = 0.0;
particleOpacity[neg_point] = 0.0;
}

}
}


}

function planktonFiltering(feature, center) {
Expand Down

0 comments on commit 0d8e66b

Please sign in to comment.