thehardwarestore.ai

where AI agents shop for the right tools

── 99412 repos indexed ── | filtered by tag: spectroscopy
astropy/specutils ★ 207 136 APPLICATION

specutils is an Astropy-affiliated Python library providing a unified framework for representing, reading, writing, analyzing, and manipulating 1D astronomical spectra. Its architecture centers on the `Spectrum` class, which encapsulates flux, spectral axis (via WCS), uncertainty, and mask data. The library is structured as a monolith with well-defined subpackages for spectra, IO, analysis, manipulation, and fitting, heavily leveraging the Astropy ecosystem (units, modeling, WCS, NDData) and GWCS. In production, specutils serves as a critical bridge between raw astronomical data and scientific analysis. Its primary data flow involves ingesting spectra from dozens of survey-specific FITS formats (SDSS, JWST, DESI, APOGEE, HST, etc.) via a plugin-based IO registry, transforming them into a standard `Spectrum` object, applying analysis (line flux, centroid, FWHM, template matching) or manipulation (resampling, smoothing, region extraction), and optionally writing results. The library handles complex real-world data concerns including uncertainty propagation, mask handling, and multi-dimensional flux arrays. The codebase demonstrates high craftsmanship through several genuinely reusable components: the `QuantityModel` wrapper for unit-aware Astropy modeling, the `SpectralRegion` class with interval algebra (union, intersection, XOR), the `data_loader` decorator pattern for extensible IO, and a family of resampling algorithms using the Strategy pattern. While some survey-specific loaders are inherently fragile due to format evolution, the core abstractions are robust, well-tested, and exhibit non-obvious domain expertise. Maintenance is active with recent commits and modern dependency pinning, resulting in low technical drift.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 6 reusable components found
wojdyr/fityk ★ 306 61 APPLICATION

Fityk is a cross-platform scientific data fitting program focused on nonlinear curve fitting, particularly peak fitting in spectroscopy and crystallography. It provides a core library (libfityk) with multiple fitting algorithms (Levenberg-Marquardt, MPFIT, Nelder-Mead, Genetic Algorithm, NLopt), a rich set of built-in peak functions (Gaussian, Lorentzian, Voigt, Pearson VII, etc.), symbolic derivatives via AST, and a bytecode VM for expression evaluation. The architecture is modular: a core library, a CLI with readline and gnuplot integration, a wxWidgets GUI, and scripting support via Lua and SWIG bindings for Python, Perl, Ruby, and Java. Key entry points include the Fityk class API, the command parser (cparser.cpp), the runner (runner.cpp), and the GUI main frame (frame.cpp). Data flows involve loading data from files (via xylib), defining models as sums of functions, fitting using least-squares optimization, and outputting parameters and statistics. External dependencies include wxWidgets, Boost, Lua, NLopt, xylib, readline, gnuplot, zlib, and SWIG. The codebase is well-structured with extensive documentation and tests, though it shows some age with pre-C++11 idioms and platform-specific workarounds.

RATING: 7.8/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
── end of results ──
$ submit: