Can't easily reuse parameters from other IFO config files
The LIGO parameter files included with pygwinc have better researched material parameters than my own parameter file. I'd like to just use the parameters for silica etc. from the aLIGO.yaml file without having to copy them into my file.
At the prototype we will also run our interferometer with different sets of optics with different coatings. Having some way to reuse parameters from other files would allow me to create a second budget with only the coatings changing in the second file and having everything else inherited. This might also be useful for e.g. A+ or LIGO India.
One idea could be to split the existing materials in the LIGO YAML files into a separate materials database. Give these materials keys that can be used inside the main YAML file to specify material properties. Allow material properties from the loaded database to be overridden, e.g. by making the block look like:
Materials:
MassRadius: 0.024 # m
MassThickness: 0.024 # m
## Coating material parameters-----------------------------------------
Coating:
use: 'materials.coatings.aLIGO' # imports default aLIGO coatings block
Yhighn: 100e9 # overrides Yhighn from aLIGO coatings block
Alternatively/additionally: allow parameter files to be loaded hierarchically. A base file could be loaded, and additional parameters overridden by a later file.
load_budget('base.yaml', 'my-ifo.yaml', ...) # loads base.yaml first, then my-ifo.yaml overwrites any params already defined by base.yaml and adds new ones
This would probably be much more work but it would to me be preferable, allowing for true reuseability.
I think the two suggestions (materials database and parameter hierarchy) aren't mutually exclusive. It anyway seems a bit strange to have the same material properties defined in every file. It should probably be possible to use database materials or define your own if you don't like them.
(Originally from #39 (closed))