Commit 07883df1 authored by JosefBrandt's avatar JosefBrandt
Browse files

Fixes in importstructure

parent 5a43b674
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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
+7 −5
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ If not, see <https://www.gnu.org/licenses/>.
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)
        
+1 −1
Original line number Diff line number Diff line
@@ -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 = {}