Skip to main content

EYE HEALTH DIAGNOSTIC GROUP's TOOLS (ehdg_tools)

Python library for eye health diagnostic group of Auckland Bioengineering Institude.

List of Tools

  1. TinyFillBuffer

TinyFillBuffer

Buffer Length

It is the buffer to fill the gap between the data.
The size of the gap that can be filled depands on the size of the buffer.

For example:

To fill the 10 data length gap, the buffer length must be atleast 12 because it needs 1 valid data at the front and at the back to be referenced.
Default size of the buffer is 7.
The minimum size of the buffer is 3.

Fill Method

As we are dealing with pupil data, most of our data are float.
Any nan data, zero data or string data between float data will be assumed as the gap.

For example:

In the x_value column in csv,
340.33
350.33
NaN
NaN
380.33

It will note that there is 2 data length gap and will be filled as follow:
340.33
350.33
360.33
370.33
380.33
In this case, the buffer length must be atleast 4.

The other data column apart from float column such as string or image will be keep as it is because there is no valid data to be referenced.

Class Attribute

self.buffer

The main buffer which is handling the filling function.

self.buffer_max_length

The length of buffer which can be initiated.

self.previous_data

The data recently released from the buffer.

self.data_attribute_array

The attribute array of the data such as x_value, y_value.
It starts as empty array and when the first data come in, it records the data attribute.

Installation

pip install ehdg_tools

To upgrade the python library

pip install ehdg_tools -U

Usage in Python

from ehdg_tools.ehdg_buffers import TinyFillBuffer
import numpy as np

fill_buffer = TinyFillBuffer(7)

example_valid_data = {"x_value": 7, "y_value": 10}
example_gap_data = {"x_value": "Nan", "y_value": np.nan}
count = 0

while True:
    if count % 2 == 0:
        return_data = fill_buffer.add(example_valid_data)
    else:
        return_data = fill_buffer.add(example_gap_data)
    print(return_data)
    count += 1

In this code, the while loop is adding the example_valid_data when the count is even and adding the example_gap_data when the count is odd.
But the return_data will be all valid data.

Metadata

Release files for ehdg-tools 4.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ehdg-tools 4.6.3
File Size Uploaded Provenance Actions
ehdg_tools-4.6.3.tar.gz 36.7 kB Without provenance Details for ehdg_tools-4.6.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ehdg-tools 4.6.3
File Interpreter ABI Platform Actions
ehdg_tools-4.6.3-py3-none-any.whl Python 3 none any Details for ehdg_tools-4.6.3-py3-none-any.whl

Total release size: 75.1 kB

Release files / ehdg_tools-4.6.3.tar.gz

Download URL ehdg_tools-4.6.3.tar.gz
Size 36.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5431d152c9367a2a0e658fa5c61a5d1080b3ec2051661fe2b3babbbf799f1d0c
BLAKE2b-256 checksum
How to use checksums
e545a98d4e6d94206a334bb0f8f74885573fb8e3c233f293a742d903070f9295
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.7

Release files / ehdg_tools-4.6.3-py3-none-any.whl

Download URL ehdg_tools-4.6.3-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5140c68fa76f1572217177d164929983d951fed2a85e694765d1b506e2659c4
BLAKE2b-256 checksum
How to use checksums
7c3de3798b5d261fd16c2188ee92cc6eaa8d3f96674bbc87fbb350008cf436dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.7

Security for ehdg-tools 4.6.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.6.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page