Skip to main content

Vyom Sutra

A wave-based decision engine.

Takes a value and a target. Returns a similarity score.

Install

pip install vyom-sutra

Use

import vyom_sutra as vyom

r = vyom.score(value, target=1.2566, scale=1.0) print(r['score']) # 0 - 100 print(r['verdict']) # "Clean" or "Noise"

Output

score > 95 excellent score > 80 clean score > 50 weak score < 50 noise

Works with FFT

FFT splits a signal into frequencies. Vyom scores each frequency. Keep the clean ones. Drop the noise.

import numpy as np import vyom_sutra as vyom

spectrum = np.fft.fft(signal)

for freq in spectrum: r = vyom.score(freq, target=1.2566) if r['clean']: print("keep", freq)

Example 1: Medicine

Screening a drug compound.

Each compound has a weight (MW) and an oiliness (LogP). These two numbers give a phase angle. That angle is compared with the target protein angle.

import vyom_sutra as vyom

mw = 463.9 logp = 2.8 target = 1.2566

phase = (mw / 500) * 1.1 + (logp / 5) * 0.5 r = vyom.score(phase, target=target)

if r['clean']: print("candidate") else: print("reject")

Use case: filter a million compounds down to a short list for the lab. Save months of time.

Example 2: Cosmology

Testing a universe model against observed data.

For each scale k, the model predicts a value n_s. Compare with the measured value from Planck 2018.

import vyom_sutra as vyom

measured_ns = 0.9649

for k in [5, 8, 12, 16]: model_ns = 1 - 2/60 + 0.0012 * (k - 5) r = vyom.score(model_ns, target=measured_ns, scale=1.0) print("k =", k, "score =", r['score'])

Use case: check how close a model is to real data.

Example 3: Earthquake detection

A seismometer records ground motion. Earthquake waves have a known shape (target).

  1. Read the sensor signal.
  2. FFT gives the frequencies.
  3. Vyom scores each frequency.
  4. Frequencies near target = earthquake.

import numpy as np import vyom_sutra as vyom

signal = read_seismometer() spectrum = np.fft.fft(signal)

eq_target = 2.0 hits = 0

for freq in spectrum: r = vyom.score(freq, target=eq_target, scale=1.0) if r['clean']: hits += 1

if hits > 10: print("earthquake detected") else: print("no earthquake")

Use case: separate a real quake from traffic noise, wind, or a passing truck.

Other sectors

The same function works anywhere a decision is needed.

audio denoise (FFT + Vyom) image compression (DCT + Vyom) game NPC (id -> behavior) finance signal (price -> buy or sell) music note (freq -> in tune or not) terrain height (x, y -> noise filter)

Same one function.

Dynamic scale

scale = 0.5 coarse scale = 1.0 normal scale = 5.0 fine scale = 25.0 very fine

Any value works.

Batch

values = [i * 0.001 for i in range(1000000)] results = vyom.score_batch(values, target=1.2566)

License

MIT

Release files for vyom-sutra 1.0.1

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

Built distribution (wheel)

Table of built distributions (wheels) for vyom-sutra 1.0.1
File Interpreter ABI Platform
vyom_sutra-1.0.1-py3-none-any.whl Python 3 none any Details

Release files / vyom_sutra-1.0.1-py3-none-any.whl

Download URL vyom_sutra-1.0.1-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3ba5b71c9de8e82ae59071539a95d9c4e3dd20dc80bab1f77c30a3f5d52874c
BLAKE2b-256 checksum
How to use checksums
2b57466b308895ed14502dd7a0edab556c85412d67ffd21ce5632add5d54cc74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

1.0.2

1 release file

This release

1.0.1 This release

1 release file

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