# simtools-validate-optics ```{eval-rst} .. automodule:: simtools.applications.validate_optics :members: :exclude-members: main ``` ```{eval-rst} A point-like light source is assumed. The output includes PSF (D80), \ effective mirror area and effective focal length as a function of the off-axis angle. \ The telescope zenith angle and the source distance can be set by command line arguments. Examples of the plots generated by this application are shown below. On the top, the D80 \ vs off-axis is shown in cm (left) and deg (right). On the bottom, the effective mirror \ area (left) and the effective focal length (right) vs off-axis angle are shown. .. _validate_optics_plot: .. image:: images/validate_optics_North-LST-1_d80_cm.png :width: 49 % .. image:: images/validate_optics_North-LST-1_d80_deg.png :width: 49 % .. image:: images/validate_optics_North-LST-1_eff_area.png :width: 49 % .. image:: images/validate_optics_North-LST-1_eff_flen.png :width: 49 % **Command line arguments** type (str, optional) Validation type: 'optics' (default; field-angle scan of the whole telescope) or 'cumulative_psf' (cumulative PSF compared with measured data given by '--data'). data (str, required for type cumulative_psf) Measured cumulative PSF data file. site (str, required) North or South. telescope (str, required) Telescope model name (e.g. LST-1, SST-D, ...). model_version (str, optional) Model version. parameter_version (str, optional) Parameter version for exporting effective_focal_length as model parameter json. source_distance (float or quantity, optional) Source distance in km. zenith_angle (float or quantity, optional) Zenith angle in deg. max_offset (float or quantity, optional) Maximum offset angle in deg. offset_step (float or quantity, optional) Offset angle step size. plot_images (activation mode, optional) Produce a multiple pages pdf file with the image plots. save_photons (activation mode, optional) Retain compressed photon list files after analysis. test (activation mode, optional) If activated, application will be faster by simulating fewer photons. **Example** LST-1 5.0.0 .. code-block:: console simtools-validate-optics --site North --telescope LST-1 --max_offset 1.0 \\ --zenith_angle 20 --source_distance 10 --test \\ --model_version 6.0.1 --parameter_version 0.0.0 The output is saved in simtools-output/validate_optics Compare the cumulative PSF with measured data (type cumulative_psf): .. code-block:: console simtools-validate-optics --type cumulative_psf --site North --telescope LST-1 \\ --zenith_angle 20 --data PSFcurve_data_v2.ecsv --model_version 6.0.2 Expected final print-out message: .. code-block:: console INFO::ray_tracing(l434)::plot::Plotting eff_area vs off-axis angle INFO::ray_tracing(l434)::plot::Plotting eff_flen vs off-axis angle ``` ## Command line arguments ```{eval-rst} .. simtools-cli-help:: :application: validate_optics :no-heading: ``` ## Example ```{eval-rst} .. simtools-integration-example:: :file: validate_optics_run.yml ``` ```{eval-rst} .. simtools-integration-example:: :file: validate_optics_cumulative_psf_prod6_psf.yml ```