Skip to content

Commit 9de71b7

Browse files
committed
bug fixes
1 parent 419c289 commit 9de71b7

6 files changed

Lines changed: 61 additions & 22 deletions

File tree

-4.25 KB
Binary file not shown.

dist/electrocute-0.1.0.tar.gz

-3.46 KB
Binary file not shown.
4.73 KB
Binary file not shown.

dist/electrocute-0.1.1.tar.gz

4.15 KB
Binary file not shown.

electrocute.egg-info/PKG-INFO

Lines changed: 60 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.4
22
Name: electrocute
3-
Version: 0.1.0
3+
Version: 0.1.1
44
Summary: A Python library for electronic formulas and signal processing
55
Home-page: https://github.com/madhurthareja/electrocute
66
Author: Madhur Thareja
@@ -22,48 +22,87 @@ Dynamic: requires-dist
2222
Dynamic: requires-python
2323
Dynamic: summary
2424

25-
# Electrocute
25+
# Electrocute
2626

27-
**Electrocute** is a Python library designed for electronic formulas and signal processing. It provides easy-to-use functions for calculations like Ohm's Law, power, FFT, DFT, and filters, making it ideal for engineers, students, and hobbyists.
27+
**Electrocute** is a Python library built for electronics and signal processing enthusiasts. Whether you're an engineer, student, or hobbyist, this package offers intuitive functions for working with electrical formulas and analyzing signals with ease.
2828

2929
---
3030

31-
## Installation
31+
## 📦 Installation
3232

3333
```bash
3434
pip install electrocute
3535
```
3636

37-
## Usage
37+
---
38+
39+
## 🚀 Quick Start
40+
41+
### Basic Electronic Formulas
3842

3943
```python
40-
from electrocute import Electrocute
44+
from electrocute.formulas.basic import BasicFormulas
45+
46+
# Calculate voltage using Ohm's Law: V = I * R
47+
voltage = BasicFormulas.ohms_law(current=2, resistance=5)
48+
print(f"Voltage: {voltage} V") # Output: Voltage: 10 V
49+
50+
# Calculate power: P = V * I
51+
power = BasicFormulas.power(voltage=10, current=2)
52+
print(f"Power: {power} W") # Output: Power: 20 W
53+
```
4154

42-
# Calculate voltage using Ohm's Law
43-
voltage = Electrocute.ohms_law(current=2, resistance=5)
44-
print(f"Voltage: {voltage} V") # Output: 10 V
55+
### Frequency Spectrum Analysis
4556

57+
```python
4658
import numpy as np
47-
from electrocute import Electrocute
59+
from electrocute.signal_processing.transforms import Transforms
4860

61+
# Generate a simple sine wave signal
4962
t = np.linspace(0, 1, 1000, endpoint=False)
5063
signal = np.sin(2 * np.pi * 10 * t)
51-
freqs, amps = Electrocute.frequency_spectrum(signal, sampling_rate=1000)
64+
65+
# Get the frequency spectrum
66+
freqs, amps = Transforms.frequency_spectrum(signal, sampling_rate=1000)
67+
```
68+
69+
### Filtering Signals
70+
71+
```python
72+
from electrocute.signal_processing.filters import Filters
73+
74+
# Create a signal with multiple frequency components
75+
t = np.linspace(0, 1, 1000, endpoint=False)
76+
signal = np.sin(2 * np.pi * 10 * t) + 0.5 * np.sin(2 * np.pi * 20 * t)
77+
78+
# Apply a low-pass filter with a cutoff at 15 Hz
79+
filtered_signal = Filters.low_pass_filter(signal, cutoff=15, sampling_rate=1000)
5280
```
5381

54-
## Features
82+
---
83+
84+
## 🔧 Features
85+
86+
- 📐 **Electronic Formulas**: Ohm's Law, power, and more.
87+
- 🎚️ **Signal Processing**: FFT, DFT, filtering, and spectral analysis.
88+
- 📚 **Extensible API**: Easy-to-use, modular design for seamless integration.
5589

56-
- Electronic formulas (Ohm's Law, power calculations, etc.)
57-
- Signal processing (FFT, DFT, frequency spectrum, filters)
58-
- Extensible and well-documented API
90+
---
91+
92+
## 🤝 Contributing
93+
94+
Contributions are welcome!
95+
If you'd like to report a bug, request a feature, or contribute code, feel free to open an issue or submit a pull request on [GitHub](https://github.com/your-repo/electrocute).
5996

60-
## Contributing
97+
---
98+
99+
## 👨‍💻 Maintainers
61100

62-
Contributions are welcome! Please submit a pull request or open an issue on GitHub.
101+
This library is actively developed and maintained by **Madhur Thareja**.
63102

64-
### Maintainers:
65-
This library is under development and is actively maintained by Madhur Thareja.
103+
---
66104

67-
## License
105+
## 📄 License
68106

69-
MIT License
107+
Licensed under the [MIT License](https://opensource.org/licenses/MIT).
108+
Feel free to use, modify, and distribute this library.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="electrocute",
5-
version="0.1.0",
5+
version="0.1.1",
66
author="Madhur Thareja",
77
author_email="madhurthareja1105@gmail.com",
88
description="A Python library for electronic formulas and signal processing",

0 commit comments

Comments
 (0)