def __init__(self, background=500, outside=200, inside=100, scale=0.01/200): self.__type__ = 'ring' self.__background__ = n = background self.__outside__ = outside self.__inside__ = inside self.__scale__ = scale self.__aper__ = __np__.zeros([n,n]) aper1 = __tools__.circle_aperture(inside) aper2 = __tools__.circle_aperture(outside) aper2[(outside/2-inside/2):(outside/2-inside/2+inside),(outside/2-inside/2):(outside/2-inside/2+inside)] = -1*(aper1-1) self.__aper__[(n/2-outside/2):(n/2-outside/2+outside),(n/2-outside/2):(n/2-outside/2+outside)] = aper2
def __init__(self, background=500, d=200, D=0.01, scale=0.01 / 200): self.__type__ = "circle" self.__background__ = n = background self.__d__ = d self.__D__ = d * scale self.__scale__ = scale radius = d / 2 self.__aper__ = __np__.zeros([n, n]) aper1 = __tools__.circle_aperture(d) self.__aper__[(n / 2 - d / 2) : (n / 2 - d / 2 + d), (n / 2 - d / 2) : (n / 2 - d / 2 + d)] = aper1
def __init__(self, background=500, d=200, D=0.01, scale=0.01 / 200): self.__type__ = 'circle' self.__background__ = n = background self.__d__ = d self.__D__ = d * scale self.__scale__ = scale radius = d / 2 self.__aper__ = __np__.zeros([n, n]) aper1 = __tools__.circle_aperture(d) self.__aper__[(n / 2 - d / 2):(n / 2 - d / 2 + d), (n / 2 - d / 2):(n / 2 - d / 2 + d)] = aper1
def __init__(self, background=500, outside=200, inside=100, scale=0.01 / 200): self.__type__ = 'ring' self.__background__ = n = background self.__outside__ = outside self.__inside__ = inside self.__scale__ = scale self.__aper__ = __np__.zeros([n, n]) aper1 = __tools__.circle_aperture(inside) aper2 = __tools__.circle_aperture(outside) aper2[(outside / 2 - inside / 2):(outside / 2 - inside / 2 + inside), (outside / 2 - inside / 2):(outside / 2 - inside / 2 + inside)] = -1 * (aper1 - 1) self.__aper__[(n / 2 - outside / 2):(n / 2 - outside / 2 + outside), (n / 2 - outside / 2):(n / 2 - outside / 2 + outside)] = aper2
def __init__(self, background=500, d=50, D=0.01, separation=100, scale=0.01 / 200): self.__type__ = "doublecircle" self.__background__ = n = background self.__d__ = DoubleRectangle self.__D__ = D self.__scale__ = scale self.__separation__ = s = separation radius = d / 2 self.__aper__ = __np__.zeros([n, n]) aper1 = __tools__.circle_aperture(d) self.__aper__[(n / 2 - d / 2) : (n / 2 - d / 2 + d), (n / 2 - s / 2 - d / 2) : (n / 2 - s / 2 + d / 2)] = aper1 self.__aper__[(n / 2 - d / 2) : (n / 2 - d / 2 + d), (n / 2 + s / 2 - d / 2) : (n / 2 + s / 2 + d / 2)] = aper1
def __init__(self, background=500, d=50, D=0.01, separation=100, scale=0.01 / 200): self.__type__ = 'doublecircle' self.__background__ = n = background self.__d__ = DoubleRectangle self.__D__ = D self.__scale__ = scale self.__separation__ = s = separation radius = d / 2 self.__aper__ = __np__.zeros([n, n]) aper1 = __tools__.circle_aperture(d) self.__aper__[(n / 2 - d / 2):(n / 2 - d / 2 + d), (n / 2 - s / 2 - d / 2):(n / 2 - s / 2 + d / 2)] = aper1 self.__aper__[(n / 2 - d / 2):(n / 2 - d / 2 + d), (n / 2 + s / 2 - d / 2):(n / 2 + s / 2 + d / 2)] = aper1