コード例 #1
0
    def checkWindows(self):
        '''Ensure that the window sizes are valid for the code to work.'''
        if (self.windowSizeWidth % 2 == 1):
            raise ValueError('Window size width needs to be multiple of 2.')

        if (self.windowSizeHeight % 2 == 1):
            raise ValueError('Window size height needs to be multiple of 2.')

        if not is_power2(self.zoomWindowSize):
            raise ValueError('Zoom window size needs to be a power of 2.')

        if not is_power2(self.oversamplingFactor):
            raise ValueError('Oversampling factor needs to be a power of 2.')

        if self.searchWindowSizeWidth >= 2 * self.windowSizeWidth:
            raise ValueError(
                'Search Window Size Width should be < 2 * Window Size Width')

        if self.searchWindowSizeHeight >= 2 * self.windowSizeHeight:
            raise ValueError(
                'Search Window Size Height should be < 2 * Window Size Height')

        if self.zoomWindowSize >= min(self.searchWindowSizeWidth,
                                      self.searchWindowSizeHeight):
            raise ValueError(
                'Zoom window size should be <= Search window size')
コード例 #2
0
    def checkWindows(self):
        '''Ensure that the window sizes are valid for the code to work.'''

        if (self.windowSizeWidth%2 == 1):
            raise ValueError('Window size width needs to be an even number.')

        if (self.windowSizeHeight%2 == 1):
            raise ValueError('Window size height needs to be an even number.')

        if not is_power2(self.zoomWindowSize):
            raise ValueError('Zoom window size needs to be a power of 2.')

        if not is_power2(self.oversamplingFactor):
            raise ValueError('Oversampling factor needs to be a power of 2.')

        if self.searchWindowSizeWidth >=  2*self.windowSizeWidth :
            raise ValueError('Search Window Size Width should be < 2 * Window Size Width')

        if self.searchWindowSizeHeight >= 2*self.windowSizeHeight :
            raise ValueError('Search Window Size Height should be < 2 * Window Size Height')

        if self.zoomWindowSize >= min(self.searchWindowSizeWidth, self.searchWindowSizeHeight):
            raise ValueError('Zoom window size should be <= Search window size')

        if self._stdWriter is None:
            self._stdWriter = create_writer("log", "", True, filename="denseampcor.log")

        self.pixLocOffAc = self.windowSizeWidth//2 + self.searchWindowSizeWidth - 1
        self.pixLocOffDn = self.windowSizeHeight//2 + self.searchWindowSizeHeight - 1
コード例 #3
0
ファイル: Ampcor.py プロジェクト: yjzhenglamarmota/isce2
    def checkWindows(self):
        '''Ensure that the window sizes are valid for the code to work.'''
        if (self.windowSizeWidth % 2 == 1):
            raise ValueError('Window size width needs to be multiple of 2.')

        if (self.windowSizeHeight % 2 == 1):
            raise ValueError('Window size height needs to be multiple of 2.')

        if not is_power2(self.zoomWindowSize):
            raise ValueError('Zoom window size needs to be a power of 2.')

        if not is_power2(self.oversamplingFactor):
            raise ValueError('Oversampling factor needs to be a power of 2.')
コード例 #4
0
    def checkWindows(self):
        '''
        Ensure that the window sizes are valid for the code to work.
        '''

        if not is_power2(self.windowSize):
            raise ValueError('Window size needs to be power of 2.')

        if not is_power2(self.zoomWindowSize):
            raise ValueError('Zoom window size needs to be a power of 2.')

        if not is_power2(self.oversamplingFactor):
            raise ValueError('Oversampling factor needs to be a power of 2.')

        if self.searchWindowSize >=  (2*self.windowSize):
            raise ValueError('Search Window Size should be < = 2 * Window Size')

        if self.zoomWindowSize >= self.searchWindowSize:
            raise ValueError('Zoom window size should be <= Search window size')

        return
コード例 #5
0
 def setOversamplingFactor(self, var):
     temp = int(var)
     if not is_power2(temp):
         raise ValueError('Oversampling factor needs to be a power of 2.')
     self.oversamplingFactor = temp
コード例 #6
0
 def setZoomWindowSize(self, var):
     temp = int(var)
     if not is_power2(temp):
         raise ValueError('Zoom window size needs to be a power of 2.')
     self.zoomWindowSize = temp
コード例 #7
0
 def setWindowSizeHeight(self, var):
     temp = int(var)
     if not is_power2(temp):
         raise ValueError('Window height needs to be a power of 2.')
     self.windowSizeHeight = temp
     return
コード例 #8
0
 def setWindowSizeWidth(self, var):
     temp = int(var)
     if not is_power2(temp):
         raise ValueError('Window width needs to be a power of 2.')
     self.windowSizeWidth = temp
     return