cut off large spikes by default

main
xenofem 2023-10-14 23:54:36 -04:00
parent 5999d54842
commit d1f8a3b8b6
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ const cutSpikesInput = document.getElementById('cutSpikes');
const hashParams = new URLSearchParams(window.location.hash.substring(1)); const hashParams = new URLSearchParams(window.location.hash.substring(1));
startInput.value = hashParams.get('start'); startInput.value = hashParams.get('start');
endInput.value = hashParams.get('end'); endInput.value = hashParams.get('end');
cutSpikesInput.checked = hashParams.get('cutSpikes') === 'true'; cutSpikesInput.checked = hashParams.get('cutSpikes') !== 'false';
const SPIKE_PERCENTILE = 95; const SPIKE_PERCENTILE = 95;
const Y_ROUNDING = 500; const Y_ROUNDING = 500;
@ -303,8 +303,8 @@ function plot(data) {
if (end !== '') { if (end !== '') {
params.set('end', end); params.set('end', end);
} }
if (cutSpikesInput.checked) { if (!cutSpikesInput.checked) {
params.set('cutSpikes', 'true'); params.set('cutSpikes', 'false');
} }
window.location.hash = params.toString(); window.location.hash = params.toString();
}; };