diff --git a/ZMQ-Message-Reference.md b/ZMQ-Message-Reference.md index 4935582..7f0a607 100644 --- a/ZMQ-Message-Reference.md +++ b/ZMQ-Message-Reference.md @@ -252,7 +252,7 @@ Changing the parameters for OSAs and zone plates, as well as the size of the OSA These keys are not required to all be included in the JSON structure (e.g. the OSA gap can be set without the "OSAs" or "zonePlates" keys being present). When the OSA or zone plate set as "active" is one of the set that are described in the config file, the "activeOSA" and/or "activeZonePlate" is updated in the config file with the associated "name" string. All other details for the zone plate or OSA are taken from the zone plate config file. When the OSA gap is given a new value via the "dOsa" key, the "dOsa" key in the zone plate config file is updated. No other changes are made to the config file. -If the OSA or zone plate holding the `"active":1` key/vale does not have a "name" key or its value is an empty string, then it is understood to be a temporary setting and is processed differently. Firstly, no change is made to the config file, so the settings will be forgotten on restart of Pixelator. Secondly, further info is read from the JSON string. For an OSA, the float value of the "diameter" key is read and applied as the OSA diameter in microns. For a zone plate, the array value of the "b" key is read and applied as the coefficients of a polynomial that describe the energy dependent focal length of the zone plate (assuming infinite source distance). While not required, an "outer_diameter" key should be provided with a float value in microns in order for the OSA gap colour indicator to function correctly (otherwise the OSA Gap input box will remain red at all times). +If the OSA or zone plate holding the `"active":1` key/vale does not have a "name" key or its value is an empty string and its position in the list is one more than the number of pre-defined OSA/ZPs, then it is understood to be a temporary setting and is processed differently. Firstly, no change is made to the config file, so the settings will be forgotten on restart of Pixelator. Secondly, further info is read from the JSON string. For an OSA, the float value of the "diameter" key is read and applied as the OSA diameter in microns. For a zone plate, the array value of the "b" key is read and applied as the coefficients of a polynomial that describe the energy dependent focal length of the zone plate (assuming infinite source distance). While not required, an "outer_diameter" key should be provided with a float value in microns in order for the OSA gap colour indicator to function correctly (otherwise the OSA Gap input box will remain red at all times). Details can be found in the [ZonePlate::modify()](https://gitea.psi.ch/MicroSpectro/Pixelator/src/branch/master/PixelatorController/src/ZonePlate.cc#L164) function and the [zone plate configuration](Config_ZonePlate) documentation. @@ -341,15 +341,20 @@ msg3 = ['modified zonePlate definition', ``` msg1 = ['modified zonePlate definition', '{ -"OSAs":[{ +"OSAs":[{} + ,{} + ,{} + ,{ "diameter":70 ,"active":1 }] }'] msg2 = ['modified zonePlate definition', -'{"zonePlates":[ - { +'{"zonePlates":[{} + ,{} + ,{} + ,{ "name":"" ,"active":1 ,"b":[0.0,4.821]