> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Example 25: Source Spectrum Diffraction Grating

Ex 25: A non-sequential system with two black body sources of different temperatures and a diffraction grating is built. The system is setup with multi-configuration to control the number of analysis rays traced for each source. Only a single source has analysis rays during a ray trace. The true color results are plotted for each configuration.

```csharp theme={null}
Input:      None

Output:     Graph (Matlab, Python)
            API\e25_source_spectrum_diffraction_grating.zos
            API\e25_source_spectrum_diffraction_grating_1.txt (C++, C#)
            API\e25_source_spectrum_diffraction_grating_2.txt (C++, C#)
```

[C#](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2-sp02/page_ex25_cs.md)

[C++](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2-sp02/page_ex25_cpp.md)

[Matlab](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2-sp02/page_ex25_m.md)

[Python](https://developer.synopsys.com/docs/zemax/zemax-opticstudio-zos-api/2025-r2-sp02/page_ex25_py.md)
