<jupyter_start><jupyter_text>Face regularizationThis code regularizes one face of the pixelation (128x128) by running the spring system for `I=1000` iterations.<jupyter_code>pixFace = pixelation.createFace(1, 128, I=1000, Ls=0)

fig, ax = splot.createFigure()
splot.addSphere(ax)
for face in pixFace:
    splot.plotContour(ax, face)

plt.show()<jupyter_output>/usr/lib/pymodules/python2.7/matplotlib/collections.py:548: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == 'face':<jupyter_text>Create and save pixelationCreate pixelations of size 1024x1024 with 3 pixels border. The spring system is run for 2000 iterations.<jupyter_code># MODE 1: use default parameters (C = 0.05)
pix = pixelation.createPixelation(1, 1024, 3, springIterations=2000, extraSeparation=2.0)
pixelation.savePixelation(pix, '../pixelations/M1_1024')

# MODE 2: use 0.025 velocity damping term
# pix = pixelation.createPixelation(2, 1024, 3, springIterations=2000, extraSeparation=2.0, C=0.025)
# pixelation.savePixelation(pix, '../pixelations/M2_1024')

# MODE 3: use 0.025 velocity damping term
# pix = pixelation.createPixelation(3, 1024, 3, springIterations=2000, extraSeparation=2.0, C=0.025)
# pixelation.savePixelation(pix, '../pixelations/M3_1024')<jupyter_output><empty_output><jupyter_text>Load and plot<jupyter_code>pix = pixelation.loadPixelation('../pixelations/M1_1024/pix.json')

fig, ax = splot.createFigure()
splot.addSphere(ax)
for k in range(pix.faceCount()):
    face = pix.faceCoordinates(k)
    splot.plotContour(ax, face)

plt.show()


for k in range(pix.faceCount()):
    face = pix.faceCoordinates(k)
    
    plt.figure(figsize=(12,3))
    plt.suptitle('Face: {0}'.format(k))
    
    labels = ['X', 'Y', 'Z']
    for n in range(3):
        plt.subplot2grid((1,3),(0,n)); plt.imshow(face[...,n],vmin=-1, vmax=1, cmap=plt.cm.get_cmap('seismic'));
        plt.colorbar(); plt.title(labels[n])
        
    plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13978494623655913, 'fraction_numerical': 0.06158357771260997, 'mean_word_length': 5.240853658536586, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '173217', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 817, 'n_tokens_neox': 723, 'n_words': 157, 'path': 'notebooks/create_pixelation.ipynb', 'repo_name': 'jadarve/spherepix-demos', 'size': '2046'}