![]() |
0.1.8
|
High-level interface for Helios photosynthesis modeling. More...
High-level interface for Helios photosynthesis modeling.
The PhotosynthesisModel provides methods for configuring and running photosynthesis simulations using various models including empirical and mechanistic (Farquhar-von Caemmerer-Berry) approaches.
Examples
Available species can be queried using:
Definition at line 70 of file PhotosynthesisModel.py.
Public Member Functions | |
__init__ (self, Context context) | |
Initialize PhotosynthesisModel. | |
__enter__ (self) | |
Context manager entry. | |
__exit__ (self, exc_type, exc_value, traceback) | |
Context manager exit with cleanup. | |
cleanup (self) | |
Clean up native resources. | |
get_native_ptr (self) | |
Get the native C++ pointer for advanced operations. | |
__del__ (self) | |
Destructor to ensure cleanup. | |
setModelTypeEmpirical (self) | |
Set the photosynthesis model type to empirical. | |
setModelTypeFarquhar (self) | |
Set the photosynthesis model type to Farquhar-von Caemmerer-Berry. | |
run (self) | |
Run photosynthesis calculations for all primitives in the context. | |
runForPrimitives (self, Union[List[int], int] uuids) | |
Run photosynthesis calculations for specific primitives. | |
setSpeciesCoefficients (self, str species, Optional[List[int]] uuids=None) | |
Set Farquhar model coefficients from built-in species library. | |
setFarquharCoefficientsFromLibrary (self, str species, Optional[List[int]] uuids=None) | |
Set Farquhar model coefficients from built-in species library. | |
List[float] | getSpeciesCoefficients (self, str species) |
Get Farquhar model coefficients for a species from the library. | |
setEmpiricalModelCoefficients (self, EmpiricalModelCoefficients coefficients, Optional[List[int]] uuids=None) | |
Set empirical model coefficients. | |
setFarquharModelCoefficients (self, FarquharModelCoefficients coefficients, Optional[List[int]] uuids=None) | |
Set Farquhar model coefficients. | |
setVcmax (self, float vcmax, List[int] uuids, Optional[float] dha=None, Optional[float] topt=None, Optional[float] dhd=None) | |
Set maximum carboxylation rate for Farquhar model. | |
setJmax (self, float jmax, List[int] uuids, Optional[float] dha=None, Optional[float] topt=None, Optional[float] dhd=None) | |
Set maximum electron transport rate for Farquhar model. | |
setDarkRespiration (self, float respiration, List[int] uuids, Optional[float] dha=None, Optional[float] topt=None, Optional[float] dhd=None) | |
Set dark respiration rate. | |
setQuantumEfficiency (self, float efficiency, List[int] uuids, Optional[float] dha=None, Optional[float] topt=None, Optional[float] dhd=None) | |
Set quantum efficiency of photosystem II. | |
setLightResponseCurvature (self, float curvature, List[int] uuids, Optional[float] dha=None, Optional[float] topt=None, Optional[float] dhd=None) | |
Set light response curvature parameter. | |
List[float] | getEmpiricalModelCoefficients (self, int uuid) |
Get empirical model coefficients for a specific primitive. | |
List[float] | getFarquharModelCoefficients (self, int uuid) |
Get Farquhar model coefficients for a specific primitive. | |
exportResults (self, str label) | |
Export photosynthesis results with optional label. | |
enableMessages (self) | |
Enable photosynthesis model status messages. | |
disableMessages (self) | |
Disable photosynthesis model status messages. | |
printModelReport (self, Optional[List[int]] uuids=None) | |
Print model configuration report. | |
bool | validateConfiguration (self) |
Basic validation that model has been configured. | |
resetModel (self) | |
Reset the model by recreating it. | |
Static Public Member Functions | |
List[str] | get_available_species () |
Static method to get available species without creating a model instance. | |
dict | get_species_aliases () |
Static method to get species aliases mapping. | |
Public Attributes | |
context = context | |
Protected Attributes | |
_native_ptr = None | |
pyhelios.PhotosynthesisModel.PhotosynthesisModel.__init__ | ( | self, | |
Context | context ) |
Initialize PhotosynthesisModel.
context | PyHelios Context instance containing the 3D geometry |
PhotosynthesisModelError | If plugin is not available or initialization fails |
Definition at line 81 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.__del__ | ( | self | ) |
Destructor to ensure cleanup.
Definition at line 140 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.__enter__ | ( | self | ) |
Context manager entry.
Definition at line 118 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.__exit__ | ( | self, | |
exc_type, | |||
exc_value, | |||
traceback ) |
Context manager exit with cleanup.
Definition at line 122 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.cleanup | ( | self | ) |
Clean up native resources.
Definition at line 126 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.disableMessages | ( | self | ) |
Disable photosynthesis model status messages.
Definition at line 542 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.enableMessages | ( | self | ) |
Enable photosynthesis model status messages.
Definition at line 538 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.exportResults | ( | self, | |
str | label ) |
Export photosynthesis results with optional label.
label | Data label for export |
Definition at line 533 of file PhotosynthesisModel.py.
|
static |
Static method to get available species without creating a model instance.
Definition at line 244 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.get_native_ptr | ( | self | ) |
Get the native C++ pointer for advanced operations.
Definition at line 136 of file PhotosynthesisModel.py.
|
static |
Static method to get species aliases mapping.
Definition at line 254 of file PhotosynthesisModel.py.
List[float] pyhelios.PhotosynthesisModel.PhotosynthesisModel.getEmpiricalModelCoefficients | ( | self, | |
int | uuid ) |
Get empirical model coefficients for a specific primitive.
uuid | Primitive UUID |
Definition at line 512 of file PhotosynthesisModel.py.
List[float] pyhelios.PhotosynthesisModel.PhotosynthesisModel.getFarquharModelCoefficients | ( | self, | |
int | uuid ) |
Get Farquhar model coefficients for a specific primitive.
uuid | Primitive UUID |
Definition at line 524 of file PhotosynthesisModel.py.
List[float] pyhelios.PhotosynthesisModel.PhotosynthesisModel.getSpeciesCoefficients | ( | self, | |
str | species ) |
Get Farquhar model coefficients for a species from the library.
species | Species name |
Definition at line 233 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.printModelReport | ( | self, | |
Optional[List[int]] | uuids = None ) |
Print model configuration report.
uuids | Optional list of UUIDs. If None, prints report for all primitives. |
Definition at line 551 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.resetModel | ( | self | ) |
Reset the model by recreating it.
Definition at line 571 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.run | ( | self | ) |
Run photosynthesis calculations for all primitives in the context.
The model must be configured with appropriate coefficients before running.
Definition at line 167 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.runForPrimitives | ( | self, | |
Union[List[int], int] | uuids ) |
Run photosynthesis calculations for specific primitives.
uuids | Single UUID (integer) or list of UUIDs for primitives |
Definition at line 177 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setDarkRespiration | ( | self, | |
float | respiration, | ||
List[int] | uuids, | ||
Optional[float] | dha = None, | ||
Optional[float] | topt = None, | ||
Optional[float] | dhd = None ) |
Set dark respiration rate.
This method modifies only the Rd parameter while preserving all other existing Farquhar model parameters for each primitive.
respiration | Dark respiration rate at 25°C (μmol m⁻² s⁻¹) |
uuids | List of primitive UUIDs to modify (required) |
dha | Activation energy (optional, kJ/mol) |
topt | Optimal temperature (optional, °C) |
dhd | Deactivation energy (optional, kJ/mol) |
Definition at line 404 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setEmpiricalModelCoefficients | ( | self, | |
EmpiricalModelCoefficients | coefficients, | ||
Optional[List[int]] | uuids = None ) |
Set empirical model coefficients.
coefficients | EmpiricalModelCoefficients instance with model parameters |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
Definition at line 266 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setFarquharCoefficientsFromLibrary | ( | self, | |
str | species, | ||
Optional[List[int]] | uuids = None ) |
Set Farquhar model coefficients from built-in species library.
This method matches the C++ API naming: setFarquharCoefficientsFromLibrary()
species | Species name from the built-in library |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
Examples
Definition at line 218 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setFarquharModelCoefficients | ( | self, | |
FarquharModelCoefficients | coefficients, | ||
Optional[List[int]] | uuids = None ) |
Set Farquhar model coefficients.
coefficients | FarquharModelCoefficients instance with FvCB parameters |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
Definition at line 284 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setJmax | ( | self, | |
float | jmax, | ||
List[int] | uuids, | ||
Optional[float] | dha = None, | ||
Optional[float] | topt = None, | ||
Optional[float] | dhd = None ) |
Set maximum electron transport rate for Farquhar model.
This method modifies only the Jmax parameter while preserving all other existing Farquhar model parameters for each primitive.
jmax | Maximum electron transport rate at 25°C (μmol m⁻² s⁻¹) |
uuids | List of primitive UUIDs to modify (required) |
dha | Activation energy (optional, kJ/mol) |
topt | Optimal temperature (optional, °C) |
dhd | Deactivation energy (optional, kJ/mol) |
Definition at line 367 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setLightResponseCurvature | ( | self, | |
float | curvature, | ||
List[int] | uuids, | ||
Optional[float] | dha = None, | ||
Optional[float] | topt = None, | ||
Optional[float] | dhd = None ) |
Set light response curvature parameter.
This method modifies only the theta parameter while preserving all other existing Farquhar model parameters for each primitive.
curvature | Light response curvature at 25°C (dimensionless) |
uuids | List of primitive UUIDs to modify (required) |
dha | Activation energy (optional, kJ/mol) |
topt | Optimal temperature (optional, °C) |
dhd | Deactivation energy (optional, kJ/mol) |
Definition at line 483 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setModelTypeEmpirical | ( | self | ) |
Set the photosynthesis model type to empirical.
The empirical model uses light response curves with saturation kinetics.
Definition at line 149 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setModelTypeFarquhar | ( | self | ) |
Set the photosynthesis model type to Farquhar-von Caemmerer-Berry.
The FvCB model is a mechanistic model accounting for biochemical limitations of C3 photosynthesis.
Definition at line 158 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setQuantumEfficiency | ( | self, | |
float | efficiency, | ||
List[int] | uuids, | ||
Optional[float] | dha = None, | ||
Optional[float] | topt = None, | ||
Optional[float] | dhd = None ) |
Set quantum efficiency of photosystem II.
This method modifies only the alpha parameter while preserving all other existing Farquhar model parameters for each primitive.
efficiency | Quantum efficiency at 25°C (dimensionless, 0-1) |
uuids | List of primitive UUIDs to modify (required) |
dha | Activation energy (optional, kJ/mol) |
topt | Optimal temperature (optional, °C) |
dhd | Deactivation energy (optional, kJ/mol) |
Definition at line 441 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setSpeciesCoefficients | ( | self, | |
str | species, | ||
Optional[List[int]] | uuids = None ) |
Set Farquhar model coefficients from built-in species library.
species | Species name from the built-in library |
uuids | Optional list of primitive UUIDs. If None, applies to all primitives. |
Examples
Definition at line 197 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.setVcmax | ( | self, | |
float | vcmax, | ||
List[int] | uuids, | ||
Optional[float] | dha = None, | ||
Optional[float] | topt = None, | ||
Optional[float] | dhd = None ) |
Set maximum carboxylation rate for Farquhar model.
This method modifies only the Vcmax parameter while preserving all other existing Farquhar model parameters for each primitive.
vcmax | Maximum carboxylation rate at 25°C (μmol m⁻² s⁻¹) |
uuids | List of primitive UUIDs to modify (required) |
dha | Activation energy (optional, kJ/mol) |
topt | Optimal temperature (optional, °C) |
dhd | Deactivation energy (optional, kJ/mol) |
Definition at line 314 of file PhotosynthesisModel.py.
bool pyhelios.PhotosynthesisModel.PhotosynthesisModel.validateConfiguration | ( | self | ) |
Basic validation that model has been configured.
Definition at line 564 of file PhotosynthesisModel.py.
|
protected |
Definition at line 88 of file PhotosynthesisModel.py.
pyhelios.PhotosynthesisModel.PhotosynthesisModel.context = context |
Definition at line 87 of file PhotosynthesisModel.py.