zospy.analyses.new.base.Analysis#
- class zospy.analyses.new.base.Analysis#
Bases:
object- Attributes:
ResultsAnalysis results.
SettingsAnalysis-specific settings.
fieldGets the wavelength value of the analysis.
header_dataObtains the header data from an OpticStudio analysis.
messagesObtains the messages from the analysis.
metadataObtains the metadata from the analysis.
wavelengthGets the wavelength value of the analysis.
Methods
complete(oncomplete, result)Completes the analysis by either closing, releasing or sustaining it.
set_surface(value)Sets the surface value for the analysis.
get_text_output
- property Results: ZOSAPI.Analysis.Data.IAR_#
Analysis results.
- property Settings: ZOSAPI.Analysis.Settings.IAS_#
Analysis-specific settings.
- __init__(analysis: ZOSAPI.Analysis.IA_)#
Zemax OpticStudio Analysis with full access to its Settings and Results attributes.
- Parameters:
- analysis: ZOSAPI.Analysis.IA_
analysis object
- complete(oncomplete: OnComplete | str, result: AnalysisResult) AnalysisResult#
Completes the analysis by either closing, releasing or sustaining it.
- Parameters:
- oncomplete: OnComplete | str
Action to perform on completion.
- result: AnalysisResult
Result of the analysis.
- Returns:
- result if the analysis is closed or released, result extended with the Analysis object if the analysis
- is sustained.
- property field: int | str#
Gets the wavelength value of the analysis.
- Returns:
- int | str
Either the field number, or ‘All’ if field was set to ‘All’.
- property header_data: list[str]#
Obtains the header data from an OpticStudio analysis.
- Returns:
- list
The header data.
- property messages: list[AnalysisMessage]#
Obtains the messages from the analysis.
- Returns:
- list[AnalysisMessage]
A list of messages. Each item is a NamedTuple with names (ErrorCode, Message).
- property metadata: AnalysisMetadata#
Obtains the metadata from the analysis.
- Returns:
- AnalysisMetadata
A named tuple containing the MetaData including ‘DateTime’, ‘FeatureDescription’, ‘LensFile’ and ‘LensTitle’.
- set_surface(value: int | str)#
Sets the surface value for the analysis.
- Parameters:
- value: int or str
The value to which the surface should be set. Either int or str. Accepts only ‘Image’ or ‘Objective’ as string.
- Returns:
- None
- Raises:
- ValueError
When ‘value’ is not integer or string. When it is a string, it also raises an error when the string does not equal ‘Image’ or ‘Objective’.
- property wavelength: int | Literal['All']#
Gets the wavelength value of the analysis.
- Returns:
- int | str
Either the wavelength number, or ‘All’ if wavelength was set to ‘All’.