coastalimagelib/argusIO.py
def readAIIIrawCropped(self):
        
        '''
        This function reads AIII raw files and populates the self.raw object
        by reading the *.raw file frame by frame and adding each to the multi-
        dimensional array and cropping the frames based on the user defined
        umin, umax, vmin, vmax

        Attributes:
            self.raw: (ndarray) contains all raw sensor data from one camera,
                read from self.rawPath
        
        '''
        self.umin = self.cameraData[self.cameraID]['umin']
        self.umax = self.cameraData[self.cameraID]['umax']
        self.vmin = self.cameraData[self.cameraID]['vmin']
        self.vmax = self.cameraData[self.cameraID]['vmax']
        skipoffset = self.skip*32 + self.skip*self.w*self.h
        self.fh.seek(30, 1)

        print("working on camera", self.cameraID)

        if skipoffset > 0:
            for i in range(self.nFrames):
                print("Reading frame {}".format(i))
                if i == 0:
                    binary = np.fromfile(file=self.fh, dtype=np.uint8, count=self.w * self.h, offset=skipoffset)
                else:
                    binary = np.fromfile(file=self.fh, dtype=np.uint8, count=self.w * self.h, offset=32)

                data = np.uint8(binary)
                del binary
                if i == 0:
                    crop = data.reshape((self.h, self.w))
                    del data
                    I = crop[self.vmin:(self.vmax), self.umin:(self.umax)]
                else:
                    crop = data.reshape((self.h, self.w))
                    del data
                    I = np.dstack((I, crop[self.vmin:(self.vmax), self.umin:(self.umax)]))

                del crop

        else:

            for i in range(self.nFrames):
                print("Reading frame {}".format(i))
                if i == 0:
                    binary = np.fromfile(file=self.fh, dtype=np.uint8, count=self.w * self.h)
                else:
                    binary = np.fromfile(file=self.fh, dtype=np.uint8, count=self.w * self.h, offset=32)

                data = np.uint8(binary)
                del binary
                if i == 0:
                    crop = data.reshape((self.h, self.w))
                    del data
                    I = crop[self.vmin:(self.vmax), self.umin:(self.umax)]
                else:
                    crop = data.reshape((self.h, self.w))
                    del data
                    I = np.dstack((I, crop[self.vmin:(self.vmax), self.umin:(self.umax)]))

                del crop

        self.raw = I

        This function reads AIII raw files and populates the self.raw object
        by reading the *.raw file frame by frame and adding each to the multi-
        dimensional array and cropping the frames based on the user defined
        umin, umax, vmin, vmax

        Attributes:
            self.raw: (ndarray) contains all raw sensor data from one camera,
                read from self.rawPath
        
        
This function reads AIII raw files and populates the self.raw object
by reading the *.raw file frame by frame and adding each to the multi
dimensional array and cropping the frames based on the user defined
umin, umax, vmin, vmax
This function reads AIII raw files and populates the self . raw object by reading the * . raw file frame by frame and adding each to the multi dimensional array and cropping the frames based on the user defined umin umax vmin vmax
def readAIIIrawCropped(self):
        self.umin = self.cameraData[self.cameraID]['umin']
        self.umax = self.cameraData[self.cameraID]['umax']
        self.vmin = self.cameraData[self.cameraID]['vmin']
        self.vmax = self.cameraData[self.cameraID]['vmax']
        skipoffset = self.skip*32 + self.skip*self.w*self.h
        self.fh.seek(30, 1)
        print("working on camera", self.cameraID)
        if skipoffset > 0:
            for i in range(self.nFrames):
                print("Reading frame {}".format(i))
                if i == 0:
                    binary = np.fromfile(file=self.fh, dtype=np.uint8, count=self.w * self.h, offset=skipoffset)
                else:
                    binary = np.fromfile(file=self.fh, dtype=np.uint8, count=self.w * self.h, offset=32)
                data = np.uint8(binary)
                del binary
                if i == 0:
                    crop = data.reshape((self.h, self.w))
                    del data
                    I = crop[self.vmin:(self.vmax), self.umin:(self.umax)]
                else:
                    crop = data.reshape((self.h, self.w))
                    del data
                    I = np.dstack((I, crop[self.vmin:(self.vmax), self.umin:(self.umax)]))
                del crop
        else:
            for i in range(self.nFrames):
                print("Reading frame {}".format(i))
                if i == 0:
                    binary = np.fromfile(file=self.fh, dtype=np.uint8, count=self.w * self.h)
                else:
                    binary = np.fromfile(file=self.fh, dtype=np.uint8, count=self.w * self.h, offset=32)
                data = np.uint8(binary)
                del binary
                if i == 0:
                    crop = data.reshape((self.h, self.w))
                    del data
                    I = crop[self.vmin:(self.vmax), self.umin:(self.umax)]
                else:
                    crop = data.reshape((self.h, self.w))
                    del data
                    I = np.dstack((I, crop[self.vmin:(self.vmax), self.umin:(self.umax)]))
                del crop
        self.raw = I
def readAIIIrawCropped ( self ) : self . umin = self . cameraData [ self . cameraID ] [ 'umin' ] self . umax = self . cameraData [ self . cameraID ] [ 'umax' ] self . vmin = self . cameraData [ self . cameraID ] [ 'vmin' ] self . vmax = self . cameraData [ self . cameraID ] [ 'vmax' ] skipoffset = self . skip * 32 + self . skip * self . w * self . h self . fh . seek ( 30 , 1 ) print ( "working on camera" , self . cameraID ) if skipoffset > 0 : for i in range ( self . nFrames ) : print ( "Reading frame {}" . format ( i ) ) if i == 0 : binary = np . fromfile ( file = self . fh , dtype = np . uint8 , count = self . w * self . h , offset = skipoffset ) else : binary = np . fromfile ( file = self . fh , dtype = np . uint8 , count = self . w * self . h , offset = 32 ) data = np . uint8 ( binary ) del binary if i == 0 : crop = data . reshape ( ( self . h , self . w ) ) del data I = crop [ self . vmin : ( self . vmax ) , self . umin : ( self . umax ) ] else : crop = data . reshape ( ( self . h , self . w ) ) del data I = np . dstack ( ( I , crop [ self . vmin : ( self . vmax ) , self . umin : ( self . umax ) ] ) ) del crop else : for i in range ( self . nFrames ) : print ( "Reading frame {}" . format ( i ) ) if i == 0 : binary = np . fromfile ( file = self . fh , dtype = np . uint8 , count = self . w * self . h ) else : binary = np . fromfile ( file = self . fh , dtype = np . uint8 , count = self . w * self . h , offset = 32 ) data = np . uint8 ( binary ) del binary if i == 0 : crop = data . reshape ( ( self . h , self . w ) ) del data I = crop [ self . vmin : ( self . vmax ) , self . umin : ( self . umax ) ] else : crop = data . reshape ( ( self . h , self . w ) ) del data I = np . dstack ( ( I , crop [ self . vmin : ( self . vmax ) , self . umin : ( self . umax ) ] ) ) del crop self . raw = I
This function reads AIII raw files and populates the self.raw object
by reading the *.raw file frame by frame and adding each to the multi
dimensional array and cropping the frames based on the user defined
umin, umax, vmin, vmax
This function reads AIII raw files and populates the self . raw object by reading the * . raw file frame by frame and adding each to the multi dimensional array and cropping the frames based on the user defined umin umax vmin vmax
'''
        This function reads AIII raw files and populates the self.raw object
        by reading the *.raw file frame by frame and adding each to the multi-
        dimensional array and cropping the frames based on the user defined
        umin, umax, vmin, vmax

        Attributes:
            self.raw: (ndarray) contains all raw sensor data from one camera,
                read from self.rawPath
        
        '''
self
self.raw
(ndarray) contains all raw sensor data from one camera,
read from self.rawPath
( ndarray ) contains all raw sensor data from one camera read from self . rawPath