Visualization of 1-stage filtering algorithm of searching GR candidate events

In [2]:
def print_quantiles(cc):
    q5 = np.quantile(cc["data"], 0.05)
    q10 = np.quantile(cc["data"], 0.1)
    q50 = np.quantile(cc["data"], 0.5)
    q90 = np.quantile(cc["data"], 0.9)
    q95 = np.quantile(cc["data"], 0.95)

    print(q5, q50, q95)
    print(q50-q5, q95-q50, (q95-q50) / (q50-q5))
    print(q10, q90)
    print(q50-q10, q90-q50, (q90-q50) / (q50-q10))

Let's pick up some image from dataset

In [3]:
file1 = "/mnt/data/fedenyov/big-nobeyama-dataset/2013/5/ifz130514_020501"
pic = f.get_fits_pic(file1)

plt.title(pic["times"])
plt.imshow(np.cbrt(pic["data"]))
print("max value is", np.max(pic["data"]))
max value is 2309427.5

Max value of the image brightness is 2 309 427 (> 150 000)

The filter is triggered. Picking up 34 GHz correlation curve for the day this image was observed

In [4]:
cc = f.correlation_curves_34_for_date(pic["times"])

plt.rcParams["axes.grid"] = True
sns.lineplot(cc["times"], cc["data"])
plt.axvline(pic["times"], color="red", linestyle="dotted")
plt.show()
  • std = 0.00091
  • std x 6 = 0.00551
  • Value on the correlation curve 0.00050 < (std x 6)
  • Event was selected, but it's not what we want
  • The same about other Nobeyama images this day (vertical dotted red line)
In [6]:
pics = f.pictures_for_cc(cc)
sns.lineplot(cc["times"], cc["data"])
plt.axvline(pic["times"], color="red", linewidth=2)
plt.title("Green is std, blue-horizontal is 6std")

for p in pics:
    plt.axvline(p["times"], color="red", linestyle="dotted")

plt.axhline(mean + std, color="green")
plt.axhline(mean + std6, color="blue")
plt.ylim(-0.5*std, 7*std)
plt.show()
In [7]:
sns.set(rc={'figure.figsize':(22,15)})
plt.rcParams["axes.grid"] = False

fig, axes = plt.subplots(3, 4)
x = np.linspace(-10, 10, 0.5)

fig.suptitle("Time dependency")
for i in range(len(pics)):
    j1 = i // 4; j2 = i % 4
    tmh = pics[i]["times"].hour
    tmm = pics[i]["times"].minute
    axes[j1][j2].set_title("{1}:{2} | max {0}".format(int(np.max(pics[i]["data"])), tmh, tmm))
    axes[j1][j2].imshow(np.cbrt(pics[i]["data"]))