Repository: gammasim/simtools (language: python)

Issue:
Review files in data/layout and confirm that they are all necessary.
Files in data/layout are telescope lists for different array definition.

- partly duplication of files in tests/resources
- different metadata definition (and values for prod5?) for some of them
- different metadata format than what we use right now for most telescope list.
- might also consider to have one list of all telescopes and tools requiring e.g., a 4 MST array are extracting that from the main array (as long as all of those are subarrays of the main array)
- 


Discussion / hints:
I will remove all those files, as all these layouts are now defined in the model parameter DB (after mergine PR 947)

Fix patch:
diff --git a/data/layout/telescope_positions-North-1LST.ecsv b/data/layout/telescope_positions-North-1LST.ecsv
deleted file mode 100644
index f9cef6fdc..000000000
--- a/data/layout/telescope_positions-North-1LST.ecsv
+++ /dev/null
@@ -1,9 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-LSTN-01               0.0        0.0        0.0
diff --git a/data/layout/telescope_positions-North-1MST.ecsv b/data/layout/telescope_positions-North-1MST.ecsv
deleted file mode 100644
index 4a65e272a..000000000
--- a/data/layout/telescope_positions-North-1MST.ecsv
+++ /dev/null
@@ -1,9 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-MSTN-01               0.0        0.0        0.0
diff --git a/data/layout/telescope_positions-North-4LST.ecsv b/data/layout/telescope_positions-North-4LST.ecsv
deleted file mode 100644
index 92a4ceed6..000000000
--- a/data/layout/telescope_positions-North-4LST.ecsv
+++ /dev/null
@@ -1,12 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-LSTN-01              -70.99     -52.08      43.00
-LSTN-02              -35.38      66.14      28.90
-LSTN-03               75.22      50.45      24.40
-LSTN-04               30.78     -64.51      30.60
diff --git a/data/layout/telescope_positions-North-4MST.ecsv b/data/layout/telescope_positions-North-4MST.ecsv
deleted file mode 100644
index b9aca64d6..000000000
--- a/data/layout/telescope_positions-North-4MST.ecsv
+++ /dev/null
@@ -1,12 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-MSTN-01              -211.61      5.67      46.50
-MSTN-02              -153.34    169.04      26.70
-MSTN-03                26.89    208.73       9.40
-MSTN-04               175.64     73.07       7.50
diff --git a/data/layout/telescope_positions-South-1LST.ecsv b/data/layout/telescope_positions-South-1LST.ecsv
deleted file mode 100644
index ee9d3575f..000000000
--- a/data/layout/telescope_positions-South-1LST.ecsv
+++ /dev/null
@@ -1,9 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-LSTS-01               0.0        0.0        0.0
diff --git a/data/layout/telescope_positions-South-1MST.ecsv b/data/layout/telescope_positions-South-1MST.ecsv
deleted file mode 100644
index 57c4fb32f..000000000
--- a/data/layout/telescope_positions-South-1MST.ecsv
+++ /dev/null
@@ -1,9 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-MSTS-01               0.0        0.0        0.0
diff --git a/data/layout/telescope_positions-South-1SST.ecsv b/data/layout/telescope_positions-South-1SST.ecsv
deleted file mode 100644
index 99cb2a26f..000000000
--- a/data/layout/telescope_positions-South-1SST.ecsv
+++ /dev/null
@@ -1,9 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-SSTS-01               0.0        0.0        0.0
diff --git a/data/layout/telescope_positions-South-4LST.ecsv b/data/layout/telescope_positions-South-4LST.ecsv
deleted file mode 100644
index 82c2b3499..000000000
--- a/data/layout/telescope_positions-South-4LST.ecsv
+++ /dev/null
@@ -1,12 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-LSTS-01             -20.64      -64.82      34.00
-LSTS-02              79.99       -0.77      29.00
-LSTS-03             -19.40       65.20      31.00
-LSTS-04             -120.03       1.15      33.00
diff --git a/data/layout/telescope_positions-South-4MST.ecsv b/data/layout/telescope_positions-South-4MST.ecsv
deleted file mode 100644
index b18652add..000000000
--- a/data/layout/telescope_positions-South-4MST.ecsv
+++ /dev/null
@@ -1,12 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-MSTS-01              -0.02        0.00      24.00
-MSTS-02               1.43      151.02      25.00
-MSTS-03              -1.47     -151.02      31.00
-MSTS-04             150.72       73.57      21.00
diff --git a/data/layout/telescope_positions-South-4SST.ecsv b/data/layout/telescope_positions-South-4SST.ecsv
deleted file mode 100644
index 28c592332..000000000
--- a/data/layout/telescope_positions-South-4SST.ecsv
+++ /dev/null
@@ -1,12 +0,0 @@
-# %ECSV 1.0
-# ---
-# datatype:
-# - {name: telescope_name, datatype: string, description: telescope name}
-# - {name: position_x, unit: m, datatype: float64, description: telescope position towards North relative to the array center.}
-# - {name: position_y, unit: m, datatype: float64, description: telescope position towards West relative to the array center.}
-# - {name: position_z, unit: m, datatype: float64, description: telescope position upwards relative to the CORSIKA observation level.}
-telescope_name      position_x      position_y      position_z
-SSTS-01              199.01      -1.91      16.25
-SSTS-02             -230.05       2.21      22.75
-SSTS-03             -252.17    -322.65      40.75
-SSTS-04             -245.93     327.43      17.25


Test patch:
diff --git a/data/layout/telescope_positions-North-test_layout.ecsv b/data/layout/telescope_positions-North-test_layout.ecsv
deleted file mode 120000
index 8a2f6922d..000000000
--- a/data/layout/telescope_positions-North-test_layout.ecsv
+++ /dev/null
@@ -1,1 +0,0 @@
-../../tests/resources/telescope_positions-North-ground.ecsv
\ No newline at end of file
diff --git a/data/layout/telescope_positions-South-test_layout.ecsv b/data/layout/telescope_positions-South-test_layout.ecsv
deleted file mode 120000
index 5d0b3361d..000000000
--- a/data/layout/telescope_positions-South-test_layout.ecsv
+++ /dev/null
@@ -1,1 +0,0 @@
-../../tests/resources/telescope_positions-South-ground.ecsv
\ No newline at end of file
diff --git a/tests/integration_tests/config/plot_array_layout_one_file.yml b/tests/integration_tests/config/plot_array_layout_one_file.yml
index e76bad5d6..79e557830 100644
--- a/tests/integration_tests/config/plot_array_layout_one_file.yml
+++ b/tests/integration_tests/config/plot_array_layout_one_file.yml
@@ -2,9 +2,9 @@ CTA_SIMPIPE:
   APPLICATION: simtools-plot-array-layout
   TEST_NAME: one_file
   CONFIGURATION:
-    ARRAY_LAYOUT_FILE: data/layout/telescope_positions-North-test_layout.ecsv
+    ARRAY_LAYOUT_FILE: tests/resources/telescope_positions-North-ground.ecsv
     MODEL_VERSION: prod6
     OUTPUT_PATH: simtools-tests
   INTEGRATION_TESTS:
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-test_layout_North_ground_0deg.pdf
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-test_layout_North_ground_0deg.png
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-ground_North_ground_0deg.pdf
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-ground_North_ground_0deg.png
diff --git a/tests/integration_tests/config/plot_array_layout_one_file_rotate.yml b/tests/integration_tests/config/plot_array_layout_one_file_rotate.yml
index 5b2db0ded..51a7fa588 100644
--- a/tests/integration_tests/config/plot_array_layout_one_file_rotate.yml
+++ b/tests/integration_tests/config/plot_array_layout_one_file_rotate.yml
@@ -3,9 +3,9 @@ CTA_SIMPIPE:
   TEST_NAME: one_file_rotate
   CONFIGURATION:
     MODEL_VERSION: prod6
-    ARRAY_LAYOUT_FILE: data/layout/telescope_positions-North-test_layout.ecsv
+    ARRAY_LAYOUT_FILE: tests/resources/telescope_positions-North-ground.ecsv
     ROTATE_ANGLE: 20
     OUTPUT_PATH: simtools-tests
   INTEGRATION_TESTS:
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-test_layout_North_ground_20deg.pdf
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-test_layout_North_ground_20deg.png
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-ground_North_ground_20deg.pdf
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-ground_North_ground_20deg.png
diff --git a/tests/integration_tests/config/plot_array_layout_one_file_with_name.yml b/tests/integration_tests/config/plot_array_layout_one_file_with_name.yml
index 2f916f948..0284b739a 100644
--- a/tests/integration_tests/config/plot_array_layout_one_file_with_name.yml
+++ b/tests/integration_tests/config/plot_array_layout_one_file_with_name.yml
@@ -2,7 +2,7 @@ CTA_SIMPIPE:
   APPLICATION: simtools-plot-array-layout
   TEST_NAME: one_file_with_name
   CONFIGURATION:
-    ARRAY_LAYOUT_FILE: data/layout/telescope_positions-North-test_layout.ecsv
+    ARRAY_LAYOUT_FILE: tests/resources/telescope_positions-North-ground.ecsv
     MODEL_VERSION: prod6
     FIGURE_NAME: test
     OUTPUT_PATH: simtools-tests
diff --git a/tests/integration_tests/config/plot_array_layout_one_file_with_name_with_extension.yml b/tests/integration_tests/config/plot_array_layout_one_file_with_name_with_extension.yml
index daea60c4e..9fc266eb8 100644
--- a/tests/integration_tests/config/plot_array_layout_one_file_with_name_with_extension.yml
+++ b/tests/integration_tests/config/plot_array_layout_one_file_with_name_with_extension.yml
@@ -2,7 +2,7 @@ CTA_SIMPIPE:
   APPLICATION: simtools-plot-array-layout
   TEST_NAME: one_file_with_name_with_extension
   CONFIGURATION:
-    ARRAY_LAYOUT_FILE: data/layout/telescope_positions-North-test_layout.ecsv
+    ARRAY_LAYOUT_FILE: tests/resources/telescope_positions-North-ground.ecsv
     MODEL_VERSION: prod6
     FIGURE_NAME: test.png
     OUTPUT_PATH: simtools-tests
diff --git a/tests/integration_tests/config/plot_array_layout_two_files.yml b/tests/integration_tests/config/plot_array_layout_two_files.yml
index 965dd5c03..9d9d75c5f 100644
--- a/tests/integration_tests/config/plot_array_layout_two_files.yml
+++ b/tests/integration_tests/config/plot_array_layout_two_files.yml
@@ -3,12 +3,12 @@ CTA_SIMPIPE:
   TEST_NAME: two_files
   CONFIGURATION:
     ARRAY_LAYOUT_FILE:
-      - data/layout/telescope_positions-North-test_layout.ecsv
-      - data/layout/telescope_positions-South-test_layout.ecsv
+      - tests/resources/telescope_positions-North-ground.ecsv
+      - tests/resources/telescope_positions-South-ground.ecsv
     MODEL_VERSION: prod6
     OUTPUT_PATH: simtools-tests
   INTEGRATION_TESTS:
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-test_layout_North_ground_0deg.pdf
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-test_layout_North_ground_0deg.png
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-South-test_layout_South_ground_0deg.pdf
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-South-test_layout_South_ground_0deg.png
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-ground_North_ground_0deg.pdf
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-ground_North_ground_0deg.png
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-South-ground_South_ground_0deg.pdf
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-South-ground_South_ground_0deg.png
diff --git a/tests/integration_tests/config/plot_array_layout_two_files_rotate.yml b/tests/integration_tests/config/plot_array_layout_two_files_rotate.yml
index e55f7324d..7d6223b75 100644
--- a/tests/integration_tests/config/plot_array_layout_two_files_rotate.yml
+++ b/tests/integration_tests/config/plot_array_layout_two_files_rotate.yml
@@ -3,13 +3,13 @@ CTA_SIMPIPE:
   TEST_NAME: two_files_rotate
   CONFIGURATION:
     ARRAY_LAYOUT_FILE:
-      - data/layout/telescope_positions-North-test_layout.ecsv
-      - data/layout/telescope_positions-South-test_layout.ecsv
+      - tests/resources/telescope_positions-North-ground.ecsv
+      - tests/resources/telescope_positions-South-ground.ecsv
     MODEL_VERSION: prod6
     ROTATE_ANGLE: 20
     OUTPUT_PATH: simtools-tests
   INTEGRATION_TESTS:
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-South-test_layout_South_ground_20deg.pdf
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-South-test_layout_South_ground_20deg.png
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-test_layout_North_ground_20deg.pdf
-    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-test_layout_North_ground_20deg.png
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-ground_North_ground_20deg.pdf
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-North-ground_North_ground_20deg.png
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-South-ground_South_ground_20deg.pdf
+    - OUTPUT_FILE: application-plots/array_layout_telescope_positions-South-ground_South_ground_20deg.png