1. Ptolemy Countourf PlotΒΆ

Importing packages and adding LordOfRings to PYHTONPATH

[1]:
import sys
sys.path.append('LordOfRings/')
# import package
import LordOfRings.generator as gen
import LordOfRings.datasort as ds
import LordOfRings.ringplot as rp
import LordOfRings.ringfit as rf

Creating the dataset and plotting the contourf plot

[2]:
# some parameters
maxhits = 64
n = 128
# generate toy dataset and load it
gen.data_gen(n, ndata = 10, ncircle = 2, maxhits = maxhits, rmax = n/4, rmin=8, seed = 0)
circle2 = ds.datasort()
dict_event = rf.load_data(circle2, maxhits=maxhits)
# Plot the decision boundary for the circle fit selection (Ptolemy Theorem)
rp.ptolemy_contourf(idx_event = 4, dict_events = dict_event,
                    maxhits=maxhits, annotate=True, thr=0.2, t = 10 , GPU = True)
../_images/notebooks_Ptolemy_Example_4_0.png