![]() |
PyHelios 0.1.11
|
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.
Available species can be queried using: >>> PhotosynthesisModel.get_available_species() ['ALMOND', 'APPLE', 'AVOCADO', ...]
Definition at line 66 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 77 of file PhotosynthesisModel.py.
| pyhelios.PhotosynthesisModel.PhotosynthesisModel.__del__ | ( | self | ) |
Destructor to ensure cleanup.
Definition at line 136 of file PhotosynthesisModel.py.
| pyhelios.PhotosynthesisModel.PhotosynthesisModel.__enter__ | ( | self | ) |
Context manager entry.
Definition at line 114 of file PhotosynthesisModel.py.
| pyhelios.PhotosynthesisModel.PhotosynthesisModel.__exit__ | ( | self, | |
| exc_type, | |||
| exc_value, | |||
| traceback ) |
Context manager exit with cleanup.
Definition at line 118 of file PhotosynthesisModel.py.
| pyhelios.PhotosynthesisModel.PhotosynthesisModel.cleanup | ( | self | ) |
Clean up native resources.
Definition at line 122 of file PhotosynthesisModel.py.
| pyhelios.PhotosynthesisModel.PhotosynthesisModel.disableMessages | ( | self | ) |
Disable photosynthesis model status messages.
Definition at line 534 of file PhotosynthesisModel.py.
| pyhelios.PhotosynthesisModel.PhotosynthesisModel.enableMessages | ( | self | ) |
Enable photosynthesis model status messages.
Definition at line 530 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 525 of file PhotosynthesisModel.py.
|
static |
Static method to get available species without creating a model instance.
Definition at line 236 of file PhotosynthesisModel.py.
| pyhelios.PhotosynthesisModel.PhotosynthesisModel.get_native_ptr | ( | self | ) |
Get the native C++ pointer for advanced operations.
Definition at line 132 of file PhotosynthesisModel.py.
|
static |
Static method to get species aliases mapping.
Definition at line 246 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 504 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 516 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 225 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 543 of file PhotosynthesisModel.py.
| pyhelios.PhotosynthesisModel.PhotosynthesisModel.resetModel | ( | self | ) |
Reset the model by recreating it.
Definition at line 563 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 163 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 173 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 396 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 258 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. |
Definition at line 210 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 276 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 359 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 475 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 145 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 154 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 433 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. |
Definition at line 191 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 306 of file PhotosynthesisModel.py.
| bool pyhelios.PhotosynthesisModel.PhotosynthesisModel.validateConfiguration | ( | self | ) |
Basic validation that model has been configured.
Definition at line 556 of file PhotosynthesisModel.py.
|
protected |
Definition at line 84 of file PhotosynthesisModel.py.
| pyhelios.PhotosynthesisModel.PhotosynthesisModel.context = context |
Definition at line 83 of file PhotosynthesisModel.py.