I haven't tried in other operative systems, but at least in MacOS (v 14.7.6) that happens:
params_scao_pyr.yml --> standard definition of the system from specula distribution containing no display objects
params_scao_plots.yml --> containing only display objects for data defined in params_scao_pyr.yml
This prompt command runs properly producing the expected output and displaying
> specula "config/scao/params_scao_pyr.yml" "config/scao/params_scao_plots.yml"
This command runs properly producing the expected output and diagram file:
> specula "config/scao/params_scao_pyr.yml" --diagram-filename "config/scao/diagram_scao_pyr_plots.png"
This command raises an error when it is going to show the first display (diagram file is generated and saved correctly):
> specula "config/scao/params_scao_pyr.yml" "config/scao/params_scao_plots.yml" --diagram-filename "config/scao/diagram_scao_pyr_plots.png"
The same error happens when running directly inside python:
>>> import specula
>>> base_config = "config/scao/params_scao_pyr.yml"
>>> plot_config = "config/scao/params_scao_plots.yml"
>>> specula.main_simul(yml_files=[base_config, plot_config], diagram_filename="config/scao/diagram_scao_pyr_plots.png")
It seems that the use of the graphics for generating the diagram leaves something unclean for the following graphics. When diagram is not requested, everything is running properly.
In both cases the log is the following:
Cupy import failed. SPECULA will fall back to CPU use.
Default device is CPU
['config/scao/params_scao_pyr.yml', 'config/scao/params_scao_plots.yml']
self.diagram_colors_on False
Reading parameters from config/scao/params_scao_pyr.yml
Reading additional parameters from config/scao/params_scao_plots.yml
overrides: []
self.trigger_order=['main', 'seeing', 'wind_speed', 'wind_direction', 'on_axis_source', 'pupilstop', 'launcher', 'atmo', 'prop', 'pyramid', 'psf', 'data_store', 'ph_disp', 'detector', 'sr_disp', 'psf_disp', 'slopec', 'pixel_disp', 'rec', 'sc_disp', 'control', 'modes_disp', 'dm', 'dm_disp']
self.trigger_order_idx=[0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9]
output_name_full seeing.output
output_name_full wind_speed.output
output_name_full wind_direction.output
output_name_full prop.out_on_axis_source_ef
output_name_full pyramid.out_i
output_name_full detector.out_pixels
output_name_full slopec.out_slopes
output_name_full rec.out_modes
output_name_full control.out_comm
output_name_full prop.out_on_axis_source_ef
output_name_full detector.out_pixels
output_name_full rec.out_modes
output_name_full slopec.out_slopes
output_name_full psf.out_sr
output_name_full prop.out_on_axis_source_ef
output_name_full dm.out_layer
output_name_full psf.out_psf
AtmoEvolution: zenith angle is defined as: 0 deg
AtmoEvolution: airmass is: 1.0
AtmoEvolution: zenith angle is defined as: 0.0 deg
AtmoEvolution: airmass is: 1.0
FoV reduction from 3.09 to 2.00 will be performed with a focal plane mask
Restoring: ./calib/SCAO/pupils/scao_pupdata.fits
Restoring: ./calib/SCAO/rec/scao_pyr_rec.fits
Building diagram...
Diagram saved.
self.loop.max_global_order 9
Cached circular modulation with 24 steps, amplitude: 3.00
SR: 0.007612507
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType initWithTypefaceInfo:key:renderingMode:]: unrecognized selector sent to instance 0x7fc8be244b30'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff8195a0cb6 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff8190909dd objc_exception_throw + 48
2 CoreFoundation 0x00007ff819646404 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007ff81950e293 forwarding + 1379
4 CoreFoundation 0x00007ff81950dca8 _CF_forwarding_prep_0 + 120
5 UIFoundation 0x00007ff81df957e6 -[__NSFontTypefaceInfo fontInstanceForKey:renderingMode:] + 100
6 UIFoundation 0x00007ff81df95762 -[__NSFontTypefaceInfo fontInstanceForFontDescriptor:size:affineTransform:renderingMode:] + 335
7 UIFoundation 0x00007ff81df94839 __NSGetMetaFontInstanceWithType + 582
8 AppKit 0x00007ff81cbcb3a9 -[NSCell _convertToText:] + 207
9 AppKit 0x00007ff81cbcb1f6 -[NSButtonCell _convertToText:] + 78
10 AppKit 0x00007ff81cbcae54 -[NSButtonCell initTextCell:] + 80
11 AppKit 0x00007ff81cbcadc0 -[NSButtonCell init] + 26
12 AppKit 0x00007ff81cbcaa7a -[NSControl initWithFrame:] + 189
13 AppKit 0x00007ff81cbca93a -[NSButton initWithFrame:] + 63
14 AppKit 0x00007ff81cbca6e8 -[_NSThemeWidget initWithButtonID:] + 102
15 AppKit 0x00007ff81cbca62b +[_NSThemeCloseWidget closeWidgetInView:withButtonID:action:] + 55
16 AppKit 0x00007ff81cbca07c -[NSThemeFrame newCloseButton] + 73
17 AppKit 0x00007ff81cbc832a -[NSThemeFrame _updateButtons] + 593
18 AppKit 0x00007ff81cbc9e78 -[NSWindow _cacheAndSetPropertiesForCollectionBehavior:] + 492
19 AppKit 0x00007ff81cbc9276 -[NSWindow _effectiveCollectionBehavior] + 608
20 AppKit 0x00007ff81cbc8fd3 -[NSWindow(NSFullScreen) canEnterFullScreenMode] + 19
21 AppKit 0x00007ff81cbc8f7b -[NSWindow showsFullScreenButton] + 22
22 AppKit 0x00007ff81cbc81d2 -[NSThemeFrame _updateButtons] + 249
23 AppKit 0x00007ff81cd66df0 -[NSThemeFrame setRepresentedURL:] + 30
24 AppKit 0x00007ff81d705a2c -[NSThemeFrame _updateTitleProperties:animated:] + 150
25 AppKit 0x00007ff81cbb5871 -[NSFrameView initWithFrame:styleMask:owner:] + 296
26 AppKit 0x00007ff81cbb55ff -[NSThemeFrame initWithFrame:styleMask:owner:] + 67
27 AppKit 0x00007ff81cbb34f3 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 662
28 AppKit 0x00007ff81cbb2e4f -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1161
29 AppKit 0x00007ff81cbb29c0 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
30 _macosx.cpython-311-darwin.so 0x0000000117c2250e -[Window initWithContentRect:styleMask:backing:defer:withManager:] + 62
31 _macosx.cpython-311-darwin.so 0x0000000117c259fb FigureManager_init + 251
32 python3.11 0x000000010fbfb18c wrap_init + 12
33 python3.11 0x000000010fb74ff2 wrapperdescr_call + 594
34 python3.11 0x000000010fcbc16f _PyEval_EvalFrameDefault + 227471
35 python3.11 0x000000010fb6549b _PyFunction_Vectorcall + 491
36 python3.11 0x000000010fb6793b _PyObject_Call_Prepend + 171
37 python3.11 0x000000010fbfaf61 slot_tp_init + 177
38 python3.11 0x000000010fbf011a type_call + 122
39 python3.11 0x000000010fcbc16f _PyEval_EvalFrameDefault + 227471
40 python3.11 0x000000010fb6549b _PyFunction_Vectorcall + 491
41 python3.11 0x000000010fb6af20 method_vectorcall + 336
42 python3.11 0x000000010fcc0450 _PyEval_EvalFrameDefault + 244592
43 python3.11 0x000000010fb6549b _PyFunction_Vectorcall + 491
44 python3.11 0x000000010fcc0450 _PyEval_EvalFrameDefault + 244592
45 python3.11 0x000000010fb6549b _PyFunction_Vectorcall + 491
46 python3.11 0x000000010fcc0450 _PyEval_EvalFrameDefault + 244592
47 python3.11 0x000000010fc821a4 _PyEval_Vector + 484
48 python3.11 0x000000010fc81f49 PyEval_EvalCode + 249
49 python3.11 0x000000010fd2f704 run_mod + 132
50 python3.11 0x000000010fd2f52c pyrun_file + 140
51 python3.11 0x000000010fd2f013 _PyRun_SimpleFileObject + 275
52 python3.11 0x000000010fd2e9c6 _PyRun_AnyFileObject + 182
53 python3.11 0x000000010fd52d4b pymain_run_file_obj + 267
54 python3.11 0x000000010fd527c5 pymain_run_file + 85
55 python3.11 0x000000010fd52146 Py_RunMain + 1990
56 python3.11 0x000000010faf52e8 main + 56
57 dyld 0x00007ff8190c5345 start + 1909
)
libc++abi: terminating due to uncaught exception of type NSException
I haven't tried in other operative systems, but at least in MacOS (v 14.7.6) that happens:
params_scao_pyr.yml --> standard definition of the system from specula distribution containing no display objects
params_scao_plots.yml --> containing only display objects for data defined in params_scao_pyr.yml
This prompt command runs properly producing the expected output and displaying
> specula "config/scao/params_scao_pyr.yml" "config/scao/params_scao_plots.yml"This command runs properly producing the expected output and diagram file:
> specula "config/scao/params_scao_pyr.yml" --diagram-filename "config/scao/diagram_scao_pyr_plots.png"This command raises an error when it is going to show the first display (diagram file is generated and saved correctly):
> specula "config/scao/params_scao_pyr.yml" "config/scao/params_scao_plots.yml" --diagram-filename "config/scao/diagram_scao_pyr_plots.png"The same error happens when running directly inside python:
It seems that the use of the graphics for generating the diagram leaves something unclean for the following graphics. When diagram is not requested, everything is running properly.
In both cases the log is the following:
Cupy import failed. SPECULA will fall back to CPU use.
Default device is CPU
['config/scao/params_scao_pyr.yml', 'config/scao/params_scao_plots.yml']
self.diagram_colors_on False
Reading parameters from config/scao/params_scao_pyr.yml
Reading additional parameters from config/scao/params_scao_plots.yml
overrides: []
self.trigger_order=['main', 'seeing', 'wind_speed', 'wind_direction', 'on_axis_source', 'pupilstop', 'launcher', 'atmo', 'prop', 'pyramid', 'psf', 'data_store', 'ph_disp', 'detector', 'sr_disp', 'psf_disp', 'slopec', 'pixel_disp', 'rec', 'sc_disp', 'control', 'modes_disp', 'dm', 'dm_disp']
self.trigger_order_idx=[0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9]
output_name_full seeing.output
output_name_full wind_speed.output
output_name_full wind_direction.output
output_name_full prop.out_on_axis_source_ef
output_name_full pyramid.out_i
output_name_full detector.out_pixels
output_name_full slopec.out_slopes
output_name_full rec.out_modes
output_name_full control.out_comm
output_name_full prop.out_on_axis_source_ef
output_name_full detector.out_pixels
output_name_full rec.out_modes
output_name_full slopec.out_slopes
output_name_full psf.out_sr
output_name_full prop.out_on_axis_source_ef
output_name_full dm.out_layer
output_name_full psf.out_psf
AtmoEvolution: zenith angle is defined as: 0 deg
AtmoEvolution: airmass is: 1.0
AtmoEvolution: zenith angle is defined as: 0.0 deg
AtmoEvolution: airmass is: 1.0
FoV reduction from 3.09 to 2.00 will be performed with a focal plane mask
Restoring: ./calib/SCAO/pupils/scao_pupdata.fits
Restoring: ./calib/SCAO/rec/scao_pyr_rec.fits
Building diagram...
Diagram saved.
self.loop.max_global_order 9
Cached circular modulation with 24 steps, amplitude: 3.00
SR: 0.007612507
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFType initWithTypefaceInfo:key:renderingMode:]: unrecognized selector sent to instance 0x7fc8be244b30'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff8195a0cb6 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff8190909dd objc_exception_throw + 48
2 CoreFoundation 0x00007ff819646404 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007ff81950e293 forwarding + 1379
4 CoreFoundation 0x00007ff81950dca8 _CF_forwarding_prep_0 + 120
5 UIFoundation 0x00007ff81df957e6 -[__NSFontTypefaceInfo fontInstanceForKey:renderingMode:] + 100
6 UIFoundation 0x00007ff81df95762 -[__NSFontTypefaceInfo fontInstanceForFontDescriptor:size:affineTransform:renderingMode:] + 335
7 UIFoundation 0x00007ff81df94839 __NSGetMetaFontInstanceWithType + 582
8 AppKit 0x00007ff81cbcb3a9 -[NSCell _convertToText:] + 207
9 AppKit 0x00007ff81cbcb1f6 -[NSButtonCell _convertToText:] + 78
10 AppKit 0x00007ff81cbcae54 -[NSButtonCell initTextCell:] + 80
11 AppKit 0x00007ff81cbcadc0 -[NSButtonCell init] + 26
12 AppKit 0x00007ff81cbcaa7a -[NSControl initWithFrame:] + 189
13 AppKit 0x00007ff81cbca93a -[NSButton initWithFrame:] + 63
14 AppKit 0x00007ff81cbca6e8 -[_NSThemeWidget initWithButtonID:] + 102
15 AppKit 0x00007ff81cbca62b +[_NSThemeCloseWidget closeWidgetInView:withButtonID:action:] + 55
16 AppKit 0x00007ff81cbca07c -[NSThemeFrame newCloseButton] + 73
17 AppKit 0x00007ff81cbc832a -[NSThemeFrame _updateButtons] + 593
18 AppKit 0x00007ff81cbc9e78 -[NSWindow _cacheAndSetPropertiesForCollectionBehavior:] + 492
19 AppKit 0x00007ff81cbc9276 -[NSWindow _effectiveCollectionBehavior] + 608
20 AppKit 0x00007ff81cbc8fd3 -[NSWindow(NSFullScreen) canEnterFullScreenMode] + 19
21 AppKit 0x00007ff81cbc8f7b -[NSWindow showsFullScreenButton] + 22
22 AppKit 0x00007ff81cbc81d2 -[NSThemeFrame _updateButtons] + 249
23 AppKit 0x00007ff81cd66df0 -[NSThemeFrame setRepresentedURL:] + 30
24 AppKit 0x00007ff81d705a2c -[NSThemeFrame _updateTitleProperties:animated:] + 150
25 AppKit 0x00007ff81cbb5871 -[NSFrameView initWithFrame:styleMask:owner:] + 296
26 AppKit 0x00007ff81cbb55ff -[NSThemeFrame initWithFrame:styleMask:owner:] + 67
27 AppKit 0x00007ff81cbb34f3 -[NSWindow _commonInitFrame:styleMask:backing:defer:] + 662
28 AppKit 0x00007ff81cbb2e4f -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1161
29 AppKit 0x00007ff81cbb29c0 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
30 _macosx.cpython-311-darwin.so 0x0000000117c2250e -[Window initWithContentRect:styleMask:backing:defer:withManager:] + 62
31 _macosx.cpython-311-darwin.so 0x0000000117c259fb FigureManager_init + 251
32 python3.11 0x000000010fbfb18c wrap_init + 12
33 python3.11 0x000000010fb74ff2 wrapperdescr_call + 594
34 python3.11 0x000000010fcbc16f _PyEval_EvalFrameDefault + 227471
35 python3.11 0x000000010fb6549b _PyFunction_Vectorcall + 491
36 python3.11 0x000000010fb6793b _PyObject_Call_Prepend + 171
37 python3.11 0x000000010fbfaf61 slot_tp_init + 177
38 python3.11 0x000000010fbf011a type_call + 122
39 python3.11 0x000000010fcbc16f _PyEval_EvalFrameDefault + 227471
40 python3.11 0x000000010fb6549b _PyFunction_Vectorcall + 491
41 python3.11 0x000000010fb6af20 method_vectorcall + 336
42 python3.11 0x000000010fcc0450 _PyEval_EvalFrameDefault + 244592
43 python3.11 0x000000010fb6549b _PyFunction_Vectorcall + 491
44 python3.11 0x000000010fcc0450 _PyEval_EvalFrameDefault + 244592
45 python3.11 0x000000010fb6549b _PyFunction_Vectorcall + 491
46 python3.11 0x000000010fcc0450 _PyEval_EvalFrameDefault + 244592
47 python3.11 0x000000010fc821a4 _PyEval_Vector + 484
48 python3.11 0x000000010fc81f49 PyEval_EvalCode + 249
49 python3.11 0x000000010fd2f704 run_mod + 132
50 python3.11 0x000000010fd2f52c pyrun_file + 140
51 python3.11 0x000000010fd2f013 _PyRun_SimpleFileObject + 275
52 python3.11 0x000000010fd2e9c6 _PyRun_AnyFileObject + 182
53 python3.11 0x000000010fd52d4b pymain_run_file_obj + 267
54 python3.11 0x000000010fd527c5 pymain_run_file + 85
55 python3.11 0x000000010fd52146 Py_RunMain + 1990
56 python3.11 0x000000010faf52e8 main + 56
57 dyld 0x00007ff8190c5345 start + 1909
)
libc++abi: terminating due to uncaught exception of type NSException