Requested by @iandobbie:
I also tried to set both a setup and dye from the URL, ie
https://www.micron.ox.ac.uk/software/spekcheck/?setup=4Pi#setup=4Pi%20Farred#dye=CF-660c
The setup list is restricted but neither the dye not setup are
selected. However each appears to work by themselves, eg
https://www.micron.ox.ac.uk/software/spekcheck/?setup=4Pi#dye=CF-660c
or
https://www.micron.ox.ac.uk/software/spekcheck/?setup=4Pi#setup=4Pi%20Farred
Could this be enabled to allow a complete config including dye to be
selected from the URL?
I believe that the code that matters for this is in SpekCheck.route_hash. Basically, it looks at the fragment/hash component of the URI. In the case of #setup=foo it looks for a setup named foo and in the case of #setup=foo#dye=bar, it will look for a setup named foo#dye=bar. It's typical to split the fragment component with & so that's a solution.
However, to note that a setup includes a dye (although in most cases we have it empty) so it's a bit weird to specify both a setup and dye. I guess that we could have it so that #setup=4pi&dye=gfp will apply gfp on top of the 4pi setup and dye=gfp&setup=4pi will apply the 4 pi setup on top of the gfp dye (possibly setting the dye to something else).
Requested by @iandobbie:
I believe that the code that matters for this is in
SpekCheck.route_hash. Basically, it looks at the fragment/hash component of the URI. In the case of#setup=fooit looks for a setup namedfooand in the case of#setup=foo#dye=bar, it will look for a setup namedfoo#dye=bar. It's typical to split the fragment component with&so that's a solution.However, to note that a setup includes a dye (although in most cases we have it empty) so it's a bit weird to specify both a setup and dye. I guess that we could have it so that
#setup=4pi&dye=gfpwill apply gfp on top of the 4pi setup anddye=gfp&setup=4piwill apply the 4 pi setup on top of the gfp dye (possibly setting the dye to something else).