def get_qpimage(self, idx=0):
        """Return background-corrected QPImage"""
        if self._bgdata:
            # The user has explicitly chosen different background data
            # using `get_qpimage_raw`.
            qpi = super(SingleHdf5Qpimage, self).get_qpimage()
        else:
            # We can use the background data stored in the qpimage hdf5 file
            qpi = qpimage.QPImage(h5file=self.path,
                                  h5mode="r",
                                  h5dtype=self.as_type,
                                  ).copy()
            # Force meta data
            for key in self.meta_data:
                qpi[key] = self.meta_data[key]
            # set identifier
            qpi["identifier"] = self.get_identifier(idx)
        return qpi
def get_qpimage ( self , idx = 0 ) : if self . _bgdata : qpi = super ( SingleHdf5Qpimage , self ) . get_qpimage ( ) else : qpi = qpimage . QPImage ( h5file = self . path , h5mode = "r" , h5dtype = self . as_type , ) . copy ( ) for key in self . meta_data : qpi [ key ] = self . meta_data [ key ] qpi [ "identifier" ] = self . get_identifier ( idx ) return qpi
Return background-corrected QPImage