{"id":35342915,"url":"https://github.com/hissain/jscipy","last_synced_at":"2026-01-23T20:11:55.946Z","repository":{"id":325693159,"uuid":"1094424339","full_name":"hissain/jscipy","owner":"hissain","description":"Java Scientific Computing Library for Signal Processing, Filters, and Transformations. A NumPy/SciPy port for JVM \u0026 Android, used in Machine Learning and Data Science.","archived":false,"fork":false,"pushed_at":"2026-01-14T19:06:06.000Z","size":8500,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T21:39:40.383Z","etag":null,"topics":["android","chebyshev-filter","cubic-splines","data-science","dsp","fft","findpeaks","hilbert-transform","interpolation","java","machine-learning","numerical-computing","python","resample","savitzky-golay","scientific-computing","scipy","scipy-signal","signal-processing"],"latest_commit_sha":null,"homepage":"https://hissain.github.io/jscipy","language":"Java","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/hissain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-11T17:30:11.000Z","updated_at":"2026-01-14T19:05:55.000Z","dependencies_parsed_at":"2025-12-31T21:06:23.570Z","dependency_job_id":null,"html_url":"https://github.com/hissain/jscipy","commit_stats":null,"previous_names":["hissain/jscipy"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/hissain/jscipy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hissain%2Fjscipy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hissain%2Fjscipy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hissain%2Fjscipy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hissain%2Fjscipy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hissain","download_url":"https://codeload.github.com/hissain/jscipy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hissain%2Fjscipy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28568833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T12:50:50.164Z","status":"ssl_error","status_checked_at":"2026-01-19T12:50:42.704Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["android","chebyshev-filter","cubic-splines","data-science","dsp","fft","findpeaks","hilbert-transform","interpolation","java","machine-learning","numerical-computing","python","resample","savitzky-golay","scientific-computing","scipy","scipy-signal","signal-processing"],"created_at":"2026-01-01T10:00:23.244Z","updated_at":"2026-01-19T13:01:08.669Z","avatar_url":"https://github.com/hissain.png","language":"Java","funding_links":[],"categories":["The Data Science Toolbox","Java","Projects"],"sub_categories":["General Machine Learning Packages","[Tools](#tools-1)","Science"],"readme":"# jSciPy: Java Scientific Computing Library\n\n![Build Status](https://github.com/hissain/jscipy/actions/workflows/android.yml/badge.svg)\n[![](https://jitpack.io/v/hissain/jscipy.svg)](https://jitpack.io/#hissain/jscipy)\n![License](https://img.shields.io/github/license/hissain/jscipy?color=blue)\n\n**jSciPy** is a comprehensive **Java Scientific Computing Library** designed for **Signal Processing**, **Machine Learning**, and **Data Science** on the JVM and Android. Inspired by Python's **SciPy** and **NumPy**, it provides high-performance implementations of essential algorithms.\n\nIt currently includes modules for:\n*   **Signal Processing**: Butterworth, Chebyshev, Elliptic, Bessel filters, 2D Convolution, Savitzky-Golay smoothing, Peak detection.\n*   **Transformations**: FFT (Fast Fourier Transform), Hilbert Transform, Welch PSD, Spectrogram, Convolution.\n*   **Math \u0026 Analysis**: RK4 ODE Solver, Interpolation (Linear, Cubic Spline), Resampling.\n\nIn modern machine learning workflows, most signal processing tasks rely on Python's SciPy utilities. However, there is no Java library that replicates SciPy's behavior with comparable completeness and consistency. This creates a significant gap for teams building ML or signal processing pipelines on the JVM. jSciPy aims to fill this gap, and the demand for such a library is higher than ever.\n\n## Why jSciPy?\n\nThe table below compares jSciPy’s signal processing and scientific computing features with several other popular Java libraries, highlighting areas where jSciPy provides more comprehensive functionality.\n\n| Feature / Characteristic              | jSciPy                          | Commons Math            | JDSP                                      | TarsosDSP                       | IIRJ            | EJML            |\n|---------------------------------------|---------------------------------|-------------------------|-------------------------------------------|---------------------------------|-----------------|-----------------|\n| Primary Focus                         | **SciPy-style Signal + Scientific** | General Math/Stats     | Java DSP Toolbox                          | Audio Processing                | IIR Filter Only | Linear Algebra  |\n| Zero-Phase Filtering (`filtfilt`)     | ✅ Yes (SciPy-compatible)       | ❌ No                   | ❌ No                                     | ❌ No                           | ❌ No           | ❌ No           |\n| 2D Signal Ops (`conv2d`, `fft2`)      | ✅ Yes                          | ❌ No                   | ❌ No                                     | ❌ No                           | ❌ No           | ❌ No           |\n| SciPy-like API Consistency            | ✅ High (SciPy semantics)       | ❌ Low                  | ⚠️ Partial Java DSP                       | ❌ No                           | ❌ No           | ❌ No           |\n| Filtering Capabilities                | ⭐⭐⭐⭐⭐ (IIR+FIR+advanced)      | ⭐ Basic                 | ⭐⭐⭐ (IIR/FIR \u0026 adaptive)                 | ⭐⭐ (audio filters)             | ⭐⭐ (IIR only)  | ❌ No           |\n| Transforms (FFT/Hilbert)              | ✅ FFT + Hilbert                | Limited / Basic FFT only| ✅ FFT + Hilbert                          | ✅ FFT spectrum tools (audio)   | ❌ No           | ❌ No           |\n| Interpolation (Linear/Cubic)          | ✅ Yes                          | ✅ Yes                  | ✅ Yes                                    | ❌ No                           | ❌ No           | ❌ No           |\n| ODE Solvers (RK4)                     | ✅ Yes                          | ✅ Yes                  | ❌ No                                     | ❌ No                           | ❌ No           | ❌ No           |\n| Signal Analysis (Peak/PSD)            | ✅ Yes                          | ❌ No                   | ⚠️ Partial (peak detection)               | ⚠️ Partial (audio metrics)      | ❌ No           | ❌ No           |\n| Welch PSD                             | ✅ Yes                          | ❌ No                   | ❌ No                                     | ❌ No                           | ❌ No           | ❌ No           |\n| Spectrogram                           | ✅ Yes                          | ❌ No                   | ✅ Yes                                    | ✅ Yes                           | ❌ No           | ❌ No           |\n| Window Functions                      | ✅ Yes                          | ❌ No                   | ✅ Yes                                    | ✅ Yes                           | ❌ No           | ❌ No           |\n| Savitzky-Golay Filter                 | ✅ Yes                          | ❌ No                   | ✅ Yes                                    | ❌ No                           | ❌ No           | ❌ No           |\n| Median Filter (`medfilt`)             | ✅ Yes                          | ❌ No                   | ✅ Yes                                    | ❌ No                           | ❌ No           | ❌ No           |\n| Detrending                            | ✅ Yes                          | ❌ No                   | ✅ Yes                                    | ❌ No                           | ❌ No           | ❌ No           |\n| Real-Optimized FFT (`rfft`/`irfft`)   | ✅ Yes                          | ❌ No                   | ✅ Yes                                    | ❌ No                           | ❌ No           | ❌ No           |\n| STFT / ISTFT Support                  | ✅ Yes (SciPy-like)             | ❌ No                   | ✅ Yes (dedicated classes)                | ⚠️ Partial (internal use only)  | ❌ No           | ❌ No           |\n| 1D Convolution with Modes (`convolve`)| ✅ Yes (with modes)             | ❌ No                   | ⚠️ Partial (convolve1d, limited modes)    | ⚠️ Partial (implied, no modes)  | ❌ No           | ❌ No           |\n| Resampling (`resample`)               | ✅ Yes                          | ❌ No                   | ✅ Yes                                    | ✅ Yes                           | ❌ No           | ❌ No           |\n| Signal Padding Utilities (`padSignal`)| ✅ Yes                          | ❌ No                   | ❌ No                                     | ❌ No                           | ❌ No           | ❌ No           |\n| Configurable Peak Finding (`find_peaks` with prominence etc.) | ✅ Yes                 | ❌ No                   | ✅ Yes                                    | ⚠️ Partial (spectral peaks only)| ❌ No           | ❌ No           |\n\n\n## Features\n\n*   **Advanced Filtering**: Butterworth, Chebyshev, Elliptic, Bessel. Supports **zero-phase (`filtfilt`)**, causal (`lfilter`), and **Second-Order Sections (`sosfilt`)** modes.\n*   **2D Processing**: `convolve2d` (Full/Same/Valid), `fft2`, `ifft2`.\n*   **Transforms**: standard 1D `fft` / `ifft`, real-optimized `rfft` / `irfft`, `stft` / `istft` (Short-Time Fourier Transform), `hilbert` transform.\n*   **Smoothing \u0026 Analysis**: Savitzky-Golay, `find_peaks`, Welch's PSD, `spectrogram`, `detrend`, `resample`.\n*   **Window Functions**: Hanning, Hamming, Blackman, Kaiser.\n\n## Accuracy \u0026 Precision\n\njSciPy is rigorously tested against Python's SciPy using a \"Golden Master\" approach. Below is a summary of the precision (RMSE) achieved across various modules:\n\n| Module | Test Case | RMSE (Approx) | Status |\n| :--- | :--- | :--- | :--- |\n| **Filters** | Butterworth, Chebyshev, Elliptic, Bessel | `1e-14` to `1e-16` | ✅ Excellent |\n| **FFT** | 1D FFT, RFFT, IFFT | `1e-15` to `1e-16` | ✅ Excellent |\n| **Spectral** | Spectrogram, Welch, STFT/ISTFT | `1e-16` to `1e-18` | ✅ Excellent |\n| **SOS Filt** | Second-Order Sections Filter | `1e-16` | ✅ Excellent |\n| **2D Ops** | 2D FFT, 2D Convolution | `1e-16` | ✅ Excellent |\n| **Math** | Interpolation, Resample | `1e-16` | ✅ Excellent |\n| **ODE** | RK4 Solver | `8e-5` | ✅ Good (Method dependent) |\n\n## Documentation\n\nYou can access full documentation javadoc of the jscipy library [HERE](https://hissain.github.io/jscipy).\n\n## Getting Started\n\n### Prerequisites\n\n* Java Development Kit (JDK) 8 or higher\n* Gradle (for building the project)\n\n## How to Include as a Dependency (JitPack)\n\nJitPack is a novel package repository for JVM projects. It builds GitHub projects on demand and provides ready-to-use artifacts (jar, javadoc, sources).\n\nTo use this library in your Gradle project, add the JitPack repository and the dependency to your `build.gradle` file:\n\n```gradle\n// In your root build.gradle (or settings.gradle for repository definition)\nallprojects {\n    repositories {\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n}\n\n// In your app's build.gradle\ndependencies {\n    implementation 'com.github.hissain:jSciPy:3.0.2' // Replace 3.0.2 with the desired version or commit hash\n}\n```\n\n## Demo Android Application\n\nA seperate demo android application is built on this library that might be helpful to understand how to consume this library. The application can be accessed [here](https://github.com/hissain/jscipy-android).\n\n## Comparison Graphs\n\n### Butterworth Filter Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/butterworth_simple_o4_input.txt_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/butterworth_simple_o4_input.txt_light.png\"\u003e\n  \u003cimg alt=\"Butterworth Comparison\" src=\"python/figs/butterworth_simple_o4_input.txt_light.png\"\u003e\n\u003c/picture\u003e\n\n### Chebyshev Filter Comparison\n\n**Type I:**\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/cheby1_input1.txt_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/cheby1_input1.txt_light.png\"\u003e\n  \u003cimg alt=\"Chebyshev Type I Comparison\" src=\"python/figs/cheby1_input1.txt_light.png\"\u003e\n\u003c/picture\u003e\n\n**Type II:**\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/cheby2_input1.txt_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/cheby2_input1.txt_light.png\"\u003e\n  \u003cimg alt=\"Chebyshev Type II Comparison\" src=\"python/figs/cheby2_input1.txt_light.png\"\u003e\n\u003c/picture\u003e\n\n### Elliptic Filter Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/ellip_input1.txt_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/ellip_input1.txt_light.png\"\u003e\n  \u003cimg alt=\"Elliptic Filter Comparison\" src=\"python/figs/ellip_input1.txt_light.png\"\u003e\n\u003c/picture\u003e\n\n### Bessel Filter Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/bessel_comparison_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/bessel_comparison_light.png\"\u003e\n  \u003cimg alt=\"Bessel Filter Comparison\" src=\"python/figs/bessel_comparison_light.png\"\u003e\n\u003c/picture\u003e\n\n### RK4 Solver Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/rk4_input.txt_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/rk4_input.txt_light.png\"\u003e\n  \u003cimg alt=\"RK4 Comparison\" src=\"python/figs/rk4_input.txt_light.png\"\u003e\n\u003c/picture\u003e\n\n### FindPeaks Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/findpeaks_input1.txt_peaks_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/findpeaks_input1.txt_peaks_light.png\"\u003e\n  \u003cimg alt=\"FindPeaks Comparison\" src=\"python/figs/findpeaks_input1.txt_peaks_light.png\"\u003e\n\u003c/picture\u003e\n\n### Interpolation Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/interpolation_comparison_1_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/interpolation_comparison_1_light.png\"\u003e\n  \u003cimg alt=\"Interpolation Comparison\" src=\"python/figs/interpolation_comparison_1_light.png\"\u003e\n\u003c/picture\u003e\n\n### FFT Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/fft_comparison_1_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/fft_comparison_1_light.png\"\u003e\n  \u003cimg alt=\"FFT Comparison\" src=\"python/figs/fft_comparison_1_light.png\"\u003e\n\u003c/picture\u003e\n\n### Welch's Method Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/welch_comparison_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/welch_comparison_light.png\"\u003e\n  \u003cimg alt=\"Welch Comparison\" src=\"python/figs/welch_comparison_light.png\"\u003e\n\u003c/picture\u003e\n\n### Spectrogram Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/spectrogram_chirp_comparison_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/spectrogram_chirp_comparison_light.png\"\u003e\n  \u003cimg alt=\"Spectrogram Comparison\" src=\"python/figs/spectrogram_chirp_comparison_light.png\"\u003e\n\u003c/picture\u003e\n\n### Resample Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/resample_comparison_1_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/resample_comparison_1_light.png\"\u003e\n  \u003cimg alt=\"Resample Comparison\" src=\"python/figs/resample_comparison_1_light.png\"\u003e\n\u003c/picture\u003e\n\n### Savitzky-Golay Comparison\n\n**Smoothing:**\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/savitzky_golay_smoothing_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/savitzky_golay_smoothing_light.png\"\u003e\n  \u003cimg alt=\"Savitzky-Golay Smoothing\" src=\"python/figs/savitzky_golay_smoothing_light.png\"\u003e\n\u003c/picture\u003e\n\n**Differentiation:**\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/savitzky_golay_differentiation_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/savitzky_golay_differentiation_light.png\"\u003e\n  \u003cimg alt=\"Savitzky-Golay Differentiation\" src=\"python/figs/savitzky_golay_differentiation_light.png\"\u003e\n\u003c/picture\u003e\n\n### Detrend Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/detrend_comparison_1_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/detrend_comparison_1_light.png\"\u003e\n  \u003cimg alt=\"Detrend Comparison\" src=\"python/figs/detrend_comparison_1_light.png\"\u003e\n\u003c/picture\u003e\n\n### MedFilt Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/medfilt_comparison_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/medfilt_comparison_light.png\"\u003e\n  \u003cimg alt=\"MedFilt Comparison\" src=\"python/figs/medfilt_comparison_light.png\"\u003e\n\u003c/picture\u003e\n\n### 1D Convolve Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/convolve_comparison_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/convolve_comparison_light.png\"\u003e\n  \u003cimg alt=\"Convolve Comparison\" src=\"python/figs/convolve_comparison_light.png\"\u003e\n\u003c/picture\u003e\n\n### 2D Convolve Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/convolve2d_comparison_full_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/convolve2d_comparison_full_light.png\"\u003e\n  \u003cimg alt=\"2D Convolve Comparison\" src=\"python/figs/convolve2d_comparison_full_light.png\"\u003e\n\u003c/picture\u003e\n\n### 2D FFT Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/fft2_comparison_forward_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/fft2_comparison_forward_light.png\"\u003e\n  \u003cimg alt=\"2D FFT Comparison\" src=\"python/figs/fft2_comparison_forward_light.png\"\u003e\n\u003c/picture\u003e\n\n### Hilbert Transform Comparison\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/hilbert_comparison_1_dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/hilbert_comparison_1_light.png\"\u003e\n  \u003cimg alt=\"Hilbert Transform Comparison\" src=\"python/figs/hilbert_comparison_1_light.png\"\u003e\n\u003c/picture\u003e\n\n### Window Functions Comparison\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"python/figs/windows_comparison_dark.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"python/figs/windows_comparison_light.png\"\u003e\n    \u003cimg alt=\"Window Functions Comparison\" src=\"python/figs/windows_comparison_light.png\" width=\"800\"\u003e\n  \u003c/picture\u003e\n  \u003cbr\u003e\n  \u003cem\u003eComparison of Bartlett, Flat Top, and Bohman Windows\u003c/em\u003e\n\u003c/p\u003e\n\n\n## Usage Examples\n\n### Digital Filters\nAll standard IIR filters (Butterworth, Chebyshev I/II, Elliptic, Bessel) are supported with consistent APIs.\n\n```java\nimport com.hissain.jscipy.Signal;\n\npublic class FilterExample {\n    public static void main(String[] args) {\n        double[] signal = {/*... input data ...*/};\n        double fs = 100.0;\n        double fc = 10.0;\n        int order = 4;\n\n        // 1. Butterworth: Zero-phase vs Causal\n        double[] zeroPhase = Signal.filtfilt(signal, fs, fc, order);\n        double[] causal = Signal.lfilter(signal, fs, fc, order);\n\n        // 2. Chebyshev Type I (Ripple 1dB) \u0026 Type II (Stopband 20dB)\n        double[] cheby1 = Signal.cheby1_filtfilt(signal, fs, fc, order, 1.0);\n        double[] cheby2 = Signal.cheby2_filtfilt(signal, fs, fc, order, 20.0);\n\n        // 3. Elliptic (Ripple 1dB, Stopband 40dB)\n        double[] ellip = Signal.ellip_filtfilt(signal, fs, fc, order, 1.0, 40.0);\n        \n        // 4. Bessel (Linear Phase)\n        double[] bessel = Signal.bessel_filtfilt(signal, fs, fc, order);\n\n        // Filter Modes: High-pass, Band-pass, Band-stop\n        // Available for all filter types (suffix: _highpass, _bandpass, _bandstop)\n        double[] bandPass = Signal.filtfilt_bandpass(signal, fs, 8.0, 4.0, order); // Center=10, Width=4\n\n        // 5. Second-Order Sections (SOS) Filtering\n        // If you have SOS coefficients (e.g., from Python/SciPy)\n        double[][] sos = { /* ... 6 coefficients per section ... */ };\n        double[] sosFiltered = Signal.sosfilt(signal, sos);\n    }\n}\n```\n\n### Spectral Analysis \u0026 Transforms\nIncludes 1D/2D FFT, Hilbert Transform, Welch's Method, and Spectrograms.\n\n```java\nimport com.hissain.jscipy.Signal;\nimport com.hissain.jscipy.signal.JComplex;\nimport com.hissain.jscipy.signal.fft.Welch;\nimport com.hissain.jscipy.signal.fft.Spectrogram;\nimport com.hissain.jscipy.signal.fft.Hilbert;\n\npublic class SpectralExample {\n    public static void main(String[] args) {\n        double[] signal = {/*... input data ...*/};\n        double fs = 1000.0;\n\n        // 1. FFT / IFFT\n        JComplex[] fft = Signal.fft(signal);\n        JComplex[] ifft = Signal.ifft(fft);\n        \n        // 2. Real-optimized FFT (RFFT)\n        JComplex[] rfft = Signal.rfft(signal);\n        \n        // 3. Welch's Method (PSD)\n        Welch.WelchResult psd = Signal.welch(signal, fs, 256);\n        // Access: psd.f (frequencies), psd.Pxx (power spectrum)\n\n        // 4. Spectrogram\n        Spectrogram.SpectrogramResult spec = Signal.spectrogram(signal, fs);\n        // Access: spec.frequencies, spec.times, spec.Sxx\n\n        // 5. Hilbert Transform (Analytic Signal)\n        Hilbert h = new Hilbert();\n        JComplex[] analytic = h.hilbert(signal);\n\n        // 6. Short-Time Fourier Transform (STFT)\n        JComplex[][] stft = Signal.stft(signal); // Uses default nperseg=256, noverlap=128\n        \n        // 7. Inverse STFT\n        double[] reconstructed = Signal.istft(stft);\n    }\n}\n```\n\n\n\n\n### Smoothing \u0026 Signal Operations\nCommon operations for signal conditioning and feature extraction.\n\n```java\nimport com.hissain.jscipy.Signal;\nimport com.hissain.jscipy.signal.filter.SavitzkyGolayFilter;\nimport com.hissain.jscipy.signal.filter.MedFilt;\n\npublic class OperationsExample {\n    public static void main(String[] args) {\n        double[] signal = {/*... data ...*/};\n\n        // 1. Savitzky-Golay Smoothing\n        SavitzkyGolayFilter sg = new SavitzkyGolayFilter();\n        double[] smoothed = sg.savgol_filter(signal, 5, 2); // Window=5, PolyOrder=2\n        double[] deriv = sg.savgol_filter(signal, 5, 2, 1, 1.0); // 1st Derivative\n\n        // 2. Peak Detection\n        // Min Height=0.5, Min Distance=10, Min Prominence=0.2\n        int[] peaks = Signal.find_peaks(signal, 0.5, 10, 0.2);\n\n        // 3. Median Filter\n        double[] med = new MedFilt().medfilt(signal, 3); // Kernel=3\n\n        // 4. Convolution (Mode: SAME, FULL, VALID)\n        double[] window = {0.25, 0.5, 0.25};\n        double[] conv = Signal.convolve(signal, window, ConvolutionMode.SAME);\n        \n        // 5. Detrending (Linear)\n        double[] detrended = Signal.detrend(signal, DetrendType.LINEAR);\n        \n        // 6. Resampling (Up/Down sampling)\n        // Note: Resampling is part of the Math module\n        double[] resampled = com.hissain.jscipy.Math.resample(signal, NEW_LENGTH);\n    }\n}\n```\n\n### Math \u0026 Interpolation\nGeneral-purpose numerical utilities.\n\n```java\nimport com.hissain.jscipy.math.RK4Solver;\nimport com.hissain.jscipy.Math;\n\npublic class MathExample {\n    public static void main(String[] args) {\n        // 1. Interpolation (Linear \u0026 Cubic)\n        double[] x = {0, 1, 2}, y = {0, 1, 4};\n        double[] query = {0.5, 1.5};\n        \n        double[] lin = Math.interp1d_linear(x, y, query);\n        double[] cub = Math.interp1d_cubic(x, y, query);\n\n        // 2. RK4 ODE Solver (dy/dt = -y)\n        RK4Solver solver = new RK4Solver();\n        RK4Solver.Solution sol = solver.solve((t, y) -\u003e -y, y0, t0, tf, step);\n    }\n}\n```\n\n## Contributing\n\nContributions are welcome! Please read our [Contribution Guidelines](CONTRIBUTING.md) for details on our workflow and coding standards. Feel free to submit issues or pull requests.\n\n### Areas for Contribution (Help Wanted)\n\nWe are actively looking for contributors to help with:\n1.  **Performance Benchmarking**: Creating benchmarks for large datasets to compare Java's performance vs NumPy/SciPy.\n2.  **Feature Expansion**: Implementing missing window functions or additional filter types.\n3.  **Edge Case Robustness**: Improving handling of `NaN`, `Infinity`, and edge cases in signal processing algorithms.\n4.  **Documentation**: Adding more usage examples and javadocs.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhissain%2Fjscipy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhissain%2Fjscipy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhissain%2Fjscipy/lists"}