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:
namestr

The name of the layer.

idstr

The ID of the layer.

fieldlist

The fields in the layer as a list of strings.

wwtWWTWindowsClient

The WWT client where this layer exists.

Methods Summary

activate(**kwargs)

Highlight this layer in the layer manager.

delete()

Delete the layer.

get_properties()

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

delete()[source]

Delete the layer.

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:
propertiesdict

All of the properties in a dict of key: value pairs.

get_property(property_name)[source]

Return a property. For a list of properties see:

https://docs.worldwidetelescope.org/lcapi-guide/1/properties/

Parameters:
property_namestr

The name of the property to be returned.

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_dictdict

Dictionary of property_name: property_value pairs.

kwargs

Additional standard keyword arguments

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/

Parameters:
property_namestr

Name of the property to be set.

property_valuestr

Value the property should take.

kwargs

Additional standard keyword arguments

update(data=None, name=None, no_purge=False, purge_all=False, show=True, **kwargs)[source]

Update the layer.

Parameters:
datadict, optional

New data to be added to the layer as a dictionary of Numpy arrays

namestr, optional

A new name for the layer, if it needs to be renamed

no_purgebool, 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_allbool, optional

Delete all data.

showbool, optional

Whether to show or hide the layer.

kwargs

Additional standard keyword arguments