Developer Guide
Documentation for developers who want to understand NIRS4ALL internals or contribute to the project.
- Architecture Overview
- Pipeline Architecture Overview
- Controller System
- Artifacts & Storage
- Artifacts Developer Guide
- Metadata Usage Guide
- Outputs vs Artifacts: Serialization Architecture
- Synthetic Data Generator
- Architecture Overview
- Physical Model
- Core Components
- Extending the Generator
- Wavenumber Utilities (Phase 1)
- Procedural Component Generator (Phase 1)
- Application Domains (Phase 1)
- Extended Component Library (Phase 1)
- Instrument Simulation (Phase 2)
- Environmental Effects (Phase 3)
- Scattering Effects (Phase 3)
- Metadata System
- Classification Generation
- Non-Linear Target Complexity
- Multi-Source Generation
- Exporter System
- Real Data Fitting
- Validation System
- Integration with Test Fixtures
- Performance Considerations
- Predefined Spectral Components
- References
- See Also
- Testing Guide
Overview
This section is for developers who want to:
Understand the internal architecture of NIRS4ALL
Extend the library with custom controllers and operators
Contribute to the project
High-level overview of the pipeline execution engine, data flow, and component interactions.
Detailed pipeline execution flow and internal mechanics.
The controller registry system that dispatches pipeline steps to appropriate handlers.
User guide for the artifact storage system.
Additional Developer Topics
Internal implementation details and extension points for the artifacts system.
Pipeline and dataset metadata handling.
Understanding the difference between outputs and artifacts.
Synthetic data generator internals and extension.
Running tests, markers, fixtures, and writing new tests.
Quick Start: Custom Controller
Here’s a minimal example of creating a custom controller:
from nirs4all.controllers import register_controller, OperatorController
@register_controller
class MyController(OperatorController):
priority = 50 # Lower = higher priority
@classmethod
def matches(cls, step, operator, keyword) -> bool:
return keyword == "my_custom_keyword"
@classmethod
def use_multi_source(cls) -> bool:
return False
def execute(self, step_info, dataset, context, runtime_context, **kwargs):
# Your implementation here
return context, output
See Controller System for the complete guide.
See Also
Writing a Pipeline in nirs4all - Pipeline syntax reference
Examples - Working examples including developer examples
GitHub Repository - Source code and issues