Giter Club home page Giter Club logo

tightframes's Introduction

design-finder

A collection of utilities to generate spherical (t,t)-designs (henceforth, t-designs) in Rd and Cd with given parameters.

This software was written by me under the supervision of Shayne Waldron for a summer research scholarship at the University of Auckland in 2019-2020; view the scholarship report.

a spherical design of 157 vectors

A spherical (3,3)-design of 157 vectors in C^5

Requirements

  • MATLAB (at least R2018b).
  • To use the Manopt scripts, you will need the Manopt software package installed somewhere in the MATLAB path.

For the Python utilities, you also need:

Scripts included

MATLAB scripts and functions

The following MATLAB scripts may be used by modifying the parameters at the top of each file. In general, the scripts using the Manopt optimiser are both much faster and much more accurate.-

  • runtf.m, which tries to generate a t-design with given fixed parameters.
  • runtfMO.m, the same as runtf.m but using Manopt.
  • search_designs.m, which tries to find a t-design for lots of n, given a fixed d and t.
  • search_designsMO.m, the same as search_designs.m but using Manopt.
  • exp12.m, which takes an existing design generated by runtf.m and makes it better.
  • countDesigns.m, which counts projective unitary equivalence classes of (d,n,t)-designs by computing triple products (see [2] sec. 8.2). This uses Manopt.
  • tabulate.m, which calculates all(!) minimal designs (table 6.2 of [2], for more up to date lists see also [3] and [4]) until the end of time.

For the more technical user, here are the functions and objects that you can call and use from your own scripts. The three scripts listed above should be decent examples of the usage of these utilities.

  • DesignPotential is an object representing an error function and the gradient of that function, for use in computations. One example is ComplexDesignPotential (which deals with the complex case).
  • getRandomComplexSeed generates a good starting matrix for iteration.
  • iterateOnDesign takes a starting matrix and a DesignPotential instance and tries to iterate it to compute a better design.
  • iterateOnDesignMO is the Manopt version of iterateOnDesign. To pick a starting matrix automatically, set the initial parameter A to be an NaN matrix of the correct dimensions.
  • compute3Products takes a design and returns the list of its 3-products in ascending order.
  • guessOrderLowerBound, which uses results of [1] to bound below the sizes of possible designs.

Remarks.

  • Designs are always stored as d by n matrices.
  • runtf.m and exp12.m will both produce a file in the current directory, named like tf_run_YYYY_MM_DD_hh_mm_ss.mat, containing all the data used to generate the design, as well as the design itself, and a list of the error of the design produced at each iteration. search_designs.m will produce a whole directory (in the current directory), named like search_designs_D_T_YYYY_MM_DD_hh_mm_ss/, which contains .mat files like those generated by runtf.m (named according to n) and plots of the associated errors.
  • runtf.m takes an errorMultiplier parameter (the step size at each iteration is then errorMultiplier * (error)^errorExp); this needs to be chosen by the user for a given d,n,t triple and can be fiddly to do. An example of an automated method, which seems to work reasonably well, may be found in search_designs.m (in particular, the for loop on r_try).

Python scripts

The Python scripts accept a --help argument. Here is a list of the scripts.

  • generate_repo.py, which takes a directory of output files from the MATLAB scripts and produces a standalone directory containing an HTML index file to all of them.
  • fmagma.py, which takes a single .mat file and produces a .magma file containing the same design.
  • project.py, which takes a single .mat file and produces a simple LaTeX/TiKZ visualisation. There are a number of configuration options; the image below was produced from a design with parameters (d,n,t) = (2,12,4) by running the following command in examples:
python3.7 ../project.py 2_12_4.mat -arif -o 2_12_4.tex && pdflatex 2_12_4 && convert 2_12_4.pdf 2_12_4.png

an example image from project.py

  • project3d.py, which takes a single .mat file and produces a 3D version of the project.py LaTeX/TiKZ visualisation. The image below was produced from a design with parameters (d,n,t) = (2,12,4) by running the following command in examples:
python3.7 ../project3d.py 2_12_4.mat -o 2_12_4_3D.tex -ee && pdflatex 2_12_4_3D && convert -flatten -density 150 2_12_4_3D.pdf -quality 100 2_12_4_3D.png

an example image from project3d.py

References

  1. P. Delsarte, J. M. Goethals, and J. J. Seidel. "Spherical codes and designs". In: Geometriae Dedicata 6.3 (1977), pp. 363–388. MR485471.
  2. Shayne Waldron. An introduction to finite tight frames. Applied and Numerical Harmonic Analysis. Birkhäuser/Springer, 2018. ISBN: 978-0-8176-4814-5; 978-0-8176-4815-2. MR3752185. See in particular chapter 6.
  3. Mozhgan Mohammadpour and Shayne Waldron. Constructing high order spherical designs as a union of two of lower order. 2019. arXiv:1912.07151
  4. Daniel Hughes and Shayne Waldron. "Spherical (t,t)-designs with a small number of vectors". In: Linear Algebra and its Applications 608 (2021), pp. 84-106. MR4142198.

tightframes's People

Contributors

aelzenaar avatar

Watchers

 avatar  avatar

tightframes's Issues

Standardise output formats

It would be nice to have:

  • For all the MATLAB scripts, a way to specify the output directory and the format of output file names.
  • A standard layout for storing the different types of generated file.

Delete duplicate files

Write a Python tool to iterate through files in a directory, for each d,n,t sort by error, and allow user to interactively delete them.

Remove or fix "smart colours"

The "smart colours" option should either be:

  • completely removed, because it's slow and awful, or
  • fixed, by caching or something similar.

The documentation is out of date

Remember doc/?

  • Rewrite the explanation of the iteration algorithm.
  • Write up explanations of the options for the Python scripts.
  • Explain how to interpret error graphs and badness.
  • Document difference between errorExp and errorMultiplier.
  • Explain how to interpret project.py visualisations.

Make tool names clearer

We should standardise the names of utilities.

  • What tf does exp12.m mean?
  • Why is there a difference between generate_from_search and generate_runtf?

There is no MATLAB code to generate *weighted* designs

Currently, there is an assumption throughout that vectors are unit norm.

  • Can we limit this assumption to the DesignPotential classes?
  • Can we introduce an easy interface to allow generation choice between weighted/non-weighted designs in runtf.m?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.