simtools-plot-array-layout#

Plot array elements (array layouts).

Plot array layouts in ground or UTM coordinate systems from multiple sources.

For the following options, array element positions are retrieved from the model parameter database:

  • from the model parameter database using the layout name (e.g., -array_layout_name alpha)

  • from the model parameter data, retrieving all layouts for the given site and model version (--plot_all_layouts)

  • from a model parameter file (e.g., -array_layout_parameter_file tests/resources/model_parameters/array_layouts-2.0.1.json)

  • from a list of array elements (e.g., -array_element_list MSTN-01, MSTN-02). Positions are retrieved from the database. * explicit listing: e.g., -array_element_list MSTN-01, MSTN05 * listing of types: e.g, -array_element_list MSTN plots all telescopes of type MSTN.

For this option, array element positions are retrieved from the input file:

  • from a file containing an astropy table with a list of array elements and their positions (e.g., -array_layout_file tests/resources/telescope_positions-North-ground.ecsv)

Plots are saved as pdf and png files in the output directory.

Example of a layout plot:

../../_images/plot_array_layout_example.png

Command line arguments#

figure_namestr

File name for the output figure.

array_layout_filestr

File (astropy table compatible) with a list of array elements.

array_layout_namestr

Name of the layout array (e.g., test_layout, alpha, 4mst, etc.). Use ‘plot_all’ to plot all layouts from the database for the given site and model version.

array_layout_parameter_filestr, optional

File with array layouts similar in the model parameter file format (typically JSON).

array_layout_name_background: str, optional

Name of the background layout array (e.g., test_layout, alpha, 4mst, etc.).

array_element_listlist

List of array elements (e.g., telescopes) to plot (e.g., LSTN-01 LSTN-02 MSTN).

coordinate_systemstr, optional

Coordinate system for the array layout (ground or utm).

show_labelsbool, optional

Shows the telescope labels in the plot.

axes_rangefloat, optional

Range of the both axes in meters.

marker_scalingfloat, optional.

Scaling factor for plotting of array elements, optional.

Examples#

Plot “alpha” layout for the North site with model version 6.0.0:

simtools-plot-array-layout --site North
                           --array_layout_name alpha
                           --model_version=6.0.0

Plot layout with 2 LSTs on top of north alpha layout:

simtools-plot-array-layout --site North
                           --array_element_list LSTN-01,LSTN-02
                           --model_version=6.0.0
                           --array_layout_name_background alpha

Plot layout from a file with a list of telescopes:

simtools-plot-array-layout
    --array_layout_file tests/resources/telescope_positions-North-ground.ecsv

Plot layout from a parameter file with a list of telescopes:

simtools-plot-array-layout
    --array_layout_parameter_file tests/resources/model_parameters/array_layouts-2.0.1.json
    --model_version 6.0.0

Plot all layouts for the North site and model version 6.0.0:

simtools-plot-array-layout --site North --plot_all_layouts --model_version=6.0.0
plot_array_layout.main()[source]#

Plot array layout application.

plot_array_layout.read_layouts(args_dict, db_config, logger)[source]#

Read array layouts from the database or parameter file.

Parameters:
args_dictdict

Dictionary with command line arguments.

db_configdict

Database configuration.

loggerlogging.Logger

Logger instance.

Returns:
list

List of array layouts.