Skip to main content

No project description provided

Project description

Dali

Dali (Data Analysis and Laboratory Instrumentation) is a Python library created for my laboratory courses. Dali was made to speed up tasks like plotting, data analysis and more, and was designed to be quite versatile as well as fast and reliable. Feel free to contribute by forking and opening pull requests.

Planned roadmap

Dali is still a very basic project with little core functionality, however it can speed up redundant and boring tasks by ~200%. Here is a list of all the features implemented so far:

  • Basic plotting (errorbar and histogram)
  • Support for multiple plots (max 3)
  • Multiple color palettes and designed to be stylish
  • Organized output folder for images
  • Basic algorithms for data analysis (Clusterization, Data cleaner)
  • LaTeX support for exporting measurements (Measurements and data tables)
  • Deployment as a Python package
  • Support for other types of plots (Spectrogram and more)

Install

To install Dali, simply use:

pip install dali_lib

To use it in your own project, use:

import Dali

# Your code...

Usage Example

The following code will produce this output:

plot

from Dali import *

def main():
    sigma = 0.3

    x = np.linspace(0, 10, 1000)
    y = LinearMap(x, 2, 0.2)
    y += np.random.randn(len(x)) * sigma

    p, cov = CurveFit(LinearMap, x, y, sigma=[sigma] * len(x), absolute_sigma=True)

    PlotErrorData(x, y, None, [sigma]*len(y), 'Data and best fit', 'Time [s]', 'Distance [cm]', legend = 'Data')
    PlotFit(x, LinearMap(x, *p))

    ChangePlotIndex(1)
    PlotHistogram(EvalSquareResidues(y, LinearMap(x, *p), len(x) - 2), 'Squared residues histogram', 'Squared distances [$\\sigma^2$]', 'Occurencies', bins = 20, legend=f'df = {len(x) - 2}')

    ChangePlotIndex(2)
    PlotHistogram(EvalResidues(y, LinearMap(x, *p), len(x) - 2), 'Residues histogram', 'Distances [$\\sigma$]', 'Frequencies', legend=f'df = {len(x) - 2}')

    ShowPlot('Trimosaic.png')

if __name__ == '__main__':
    InitPlotMode(mode = 'trimosaic', figSize = (16, 8), palette = 'Funky', path = 'Images/')
    main()

Project details


Download files

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

Source Distribution

dali_lib-1.0.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dali_lib-1.0.3-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

dali_lib-1.0.3-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dali_lib-1.0.3.tar.gz.

File metadata

  • Download URL: dali_lib-1.0.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for dali_lib-1.0.3.tar.gz
Algorithm Hash digest
SHA256 5266a6c03ef51c5398d6f14e9d3e96a5cc58c97ae3110a7dbc829b4693515dac
MD5 7d640999143a5bb0bd073dc4cb215fd5
BLAKE2b-256 c967d3478de981e248d5247513917990cabafefe6a177ce7a3b2c06b7bb20db5

See more details on using hashes here.

File details

Details for the file dali_lib-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: dali_lib-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for dali_lib-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0a27d7bf36f333d374d41e635a33685c03b5bec7add799df0aa4987e2f54d37f
MD5 fa57ec31275d017bcfe3d20f56b4b69c
BLAKE2b-256 f239737626aa75657ea47cac2d07c9560c1c945e7c88301fc1231db36251b13f

See more details on using hashes here.

File details

Details for the file dali_lib-1.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: dali_lib-1.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for dali_lib-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b367f5f3ffb683153dcc6afc6385f7a00c3a7eba750adecfb2d4209a704e46e0
MD5 63f5f733cb1541389d6e25f459b1426e
BLAKE2b-256 c20419de6e997f3dd385b284a5e2fef358d3e6793f9c92cd8b4cc919d178380c

See more details on using hashes here.

Supported by

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