WWTLayer¶
- class pywwt.windows.layer.WWTLayer(name, id, fields, wwt)[source]¶
Bases:
object
A
WWTLayer
object corresponding to a layer in WWT’s Layer Manager.- Parameters:
- name
str
The name of the layer.
- id
str
The ID of the layer.
- field
list
The fields in the layer as a list of strings.
- wwt
WWTWindowsClient
The WWT client where this layer exists.
- name
Methods Summary
activate
(**kwargs)Highlight this layer in the layer manager.
delete
()Delete the layer.
Return all the properties of the layer.
get_property
(property_name)Return a property.
set_properties
(props_dict, **kwargs)Set the properties of the layer.
set_property
(property_name, property_value, ...)Set a single property.
update
([data, name, no_purge, purge_all, show])Update the layer.
Methods Documentation
- activate(**kwargs)[source]¶
Highlight this layer in the layer manager.
- Parameters:
- kwargs
Additional standard keyword arguments
- get_properties()[source]¶
Return all the properties of the layer. For a list of properties see:
https://docs.worldwidetelescope.org/lcapi-guide/1/properties/
- Returns:
- properties
dict
All of the properties in a dict of key: value pairs.
- properties
- get_property(property_name)[source]¶
Return a property. For a list of properties see:
https://docs.worldwidetelescope.org/lcapi-guide/1/properties/
- Parameters:
- property_name
str
The name of the property to be returned.
- property_name
- set_properties(props_dict, **kwargs)[source]¶
Set the properties of the layer. For a list of properties see:
https://docs.worldwidetelescope.org/lcapi-guide/1/properties/
- Parameters:
- props_dict
dict
Dictionary of property_name: property_value pairs.
- kwargs
Additional standard keyword arguments
- props_dict
- set_property(property_name, property_value, **kwargs)[source]¶
Set a single property. For a list of properties see:
https://docs.worldwidetelescope.org/lcapi-guide/1/properties/
- update(data=None, name=None, no_purge=False, purge_all=False, show=True, **kwargs)[source]¶
Update the layer.
- Parameters:
- data
dict
, optional New data to be added to the layer as a dictionary of Numpy arrays
- name
str
, optional A new name for the layer, if it needs to be renamed
- no_purge
bool
, optional The sending of an update command will delete events that occur before the start time of any events in the update and that have already decayed. Set this flag to
True
if the event data should not be deleted.- purge_all
bool
, optional Delete all data.
- show
bool
, optional Whether to show or hide the layer.
- kwargs
Additional standard keyword arguments
- data