Skip to content
Snippets Groups Projects
Commit 2d7adbdd authored by Xia, Ning's avatar Xia, Ning :penguin:
Browse files

update notebook

parent 501b9c30
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
# E1: Kalorimetrie
<!-- verstecktes Kommentar -->
Kurzbeschreibung/Abstract
Wichtige Punkte:
- wo liegen Rohdaten
- wo liegen Skripte für Datenerhebung
- welche andere relevante Dateien gibt es und wo liegen sie
- Prüfstand beschreiben
%% Cell type:markdown id: tags:
## Zielsetzung/Hypothese
- aus der Aufgabenstellung
- eigenes Verständnis
%% Cell type:markdown id: tags:
## Versuchsaufbau und Durchführung
- Bild vom Prüfstand:
<img src="image/kalorimetrie_pruefstand.jpg" width="500">
- Beschreibung vom Prüfstand und vom Vorgehen
%% Cell type:markdown id: tags:
## Versuchsauswertung
%% Cell type:code id: tags:
``` python
import numpy as np
from matplotlib import pyplot as plt
from datetime import datetime
import h5py as h5
import json
import sympy
import utility
import importlib
plt.style.use("../supplements/FST.mplstyle")
```
%% Cell type:markdown id: tags:
### Constant
(i) Messdaten einlesen
%% Cell type:code id: tags:
``` python
datafile_path_const = None
# TODO: Define the path to hdf5 file, which containing experiment data for constant.
## DONE ##
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5
## DONE ##
```
%% Cell type:code id: tags:
``` python
sensor_name = ["calorimeter", "environment", "heating_bath"]
index_calorimeter = []
index_bath = []
index_env = []
# TODO: Get index of sensors in the temperature array for plot
## DONE ##
```
%% Cell type:markdown id: tags:
(ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ##
```
%% Cell type:code id: tags:
``` python
# Generating plot data by combining data containing uncertainty.
# np.concatenate is called here where each ndarray contained in the tupel is expected to be 2d and have a first dimension of 2.
# The syntax of [None, ...] syntax represents the addition of an extra dimension to the front.
# Therefore the plot_data variable is expected to be a 3d ndarray with the first dimension 3 and the second dimension 2.
# If you got exception hier, make sure the dimensions are correct.
plot_data = np.concatenate(
(
# Add dimension for plot function to work
calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...],
)
)
```
%% Cell type:markdown id: tags:
(iii) Ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: plot and save the picture by calling the function.
## DONE ##
```
%% Cell type:markdown id: tags:
(iV) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# Heat capacity of Water
water_heat_capa = 4.18
water_mass = None
# TODO: Read mass of the water from the metadata of the experiment.
## DONE ##
```
%% Cell type:code id: tags:
``` python
current = None
heat_time = None
voltage = None
# TODO: Reading heater related data from hdf5 file, please use the same datafile_path_const variable.
## DONE ##
```
%% Cell type:markdown id: tags:
(V) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature_end = None
temperature_start = None
# TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ##
```
%% Cell type:markdown id: tags:
(Vi) Wärmekapazität bestimmen
%% Cell type:code id: tags:
``` python
calorimeter_const = None
# TODO: Calculate heat capacity of the calorimeter
## DONE ##
calorimeter_const
```
%% Cell type:markdown id: tags:
### Spezifische Wärmekapazität erster Probe
(i) Messdaten aus hdf5-Datei auslesen.
%% Cell type:code id: tags:
``` python
datafile_path_prob1 = None
# TODO: Define the path to hdf5 file, which containing experiment data.
## DONE ##
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5
## DONE ##
```
%% Cell type:code id: tags:
``` python
index_calorimeter = []
index_bath = []
index_env = []
# TODO: Get index of sensors in the temperature array for uncertainty calculation and plot.
## DONE ##
```
%% Cell type:markdown id: tags:
(ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ##
```
%% Cell type:code id: tags:
``` python
plot_data = np.concatenate(
(
calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...]
)
)
```
%% Cell type:markdown id: tags:
(iii) Ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Plot and save the plot by calling the function.
## DONE ##
```
%% Cell type:markdown id: tags:
(iV) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# TODO: Read mass of the water from the metadata of the experiment.
## DONE ##
```
%% Cell type:markdown id: tags:
(V) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature_mix = None
temperature_start_water = None
# TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ##
```
%% Cell type:code id: tags:
``` python
temperature_start_sample = None
# TODO: Determine the initial temperature of the sample.
# Since the temperature of the water bath is stable, the initial temperature of the sample can be taken as the average of the 10 data after the start of the measurement.
## DONE ##
```
%% Cell type:markdown id: tags:
(Vi) Wärmekapazität bestimmen
%% Cell type:code id: tags:
``` python
sample_heat_capa = None
# TODO: Calulate specific heat capacity of the sample.
## DONE ##
sample_heat_capa
```
%% Cell type:markdown id: tags:
### Spezifische Wärmekapazität zweiter Probe
(i) Messdaten aus hdf5-Datei auslesen.
%% Cell type:code id: tags:
``` python
datafile_path_prob2 = None
# TODO: Define the path to hdf5 file, which containing experiment data.
## DONE ##
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5
## DONE ##
```
%% Cell type:code id: tags:
``` python
index_calorimeter = []
index_bath = []
index_env = []
# TODO: Get index of sensors in the temperature array for uncertainty calculation and plot.
## DONE ##
```
%% Cell type:markdown id: tags:
(ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ##
```
%% Cell type:code id: tags:
``` python
plot_data = np.concatenate(
(
calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...]
)
)
```
%% Cell type:markdown id: tags:
(iii) Ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Plot and save the plot by calling the function.
## DONE ##
```
%% Cell type:markdown id: tags:
(iV) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# TODO: Read mass of the water from the metadata of the experiment.
## DONE ##
```
%% Cell type:markdown id: tags:
(V) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature_mix = None
temperature_start_water = None
# TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ##
```
%% Cell type:code id: tags:
``` python
temperature_start_sample = None
# TODO: Determine the initial temperature of the sample.
# Since the temperature of the water bath is stable, the initial temperature of the sample can be taken as the average of the 10 data after the start of the measurement.
## DONE ##
```
%% Cell type:markdown id: tags:
(Vi) Wärmekapazität bestimmen
%% Cell type:code id: tags:
``` python
sample_heat_capa = None
# TODO: Calulate specific heat capacity of the sample.
## DONE ##
sample_heat_capa
```
%% Cell type:markdown id: tags:
### Spezifische Wärmekapazität dritter Probe
(i) Messdaten aus hdf5-Datei auslesen.
%% Cell type:code id: tags:
``` python
datafile_path_prob1 = None
datafile_path_prob3 = None
# TODO: Define the path to hdf5 file, which containing experiment data.
## DONE ##
```
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5
## DONE ##
```
%% Cell type:code id: tags:
``` python
index_calorimeter = []
index_bath = []
index_env = []
# TODO: Get index of sensors in the temperature array for uncertainty calculation and plot.
## DONE ##
```
%% Cell type:markdown id: tags:
(ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ##
```
%% Cell type:code id: tags:
``` python
plot_data = np.concatenate(
(
calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...]
)
)
```
%% Cell type:markdown id: tags:
(iii) Ploten
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
# TODO: Plot and save the plot by calling the function.
## DONE ##
```
%% Cell type:markdown id: tags:
(iV) Metadaten auslesen
%% Cell type:code id: tags:
``` python
# TODO: Read mass of the water from the metadata of the experiment.
## DONE ##
```
%% Cell type:markdown id: tags:
(V) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags:
``` python
importlib.reload(utility)
temperature_mix = None
temperature_start_water = None
# TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ##
```
%% Cell type:code id: tags:
``` python
temperature_start_sample = None
# TODO: Determine the initial temperature of the sample.
# Since the temperature of the water bath is stable, the initial temperature of the sample can be taken as the average of the 10 data after the start of the measurement.
## DONE ##
```
%% Cell type:markdown id: tags:
(Vi) Wärmekapazität bestimmen
%% Cell type:code id: tags:
``` python
sample_heat_capa = None
# TODO: Calulate specific heat capacity of the sample.
## DONE ##
sample_heat_capa
```
%% Cell type:markdown id: tags:
## Datenverfügbarkeit (title WIP)
- Daten und Metadaten beschreiben inkl. Dateiennamen (wo sie zu finden sind, was sie enthalten etc.)
%% Cell type:code id: tags:
``` python
```
%% Cell type:markdown id: tags:
## Diskussion
- wissenschaftliche Sicht
%% Cell type:markdown id: tags:
## Fazit
- persönliche Sicht (was hat man gelernt usw.)
%% Cell type:code id: tags:
``` python
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment