def bandpass(self, rin, sin, rout, sout):
''' To create a band pass two circle images are created, one inverted
and pasted into dthe other'''
# if radius zero dont create the inner circle
if rin != 0:
self.create_circle_mask(rin, sin)
else:
self.data = np.zeros(self.data.shape)
# create the outer circle
bigcircle = deepcopy(self)
bigcircle.create_circle_mask(rout, sout)
bigcircle.invert()
# sum the two pictures
m = (self + bigcircle)
# limit fro 0 to 1 and invert
m.limit(1)
m.invert()
self.data = m.data
评论列表
文章目录