PYME.LMVis.layers.layer_defaults module¶
Default configurations for new layers¶
To over-ride the defaults, place a file called layer_defaults.yaml
in your ~\.PYME
directory. This should be a .yaml
representation of a dictionary of default settings. An example file is shown below:
# the method/intent used to display all the localisations (default layer when opening PYMEVis)
points:
method: spheres # change display mode to spheres
size: 50 # change size to 50
cmap: gist_rainbow # keep colourmap as gist_rainbow
vertexColour: ['z', 't'] # change to using z coloring by default (rather than ['t', 'z'])
# the method/intent used to display points from a single colour channel
points_channel:
method: pointsprites # change display method to pointsprites
alpha: 0.2 # transparency
size: 20 # size
cmap: ['c', 'm', 'y', 'r', 'g', 'b'] # change order of colour selections (default = ['r', 'g', 'b', 'c', 'm', 'y'])
NOTE: you must currently specify all setings for a layer - not just the ones you want to change/override as we we don’t merge settings with the default settings.
TODO - do a merge of the dictionaries so that we can just specify over-rides
- PYME.LMVis.layers.layer_defaults.new_layer_settings(intent, layer_index=0, ds_keys=[], overrides={})¶
Get the settings to use for a new channel based on intent.
To allow customisation with fallbacks, intent is split with an underscore into <base intent>_<specialisation>. Calling code should try to specify a specialisation where appropriate, even if defaults for that specialisation do not exist.
- Parameters
- intentstr
the intent of this layer
- layer_indexint, optional
the number of previously exisiting layers of this kind/intent (used for asigning sequential colourmaps to layers)
- ds_keyslist, optional
the available data columns (usually data.keys()). Used to select which variable to colour points by.