<jupyter_start><jupyter_text>Interactive Image PatchesThis module is very similar to the other image patches module, but it shows how to interactively choose the cocycle representatives and stereographic north pole.  First, we import things and setup the patches.  Then, we plot an interactive window, where we can choose representative cocycles, coverage, type of partition of unity, and the stereographic north pole<jupyter_code>import matplotlib.pyplot as plt
import numpy as np
from dreimac import ProjectiveCoords, get_line_patches

dim = 10
P = get_line_patches(dim=dim, NAngles = 200, NOffsets = 200, sigma=0.25)
patches = [np.reshape(P[i, :], (dim, dim)) for i in range(P.shape[0])]
pc = ProjectiveCoords(P, n_landmarks=100)
pc.plot(patches, max_disp=200)<jupyter_output><empty_output><jupyter_text>After we're satisfied with our selections, we can save the parameters that we selected and print them out<jupyter_code>params = pc.get_selected_info()
for key, value in params.items():
    print(key, ":", value)<jupyter_output><empty_output><jupyter_text>We can send this information back to the plot function of the projective coordinates object if we want to pick up where we left off<jupyter_code>pc = ProjectiveCoords(P, n_landmarks=100)
pc.plot(patches, max_disp=200, init_params=params)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08126410835214447, 'fraction_numerical': 0.01805869074492099, 'mean_word_length': 6.687861271676301, 'pattern_counts': {'":': 1, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '631278', 'license': 'Apache-2.0', 'n_tokens_mistral': 432, 'n_tokens_neox': 409, 'n_words': 146, 'path': 'notebooks/ImagePatches_Interactive.ipynb', 'repo_name': 'ctralie/CircularCoordinates', 'size': '1329'}