# don't overwrite... results = [[] for h in hs] means = np.zeros(np.arange(0.2, 1.0, 0.1).shape) stdevs = np.zeros(np.arange(0.2, 1.0, 0.1).shape) for H_i, H in enumerate(np.arange(0.2, 1.0, 0.1)): gen_params = fract.save_fbm2D_exact_generator_params(H, N) print(H) loc_result_arr = np.zeros(stat_n) for j in range(0, stat_n // 2): print(" ", j) z2d1, z2d2 = fract.fbm2D_exact_from_generator(*gen_params) try: res1 = fract.box_counting_H(z2d1, data=False, log_spacing=True) loc_result_arr[2 * j] = res1 except: res1 = np.nan try: res2 = fract.box_counting_H(z2d2, data=False, log_spacing=True) except: res1 = np.nan loc_result_arr[2 * j + 1] = res2 results[H_i].append(res1) results[H_i].append(res2) np_res = np.array(results) if first_time == False:
results = [ [] for h in hs] means = np.zeros(np.arange(0.2, 1.0, 0.1).shape) stdevs = np.zeros(np.arange(0.2, 1.0, 0.1).shape) for H_i, H in enumerate(np.arange(0.2, 1.0, 0.1)): gen_params = fract.save_fbm2D_exact_generator_params(H,N) print(H) loc_result_arr = np.zeros(stat_n) for j in range(0,stat_n//2): print(" ",j) z2d1, z2d2 = fract.fbm2D_exact_from_generator(*gen_params) try: res1 = fract.box_counting_H(z2d1, data=False) loc_result_arr[2*j] = res1 except: res1 = np.nan try: res2 = fract.box_counting_H(z2d2, data=False) except: res1 = np.nan loc_result_arr[2*j+1] = res2 results[H_i].append(res1) results[H_i].append(res2)
stdevs = np.zeros(hs.shape) for H_i, H in enumerate(hs): gen_params = fract.save_fbm2D_exact_generator_params(H,N) print(H) for j in range(0,stat_n//2): print(" ",j) z2d1, z2d2 = fract.fbm2D_exact_from_generator(*gen_params) z2d1 = fract.cut_profile(z2d1, contour_H) z2d2 = fract.cut_profile(z2d2, contour_H) res1 = 0 res2 = 0 try: detect_H1 = fract.box_counting_H(z2d1, data=False) print(" ",detect_H1) except Exception as ex: res1 = np.nan print("Exception ", ex) try: detect_H2 = fract.box_counting_H(z2d2, data=False) # print(" ",res2) except Exception as ex: res2 = np.nan print("Exception ", ex) results[H_i].append(detect_H1) results[H_i].append(detect_H2)
# don't overwrite... results = [ [] for h in hs] means = np.zeros(np.arange(0.2, 1.0, 0.1).shape) stdevs = np.zeros(np.arange(0.2, 1.0, 0.1).shape) for H_i, H in enumerate(hs): print(H) for j in range(0,stat_n): print(" ",j) z2d = fract.fbm2D_spectral(H, N) res1 = 0 try: det_H = fract.box_counting_H(z2d, data=False, z_scale=10000000) print(" ",det_H) except Exception as ex: det_H = np.nan print("Exception ", ex) results[H_i].append(det_H) np_res = np.array(results) if first_time == False: disk_np_res = np.hstack(( disk_np_res, np_res )) elif first_time == True: disk_np_res = np_res
# don't overwrite... results = [[] for h in hs] means = np.zeros(hs.shape) stdevs = np.zeros(hs.shape) for H_i, H in enumerate(hs): print(H) for j in range(0, stat_n): print(" ", j) z2d = fract.fbm2D_spectral(H, N) z2d = fract.cut_profile(z2d, contour_H) try: detect_H1 = fract.box_counting_H(z2d, data=False) print(" ", detect_H1) except Exception as ex: res1 = np.nan print("Exception ", ex) results[H_i].append(detect_H1) np_res = np.array(results) if first_time == False: disk_np_res = np.hstack((disk_np_res, np_res)) elif first_time == True: disk_np_res = np_res # SAVING np.save(