def __init__(self, width, height, rayleigh_scale=1.0): np.random.seed(np.random.randint(1, 1000000 + 1)) self.width = width self.height = height self.rayleigh_scale = rayleigh_scale self.x, self.y = np.meshgrid(range(self.width), range(self.height)) self.x = self.x.astype(np.float) self.y = self.y.astype(np.float) self.signal = np.zeros((height, width)) self.signal_gauss_bubbles = [] self.signal_ellipses = [] self.signal_polygons = [] self.signal_buildings = [] self.signal_faults = [] self.signal_band = [] amp = gauss_filt( np.random.rayleigh(self.rayleigh_scale, (self.height, self.width)), 10) self.amp1 = amp.copy() self.amp2 = amp.copy() self.slc1 = np.exp(1j * np.zeros((height, width))) self.slc2 = np.zeros((height, width)).astype(np.complex) self.noise1 = np.zeros((height, width)).astype(np.complex) self.noise2 = np.zeros((height, width)).astype(np.complex) self.ifg = np.zeros((height, width)).astype(np.complex) self.noisy_ifg = np.zeros((height, width)).astype(np.complex) self.add_random_dem_signal_flag = False self.dem_scale = 1.0
def generate_band_mask(width, height, thickness=1): screen = gauss_filt(np.random.normal(0, 500., (height, width)), 12.) return (screen < thickness) & (screen > -thickness)