From 7f2487509e2379cac0076260a432113c8581731c Mon Sep 17 00:00:00 2001
From: lukas
Date: Thu, 6 Feb 2025 14:00:58 +0100
Subject: [PATCH] some minor changes to increase readability
---
create_report.html | 100 +++++++++++++++++++--------------------------
1 file changed, 43 insertions(+), 57 deletions(-)
diff --git a/create_report.html b/create_report.html
index 0e59c8b..d6bfe57 100644
--- a/create_report.html
+++ b/create_report.html
@@ -29,25 +29,20 @@
???.
- The sample volume VSample = ??? uL
- divided by the size of the coverslip Acoverslip =
+ Dividing the sample volume VSample = ??? uL
+ by the size of the coverslip Acoverslip =
??? mm x ??? mm
- yield an observed height of
-
- hobserved = VSample / Acoverslip =
- um.
-
- Multipilcation with the size of the
- the field of view AFoV = ??? um x
- ??? um yield
- an observed Volume of
-
- Vobserved = hobserved * AFoV = ??? uL per FoV.
+ yields the observed height hobserved = VSample / Acoverslip =
+ um. Multipilcation with the size of the the field of view
+ AFoV = ??? um x
+ ??? um
+ yields the observed Volume Vobserved =
+ hobserved * AFoV = ??? uL per FoV.
+ The volume of organisms per FoV is multiplied with the
+ dilution Factor Fdilution = ???
+ and devided by Vobserved to calculate the abundance per uL.
- The volume of organisms per FoV is multiplied with the
- dilution Factor Fdilution = ???
- and devided by Vobserved to calculate the abundance per uL.
Fmultiplication = Fdilution * 1 uL / Vobserved = ???
@@ -76,29 +71,21 @@
Bacteria Scan
- The bacteria scan has been performed on ???.
+ The bacteria scan has been performed on ???.
+ Dividing the sample volume VSample = ??? uL
+ by the size of the coverslip Acoverslip =
+ ??? mm x ??? mm
+ yields the observed height hobserved = VSample / Acoverslip =
+ um. Multipilcation with the size of the
+ the field of view AFoV = ??? um x
+ ??? um yields the observed Volume
+ Vobserved = hobserved * AFoV = ??? uL per FoV. The volume of organisms per FoV is multiplied with the
+ dilution Factor Fdilution = ???
+ and devided by Vobserved to calculate the abundance per uL:
- The sample volume VSample = ??? uL
- divided by the size of the coverslip Acoverslip =
- ??? mm x ??? mm
- yield an observed height of
-
- hobserved = VSample / Acoverslip =
- um.
-
- Multipilcation with the size of the
- the field of view AFoV = ??? um x
- ??? um yield
- an observed Volume of
-
- Vobserved = hobserved * AFoV = ??? uL per FoV.
-
- The volume of organisms per FoV is multiplied with the
- dilution Factor Fdilution = ???
- and devided by Vobserved to calculate the abundance per uL.
- Fmultiplication = Fdilution * 1 uL / Vobserved = ???
-
+ F
multiplication = F
dilution * 1 uL / V
observed =
???
+
Bacteria Table
@@ -257,11 +244,14 @@
};
function write_sample_description(sample){
+ let latLon = sample.Place.split(', ');
+ let lat = Number(latLon[0]);
+ let lon = Number(latLon[1]);
document.querySelector("#sample_id").textContent = sample_chooser.value;
document.querySelector("#sample_name").textContent = sample.Name;
document.querySelector("#sample_type").textContent = sample.Type;
- document.querySelector("#sample_date").textContent = sample.Date_Collected;
- document.querySelector("#sample_location").textContent = sample.Place;
+ document.querySelector("#sample_date").textContent = sample.Date_Collected.toDateString() + ' at ' + sample.Date_Collected.toLocaleTimeString();
+ document.querySelector("#sample_location").textContent = lat.toFixed(4) + ', ' + lon.toFixed(4);
}
@@ -276,7 +266,8 @@
multiplication_factor_main_scan = main_result.dilution / observed_volume;
- document.querySelector("#main_scan_datetime").textContent = main_result.datetime;
+ document.querySelector("#main_scan_datetime").textContent = main_result.datetime.toDateString() + ' at ' + main_result.datetime.toLocaleTimeString();
+ sample.Date_Collected.toDateString() + ' at ' + sample.Date_Collected.toLocaleTimeString();
document.querySelector("#prep_protocol_name").textContent = prep_protocol.name;
document.querySelector("#cam_setup_name").textContent = microscope_setup.name;
document.querySelector("#coverslip_height").textContent = microscope_setup.Slip_Height;
@@ -289,7 +280,7 @@
document.querySelector("#observed_volume").textContent = observed_volume.toExponential(2);
document.querySelector("#dilution_factor").textContent = main_result.dilution;
- document.querySelector("#factor").textContent = multiplication_factor_main_scan;
+ document.querySelector("#factor").textContent = multiplication_factor_main_scan.toFixed(2);
}
// get results of the main scan + prep_protocol and microscope_setup
@@ -470,14 +461,14 @@
case "Actinobacteria":
newRow.insertCell(0).innerHTML = key ;
// get
- newRow.insertCell(1).innerHTML = (mean * Math.pow(10, -6) * multiplication_factor_main_scan).toExponential(2);
- newRow.insertCell(2).innerHTML = (stdev/mean * 100);
+ newRow.insertCell(1).innerHTML = (mean * Math.pow(10, -6) * multiplication_factor_main_scan).toFixed(2);
+ newRow.insertCell(2).innerHTML = (stdev/mean * 100).toFixed(2);
break
default:
newRow.insertCell(0).innerHTML = key;
- newRow.insertCell(1).innerHTML = mean * multiplication_factor_main_scan;
- newRow.insertCell(2).innerHTML = (stdev/mean * 100);
+ newRow.insertCell(1).innerHTML = (mean * multiplication_factor_main_scan).toFixed(2);
+ newRow.insertCell(2).innerHTML = (stdev/mean * 100).toFixed(2);
}
}
@@ -541,7 +532,7 @@
}
function write_nema_scan_description(result, protocol, setup){
multiplication_factor_nema_scan = (result.dilution / protocol.Sample_Size) * Math.pow(10,3);
- document.querySelector("#nema_scan_datetime").innerHTML = result.datetime;
+ document.querySelector("#nema_scan_datetime").innerHTML = result.datetime.toDateString() + ' at ' + result.datetime.toLocaleTimeString();
document.querySelector("#dilution_nema").innerHTML = result.dilution;
document.querySelector("#samplesize_nema").innerHTML = protocol.Sample_Size;
document.querySelector("#multiplication_factor_nema").innerHTML = multiplication_factor_nema_scan;
@@ -640,7 +631,7 @@ function write_bact_scan_description(result, protocol, setup){
multiplication_factor_bact_scan = result.dilution / observed_volume_bact;
- document.querySelector("#bact_scan_datetime").textContent = result.datetime;
+ document.querySelector("#bact_scan_datetime").textContent = result.datetime.toDateString() + " at " + result.datetime.toLocaleTimeString();
document.querySelector("#prep_protocol_name_bact").textContent = protocol.name;
document.querySelector("#cam_setup_name_bact").textContent = setup.name;
document.querySelector("#coverslip_height_bact").textContent = setup.Slip_Height;
@@ -653,7 +644,7 @@ function write_bact_scan_description(result, protocol, setup){
document.querySelector("#observed_volume_bact").textContent = observed_volume_bact.toExponential(2);
document.querySelector("#dilution_factor_bact").textContent = result.dilution;
- document.querySelector("#factor_bact").textContent = multiplication_factor_bact_scan;
+ document.querySelector("#factor_bact").textContent = multiplication_factor_bact_scan.toFixed(2);
@@ -699,18 +690,13 @@ function render_bact_scan_table(result){
for (let i=0; i