Interface ZOSAPI::Analysis::Data::IAR_DataGrid
Last update: 13.03.2026
Definition:
Members
- ConvertToRGB
- Description
- Dx
- Dy
- MinX
- MinY
- Nx
- Ny
- ValueData
- ValueLabel
- Values
- (interface_z_o_s_a_p_i_1_1_analysis_1_1_data_1_1_i_a_r___data_grid.md#interface_z_o_s_a_p_i_1_1_analysis_1_1_data_1_1_i_a_r___data_grid_1a07aaf77c88f95016c9675185fe6b40bd)
- XLabel
- XYZ
- Y
- YLabel
- Z
Properties
Property Description
Definition:
String ZOSAPI.Analysis.Data.IAR_DataGrid.Description
Return type: String
Property XLabel
Definition:
String ZOSAPI.Analysis.Data.IAR_DataGrid.XLabel
Return type: String
Property YLabel
Definition:
String ZOSAPI.Analysis.Data.IAR_DataGrid.YLabel
Return type: String
Property ValueLabel
Definition:
String ZOSAPI.Analysis.Data.IAR_DataGrid.ValueLabel
Return type: String
Property Nx
Definition:
uint ZOSAPI.Analysis.Data.IAR_DataGrid.Nx
Return type: uint
Property Ny
Definition:
uint ZOSAPI.Analysis.Data.IAR_DataGrid.Ny
Return type: uint
Property Dx
Definition:
double ZOSAPI.Analysis.Data.IAR_DataGrid.Dx
Return type: double
Property Dy
Definition:
double ZOSAPI.Analysis.Data.IAR_DataGrid.Dy
Return type: double
Property MinX
Definition:
double ZOSAPI.Analysis.Data.IAR_DataGrid.MinX
Return type: double
Property MinY
Definition:
double ZOSAPI.Analysis.Data.IAR_DataGrid.MinY
Return type: double
Property Values
Definition:
double [,] ZOSAPI.Analysis.Data.IAR_DataGrid.Values
Usage (see Example 24 for a full sample)
C#
// Changes default values for Detector Viewer
// Plots the Incoherent Irradiance in False Color
ZOSAPI.Analysis.IA_ d5 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer);
ZOSAPI.Analysis.Settings.RayTracing.IAS_DetectorViewer d5_set = d5.GetSettings() as ZOSAPI.Analysis.Settings.RayTracing.IAS_DetectorViewer;
d5_set.Detector.SetDetectorNumber(5);
d5_set.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.FalseColor;
d5.ApplyAndWaitForCompletion();
ZOSAPI.Analysis.Data.IAR_ d5_results = d5.GetResults();
double[,] d5_values = d5_results.GetDataGrid(0).Values;
C++
// Changes default values for Detector Viewer
// Plots the Incoherent Irradiance in False Color
IA_Ptr d5 = TheSystem->Analyses->New_Analysis(AnalysisIDM_DetectorViewer);
IAS_DetectorViewerPtr d5_set = d5->GetSettings();
d5_set->Detector->SetDetectorNumber(5);
d5_set->ShowAs = DetectorViewerShowAsTypes_FalseColor;
d5->ApplyAndWaitForCompletion();
IAR_Ptr d5_results = d5->GetResults();
// This is the easiest way to retrieve the data via COM.
// Create the array locally and pass it to the API to fill.
IAR_DataGridPtr gi = d5_results->GetDataGrid(0);
auto gid = gi->ValueData;
long cols = gid->Cols, rows = gid->Rows;
// Create the array. Note that if the array is too small, the application will crash when ReadData is called
double *valuesAF = new double[cols * rows];
gid->ReadData(cols * rows, valuesAF);
long loop_ctr = 0;
filepath = TheApplication->SamplesDir + "\\API\\CPP\\e24_nsc_detectors_falsecolor.txt";
textfile.open(filepath, fstream::trunc | ios::out);
for (long j = 0; j < rows; ++j) {
for (long k = 0; k < cols; ++k) {
textfile << valuesAF[loop_ctr++] << '\t';
}
textfile << endl;
}
textfile.close();
delete[] valuesAF;
Matlab
% changes default values for Detector Viewer
% pltos the Incoherent Irradiance in False Color
d5 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer);
d5_set = d5.GetSettings();
d5_set.Detector.SetDetectorNumber(5);
d5_set.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.FalseColor;
d5.ApplyAndWaitForCompletion()
d5_results = d5.GetResults();
d5_values = d5_results.GetDataGrid(0).Values.double;
Python
# changes default values for Detector Viewer
# pltos the Incoherent Irradiance in False Color
d5 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer)
d5_set = d5.GetSettings()
d5_set.Detector.SetDetectorNumber(5)
d5_set.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.FalseColor
d5.ApplyAndWaitForCompletion()
d5_results = d5.GetResults()
d5_values = d5_results.GetDataGrid(0).Values
Return type: double[,]
Property ValueData
Definition:
IMatrixData ZOSAPI.Analysis.Data.IAR_DataGrid.ValueData
Return type: IMatrixData
Public functions
Function X
double ZOSAPI.Analysis.Data.IAR_DataGrid.X(int rowX)
Parameters:
- int rowX
Return type: double
Function Y
double ZOSAPI.Analysis.Data.IAR_DataGrid.Y(int colY)
Parameters:
- int colY
Return type: double
Function Z
double ZOSAPI.Analysis.Data.IAR_DataGrid.Z(int rowX, int colY)
Parameters:
- int rowX
- int colY
Return type: double
Function XYZ
IAR_XYZ ZOSAPI.Analysis.Data.IAR_DataGrid.XYZ(int rowX, int colY)
Parameters:
- int rowX
- int colY
Return type: IAR_XYZ
Function ConvertToRGB
IAR_DataGridRgb ZOSAPI.Analysis.Data.IAR_DataGrid.ConvertToRGB(IColorTranslator translator)
Parameters:
- IColorTranslator translator
Return type: IAR_DataGridRgb