Spectral detectability and inverse design of engineered biosensors.
Model whether an engineered biosensor is detectable from orbit, and design toward it. Pin what you know about the design - the molecule, its pigment, the host organism, the habitat, the sensor, the platform - leave the rest free, and solve for the unknown. It answers one question in many directions: can this signal be read from a drone or satellite, and what should be engineered toward it?
"Detectable" means a real yes-or-no with a confidence band: the molecule's signature clears the sensor's noise floor over a real habitat, an absolute answer rather than only a ranking. Validated against Chemla et al. (Nat Biotechnol 2025), who detected pigment-engineered bacteria from a 90 m drone.
From a fresh clone (Julia 1.10+); Julia resolves all dependencies, no manual system setup:
julia --project=. -e 'using Pkg; Pkg.instantiate()'
julia --project=. -e 'using Pkg; Pkg.test()' # closed-form physics testsEvery design question is the same physics solved for a different variable. A Session loads the expensive per-habitat state once; explore answers queries against it. Each node in a query is FIXED (pinned), FREE (uncertain, carries a prior), SOLVE (the unknown), or OBJECTIVE (optimized toward a goal).
using Biosensing
session = Session(; root = "data", manifest = "scripts/habitats.tsv")
# "Which buildable pigment stands out most over cropland?"
spec = QuerySpec(nodes = Dict(
:habitat => Node(role = FIXED, value = "cropland"),
:molecule => Node(role = SOLVE)))
result = explore(session, spec)
result.chosen[:molecule] # top pigment, screened from ~20k candidate molecules
result.frontier # ranked: detectability, red-edge peak, biosynthetic stepsRun across its habitats, the same screen rediscovers the pigments Chemla actually used: biliverdin for soil (one biosynthetic step in P. putida) and a bacteriochlorophyll derivative for water.
Set one node to SOLVE; the matching physics inversion runs:
| SOLVE node | Question | Returns |
|---|---|---|
:molecule |
best buildable pigment for a habitat | ranked molecule frontier |
:wavelength |
best pigment absorption band for a habitat | optimal peak (nm) + detectability |
:fill |
smallest detectable patch | break-even coverage + area (m²) |
| (none) | forward SNR for a fully-pinned design | absolute SNR + detect / no-detect |
FREE nodes (an uncertain expression depth, say) propagate through a sample ensemble, so a forward answer comes back as a mean SNR with a 5-95% band and a detection probability.
A habitat's natural spectral clutter is summarized as a covariance Σ. The matched filter scores how far the molecule's signature stands out from that clutter; detectability is √(sᵀΣ⁻¹s), largest where the pigment absorbs and the background is quiet. Absolute SNR adds the sensor's per-band noise floor and the sunlight-plus-atmosphere bridge (sunlight × transmittance / π) that converts reflectance to the radiance the noise lives in. Only then can the tool say "yes, detectable" rather than only rank options.
Core- exact physics (matched filter, design envelope, absolute SNR), the ENVI /.npy/ EMIT scene readers, and the sensor ladder (drone to orbital).Engine- the sample-ensemble backbone and theexplorequery layer.QuerySpec/QueryResultare JSON-serializable (to_json/from_json), so a notebook today and a web client later are interchangeable front-ends over the sameexplore.outputs/- an open detectability dataset: 500 buildable molecules over 10 real habitats, with EnMAP orbital break-even areas. Seeoutputs/README.md.
The scene library (hyperspectral cubes) and the npspec molecule extract are GB-scale and external (gitignored); sources and a 10-habitat manifest live in scripts/habitats.tsv. For a self-contained, data-free example of the query path, see the explore test in test/runtests.jl.
Research tool, v0.1. Physics core complete through absolute SNR; query layer over four inversion directions. Continuous-optimization and Pareto objectives are in progress.