VinayR-GitHub / domain-colouring-tools

A set of useful tools for visualising complex mappings and proving properties of said mappings.
Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

Usage isn't explained #13

Closed s1050613 closed 11 months ago

s1050613 commented 11 months ago

Please add some explanation of how to use this... otherwise it just crashes

VinayR-GitHub commented 11 months ago

Hello @s1050613 . Firstly, I would like to sincerely apologise for the troubles you may have faced in using this software. It is my goal to provide the optimal experience to users of this tool. I have identified one bug that may occur if the value passed to a certain argument does not fulfill certain conditions. This has been patched as of now. In order to prevent crashes for other reasons, ensure that you have installed the numpy and matplotlib modules into your system. Moreover, the tool lacks try/except statements, so an invalid entry may cause errors. Ensure that you do not use characters when entering numbers, and that exponentiation is denoted with ** instead of ^.

Running in VS code, for example, you should get an output file and matplotlib display, as below: image

Thank you for alerting me to this problem!

s1050613 commented 11 months ago

This isn't solved yet, what do all the hyperparameters mean? Which file do I use for each purpose? Thanks.

VinayR-GitHub commented 11 months ago

Hello @s1050613. The files are each used for a different view of the complex function in question. 'complex_grapher_sa' is used for the approximation of complex function characteristics without paying particular detail to colours. Therefore, its colour system is arbitrary, yet it is more time efficient. 'domain_colouring_contour', 'domain_colouring_phase', and 'domain_colouring_continuous' provide the options of colouring with contour (second column below), with a conformal map display (third column below), or with the classic methodology (first column below). 'domain_colouring_universal' offers all 3 of these perspectives at once, see entire figure below: image Above: an example of a plot with the function $f(z)=z^\frac{1}{z}+sin(z^3+4)$.

The hyperparameters are elaborated upon below (the below shows the notes for domain_colouring_universal.py, as it takes the most inputs; in other versions, when asked if a paired view is wanted, 'True' and 'False' correspond to showing or not showing the domain colouring of $f(z)=z$ alongside the function in question respectively):

'f(z) = ': asks for the function you want to plot (ensure that syntax is used that allows for the function to be evaluated with eval()).

'Saturation: ': asks for the saturation of the image you want as an output (S in the HSV system). It is strongly recommended to keep this value to 1.

'Resolution/acuity: ': the number of pixels per unit length (e.g., between 1+i and 1+2i). If you are plotting a large area, you may want to reduce this value (high values can lead to runtime warnings appearing in the terminal. These can usually be ignored).

'Contour Gradation Power: ': this value characterises the magnitudes at which new contour lines are generated in the contour plot (specifically, $a^n$ with $n \in \mathbb{Z}$. Any satisfactory number leads to a very similar outcomes, and 2 is a recommended default.

'Lower real boundary,..., upper imaginary boundary: ': this characterises the portion of the domain you want coloured. For example, in the above image, the set of values -2.5, 1.5, -2, 2 was chosen. They are the same for all 3 plots.

'Lower real boundary for identity,..., upper imaginary boundary for identity: ': these are the same values as the above, but for the reference function $f(z)=z$. In the example, these are -1, 1, -1, 1. They are the same for all 3 plots.

'File name: ': the outcome is saved in a file, and this field requests for the file name.

'File type: ': enter the file extension for the file you wish to save the plot in. It is highly recommended to enter "png" (do not use a full stop at the start of the file extension).

I hope this guide has helped you better understand this resource.

Thanks!