Changes in code structure to allow relative imports of modules
This commit is contained in:
1 parent
fcc267b446
commit
5aea6bcdac
5 files changed
+42
-17
No files matched your search
Whitespace-only changes.
@@ -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")
|
||||
+17
-6
@@ -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
|
||||
|
||||
### -------------------------------------------------------------------------------- ###
|
||||
|
||||
@@ -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")
|
||||
+13
-11
@@ -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"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user