Open-source quantum random coordinate generation for randonauts.
Project description
PyRandonaut
Open-source quantum random coordinate generation for randonauts ❤️
This is a Python3 module for generating quantum random coordinates. It interfaces with the QRNG, at The Australian National University where it gets a list of quantum random numbers, converts them to coordinates and then computes the gaussian kernel density estimate of those coordinates, similar to how an Attractor point is generated in Randonautica.
This gives you the ability to implement quantum random coordinates in your own applications. Just import pyrandonaut
and off you go!
If you're unfamiliar with Randonautica, the concepts of Probability Blind-Spots and Quantum Randomness, I recommend reading fatum_theory.txt which shipped with the original Fatum Project bot that inspired Randonautica. This video 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 and/or read this article.
Contributions greatly appreciated!
Table of contents
Installation
The module requires at least Python 3.9 to function and can be installed using pip like so:
pip install pyrandonaut
That's it!
Usage
-
As module
- Import the module:
import pyrandonaut
- You can now call the module functions, e.g.:
# Define a starting point my_latitude = 51.178840902136464 my_longitude = -1.8261452442305293 # Call get_coordinate() with starting point values and store the result result = openrandonaut.get_coordinate(my_latitude, my_longitude) # Print result to screen print(f"Go here to escape the stasis field: {result}")
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.- Functions and arguments:
-
get_coordinate()
is the main functionality of the library, generating a coordinate equivalent to an Attractor point in Randonautica. It takes the following arguments:start_lat
Latitude of starting position (float)start_lon
Longitude of starting position (float)radius
Max radius from starting position (integer)num_points
Number of random points to use in calculation of kernel density estimate (integer)
It returns a tuple in the following format:
(latitude, longitude)
-
random_location()
Converts 2 floating point values to coordinates within the defined radius from the starting position. It takes the following arguments:start_lat
Latitude of starting position (float)start_lon
Longitude of starting position (float)radius
Max radius from starting position (integer)rand_float_1
Random value to turn into X in coordinaterand_float_2
Random value to turn into Y in coordinate
It returns a tuple in the following format:
(latitude, longitude)
-
- Import the module:
-
Command-line interface
You can also run PyRandonaut directly in your terminal. Example:
$ python pyrandonaut.py 51.178840902136464 -1.8261452442305293
51.20545110291186, -1.824335160309919
Run the script with --help
to see the options:
$ python pyrandonaut.py --help
usage: pyrandonaut.py [-h] [-r RADIUS] [-p POINTS] [-v] LATITUDE LONGITUDE
This 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.
positional arguments:
LATITUDE starting position latitude
LONGITUDE starting position longitude
options:
-h, --help show this help message and exit
-r RADIUS max radius from starting position in meters
-p POINTS number of points to base KDE on (must be divisible by 1024)
-v verbose logging
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyrandonaut-0.1.2.tar.gz
.
File metadata
- Download URL: pyrandonaut-0.1.2.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5dd8c08c5557e4aa1b82bd0cc6b7f3d4dd4e317e50fb1478ef2de59efe267c3 |
|
MD5 | d499fd75fc0daffa4fc7f1d90ce13df0 |
|
BLAKE2b-256 | e18c4a74afcf69b8b5f1a608c96626fbb1b120587247db12da29beb6be7057f1 |
File details
Details for the file pyrandonaut-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pyrandonaut-0.1.2-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78b2febb366635725d1367200fb4b325e52375a4cba0766a5762ca29ded4ca72 |
|
MD5 | 91ebe7b7da55272d9c40e8916d08596c |
|
BLAKE2b-256 | 6f62e431fdf300672313f5a6693763ef9bfe471c4a08444e7e76f3931fe45dec |