Commit cfa964ed authored by JosefBrandt's avatar JosefBrandt
Browse files

temporary fixes, non working solution

parent f1fe95fd
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ If not, see <https://www.gnu.org/licenses/>.
Simualted Raman interface module for testing without actual raman system connected
"""

import sys
stdout = sys.stdout
from time import sleep
import numpy as np
from shutil import copyfile
@@ -35,9 +37,9 @@ class SimulatedRaman(RamanBase):
        self.currentpos = None, 0., 0.
        self.currentZ = 0.
        # some plausible data to simulate consecutively changing positions
        self.positionlist = np.array([[ 1526. , -1379.9,  -131. ],
                                      [ 3762.5, -1197.7,  -138.1],
                                      [ 2313.7, -2627.2,  -138.1],
        self.positionlist = np.array([[ -12012,  13716,  -1290],
                                      [ -11955,  -9200,  -1279],
                                      [  10978,  -9254,  -1297],
                                      [ 2704.1, -1788.2,  -138.1],
                                      [ 3884. , -2650.8,  -138.1]])
        self.znum = 4
@@ -77,6 +79,7 @@ class SimulatedRaman(RamanBase):
        
    def moveToAbsolutePosition(self, x, y, z=None, epsxy=0.11, epsz=0.011, debugReturn=False, measurementRunning=False):
        assert self.connected
        print('moving to:', x, y, z, file=stdout)
        if z is None:
            self.currentpos = x, y, self.currentpos[2]        
        else:
+44 −42
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ class SegmentationContours(QtWidgets.QGraphicsItem):
            self.update()
    
    def contextMenuEvent(self, event):
        if self.parent.analysiswidget is not None:
            contextMenu = QtWidgets.QMenu("Particle options")
    
            combineMenu = QtWidgets.QMenu("Combine Particles into")
@@ -129,6 +130,7 @@ class SegmentationContours(QtWidgets.QGraphicsItem):
            
            reassignActs = []
            reassignMenu = QtWidgets.QMenu("Reassign particle(s) into")
            
            for polymer in self.parent.analysiswidget.datastats.getUniquePolymers():
                reassignActs.append(reassignMenu.addAction(polymer))
            reassignActs.append(reassignMenu.addAction("other"))
+4 −2
Original line number Diff line number Diff line
@@ -186,10 +186,12 @@ class ZeissImporter(QtWidgets.QDialog):
        dataset.coordinatetransform = T, pc
        
        # set image center as reference point in data set (use Zeiss coordinates)
        p0 = np.array([self.region.centerx, self.region.centery]) - zpc[:2]
        p0center = np.array([self.region.centerx, self.region.centery]) - zpc[:2]
        p0 = p0center-.5*np.array((self.region.width, self.region.height))
        p1 = p0center+.5*np.array((self.region.width, self.region.height))
        dataset.readin = False
        dataset.lastpos = p0
        dataset.maxdim = p0 + p0
        dataset.maxdim = p0 + p1
        
        zmin, zmax = dataset.zpositions.min(), dataset.zpositions.max()
        blur = (blur)*(255.)