From 7851a353bb2c0971115b61ed118b933a92a9b59e Mon Sep 17 00:00:00 2001 From: Tschan Date: Thu, 2 Jul 2026 08:43:44 +0200 Subject: [PATCH] Refactoring some files making defs more consistent, i.e. adding all visualising as another module in defs --- README.md | 4 ++-- defs/{defs.py => computing.py} | 0 vis/__init__.py => defs/visualising.py | 0 main.py | 4 ++-- run/__init__.py | 0 run/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 159 bytes run/__pycache__/defs.cpython-312.pyc | Bin 0 -> 474 bytes run/runfile_01.py | 0 vis/defs.py | 4 ---- 9 files changed, 4 insertions(+), 8 deletions(-) rename defs/{defs.py => computing.py} (100%) rename vis/__init__.py => defs/visualising.py (100%) create mode 100644 run/__init__.py create mode 100644 run/__pycache__/__init__.cpython-312.pyc create mode 100644 run/__pycache__/defs.cpython-312.pyc create mode 100644 run/runfile_01.py delete mode 100644 vis/defs.py diff --git a/README.md b/README.md index 71f78e1..2135972 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,10 @@ You are currently reading `README.md`, where the structure of this oroject is ex 1. `.git` contains all files related to `git`. These files are usually not interesting, unless you need to go back to old commits or want to know more details. Best leave this alone. For a detailed description of how `git` (and with it the `.git` directory) works, see [`git` description](##Git). 2. `.vscode` contains all files relevant for environment setup to run this project in [Visual Studio Code](https://code.visualstudio.com/). These files are: 1. `settings.json`: the setup file to set up VS Code in the desired configuration. Feel free to change these as you like. For example, the setting `"python.defaultInterpreterPath": "C:/Users/tschan_d/AppData/Local/miniforge3/envs/MA/python"` needs to be changed to point to the path of the Python interpreter you select. - 2. `launch.json`: the launch configuration file for the project, in which it is specified how VSCode should behave when you launch a job: that is, when you want to run a file or debug it. Again, feel free to customise these settings. -Important here is that + 2. `launch.json`: the launch configuration file for the project, in which it is specified how VSCode should behave when you launch a job: that is, when you want to run a file or debug it. Again, feel free to customise these settings. 3. `defs` contains source code for data analysis: 1. `__init__.py` is a file to structure the project like a package. This file is empty, but it is needed such that relative imports work properly. + 2. `defs.py` is the file defining classed and methods used to analyse data. 4. `vis` contains source code for data visualisation. # Coding help diff --git a/defs/defs.py b/defs/computing.py similarity index 100% rename from defs/defs.py rename to defs/computing.py diff --git a/vis/__init__.py b/defs/visualising.py similarity index 100% rename from vis/__init__.py rename to defs/visualising.py diff --git a/main.py b/main.py index a3c93c2..4cd50f0 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,5 @@ #%% -from defs.defs import OFRAnalyser +from defs.computing import OFRAnalyser import numpy as np #%% @@ -12,5 +12,5 @@ analyser = OFRAnalyser(sourcefile="Z:/People/David_Tschan/data/OFR_SMPS/2026/pro analyser.AggregateSamples(samples=[33]) #%% -print(analyser.total_surface) +print(analyser.total_count) # %% diff --git a/run/__init__.py b/run/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/run/__pycache__/__init__.cpython-312.pyc b/run/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8ca838a826938d6901e854125c71d063b46595b5 GIT binary patch literal 159 zcmX@j%ge<81W#VOWP#|%AOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdW#?=a6Iz^FR2)-M zoSc!E7oQU2lAm0fo0?Zr9Fv@%k{aWiSX`1?6d#h2TAW!NQwGHG@tJvThi1Cq`k&&^88OQUm2y1pPFzI#3=n?63%BTPK_TXQu!BwNtMRS zi852;-_w+8Z2Gs0td2O1rzzs&!T;s@+fBZdX%IZY$6@E$d1>TSz{qtt7zZ