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: %% Cell type:markdown id: tags:
# E1: Kalorimetrie # E1: Kalorimetrie
<!-- verstecktes Kommentar --> <!-- verstecktes Kommentar -->
Kurzbeschreibung/Abstract Kurzbeschreibung/Abstract
Wichtige Punkte: Wichtige Punkte:
- wo liegen Rohdaten - wo liegen Rohdaten
- wo liegen Skripte für Datenerhebung - wo liegen Skripte für Datenerhebung
- welche andere relevante Dateien gibt es und wo liegen sie - welche andere relevante Dateien gibt es und wo liegen sie
- Prüfstand beschreiben - Prüfstand beschreiben
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## Zielsetzung/Hypothese ## Zielsetzung/Hypothese
- aus der Aufgabenstellung - aus der Aufgabenstellung
- eigenes Verständnis - eigenes Verständnis
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## Versuchsaufbau und Durchführung ## Versuchsaufbau und Durchführung
- Bild vom Prüfstand: - Bild vom Prüfstand:
<img src="image/kalorimetrie_pruefstand.jpg" width="500"> <img src="image/kalorimetrie_pruefstand.jpg" width="500">
- Beschreibung vom Prüfstand und vom Vorgehen - Beschreibung vom Prüfstand und vom Vorgehen
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## Versuchsauswertung ## Versuchsauswertung
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
import numpy as np import numpy as np
from matplotlib import pyplot as plt from matplotlib import pyplot as plt
from datetime import datetime from datetime import datetime
import h5py as h5 import h5py as h5
import json import json
import sympy import sympy
import utility import utility
import importlib import importlib
plt.style.use("../supplements/FST.mplstyle") plt.style.use("../supplements/FST.mplstyle")
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
### Constant ### Constant
(i) Messdaten einlesen (i) Messdaten einlesen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
datafile_path_const = None datafile_path_const = None
# TODO: Define the path to hdf5 file, which containing experiment data for constant. # TODO: Define the path to hdf5 file, which containing experiment data for constant.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([]) temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5 # TODO: Call function to get the experiment data out of hdf5
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
sensor_name = ["calorimeter", "environment", "heating_bath"] sensor_name = ["calorimeter", "environment", "heating_bath"]
index_calorimeter = [] index_calorimeter = []
index_bath = [] index_bath = []
index_env = [] index_env = []
# TODO: Get index of sensors in the temperature array for plot # TODO: Get index of sensors in the temperature array for plot
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(ii) Unsicherheit für Plots bestimmen (ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]]) calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]]) env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]]) heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function. # TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
# Generating plot data by combining data containing uncertainty. # 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. # 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. # 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. # 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. # If you got exception hier, make sure the dimensions are correct.
plot_data = np.concatenate( plot_data = np.concatenate(
( (
# Add dimension for plot function to work # Add dimension for plot function to work
calorimeter_data_with_uncert[None, ...], calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...], env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...], heat_data_with_uncert[None, ...],
) )
) )
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(iii) Ploten (iii) Ploten
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
# TODO: plot and save the picture by calling the function. # TODO: plot and save the picture by calling the function.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(iV) Metadaten auslesen (iV) Metadaten auslesen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
# Heat capacity of Water # Heat capacity of Water
water_heat_capa = 4.18 water_heat_capa = 4.18
water_mass = None water_mass = None
# TODO: Read mass of the water from the metadata of the experiment. # TODO: Read mass of the water from the metadata of the experiment.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
current = None current = None
heat_time = None heat_time = None
voltage = None voltage = None
# TODO: Reading heater related data from hdf5 file, please use the same datafile_path_const variable. # TODO: Reading heater related data from hdf5 file, please use the same datafile_path_const variable.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(V) Anfangs- und Endwert der Temperatur (V) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
temperature_end = None temperature_end = None
temperature_start = None temperature_start = None
# TODO: Calling function to get the temperatures for heat capacity calculation. # TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(Vi) Wärmekapazität bestimmen (Vi) Wärmekapazität bestimmen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
calorimeter_const = None calorimeter_const = None
# TODO: Calculate heat capacity of the calorimeter # TODO: Calculate heat capacity of the calorimeter
## DONE ## ## DONE ##
calorimeter_const calorimeter_const
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
### Spezifische Wärmekapazität erster Probe ### Spezifische Wärmekapazität erster Probe
(i) Messdaten aus hdf5-Datei auslesen. (i) Messdaten aus hdf5-Datei auslesen.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
datafile_path_prob1 = None datafile_path_prob1 = None
# TODO: Define the path to hdf5 file, which containing experiment data. # TODO: Define the path to hdf5 file, which containing experiment data.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([]) temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5 # TODO: Call function to get the experiment data out of hdf5
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
index_calorimeter = [] index_calorimeter = []
index_bath = [] index_bath = []
index_env = [] index_env = []
# TODO: Get index of sensors in the temperature array for uncertainty calculation and plot. # TODO: Get index of sensors in the temperature array for uncertainty calculation and plot.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(ii) Unsicherheit für Plots bestimmen (ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]]) calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]]) env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]]) heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function. # TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
plot_data = np.concatenate( plot_data = np.concatenate(
( (
calorimeter_data_with_uncert[None, ...], calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...], env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...] heat_data_with_uncert[None, ...]
) )
) )
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(iii) Ploten (iii) Ploten
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
# TODO: Plot and save the plot by calling the function. # TODO: Plot and save the plot by calling the function.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(iV) Metadaten auslesen (iV) Metadaten auslesen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
# TODO: Read mass of the water from the metadata of the experiment. # TODO: Read mass of the water from the metadata of the experiment.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(V) Anfangs- und Endwert der Temperatur (V) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
temperature_mix = None temperature_mix = None
temperature_start_water = None temperature_start_water = None
# TODO: Calling function to get the temperatures for heat capacity calculation. # TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
temperature_start_sample = None temperature_start_sample = None
# TODO: Determine the initial temperature of the sample. # 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. # 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 ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(Vi) Wärmekapazität bestimmen (Vi) Wärmekapazität bestimmen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
sample_heat_capa = None sample_heat_capa = None
# TODO: Calulate specific heat capacity of the sample. # TODO: Calulate specific heat capacity of the sample.
## DONE ## ## DONE ##
sample_heat_capa sample_heat_capa
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
### Spezifische Wärmekapazität zweiter Probe ### Spezifische Wärmekapazität zweiter Probe
(i) Messdaten aus hdf5-Datei auslesen. (i) Messdaten aus hdf5-Datei auslesen.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
datafile_path_prob2 = None datafile_path_prob2 = None
# TODO: Define the path to hdf5 file, which containing experiment data. # TODO: Define the path to hdf5 file, which containing experiment data.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([]) temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5 # TODO: Call function to get the experiment data out of hdf5
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
index_calorimeter = [] index_calorimeter = []
index_bath = [] index_bath = []
index_env = [] index_env = []
# TODO: Get index of sensors in the temperature array for uncertainty calculation and plot. # TODO: Get index of sensors in the temperature array for uncertainty calculation and plot.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(ii) Unsicherheit für Plots bestimmen (ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]]) calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]]) env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]]) heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function. # TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
plot_data = np.concatenate( plot_data = np.concatenate(
( (
calorimeter_data_with_uncert[None, ...], calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...], env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...] heat_data_with_uncert[None, ...]
) )
) )
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(iii) Ploten (iii) Ploten
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
# TODO: Plot and save the plot by calling the function. # TODO: Plot and save the plot by calling the function.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(iV) Metadaten auslesen (iV) Metadaten auslesen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
# TODO: Read mass of the water from the metadata of the experiment. # TODO: Read mass of the water from the metadata of the experiment.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(V) Anfangs- und Endwert der Temperatur (V) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
temperature_mix = None temperature_mix = None
temperature_start_water = None temperature_start_water = None
# TODO: Calling function to get the temperatures for heat capacity calculation. # TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
temperature_start_sample = None temperature_start_sample = None
# TODO: Determine the initial temperature of the sample. # 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. # 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 ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(Vi) Wärmekapazität bestimmen (Vi) Wärmekapazität bestimmen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
sample_heat_capa = None sample_heat_capa = None
# TODO: Calulate specific heat capacity of the sample. # TODO: Calulate specific heat capacity of the sample.
## DONE ## ## DONE ##
sample_heat_capa sample_heat_capa
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
### Spezifische Wärmekapazität dritter Probe ### Spezifische Wärmekapazität dritter Probe
(i) Messdaten aus hdf5-Datei auslesen. (i) Messdaten aus hdf5-Datei auslesen.
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
datafile_path_prob1 = None datafile_path_prob3 = None
# TODO: Define the path to hdf5 file, which containing experiment data. # TODO: Define the path to hdf5 file, which containing experiment data.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
temperature, time, data_name = np.array([]), np.array([]), np.array([]) temperature, time, data_name = np.array([]), np.array([]), np.array([])
# TODO: Call function to get the experiment data out of hdf5 # TODO: Call function to get the experiment data out of hdf5
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
index_calorimeter = [] index_calorimeter = []
index_bath = [] index_bath = []
index_env = [] index_env = []
# TODO: Get index of sensors in the temperature array for uncertainty calculation and plot. # TODO: Get index of sensors in the temperature array for uncertainty calculation and plot.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(ii) Unsicherheit für Plots bestimmen (ii) Unsicherheit für Plots bestimmen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
calorimeter_data_with_uncert = np.array([[],[]]) calorimeter_data_with_uncert = np.array([[],[]])
env_data_with_uncert = np.array([[],[]]) env_data_with_uncert = np.array([[],[]])
heat_data_with_uncert = np.array([[],[]]) heat_data_with_uncert = np.array([[],[]])
# TODO: Calculate the uncertainty of the sensor data by calling the function. # TODO: Calculate the uncertainty of the sensor data by calling the function.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
plot_data = np.concatenate( plot_data = np.concatenate(
( (
calorimeter_data_with_uncert[None, ...], calorimeter_data_with_uncert[None, ...],
env_data_with_uncert[None, ...], env_data_with_uncert[None, ...],
heat_data_with_uncert[None, ...] heat_data_with_uncert[None, ...]
) )
) )
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(iii) Ploten (iii) Ploten
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
# TODO: Plot and save the plot by calling the function. # TODO: Plot and save the plot by calling the function.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(iV) Metadaten auslesen (iV) Metadaten auslesen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
# TODO: Read mass of the water from the metadata of the experiment. # TODO: Read mass of the water from the metadata of the experiment.
## DONE ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(V) Anfangs- und Endwert der Temperatur (V) Anfangs- und Endwert der Temperatur
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
importlib.reload(utility) importlib.reload(utility)
temperature_mix = None temperature_mix = None
temperature_start_water = None temperature_start_water = None
# TODO: Calling function to get the temperatures for heat capacity calculation. # TODO: Calling function to get the temperatures for heat capacity calculation.
## DONE ## ## DONE ##
``` ```
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
temperature_start_sample = None temperature_start_sample = None
# TODO: Determine the initial temperature of the sample. # 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. # 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 ## ## DONE ##
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
(Vi) Wärmekapazität bestimmen (Vi) Wärmekapazität bestimmen
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
sample_heat_capa = None sample_heat_capa = None
# TODO: Calulate specific heat capacity of the sample. # TODO: Calulate specific heat capacity of the sample.
## DONE ## ## DONE ##
sample_heat_capa sample_heat_capa
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## Datenverfügbarkeit (title WIP) ## Datenverfügbarkeit (title WIP)
- Daten und Metadaten beschreiben inkl. Dateiennamen (wo sie zu finden sind, was sie enthalten etc.) - Daten und Metadaten beschreiben inkl. Dateiennamen (wo sie zu finden sind, was sie enthalten etc.)
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` python
``` ```
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## Diskussion ## Diskussion
- wissenschaftliche Sicht - wissenschaftliche Sicht
%% Cell type:markdown id: tags: %% Cell type:markdown id: tags:
## Fazit ## Fazit
- persönliche Sicht (was hat man gelernt usw.) - persönliche Sicht (was hat man gelernt usw.)
%% Cell type:code id: tags: %% Cell type:code id: tags:
``` python ``` 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