Add a colour map for consistent coincidence colors #5039
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As we are now making plots with difference coincidences on one chart, I thought we should make a consistent chart to refer to each detector combination.
Standard information about the request
This is a new feature
This change changes result presentation / plotting
This change follows style guidelines (See e.g. PEP8), has been proposed using the contribution guidelines
Contents
Add a dictionary of colour choices and a function to wrap it.
How this is made is probably the more interesting thing:
This was made from combining the
_ifo_color_map
colors and generating a maximally-distinct colour based on a few things.I set this up by starting with an IFO-precedence list: H1 L1 V1 K1 I1 G1
I then created coincidences containing the most-preferred IFOs and extended the color palette using glasbey to maximise the distinctness of the new color(s).
In words:
The code I ran is here:
I didn't want to add the code directly because
Right now, nothing links to this function/dictionary, so I expect all tests to pass, but we can use this for different coincs on the same plot