{"id":29801458,"url":"https://github.com/galihru/laplapy","last_synced_at":"2025-07-28T09:46:28.022Z","repository":{"id":299364521,"uuid":"1002789401","full_name":"galihru/LaplaPy","owner":"galihru","description":"Symbolic Differentiation \u0026 Laplace Transform Utility A scientific Python library for step-by-step symbolic computation of time-domain derivatives and their Laplace transforms.","archived":false,"fork":false,"pushed_at":"2025-06-29T12:52:34.000Z","size":205,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-22T02:12:28.029Z","etag":null,"topics":["computation-physics","laplacian","library","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/galihru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-16T06:35:09.000Z","updated_at":"2025-06-29T12:52:31.000Z","dependencies_parsed_at":"2025-06-16T07:16:26.099Z","dependency_job_id":"0d247855-f635-408a-8978-3917d605a95c","html_url":"https://github.com/galihru/LaplaPy","commit_stats":null,"previous_names":["4211421036/laplapy","galihru/laplapy"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/galihru/LaplaPy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galihru%2FLaplaPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galihru%2FLaplaPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galihru%2FLaplaPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galihru%2FLaplaPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/galihru","download_url":"https://codeload.github.com/galihru/LaplaPy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galihru%2FLaplaPy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267497139,"owners_count":24097104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computation-physics","laplacian","library","python"],"created_at":"2025-07-28T09:45:56.790Z","updated_at":"2025-07-28T09:46:28.006Z","avatar_url":"https://github.com/galihru.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LaplaPy: Advanced Symbolic Laplace Transform Analysis\n\n[![PyPI Version](https://img.shields.io/pypi/v/LaplaPy?color=blue)](https://pypi.org/project/LaplaPy/)\n[![PyPI Downloads](https://static.pepy.tech/badge/LaplaPy/month)](https://pepy.tech/project/LaplaPy)\n[![GitHub Actions](https://github.com/4211421036/LaplaPy/actions/workflows/py.yml/badge.svg)](https://github.com/4211421036/LaplaPy/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n---\n\n## Overview\n\n**LaplaPy** is a professional-grade Python library for:\n\n* **Symbolic Laplace transforms** with rigorous *Region of Convergence* (ROC) analysis\n* **Linear ODE solving** via Laplace methods, including initial conditions\n* **Control system analysis**: pole-zero maps, stability checks, frequency/time responses\n* **Educational, step-by-step output modes** for teaching and self-study\n\nDesigned for engineers, scientists, and researchers in control theory, signal processing, electrical/mechanical systems, and applied mathematics.\n\n---\n\n## Features\n\n1. **Forward \u0026 Inverse Laplace** with automatic ROC determination\n2. **ODE Solver**: direct transform–solve–invert workflow for linear constant-coefficient equations\n3. **Pole-Zero Analysis**: identify all poles and zeros symbolically\n4. **Stability Assessment**: evaluate pole locations in the complex plane\n5. **Frequency Response \u0026 Bode**: generate magnitude/phase plots data for `ω ∈ [ω_min, ω_max]`\n6. **Time-Domain Response**: compute response to arbitrary inputs (e.g., steps, impulses, sinusoids)\n7. **Causal/Non-Causal Modes**: model physical vs. mathematical systems\n8. **Step-by-Step Tracing**: verbose mode to print every algebraic step (educational)\n\n---\n\n## Installation\n\n**From PyPI**:\n\n```bash\npip install LaplaPy\n```\n\n**From source (dev)**:\n\n```bash\ngit clone https://github.com/4211421036/LaplaPy.git\ncd LaplaPy\npip install -e .[dev]\n```\n\nDependencies: `sympy\u003e=1.10`, `numpy`.\n\n---\n\n## Quickstart Examples\n\n### 1. Basic Laplace Transform\n\n```python\nfrom LaplaPy import LaplaceOperator, t, s\n\n# f(t) = e^{-3t} + sin(2t)\nop = LaplaceOperator(\"exp(-3*t) + sin(2*t)\", show_steps=False)\nF_s = op.forward_laplace()\nprint(\"F(s) =\", F_s)       # 1/(s+3) + 2/(s^2+4)\nprint(\"ROC:\", op.roc)       # Re(s) \u003e -3\n```\n\n### 2. Inverse Transform\n\n```python\n# Recover f(t)\nf_recov = op.inverse_laplace()\nprint(\"f(t) =\", f_recov)    # exp(-3*t) + sin(2*t)\n```\n\n### 3. Solve ODE\n\n```python\nfrom sympy import Eq, Function, Derivative, exp\n\nf = Function('f')(t)\node = Eq(Derivative(f, t, 2) + 3*Derivative(f, t) + 2*f,\n         exp(-t))\n# ICs: f(0)=0, f'(0)=1\nsol = LaplaceOperator(0).solve_ode(node,\n      {f.subs(t,0):0, Derivative(f,t).subs(t,0):1})\nprint(sol)  # (e^{-t} - e^{-2t})\n```\n\n### 4. System Analysis \u0026 Bode Data\n\n```python\n# H(s) = (s+1)/(s^2+0.2*s+1)\nop = LaplaceOperator(\"(s+1)/(s**2+0.2*s+1)\")\nop.forward_laplace()\nanalysis = op.system_analysis()\n# poles, zeros, stability\ndefp print(analysis)\n# Bode data\nω, mag_db, phase = op.bode_plot(w_min=0.1, w_max=100, points=200)\n```\n\n### 5. Time-Domain Response\n\n```python\n# Response to sin(4t)\nr = op.time_domain_response(\"sin(4*t)\")\nprint(r)\n```\n\n---\n\n## CLI Usage\n\nThe `LaplaPy` console script provides a quick interface:\n\n```bash\n# Laplace transform + 2nd derivative:\nLaplaPy \"exp(-2*t)*sin(3*t)\" --laplace\n\n# Inverse Laplace:\nLaplaPy \"1/(s**2+4)\" --inverse\n\n# Solve ODE with ICs:\nLaplaPy \"f''(t)+4*f(t)=exp(-t)\" --ode \\\n        --ic \"f(0)=0\" \"f'(0)=1\"\n```\n\n**Flags**:\n\n* `--laplace` (`-L`) : forward transform\n* `--inverse` (`-I`): inverse transform\n* `--ode` (`-O`)    : solve ODE\n* `--ic`: initial conditions\n* `--quiet`: suppress verbose steps\n* `--causal/--noncausal`: choose system causality\n\n---\n\n## 📚 Mathematical Foundations\n\n### Laplace Transform Definition\n\n$$\n\\mathcal{L}\\{f(t)\\}(s)\n= \\int_{0^-}^{\\infty} e^{-st}f(t)\\,dt\n$$\n\n### Derivative Property\n\n$$\n\\mathcal{L}\\{f^{(n)}(t)\\}(s)\n= s^nF(s)-\\sum_{k=0}^{n-1}s^{n-1-k}f^{(k)}(0^+)\n$$\n\n### Region of Convergence (ROC)\n\n* For causal signals: \\$\\mathrm{Re}(s) \u003e \\max(\\mathrm{Re}(\\text{poles}))\\$\n* ROC ensures transform integrals converge and stability criteria\n\n### Pole-Zero \u0026 Stability\n\n* **Poles**: roots of denominator \\$D(s)=0\\$\n* **Zeros**: roots of numerator \\$N(s)=0\\$\n* **Stability**: all poles in left-half complex plane\n\n### Frequency Response\n\n$$\nH(j\\omega)=H(s)\\big|_{s=j\\omega}\n=|H(j\\omega)|e^{j\\angle H(j\\omega)}\n$$\n\n---\n\n## Development \u0026 Testing\n\n```bash\n# Install dev extras\npip install -e .[dev]\n\n# Run test suite\npytest -q\n\n# Lint with ruff\nruff .\n\n# Type-check (mypy)\nmypy LaplaPy\n```\n\n---\n\n## License\n\nDistributed under the **MIT License**. See [LICENSE](LICENSE) for details.\n\n---\n\n## Citation\n\n```bibtex\n@software{LaplaPy,\n  author    = {GALIH RIDHO UTOMO},\n  title     = {LaplaPy: Advanced Symbolic Laplace Transform Analysis},\n  year      = {2025},\n  url       = {https://github.com/4211421036/LaplaPy},\n  version   = {0.2.2}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalihru%2Flaplapy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgalihru%2Flaplapy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalihru%2Flaplapy/lists"}