Reference Overview
The pymizer reference now has two layers:
- high-level guide pages in this
reference/section - generated API pages under API Reference, built from the package source with
quartodoc
Guide Pages
- Model API: model constructors and wrapper classes
- Dataset API: list and load packaged example datasets
- R Bridge API: lower-level access to the embedded R environment
- API Reference: generated signatures and docstrings for the public Python surface
Key Wrapper Surfaces
The current pymizer API is centred around three parts of the workflow:
- model construction with
new_community_params(),new_multispecies_params(),new_single_species_params(), andread_params() - simulation with
MizerParams.project() - inspection through
MizerParamsandMizerSimmethods that returnpandas,numpy, orxarrayobjects
Common Return Types
- tabular summaries such as
sim.biomass()andsim.abundance()returnpandas.DataFrame - state spectra such as
params.initial_n()andsim.pred_rate()returnxarray.DataArrayby default - one-dimensional indicator outputs such as
params.mean_weight()orparams.initial_n_resource()return Python scalars orpandas.Series
Common Analysis Patterns
- use
params.initial_n()andparams.initial_n_resource()to inspect the starting state before a projection - use
sim.biomass(),sim.abundance(), andsim.ssb()for time-by-species summaries - use
sim.biomass_tidy()when you want long-form pandas output for plotting libraries or grouped notebook analysis - use
sim.plot_biomass()for a quick matplotlib view before dropping down to pandas or seaborn - use
sim.pred_rate(),sim.pred_mort(),sim.feeding_level(), andsim.diet()for size-resolved diagnostics - use filter arguments such as
species=,min_w=,max_w=,min_l=, andmax_l=on supported summary methods to stay within Python for common exploratory analysis
Design Notes
The public API deliberately stays narrower than the full R package:
- constructor functions are exposed at top level
MizerParamsandMizerSimprovide the most common workflows- raw R objects remain accessible through the
.rproperty when needed - advanced workflows can use
read_rds(),MizerREnvironment.eval(), andMizerParams.set_rate_functions()when the core wrapper surface is not quite enough - plotting support stays intentionally small and is meant to complement, not replace, direct use of pandas, xarray, and matplotlib
For full signatures and class pages, use the generated API Reference.