diff --git a/defs/__init__.py b/defs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/defs/debug_scrapyard.py b/defs/debug_scrapyard.py new file mode 100644 index 0000000..a215dcb --- /dev/null +++ b/defs/debug_scrapyard.py @@ -0,0 +1,10 @@ +### -------------------------------------------------------------------------------- ### +### SCRAPYARD TO DEBUG AND TEST FUNCTIONALITY + +import sys +print(sys.path) + +import pandas as pd +from defs import OFRAnalyser, OFRSample + +analyser = OFRAnalyser(sourcefile="/Volumes/5505/People/David_Tschan/data/OFR_SMPS/2026/processed/06_June/20260612/20260612_SET02_EXP01_full.csv") \ No newline at end of file diff --git a/defs/defs.py b/defs/defs.py index e1ded07..2ef304c 100644 --- a/defs/defs.py +++ b/defs/defs.py @@ -17,22 +17,33 @@ class OFRSample: class OFRAnalyser: - def __init__(self, sourcefile): + def __init__(self, sourcefile, headlines = 238) -> None: self.sourcefile = sourcefile + self.headlines = headlines - def read(self, headlines = 238): + head_row = pd.read_csv(filepath_or_buffer=self.sourcefile, header=self.headlines, nrows=1) + self.__max_sample = None + + def __get_samples(self) -> None: pass - def getTotalMass(self): + def __samplelist_check(self, samplelist) -> None: + + last_sample = samplelist[-1] + + if last_sample > self.__max_sample: + raise IndexError("The last sample(s) go out of range of recorded samples") + + def __mass_integrator(self, samplelist) -> None: pass - def plotTimeSeries(self): + def GetTotalMass(self, samples = 'all', plot = False) -> None: pass - def plotDistribution(self, sample): + def PlotSampleDistribution(self, sample) -> None: pass - def plotAllDistributions(self): + def PlotAllDistributions(self): pass ### -------------------------------------------------------------------------------- ### diff --git a/playground.py b/playground.py new file mode 100644 index 0000000..5a8dddc --- /dev/null +++ b/playground.py @@ -0,0 +1,2 @@ +from defs.defs import OFRAnalyser +analyser = OFRAnalyser(sourcefile="/Volumes/5505/People/David_Tschan/data/OFR_SMPS/2026/processed/06_June/20260612/20260612_SET02_EXP01_full.csv") diff --git a/vis/playground.ipynb b/vis/playground.ipynb index 2fc7051..6f0281d 100644 --- a/vis/playground.ipynb +++ b/vis/playground.ipynb @@ -1,16 +1,18 @@ { "cells": [ + { + "cell_type": "markdown", + "id": "ed5db215", + "metadata": {}, + "source": [ + "### Playground Python Notebook for Visualisation" + ] + }, { "cell_type": "code", - "execution_count": 1, - "id": "initial_id", - "metadata": { - "ExecuteTime": { - "end_time": "2026-06-15T14:00:10.219007Z", - "start_time": "2026-06-15T14:00:09.797047Z" - }, - "collapsed": true - }, + "execution_count": null, + "id": "ee443e0d", + "metadata": {}, "outputs": [], "source": [ "from defs.defs import OFRSample, OFRAnalyser" @@ -28,7 +30,7 @@ }, "outputs": [], "source": [ - "anlsyr = OFRAnalyser(sourcefile=\"/Volumes/5505/People/David_Tschan/data/OFR_SMPS/2026/processed/06_June/20260612/20260612_SET02_EXP01_full.csv\")" + "analyser = OFRAnalyser(sourcefile=\"Z:\\People\\David_Tschan\\data\\OFR_SMPS\\2026\\processed\\06_June\\20260612\\20260612_SET02_EXP01_full.csv\")" ] }, { @@ -43,7 +45,7 @@ }, "outputs": [], "source": [ - "anlsyr.sourcefile" + "analyser.sourcefile" ] }, {