Skip to content

Commit 0bee0b3

Browse files
authored
Merge pull request #1635 from gammasim/lower-case-snake-make-for-plotting-configuration
Default plotting for tables; lower cases for keys in plotting configuration schema.
2 parents b29a798 + 9a3eeaa commit 0bee0b3

File tree

37 files changed

+292
-821
lines changed

37 files changed

+292
-821
lines changed

docs/changes/1635.maintenance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add default plotting configuration for tabular data. Introduce consistent lower-cases for keys in plotting configuration schema.

src/simtools/applications/plot_tabular_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def main():
9191
)
9292

9393
plot_tables.plot(
94-
config=plot_config["cta_simpipe"]["plot"],
94+
config=plot_config["plot"],
9595
output_file=io_handler_instance.get_output_file(args_dict["output_file"]),
9696
db_config=db_config_,
9797
)

src/simtools/schemas/model_parameter_and_data_schema.metaschema.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ definitions:
6161
plot_configuration:
6262
type: array
6363
items:
64-
$ref: 'plot_configuration.metaschema.yml#/definitions/Plot'
64+
$ref: 'plot_configuration.metaschema.yml#/definitions/plot'
6565
description: "List of plotting configurations"
6666
required:
6767
- version

src/simtools/schemas/model_parameters/atmospheric_profile.schema.yml

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,43 @@ source:
3131
simulation_software:
3232
- name: corsika
3333
plot_configuration:
34-
- TYPE: density_vs_altitude
35-
TITLE: 'Atmospheric density profile'
36-
XTITLE: 'Height [km]'
37-
YTITLE: 'Density [g/cm^3]'
38-
YSCALE: 'log'
39-
NO_MARKERS: true
40-
PLOT_RATIO: false
41-
TABLES:
42-
- PARAMETER: atmospheric_profile
43-
COLUMN_X: 'altitude'
44-
COLUMN_Y: 'density'
45-
- TYPE: refractive_index_vs_altitude
46-
TITLE: 'Atmospheric refractive index profile'
47-
XTITLE: 'Height [km]'
48-
YTITLE: 'refractive index (n-1)'
49-
YSCALE: 'log'
50-
NO_MARKERS: true
51-
PLOT_RATIO: false
52-
TABLES:
53-
- PARAMETER: atmospheric_profile
54-
COLUMN_X: 'altitude'
55-
COLUMN_Y: 'refractive_index'
34+
- type: density_vs_altitude
35+
title: 'Atmospheric density profile'
36+
xtitle: 'Height [km]'
37+
ytitle: 'Density [g/cm^3]'
38+
yscale: 'log'
39+
no_markers: true
40+
tables:
41+
- parameter: atmospheric_profile
42+
column_x: 'altitude'
43+
column_y: 'density'
44+
- type: refractive_index_vs_altitude
45+
title: 'Atmospheric refractive index profile'
46+
xtitle: 'Height [km]'
47+
ytitle: 'refractive index (n-1)'
48+
yscale: 'log'
49+
no_markers: true
50+
tables:
51+
- parameter: atmospheric_profile
52+
column_x: 'altitude'
53+
column_y: 'refractive_index'
54+
- type: pressure_vs_altitude
55+
title: 'Atmospheric pressure profile'
56+
xtitle: 'Height [km]'
57+
ytitle: 'Pressure [mbar]'
58+
yscale: 'log'
59+
no_markers: true
60+
tables:
61+
- parameter: atmospheric_profile
62+
column_x: 'altitude'
63+
column_y: 'pressure'
64+
- type: thickness_vs_altitude
65+
title: 'Atmospheric thickness profile'
66+
xtitle: 'Height [km]'
67+
ytitle: 'Thickness [g/cm^2]'
68+
yscale: 'log'
69+
no_markers: true
70+
tables:
71+
- parameter: atmospheric_profile
72+
column_x: 'altitude'
73+
column_y: 'thickness'

src/simtools/schemas/model_parameters/atmospheric_transmission.schema.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,46 @@ source:
3333
simulation_software:
3434
- name: corsika
3535
- name: sim_telarray
36+
plot_configuration:
37+
- type: atmospheric_transmission
38+
title: 'Atmospheric transmission profile'
39+
xtitle: 'Wavelength [nm]'
40+
ytitle: 'Extinction'
41+
yscale: 'log'
42+
no_markers: true
43+
tables:
44+
- parameter: atmospheric_transmission
45+
label: '30 km'
46+
column_x: 'wavelength'
47+
column_y: 'extinction'
48+
select_values:
49+
column_name: 'altitude'
50+
value: 30.0
51+
- parameter: atmospheric_transmission
52+
label: '15 km'
53+
column_x: 'wavelength'
54+
column_y: 'extinction'
55+
select_values:
56+
column_name: 'altitude'
57+
value: 15.0
58+
- parameter: atmospheric_transmission
59+
label: '10 km'
60+
column_x: 'wavelength'
61+
column_y: 'extinction'
62+
select_values:
63+
column_name: 'altitude'
64+
value: 10.0
65+
- parameter: atmospheric_transmission
66+
label: '5 km'
67+
column_x: 'wavelength'
68+
column_y: 'extinction'
69+
select_values:
70+
column_name: 'altitude'
71+
value: 5.0
72+
- parameter: atmospheric_transmission
73+
label: '2.4 km'
74+
column_x: 'wavelength'
75+
column_y: 'extinction'
76+
select_values:
77+
column_name: 'altitude'
78+
value: 2.358

src/simtools/schemas/model_parameters/camera_filter.schema.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,13 @@ source:
4343
- Calibration
4444
simulation_software:
4545
- name: sim_telarray
46+
plot_configuration:
47+
- type: camera_filter
48+
title: 'Camera filter'
49+
xtitle: 'Wavelength (nm)'
50+
ytitle: 'Transmission'
51+
no_markers: true
52+
tables:
53+
- parameter: camera_filter
54+
column_x: 'wavelength'
55+
column_y: 'transmission'

src/simtools/schemas/model_parameters/camera_filter_incidence_angle.schema.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,13 @@ source:
2727
- SimPipe Derived
2828
simulation_software:
2929
- name: simtools
30+
plot_configuration:
31+
- type: camera_filter_incidence_angle
32+
title: 'Photon incident angles'
33+
xtitle: 'Photon incident angle [deg]'
34+
ytitle: 'Fraction'
35+
no_markers: true
36+
tables:
37+
- parameter: camera_filter_incidence_angle
38+
column_x: 'Incidence angle'
39+
column_y: 'Fraction'

src/simtools/schemas/model_parameters/discriminator_pulse_shape.schema.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,34 @@ source:
3131
- Calibration
3232
simulation_software:
3333
- name: sim_telarray
34+
plot_configuration:
35+
- type: discriminator_pulse_shape
36+
title: 'Discriminator pulse shape'
37+
xtitle: 'Time [ns]'
38+
ytitle: 'Amplitude [a.u.]'
39+
no_markers: true
40+
tables:
41+
- parameter: discriminator_pulse_shape
42+
column_x: 'time'
43+
column_y: 'amplitude'
44+
- type: discriminator_pulse_shape_low_gain
45+
title: 'Discriminator pulse shape (low gain)'
46+
xtitle: 'Time [ns]'
47+
ytitle: 'Amplitude [a.u.]'
48+
no_markers: true
49+
tables:
50+
- parameter: discriminator_pulse_shape
51+
column_x: 'time'
52+
column_y: 'amplitude (low gain)'
53+
- type: discriminator_pulse_shape_high_and_low_gain
54+
title: 'Discriminator pulse shape (high and low gain)'
55+
xtitle: 'Time [ns]'
56+
ytitle: 'Amplitude [a.u.]'
57+
no_markers: true
58+
tables:
59+
- parameter: discriminator_pulse_shape
60+
column_x: 'time'
61+
column_y: 'amplitude'
62+
- parameter: discriminator_pulse_shape
63+
column_x: 'time'
64+
column_y: 'amplitude (low gain)'

src/simtools/schemas/model_parameters/fadc_pulse_shape.schema.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ source:
3838
simulation_software:
3939
- name: sim_telarray
4040
plot_configuration:
41-
- TYPE: fadc_pulse_shape
42-
TITLE: 'FADC pulse shape'
43-
XTITLE: 'Time [ns]'
44-
YTITLE: 'Amplitude [a.u.]'
45-
XSCALE: 'linear'
46-
YSCALE: 'linear'
47-
NO_MARKERS: true
48-
PLOT_RATIO: false
49-
TABLES:
50-
- PARAMETER: fadc_pulse_shape
51-
COLUMN_X: 'time'
52-
COLUMN_Y: 'amplitude'
41+
- type: fadc_pulse_shape
42+
title: 'FADC pulse shape'
43+
xtitle: 'Time [ns]'
44+
ytitle: 'Amplitude [a.u.]'
45+
xscale: 'linear'
46+
yscale: 'linear'
47+
no_markers: true
48+
tables:
49+
- parameter: fadc_pulse_shape
50+
column_x: 'time'
51+
column_y: 'amplitude'

src/simtools/schemas/model_parameters/lightguide_efficiency_vs_incidence_angle.schema.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,13 @@ source:
3939
- Calibration
4040
simulation_software:
4141
- name: simtools
42+
plot_configuration:
43+
- type: lightguide_efficiency_vs_incidence_angle
44+
title: 'Light guide efficiency'
45+
xtitle: 'Incident angle [deg]'
46+
ytitle: 'Efficiency'
47+
no_markers: true
48+
tables:
49+
- parameter: lightguide_efficiency_vs_incidence_angle
50+
column_x: 'angle'
51+
column_y: 'efficiency'

0 commit comments

Comments
 (0)