Giter Club home page Giter Club logo

bella's Introduction

bella's People

Contributors

aelzenaar avatar

Watchers

 avatar

bella's Issues

Make clearer examples

Right now the examples are kind of messy. Write specific well-documented examples to showcase particular features, or at least document the existing ones clearer.

`slices.elliptic_slice_exterior` computes the wrong polynomials

MWE:

from bella import slices

# Compute a whole bunch of level sets, and stick them into one pandas dataframe
depth = 20
p = 3
q = 6
elliptic_slice = slices.elliptic_exterior(p, q, depth)

print(elliptic_slice[43])

The polynomial solver fails to converge, and we see:

bella.slices.ConvergenceFailedException: Convergence failed at r/s = 2/3, polynomial 3.0 -
12.12435565298214105469212439054110656859963677667266439639064885616353111836160025956802330730074003·x +
15.0·x² -
5.196152422706631880582339024517617100828415761431141884167420938355799050726400111243438560271745727·x³

But:

>>> print(farey.farey_polynomial_classic(2,3,3,6)+2)
3.732050807568877293527446341505872366942805253810380628055806979451933016908800037081146186757248576 -
1.0·x +
1.732050807568877293527446341505872366942805253810380628055806979451933016908800037081146186757248576·x² -
1.0·x³

so the wrong Farey polynomial is computed by slices.elliptic_exterior. (It even fails to be monic!)

Pleating ray API

  • generator walking down r/s pleating ray from -10 to -2 (say) with a step either uniform in [-10,2] or in the moduli space (general for all polynomials)
  • selection of correct cusp from roots of Farey polynomial
  • continued fraction approximation of cusp groups
  • add subclass CuspGroup of ClassicalRileyGroup

Conduct convergence study on mpmath

Currently riley.riley_slice_exterior is very slow. This is a factor of three variables:

  • mp.dps = 100 (__init__.py)
  • maxsteps = 500 (in farey.solve_polynomial)
  • extraprec = 1000 (in farey.solve_polynomial)

First of all, we should have an internal mpmath context to avoid setting the dps globally. We should then choose maxsteps and extraprec to be minimal to ensure convergence. This could be done as follows:

  1. Try with maxsteps = 20, extraprec = 20
  2. If no convergence:
    1. Increase maxsteps by (say) 1.5x and extraprec by 2x
    2. try again
  3. Store minimal working maxsteps and extraprec in global context and use them as starting point next time solve_polynomial is called.

Hyperbolic geometry functions

Add functions to:

  • construct regular polygons
  • compute geometry of pairs of geodesics [B, section starting p.162]
  • Find pencils fixed by mobius transforms and (inversely) find the mobius transform fixing a pencil

Farey fractions

Add functions to:

  • approximate arbitrary numbers with continued fractions
  • convert continued fraction expansions to and from rational numbers

Revamp Farey polynomial API

  • Use trX,trY,trXY not alpha and beta
  • Remove all but numpy polynomial generators
  • Add utility functions to convert <-> numpy and mpmath representations
  • Add utility function to solve polynomials

GroupCache.subgroup() should take a list of words

GroupCache.subgroup() should take a list of words, i.e. [(0,), (3,),...]; instead it takes just matrices so is essentially useless.

RileyGroup should also expose a subgroup method that takes XY strings.

Compute peripheral subwords of Riley words

In farey.py implement:

  • function to check if a word is a conjugate of some generator
  • cyclic permutation generator
  • combination of the above to compute the two splittings of the Farey word producing peripheral groups
  • update the peripherals.py example to use this.

coloured_limit_set_mc come back please

Add back in this function removed in de0855b and add a new "left-to-right" mode. This is of interest in computing zooms of limit sets and cannot be done in the "fast" way so it is worth having the function back even though it is slow at "normal" limit sets.

Write tests

  • unit test that 4*i lies on the 1/2 pleating ray and 37 lies on the 0/1 pleating ray and -43 lies on the 1/1 pleating ray (parabolic/parabolic case)
  • unit test that riley_string * X * riley_string^-1 Y = farey_string
  • unit test fixed points and words are equal to finite initial list
  • verify trace of farey words equals value of farey polynomials

Add holoviews helper functions

  • draw circles fast using isometric_circles.py method but tweaked to make thinner circles
  • for non-dynamic groups add global switch (e.g. command line parameter) to swap between panel serve or png output

Error running atom.py

Traceback (most recent call last):
  File "/Users/amar630/anaconda3/envs/py3-11/lib/python3.11/site-packages/dask/backends.py", line 136, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/amar630/anaconda3/envs/py3-11/lib/python3.11/site-packages/dask/dataframe/io/csv.py", line 760, in read
    return read_pandas(
           ^^^^^^^^^^^^
  File "/Users/amar630/anaconda3/envs/py3-11/lib/python3.11/site-packages/dask/dataframe/io/csv.py", line 533, in read_pandas
    raise OSError(f"{urlpath} resolved to no files")
OSError: atom/*.csv resolved to no files

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/amar630/Downloads/bella-main/examples/atom.py", line 70, in <module>
    df = dd.read_csv("atom/*.csv")
         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/amar630/anaconda3/envs/py3-11/lib/python3.11/site-packages/dask/backends.py", line 138, in wrapper
    raise type(e)(
OSError: An error occurred while calling the read_csv method registered to the pandas backend.

I tried uncommenting the commented code, but then I get an error that G is not defined.

I am running Python 3.11.

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.