# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['pyrandonaut']

package_data = \
{'': ['*']}

install_requires = \
['numpy==1.23.1', 'pandas==1.4.3', 'randonautentropy==1.0.2', 'scipy==1.9.0']

entry_points = \
{'console_scripts': ['pyrandonaut = pyrandonaut.__init__:__main__']}

setup_kwargs = {
    'name': 'pyrandonaut',
    'version': '0.1.9',
    'description': 'Open-source quantum random coordinate generation for randonauts <3',
    'long_description': '## PyRandonaut\n![Python](https://img.shields.io/badge/built%20with-Python3-red.svg)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n### Open-source quantum random coordinate generation for randonauts ❤️\n<img align="left" src="https://i.imgur.com/RJxATsu.png" width="170">\n\nThis is a Python3 module for generating quantum random coordinates. It interfaces with the QRNG at Randonautica where it gets a list of [quantum random](https://en.wikipedia.org/wiki/Hardware_random_number_generator#Quantum_random_properties) numbers, converts them to coordinates and then computes the [gaussian kernel density estimate](https://en.wikipedia.org/wiki/Kernel_density_estimation) of those coordinates to find a point with a statistically anomalous density, similar to how an Attractor point is generated by [Randonautica](https://www.randonautica.com/).\n\t<br><br>\n\tThis gives you the ability to implement quantum random coordinates in your own applications. Just `import pyrandonaut` and off you go!\n\t<br><br>\n\tIf you\'re unfamiliar with Randonautica, the concepts of Probability Blind-Spots and Quantum Randomness, I recommend reading [fatum_theory.txt](https://github.com/anonyhoney/fatum-en/blob/master/docs/fatum_theory.txt) which shipped with the original Fatum Project bot that inspired Randonautica. [This video](https://www.youtube.com/watch?v=6C6aXta3m1M) gives a lot of great background info too. If you have no idea what any of this is about and is completely new to this, watch [this video](https://www.youtube.com/watch?v=nDX81AUm8yE) and/or read [this article](https://medium.com/swlh/randonauts-how-a-random-number-generator-can-set-you-free-dfc2a2413e15).\n\nContributions greatly appreciated!\n\n## Table of contents\n* [Introduction](#openrandonaut)\n* [Installation](#installation)\n* [Usage](#usage)\n\t* [As module](#as-module)\n\t* [Command line interface](#command-line-interface)\n* [Visualization](#visualization)\n* [To-do](#to-do)\n\n## Installation\nThe module requires at least Python 3.9 to function and can be installed using [pip](https://pip.pypa.io/en/stable/) like so:<br>\n`pip install pyrandonaut`\n<br><br>\nThat\'s it!\n\n\n## Usage\n\n* ### As module\n\n\t1. Import the module: `import pyrandonaut`\n\t2. You can now call the module functions, e.g.:<br>\n\t\n\t```python\n\t# Define a starting point\n\tmy_latitude = 51.178840902136464\n\tmy_longitude = -1.8261452442305293\n\t\n\t# Call get_coordinate() with starting point values and store the result\n\tresult = pyrandonaut.get_coordinate(my_latitude, my_longitude)\t\n\t# Print result to screen\n\tprint(f"Go here to escape the stasis field: {result}")\n\t``` \n\t`get_coordinate()` will return a tuple with the calculated coordinate. By default it uses a radius of 5000 meters and a value of 1024 random points to base the calculation on. These values can be specified in the arguments.\n\t\n\t* **Functions and arguments:**\n\t\t* **`get_coordinate()`** is the main functionality of the library, generating a coordinate equivalent to an Attractor point in Randonautica. It takes the following arguments:\n\t\t\t* `start_lat` Latitude of starting position (float)\n\t\t\t* `start_lon` Longitude of starting position (float)\n\t\t\t* `radius` Max radius from starting position (integer)\n\t\t\t* `num_points` Number of random points to use in calculation of kernel density estimate. Must be divisible by 1024 (integer)\n\t\t\n\t\t\tIt returns a tuple in the following format:<br>\n\t\t\t`(latitude, longitude)`<br>\n\t\t\n\t\t* **`random_location()`** Converts 2 floating point values to coordinates within\n    the defined radius from the starting position. It takes the following arguments:\n\t\t\t* `start_lat` Latitude of starting position (float)\n\t\t\t* `start_lon` Longitude of starting position (float)\n\t\t\t* `radius` Max radius from starting position (integer)\n\t\t\t* `rand_float_1`\tRandom value to turn into X in coordinate\n\t\t\t* `rand_float_2`\tRandom value to turn into Y in coordinate\n\t\t\t\n\t\t\tIt returns a tuple in the following format:<br>\n\t\t\t`(latitude, longitude)`\n\t\t\n* ### Command-line interface\n\n You can also run PyRandonaut directly in your terminal.\n Example:\n \n ```console\n $ python pyrandonaut.py 51.178840902136464 -1.8261452442305293\n 51.20545110291186, -1.824335160309919\n ```\n \n Run the script with `--help` to see the options:\n \n ```console\n\t$ python pyrandonaut.py --help                                                                                                                             \n\tusage: pyrandonaut.py [-h] [-r RADIUS] [-p POINTS] [-v] LATITUDE LONGITUDE\n\t\n\tThis script interfaces with the Quantum Random Number Generator at the The Australian National University, where it gets a list of quantum random numbers, converts them to coordinates and computes the gaussian kernel density estimate of those coordinates, returning the point within the defined radius, where the density of random coordinates is highest, similar to how an Attractor point is calculated by Randonautica.\n\t\n\tpositional arguments:\n\t  LATITUDE    starting position latitude\n\t  LONGITUDE   starting position longitude\n\t\n\toptions:\n\t  -h, --help  show this help message and exit\n\t  -r RADIUS   max radius from starting position in meters\n\t  -p POINTS   number of points to base KDE on (must be divisible by 1024)\n\t  -v          verbose logging\n\n```\n\n\n## Visualization\n<img src="https://camo.githubusercontent.com/e6b5661fff27ec6a7e51f39141e640bf8c59c9d05b7847e28af71d32ddcb06fc/68747470733a2f2f692e696d6775722e636f6d2f427878786464462e706e67" alt="Heatmap" style="width:50%"><br>This is a heatmap visualization of how the module calculates the Attractor point. An arbitrary number of points based on QRNG numbers are plotted geospatially and the place with the highest density of points is returned.  Image made using [Seaborn](https://github.com/mwaskom/seaborn) and [this script](https://github.com/openrandonaut/openrandonaut/blob/main/kdeplot_heatmap.py) (BETA).\n\n\n## To-do\n- [ ] Get people excited about the project!\n- [ ] Add more QRNG sources (If you can help supply hardware modules for testing, please get in touch!)\n- [ ] Make requests to ANU QRNG API asynchronous\n- [ ] Implement heatmap generation from [openrandonaut-bot](https://github.com/openrandonaut/openrandonaut-bot)\n- [ ] Add ability to calculate Void and Power points as well\n',
    'author': 'alicemandragora',
    'author_email': 'openrandonaut@riseup.net',
    'maintainer': None,
    'maintainer_email': None,
    'url': None,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.9,<3.12',
}


setup(**setup_kwargs)
