Package: cate
CATE stands forChaoticAttractorTEmplate.cateis a libre software tool (licensed under GNU Lesser General Public
License v3.0 only) to draw the templates of chaotic attractors.Chaotic attractors are solutions of deterministic processes, of which the
topology can be described by templates.  We consider templates of chaotic
attractors bounded by a genus-1 torus described by a linking matrix.This tool first validates a linking matrix by checking continuity and
determinism constraints.
The tool then draws the template corresponding to the linking matrix, and
optimizes the compactness of the representation.  The representation is saved
as a Scalable Vector Graphics (SVG) file.Citationcateis developed as a research project.The motivation for a tool such ascate, an introduction to linking
matrices, and a description of the optimization logic are described,inter
alia, in a publication presented at the conference Graph Drawing 2018.This publication is available in the conference proceedings
(doi:10.1007/978-3-030-04414-5_8, paywalled),
or on arXiv (arxiv:1807.11853).If you usecatefor a publication, please cite as follows:Maya Olszewski, Jeff Meder, Emmanuel Kieffer, Raphaël Bleuse, Martin Rosalie,
Grégoire Danoy, and Pascal Bouvry.Visualizing the Template of a Chaotic Attractor.InGraph Drawing, volume 11282 of Lecture Notes in Computer Science, 106–119.
Springer, 2018.doi:10.1007/978-3-030-04414-5_8.Or you may use, at your convenience, the followingBibTeX entry:@inproceedings{OlszewskiM2018Visualizing,author={Olszewski, Maya and
               Meder, Jeff and
               Kieffer, Emmanuel and
               Bleuse, Rapha{\"{e}}l and
               Rosalie, Martin and
               Danoy, Gr{\'{e}}goire and
               Bouvry, Pascal},title={{V}isualizing the {T}emplate of a {C}haotic {A}ttractor},booktitle={Graph Drawing},series={Lecture Notes in Computer Science},volume=11282,pages={106--119},publisher={Springer},year=2018,month=sep,doi={10.1007/978-3-030-04414-5_8},isbn={978-3-030-04413-8},}Installationcateis packaged as a regular Python package, and is published onPyPI.  It hence can easily be installed
withpip.For more details on how to install a Python package, one can refer tohttps://packaging.python.org/tutorials/installing-packages/The latest stable (recommended) version can be installed with the following
command (assumingpipis installed):$pipinstallcateIt is recommended to use a virtual environment to installcate.  Again, one
can refer tohttps://packaging.python.org/tutorials/installing-packages/to get
a more comprehensive overview.On a typical Linux environment, the typical commands to use would be:$python3-mvenvcate_venv$sourcecate_venv/bin/activate$pipinstallcateThis will create a new virtual environment in thecate_venvsubdirectory,
and configure the current shell to use it as the defaultpythonenvironment.  This will then installcatein this new environment without
interfering with the already installed packages.One would then exit this environment either by exiting the current shell, or by
typing the commanddeactivate.Further uses ofcateonly require to activate the virtual environment with
the following command:$sourcecate_venv/bin/activateUsageGiven a linking matrix, we can draw its template withcateby following
these steps.  For instance, let’s consider the following linking matrix:This linking matrix describes a template made of five strips.cateuses
JSON files as an input.  A linking matrix has to be described as an array made
of arrays of integers, with a row-major order.  For the above example linking
matrix, one can encode it as follows.  Note that whitespaces, new lines, … are
insignificant, but do improve the readability.[[2,1,0,0,0],[1,1,0,0,0],[0,0,0,0,0],[0,0,0,1,1],[0,0,0,1,2]]To draw the compact template of this example linking matrix, it is as simple as
callingcatewith the name of the input file as the first argument.$cate5x5_001.json[  INFO  ] Input matrix
[  INFO  ]   [2, 1, 0, 0, 0]
[  INFO  ]   [1, 1, 0, 0, 0]
[  INFO  ]   [0, 0, 0, 0, 0]
[  INFO  ]   [0, 0, 0, 1, 1]
[  INFO  ]   [0, 0, 0, 1, 2]
[  INFO  ] Starting constructing the tree
[  INFO  ] Maximum possible template length: 2
[  INFO  ] Finished constructing the tree
[  INFO  ] Starting creation of the SVG template
[  INFO  ] Shortest template
[  INFO  ]   Level 1: (0, 1), (3, 4)
[  INFO  ] Finished creation of the SVG templatecatehas created a SVG whose default file istemplate.svg.The comprehensive set of elementary matrices of size 5x5 and 6x6 is available
in the official repository ofcate(seehttps://gitlab.inria.fr/cate/cate/tree/master/examples).
The depicted example corresponds to the5x5_001.jsonlinking matrix.The comprehensive list of the supported options and their usage is available by
typingcate-h.