Skip to content

Commit 36cb99c

Browse files
committed
Version 3_0_1
1 parent 289a8ce commit 36cb99c

File tree

3 files changed

+57
-16
lines changed

3 files changed

+57
-16
lines changed

hplcsim.html

+11-10
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ <h1><br>Multi-Dimensional Separations</h1>
162162
</td>
163163
<td style="padding-left:10px;">
164164
<input class="export_button" type="button" value="Export Chromatogram" onclick="logExportFileData_Full()">
165-
<h3 style="width:50px; height:25px; float:right;">Version:<br>3.0.0</h3>
165+
<h3 style="width:50px; height:25px; float:right;">Version:<br>3.0.1</h3>
166166
<input class="export_button" type="button" value="Export Selected Compound" onclick="logExportFileData_Selected()">
167167
</td>
168168
</tr>
@@ -462,32 +462,32 @@ <h3 style="width:50px; height:25px; float:right;">Version:<br>3.0.0</h3>
462462
<td colspan="3">Flow Velocities:</td>
463463
</tr>
464464
<tr onmouseenter="setDesc('Flow Velocities', 'The different calculations of flow velocities. Used in calculating column efficiency.<div>-----</div><div>Open Tube: The rate at which the mobile phase would move through the column if it were empty.</div>')" onmouseleave="setDesc('', '')">
465-
<td class="tab">-Open Tube:</td>
465+
<td class="tab">--- Open Tube:</td>
466466
<td id="open_tube_flow_velocity">Loading...</td>
467467
<td>cm/s</td>
468468
</tr>
469469
<tr onmouseenter="setDesc('Flow Velocities', 'The different calculations of flow velocities. Used in calculating column efficiency.<div>-----</div><div>Interstitial: </div>')" onmouseleave="setDesc('', '')">
470-
<td class="tab">-Interstitial:</td>
470+
<td class="tab">--- Interstitial:</td>
471471
<td id="intersitial_flow_velocity">Loading...</td>
472472
<td>cm/s</td>
473473
</tr>
474474
<tr onmouseenter="setDesc('Flow Velocities', 'The different calculations of flow velocities. Used in calculating column efficiency.<div>-----</div><div>Chromatographic: </div>')" onmouseleave="setDesc('', '')">
475-
<td class="tab" style="width: 200px;">-Chromatographic:</td>
475+
<td class="tab" style="width: 200px;">--- Chromatographic:</td>
476476
<td id="chromatographic_flow_velocity">Loading...</td>
477477
<td>cm/s</td>
478478
</tr>
479479
<tr onmouseenter="setDesc('Flow Velocities', 'The different calculations of flow velocities. Used in calculating column efficiency.<div>-----</div><div>Reduced: </div>')" onmouseleave="setDesc('', '')">
480-
<td class="tab">-Reduced:</td>
480+
<td class="tab">--- Reduced:</td>
481481
<td id="reduced_flow_velocity">Loading...</td>
482482
<td></td>
483483
</tr>
484484
<tr onmouseenter="setDesc('HTEP (Height Equivalent to a Theoretical Plate)', '')" onmouseleave="setDesc('', '')">
485-
<td>HETP:</td>
485+
<td>H (plate height):</td>
486486
<td id="HETP_chrom">Loading...</td>
487487
<td>cm</td>
488488
</tr>
489489
<tr onmouseenter="setDesc('Theoretical Plates', 'The number of theoretical plates is the number of efficiency zones. It is dependant on the dimensions of the column and the HETP.')" onmouseleave="setDesc('', '')">
490-
<td>Theoretical Plates:</td>
490+
<td>Plate number:</td>
491491
<td id="theoretical_plates_chrom">Loading...</td>
492492
<!-- This was originally 16490 -->
493493
<td></td>
@@ -537,12 +537,12 @@ <h3 style="width:50px; height:25px; float:right;">Version:<br>3.0.0</h3>
537537
</tr>
538538
<tr>
539539
<td>Signal Offset:</td>
540-
<td><input class="number" type="number" step="any" id="signal_offset_general" onchange="calculatePeaks()" value="0.0" disabled></td>
540+
<td><input class="number" type="number" step="any" id="signal_offset_general" onchange="calculatePeaks()" value="0.0"></td>
541541
<td>munits</td>
542542
</tr>
543543
<tr>
544544
<td>Noise:</td>
545-
<td><input class="number" type="number" step="any" id="noise_general" onchange="calculatePeaks()" value="2.0" disabled></td>
545+
<td><input class="number" type="number" step="any" id="noise_general" onchange="calculatePeaks()" value="2.0"></td>
546546
<td></td>
547547
</tr>
548548
<tr>
@@ -703,7 +703,8 @@ <h3 style="width:50px; height:25px; float:right;">Version:<br>3.0.0</h3>
703703
<table id="headerTable">
704704
<tr>
705705
<th>Compound</th>
706-
<th id="headerTable_k">k&#39;</th>
706+
<!--<th id="headerTable_k">k&#39;</th>-->
707+
<th id="headerTable_k">k</th>
707708
<th>t<sub>R</sub> (min)</th>
708709
<!--<th>sigma (s)</th>-->
709710
<th>&#963; (s)</th>

index.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<head>
77
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
88
<meta http-equiv="Refresh"
9-
content="1; url=/hplcsim/3_0_0/hplcsim.html" />
9+
content="1; url=/hplcsim/3_0_1/hplcsim.html" />
1010
</head>
1111
<body>
1212
<main>
1313
<div class="hplc-resources">
1414
<h1 id="page-title">Redirecting to HPLCSim...</h1>
1515
<hr>
16-
<h4>If you are not automatically redirected, <a href="/hplcsim/3_0_0/hplcsim.html">Click Here</a></h4>
16+
<h4>If you are not automatically redirected, <a href="/hplcsim/3_0_1/hplcsim.html">Click Here</a></h4>
1717
</div>
1818
</main>
1919
<?php include($_SERVER['DOCUMENT_ROOT'].'/scaffold/footer.php'); ?>

simulator.js

+44-4
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,7 @@ function hideGradientElutionStuffs(bool){
728728

729729
function resetMenus(){
730730
log("Running 'resetMenus()'...");
731+
731732
//Mobile Phase Composition
732733
select_option('Acetonitrile', 'solvent_b');
733734
compoundList = ["phenol", "benzonitrile", "p-chlorophenol", "acetophenone", "nitrobenzene"];
@@ -736,11 +737,33 @@ function resetMenus(){
736737
document.getElementById("gradient_radio").checked = false;
737738
document.getElementById("solvent_fraction_slider").value = 40;
738739
document.getElementById("solvent_fraction_comp").value = 40;
740+
739741
//Chromatographic Properties
740742
document.getElementById("temperature_slider").value = 40;
741743
document.getElementById("temperature_chrom").value = 40;
742744
document.getElementById("injection_volume_chrom").value = "5.0";
743745
document.getElementById("flow_rate_chrom").value = "2.0";
746+
747+
//General Properties
748+
document.getElementById("signal_offset_general").value = 0;
749+
document.getElementById("noise_general").value = 2.0;
750+
document.getElementById("auto_time_check").checked = true;
751+
document.getElementById("initial_time_general").value = 0;
752+
document.getElementById("plot_points_general").value = 3000;
753+
754+
//Column Properties
755+
select_option('Agilent SB-C18', 'stationary_phase');
756+
toggleColumnProperties('Agilent SB-C18');
757+
document.getElementById("length_column").value = 100.0;
758+
document.getElementById("inner_diameter_column").value = 4.6;
759+
document.getElementById("particle_size_column").value = 3.0;
760+
document.getElementById("interparticle_porosity_column").value = 0.4;
761+
document.getElementById("intraparticle_porosity_column").value = 0.4;
762+
document.getElementById("A_column").value = 1.0;
763+
document.getElementById("B_column").value = 5.0;
764+
document.getElementById("C_column").value = 0.05;
765+
766+
744767
//compoundList
745768
displayTable();
746769
applyHighlightCode();
@@ -1010,6 +1033,9 @@ function renderGraph(data) {
10101033
new_data = [];
10111034
new_data[0] = aggregateSignal(data);
10121035

1036+
var domainData = aggregateSignal(data);
1037+
domainData[0].Ct = 0;
1038+
10131039
createDataExportFile_Full(new_data[0]);
10141040

10151041
if (document.getElementById("dataTable").className != ""){
@@ -1021,7 +1047,8 @@ function renderGraph(data) {
10211047
}
10221048

10231049
x.domain(d3.extent(new_data[0], function(d) { return d.t; }));
1024-
y.domain(d3.extent(new_data[0], function(d) { return d.Ct; }));
1050+
//y.domain(d3.extent(new_data[0], function(d) { return d.Ct; }));
1051+
y.domain(d3.extent(domainData, function(d) { return d.Ct; }));
10251052
//megan.domain([0, 100]);
10261053

10271054
g.append("g")
@@ -1135,7 +1162,13 @@ function aggregateSignal(data){
11351162
log("Running 'aggregateSignal(data)'...");
11361163
base_data = data[0];
11371164
max_t = maximum_t(data);
1138-
1165+
1166+
if(document.getElementById("signal_offset_general").value == ""){ document.getElementById("signal_offset_general").value = 0; }
1167+
if(document.getElementById("noise_general").value == ""){ document.getElementById("noise_general").value = 0; }
1168+
1169+
var signalOffset = parseFloat(document.getElementById("signal_offset_general").value);
1170+
var noise = parseFloat(document.getElementById("noise_general").value);
1171+
11391172
step = .01;
11401173
aggregate_signal = [];
11411174

@@ -1147,12 +1180,18 @@ function aggregateSignal(data){
11471180
y_targ = localInterpolation(data[k], x_targ);
11481181
signal += y_targ;
11491182
}
1183+
1184+
var noiseValue = Math.random()*noise;
1185+
11501186
aggregate_signal[index] = {
11511187
"t" : j,
1152-
"Ct" : signal,
1188+
"Ct" : signal+signalOffset+noiseValue,
11531189
"c" : "steelblue"
11541190
}
11551191
}
1192+
1193+
//aggregate_signal[0].Ct = 0;
1194+
11561195
return aggregate_signal;
11571196
}
11581197

@@ -2001,7 +2040,8 @@ function calculatePeaks() {
20012040
if (document.getElementById("isocratic_radio").checked) {
20022041
mode = "isocratic";
20032042
hideGradientElutionStuffs("true");
2004-
document.getElementById("headerTable_k").innerHTML = "k&#39;";
2043+
//document.getElementById("headerTable_k").innerHTML = "k&#39;";
2044+
document.getElementById("headerTable_k").innerHTML = "k";
20052045
} else {
20062046
mode = "gradient";
20072047
hideGradientElutionStuffs("false");

0 commit comments

Comments
 (0)