AOtools / soapy

A Python Adaptive Optics Simulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better configuration format

andrewpaulreeves opened this issue · comments

The current configuration format can be a bit clunky. The is especially the case for components like WFSs and DMs, where you have to supply an array for every parameter. This gets silly when you combine different types, like a tip-tilt and Piezo DM which require different parameter sets, but all are required for both anyway. For example, you end up setting the number of actuators on a tip-tilt mirror.

This could be changed relatively easily so that you provide each component separately, e.g.

"DM":{
    0: { 
        'type': "TipTilt",
        'gain': 0.7
    },
    1: {
        'type': "Peizo",
        'nxActuators': 10,
        'gain': 0.6,
    }
}

This is better, but a lot of dictionaries are required! Perhaps this is a good oppertunity to adopt something like YAML for configuration, so it becomes:

- dm:
    - TipTilt:
        - gain: 0.7
    - Peizo:
        - nxActuators: 10
        - gain: 0.6

The downside of this is that you can no-longer write any quick python code to set a number of parameters in the config file. Perhaps this is actually a good though to stop messy config files....?

If others have thoughts, I'd be eager to hear them!