API Reference

This section provides the complete API reference for the Homodyne package. All documentation is auto-generated from docstrings in the source code using Sphinx autodoc. Module and class signatures reflect the installed package version.

Note

The recommended entry points for most users are homodyne.optimization.nlsq.core.fit_nlsq_jax() for non-linear least squares fitting and homodyne.optimization.cmc.core.fit_mcmc_jax() for Bayesian uncertainty quantification. Start with the homodyne.optimization.nlsq — Adapter page for the high-level adapter interface.


Module Overview

Module

Description

homodyne.core

Physical constants, parameter bounds, validation, and shared utilities

homodyne.core.homodyne_model

HomodyneModel — unified model facade for NLSQ and CMC

homodyne.core.jax_backend

JIT-compiled g₁/g₂ physics, autodiff, meshgrid cache

homodyne.core.models

DiffusionModel, ShearModel, CombinedModel — OO model interface

homodyne.core.theory

TheoryEngine — high-level g1/g2 computation interface

homodyne.optimization

Optimization overview: NLSQ vs CMC, common workflow patterns

homodyne.optimization.nlsq — Adapter

NLSQAdapter — recommended adapter for standard optimizations

homodyne.optimization.nlsq — Wrapper

NLSQWrapper — full-featured wrapper for advanced use cases

homodyne.optimization.cmc

CMC overview, fit_mcmc_jax(), CMCConfig, shard size guide

homodyne.optimization.cmc.sampler

SamplingPlan, NUTS execution, adaptive sampling

homodyne.optimization.cmc.reparameterization

Parameter reparameterization for MCMC sampling efficiency

homodyne.optimization.cmc.backends

Multiprocessing backend, worker configuration, chain execution methods

homodyne.data

XPCSDataLoader — HDF5 data ingestion and validation

homodyne.config

ConfigManager, ParameterSpace, ParameterRegistry, YAML schema

homodyne CLI

All CLI entry points and shell completion system

Device Module

CPU device management, NUMA configuration, and status utilities

I/O Module

Result saving (JSON, NPZ) and serialization utilities

Visualization Module

Plotting, visualization, and diagnostic figure generation

Utilities

Logging utilities, CPU/NUMA detection


Quick Navigation

Core Physics

Models

Optimization

Infrastructure


API Reference