def plot_clusters_all(self): """ plot clusters for all regions of japan you can select the number of clusters and the time period you want """ # auxiliar classes that we'll be needed draw = Draw() cat = Catalog() # information relative to the regions BOUNDS = 0 ZOOM_INDEX = 1 ZOOM_VALUE = 9 info = {} info["kanto"] = [cat.get_kanto_bounds(), ZOOM_VALUE] #info["kansai"] = [cat.get_kansai_bounds(), ZOOM_VALUE] #info["tohoku"] = [cat.get_tohoku_bounds(), ZOOM_VALUE] #info["east_japan"] = [cat.get_east_japan_bounds(), ZOOM_VALUE] # list containing the number of clusters to plot and the time period to consider num_cluster = [10] time_period = [[0.0, 12 * 366 * 24.0 * 3600.0]] # get all valid combinations combinations = list(itertools.product(info, num_cluster, time_period)) REGION_IND = 0 CLUSTER_IND = 1 TIME_IND = 2 # iterate through all combinations for comb in combinations: # get region region = comb[REGION_IND] # folder we save the results into folder = '../images/single_link/' # obtain array of quakes path = '../results/single_link/declustered_array_' + region quakes = pickle.load(open(path, 'rb')) # plot background for current region draw.plot_quakes_coast_slc(quakes, comb[TIME_IND], num_clusters = comb[CLUSTER_IND]) call(["mv", "temp.png", folder + region + "_back_coast-1.png"]) input("Edit the image and then press Enter") # plot cluster for the current data we have self.plot_clusters(quakes, comb[CLUSTER_IND], comb[TIME_IND], folder + region +"_back_coast-1.png") # save it in the correct format and do cleaning call(["mv", "temp.png", folder + region + "_clusters_coast.png"])