home / skills / eyadsibai / ltk / scientific-computing
This skill helps you perform scientific computing tasks by leveraging AstroPy, BioPython, SymPy, and Statsmodels for precise calculations, data analysis, and
npx playbooks add skill eyadsibai/ltk --skill scientific-computingReview the files below or copy the command above to add this skill to your agents.
---
name: scientific-computing
description: Use when "scientific computing", "astronomy", "astropy", "bioinformatics", "biopython", "symbolic math", "sympy", "statistics", "statsmodels", "scientific Python"
version: 1.0.0
---
# Scientific Computing
Domain-specific Python libraries for scientific applications.
## Libraries
| Library | Domain | Purpose |
|---------|--------|---------|
| **AstroPy** | Astronomy | Coordinates, units, FITS files |
| **BioPython** | Bioinformatics | Sequences, BLAST, PDB |
| **SymPy** | Mathematics | Symbolic computation |
| **Statsmodels** | Statistics | Statistical modeling, tests |
---
## AstroPy
Astronomy and astrophysics computations.
**Key capabilities:**
- **Units**: Physical unit handling with automatic conversion
- **Coordinates**: Celestial coordinate systems (ICRS, galactic, etc.)
- **Time**: Astronomical time scales (UTC, TAI, Julian dates)
- **FITS**: Read/write FITS astronomical data format
**Key concept**: Unit-aware calculations prevent errors from unit mismatches.
---
## BioPython
Bioinformatics - sequences, structures, databases.
**Key capabilities:**
- **Sequences**: DNA/RNA/protein manipulation, translation, complement
- **File parsing**: FASTA, GenBank, PDB formats
- **BLAST**: Local and remote sequence alignment
- **NCBI Entrez**: Database access (nucleotide, protein, taxonomy)
**Key concept**: `SeqIO` for reading any sequence format, `Seq` for sequence operations.
---
## SymPy
Symbolic mathematics - algebra, calculus, equation solving.
**Key capabilities:**
- **Algebra**: Solve equations, simplify, expand, factor
- **Calculus**: Derivatives, integrals, limits, series
- **Linear algebra**: Matrix operations, eigenvalues
- **Printing**: LaTeX output for documentation
**Key concept**: Work with symbols, not numbers. Get exact answers, not approximations.
---
## Statsmodels
Statistical modeling with R-like formula interface.
**Key capabilities:**
- **Regression**: OLS, logistic, generalized linear models
- **Time series**: ARIMA, VAR, state space models
- **Statistical tests**: t-tests, ANOVA, diagnostics
- **Formula API**: R-style formulas (`y ~ x1 + x2`)
**Key concept**: `model.summary()` gives comprehensive statistical output like R.
---
## Decision Guide
| Domain | Library |
|--------|---------|
| Astronomy/astrophysics | AstroPy |
| Biology/genetics | BioPython |
| Symbolic math | SymPy |
| Statistical analysis | Statsmodels |
| Numerical computing | NumPy, SciPy |
| Data manipulation | Pandas |
## Resources
- AstroPy: <https://docs.astropy.org>
- BioPython: <https://biopython.org/docs/>
- SymPy: <https://docs.sympy.org>
- Statsmodels: <https://www.statsmodels.org>
This skill packages guidance for choosing and using domain-specific Python libraries for scientific computing. It highlights AstroPy, BioPython, SymPy, and Statsmodels and links each library to its primary domain and common tasks. Use it to match problems to libraries and to follow practical usage patterns for astronomy, bioinformatics, symbolic math, and statistical modeling.
The skill inspects the scientific task and recommends the most suitable Python library based on domain: astronomy → AstroPy, biology/genetics → BioPython, symbolic math → SymPy, statistics → Statsmodels. It summarizes key capabilities (units/coordinates, sequence handling, symbolic manipulation, regression/time-series) and points to relevant APIs and concepts. It also suggests complementary tools (NumPy, SciPy, Pandas) when numerical computing or data manipulation is required.
Which library should I learn first for general scientific Python?
Start with NumPy and Pandas for numerical arrays and tabular data, then add domain libraries (AstroPy, BioPython, SymPy, Statsmodels) as your specific needs arise.
Can I mix symbolic and numeric workflows?
Yes. Use SymPy to get exact symbolic results, then convert expressions to numeric functions (lambdify) for evaluation with NumPy or SciPy when needed.