Spaces:
Running
Running
Paolo commited on
Commit ·
fbe4618
1
Parent(s): aa4aab0
sample ID added
Browse files- marimo/bomb_calorimetry.py +1 -1
- marimo/crystal_violet.py +1 -1
- marimo/docs/LabReportTemplate.docx +2 -2
- marimo/statistics_lab.py +1 -1
- marimo/surface_adsorption.py +1 -1
- src/pycek_public/cek_labs.py +8 -0
marimo/bomb_calorimetry.py
CHANGED
|
@@ -89,7 +89,7 @@ def _(cek, lab, mo, reset_button, run_button, sample_selector):
|
|
| 89 |
mo.stop(sample_selector.value is None, mo.md(f"### No sample selected !!"))
|
| 90 |
|
| 91 |
lab.set_parameters(sample=sample_selector.value)
|
| 92 |
-
data = lab.
|
| 93 |
file_content = lab.write_data_to_string()
|
| 94 |
|
| 95 |
fname = lab.filename_gen.random
|
|
|
|
| 89 |
mo.stop(sample_selector.value is None, mo.md(f"### No sample selected !!"))
|
| 90 |
|
| 91 |
lab.set_parameters(sample=sample_selector.value)
|
| 92 |
+
data = lab.create_data_for_lab()
|
| 93 |
file_content = lab.write_data_to_string()
|
| 94 |
|
| 95 |
fname = lab.filename_gen.random
|
marimo/crystal_violet.py
CHANGED
|
@@ -132,7 +132,7 @@ def _(
|
|
| 132 |
volumes={"cv": cv_vol, "oh": oh_vol, "h2o": h2o_vol},
|
| 133 |
temperature=temperature.value + 273.15,
|
| 134 |
)
|
| 135 |
-
data = lab.
|
| 136 |
file_content = lab.write_data_to_string()
|
| 137 |
|
| 138 |
fname = lab.filename_gen.random
|
|
|
|
| 132 |
volumes={"cv": cv_vol, "oh": oh_vol, "h2o": h2o_vol},
|
| 133 |
temperature=temperature.value + 273.15,
|
| 134 |
)
|
| 135 |
+
data = lab.create_data_for_lab()
|
| 136 |
file_content = lab.write_data_to_string()
|
| 137 |
|
| 138 |
fname = lab.filename_gen.random
|
marimo/docs/LabReportTemplate.docx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3bbb20fd83e72a0fbb210ef2e95a1b5baf3cacdf70c6906e1399403242f647c
|
| 3 |
+
size 17796
|
marimo/statistics_lab.py
CHANGED
|
@@ -97,7 +97,7 @@ def _(cek, lab, mo, reset_button, run_button, sample_selector, student_ID):
|
|
| 97 |
mo.stop(sample_selector.value is None, mo.md("### No sample selected !!"))
|
| 98 |
|
| 99 |
lab.set_parameters(number_of_values=12, sample=sample_selector.value)
|
| 100 |
-
data = lab.
|
| 101 |
file_content = lab.write_data_to_string()
|
| 102 |
|
| 103 |
fname = lab.output_file
|
|
|
|
| 97 |
mo.stop(sample_selector.value is None, mo.md("### No sample selected !!"))
|
| 98 |
|
| 99 |
lab.set_parameters(number_of_values=12, sample=sample_selector.value)
|
| 100 |
+
data = lab.create_data_for_lab()
|
| 101 |
file_content = lab.write_data_to_string()
|
| 102 |
|
| 103 |
fname = lab.output_file
|
marimo/surface_adsorption.py
CHANGED
|
@@ -90,7 +90,7 @@ def _(cek, lab, mo, reset_button, run_button, student_ID, temperature):
|
|
| 90 |
)
|
| 91 |
|
| 92 |
lab.set_parameters(temperature=temperature.value + 273.15)
|
| 93 |
-
data = lab.
|
| 94 |
file_content = lab.write_data_to_string()
|
| 95 |
|
| 96 |
fname = lab.filename_gen.random
|
|
|
|
| 90 |
)
|
| 91 |
|
| 92 |
lab.set_parameters(temperature=temperature.value + 273.15)
|
| 93 |
+
data = lab.create_data_for_lab()
|
| 94 |
file_content = lab.write_data_to_string()
|
| 95 |
|
| 96 |
fname = lab.filename_gen.random
|
src/pycek_public/cek_labs.py
CHANGED
|
@@ -435,6 +435,14 @@ class cek_labs(ABC):
|
|
| 435 |
self.write_data_to_file(self.metadata["output_file"], data, **self.metadata)
|
| 436 |
return self.metadata["output_file"]
|
| 437 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 438 |
def get_data(self):
|
| 439 |
return self.data
|
| 440 |
|
|
|
|
| 435 |
self.write_data_to_file(self.metadata["output_file"], data, **self.metadata)
|
| 436 |
return self.metadata["output_file"]
|
| 437 |
|
| 438 |
+
def create_data_for_lab(self,seed_local=None):
|
| 439 |
+
if seed_local is None:
|
| 440 |
+
seed_local = np.random.randint(1,999999)
|
| 441 |
+
self.add_metadata( **{"sample_ID" : seed_local} )
|
| 442 |
+
np.random.seed( seed_local )
|
| 443 |
+
data = self.create_data()
|
| 444 |
+
return data
|
| 445 |
+
|
| 446 |
def get_data(self):
|
| 447 |
return self.data
|
| 448 |
|