Example #1
0
 def unwrapped_phase(self):
     print("Phase unwrapping")
     if self.unwrapper.func_code.co_argcount == 1:
         unwrapped = self.unwrapper(self.phase_denoised)
     else:
         if self.filename_obj:
             module = self.image_obj
         else:
             module = self.module
         unwrapped = self.unwrapper(self.phase_denoised, module)
     if self.phase_correct_cmos:
         print("Correcting cmos strips")
         return correct_cmos_stripes(unwrapped)
     else:
         return unwrapped
Example #2
0
 def unwrapped_phase(self):
     print("Phase unwrapping")
     if self.unwrapper.func_code.co_argcount == 1:
         unwrapped = self.unwrapper(self.phase_denoised)
     else:
         if self.filename_obj:
             module = self.image_obj
         else:
             module = self.module
         unwrapped = self.unwrapper(self.phase_denoised, module)
     if self.phase_correct_cmos:
         print("Correcting cmos strips")
         return correct_cmos_stripes(unwrapped)
     else:
         return unwrapped
Example #3
0
def main():
    import pea
    import image
    from autopipe import showimage
    import unwrap
    p = pea.PEA()
    p.unwrapper = unwrap.unwrap_qg
    p.filename_holo = "feh_004123_000001_tmpXAePgu.png"
    phase = image.correct_cmos_stripes(p.unwrapped_phase)
    module = p.module
    comb = array((phase.ravel(), module.ravel())).transpose()
    pca = PCA_nipals2(comb)
    p = pca[0]
    showimage(p[:, 0].reshape(phase.shape))

    return 0
Example #4
0
def main():
    import pea
    import image
    from autopipe import showimage
    import unwrap

    p = pea.PEA()
    p.unwrapper = unwrap.unwrap_qg
    p.filename_holo = "feh_004123_000001_tmpXAePgu.png"
    phase = image.correct_cmos_stripes(p.unwrapped_phase)
    module = p.module
    comb = array((phase.ravel(), module.ravel())).transpose()
    pca = PCA_nipals2(comb)
    p = pca[0]
    showimage(p[:, 0].reshape(phase.shape))

    return 0