diff --git a/dataset.py b/dataset.py index 81546be7b0564925cb80ba162567a44d73415035..775c9353b709c72ab7858307d454b85177436c03 100644 --- a/dataset.py +++ b/dataset.py @@ -30,7 +30,9 @@ from .legacyConvert import legacyConversion, currentVersion # for legacy pickle import the old module name dataset must be found # (no relative import) from . import dataset +from . import analysis sys.modules['dataset'] = dataset +sys.modules['analysis'] = analysis def loadData(fname): retds = None diff --git a/ramancom/simulatedraman.py b/ramancom/simulatedraman.py index e4f0210b78b0cc753b0d687c76760f9cb4e0bfc3..d31b7e6d5526817317d97beb74c07352658debec 100644 --- a/ramancom/simulatedraman.py +++ b/ramancom/simulatedraman.py @@ -21,7 +21,7 @@ If not, see . Simualted Raman interface module for testing without actual raman system connected """ -import sys +import sys, os stdout = sys.stdout from time import sleep import numpy as np @@ -38,9 +38,9 @@ class SimulatedRaman(RamanBase): self.currentpos = None, 0., 0. self.currentZ = 0. # some plausible data to simulate consecutively changing positions - self.positionlist = np.array([[ -12012, 13716, -1290], - [ -11955, -9200, -1279], - [ 10978, -9254, -1297], + self.positionlist = np.array([[ -1201, 1376, -1290], + [ -1195, -9200, -1279], + [ 1097, -9254, -1297], [ 2704.1, -1788.2, -138.1], [ 3884. , -2650.8, -138.1]]) self.znum = 4 @@ -93,7 +93,9 @@ class SimulatedRaman(RamanBase): def saveImage(self, fname): assert self.connected - copyfile(f"fakeData/image.bmp", fname) + cwd = os.getcwd() + fakeImgPath = os.path.join(cwd, "gepard", "fakeData/image.bmp") + copyfile(fakeImgPath, fname) self.imageindex = (self.imageindex+1)%(self.znum*self.gridnum) sleep(.01) diff --git a/segmentation.py b/segmentation.py index e003d933682c545e86cda273f7e24d31f53f6610..eae27f47e2558157ea49e797417b7dcb3a6bcc44 100644 --- a/segmentation.py +++ b/segmentation.py @@ -432,7 +432,7 @@ class Segmentation(object): if self.cancelcomputation: return None, None, None - from analysis.particleCharacterization import getParticleStatsWithPixelScale #TODO: AH, this should be imported at beginning of the file, but there it always chrashes.. + from .analysis.particleCharacterization import getParticleStatsWithPixelScale #TODO: AH, this should be imported at beginning of the file, but there it always chrashes.. particlestats = [] measurementPoints = {}