Skip to main content

Compressed Sensing library for 1D Spectroscopic Profiling Data

Project description

cs1

Compressed Sensing library for 1D Spectroscopic Profiling

Installation

pip install cs1

A simple startup

from cs1 import cs, adaptive

# Generate common non-adaptive bases and save to a local pickle file.
# The generation process can be very slow, so save it for future use.
cs.Generate_PSIHs(n, savepath = 'PSIHs_' + str(n) + '.pkl') # n is the data/signal dimensionality

# load back bases
file = open('PSIs_' + str(n) + '.pkl','rb')
PSIs = pickle.load(file)
file.close()

# sparsity analysis
Analyze_Sparsity(x, PSIs)
# compare different bases and sampling ratio on a single sample
rmses = GridSearch_Sensing_n_Recovery(x, PSIs, solver = 'LASSO') # returns relative MSEs

low-level cs functions

dftmtx()
dctmtx()
hwtmtx()
Sensing()
Recovery()
Mutual_Coherence()
...

singal processing functions for other domains

Simulate_ECG()
dct_lossy_signal_compression()
dft_lossy_signal_compression()
img_dct()
img_dft()
dct_lossy_image_compression()
dft_lossy_image_compression()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

cs1-0.0.2-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file cs1-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: cs1-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/1.5.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for cs1-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e27889dec934d972cf0803d4a216bb47621b9c384858e41c451f5373d8436107
MD5 195755e0013454116e05f4da1796269e
BLAKE2b-256 3e96476a3b3223cd635a5bd3d8ae41ce44b5b53b34b96fa645171a78cdaf2306

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page