WWTWindowsClient¶
- class pywwt.windows.client.WWTWindowsClient(host=None)[source]¶
Bases:
object
Initialize a WWTWindowsClient, connecting to a WWT client.
- Parameters:
- host
str
, optional The hostname or IP address where the WWT client is being run. Default: “127.0.0.1”
- host
Methods Summary
change_mode
(mode, **kwargs)Changes the view to one of Earth, Planet, Sky, Panorama, SolarSystem.
get_existing_layer
(name)Return an existing layer as a
WWTLayer
object.Returns information about the reference frames that are currently in the layer manager.
Returns information about the layers that are currently in the layer manager.
Requests some details of the current view.
load
(filename, frame, name[, color, ...])Initialize a new layer in the layer manager.
move_view
(parameter, **kwargs)Changes the view depending on the supplied parameter.
new_layer
(frame, name, fields[, color, ...])Initialize a new layer in the layer manager.
new_layer_group
(frame, name, **kwargs)Specifies that a layer group should be added.
ui_settings
(setting_name, setting_value, ...)Change user interface settings, without altering the layer data.
Methods Documentation
- change_mode(mode, **kwargs)[source]¶
Changes the view to one of Earth, Planet, Sky, Panorama, SolarSystem.
- Parameters:
- mode
str
The mode to change to.
- kwargs
Additional standard keyword arguments
- mode
- get_frame_list()[source]¶
Returns information about the reference frames that are currently in the layer manager.
- Returns:
- frames
dict
A dictionary of reference frames.
- frames
- get_layer_list()[source]¶
Returns information about the layers that are currently in the layer manager.
- Returns:
- layers
dict
A dictionary of layers.
- layers
- get_state()[source]¶
Requests some details of the current view.
- Returns:
- state
dict
The state information as a dict of key, value pairs.
- state
- load(filename, frame, name, color=None, start_date=None, end_date=None, fade_type=None, fade_range=None, **kwargs)[source]¶
Initialize a new layer in the layer manager.
- Parameters:
- filename
str
The name of the file to read the data from.
- frame
str
The reference frame of the layer.
- name
str
The name of the layer.
- fields
list
The names of the fields to be loaded in the layer, as a list of strings.
- color
str
, optional ARBG hex value of the color to be used when rendering the events of the layer. Default: “FFFFFFFF” (white)
- start_date
str
, optional With time series data, the date and time to start the visualization for this layer. This could for example be slightly earlier than the date of the first event in the actual data. Default: the system minimum date value. Acceptable formats (month/day/year):
"1/1/2010 11:00:00 PM"
,"1/1/2010 11:30 AM"
,"1/1/2010 11 am"
,"1/1/2000"
,"1/2000"
,- end_date
str
, optional With time series data, the date and time to end the visualization for this layer. Default: the system maximum date value.
- fade_type{‘In’, ‘Out’, ‘Both’, ‘None’}
Fades the data visualization
- fade_range
int
Fade time in days
- kwargs
Additional standard keyword arguments
- filename
- Returns:
- layer
A
WWTLayer
object corresponding to the layer just created.
- move_view(parameter, **kwargs)[source]¶
Changes the view depending on the supplied parameter. For a list of parameters see:
https://docs.worldwidetelescope.org/lcapi-guide/1/lcapicommands/#move
- Parameters:
- parameter
str
The parameter used to set the view.
- kwargs
Additional standard keyword arguments
- parameter
- new_layer(frame, name, fields, color=None, start_date=None, end_date=None, fade_type=None, fade_range=None, **kwargs)[source]¶
Initialize a new layer in the layer manager.
- Parameters:
- frame
str
The reference frame of the layer.
- name
str
The name of the layer.
- fields
list
The names of the fields to be loaded in the layer, as a list of strings.
- color
str
, optional ARBG hex value of the color to be used when rendering the events of the layer. Default: “FFFFFFFF” (white)
- start_date
str
, optional With time series data, the date and time to start the visualization for this layer. This could for example be slightly earlier than the date of the first event in the actual data. Default: the system minimum date value. Acceptable formats (month/day/year):
"1/1/2010 11:00:00 PM"
,"1/1/2010 11:30 AM"
,"1/1/2010 11 am"
,"1/1/2000"
,"1/2000"
,- end_date
str
, optional With time series data, the date and time to end the visualization for this layer. Default: the system maximum date value.
- fade_type{‘In’, ‘Out’, ‘Both’, ‘None’}
Fades the data visualization
- fade_range
int
Fade time in days
- kwargs
Additional standard keyword arguments
- frame
- Returns:
- layer
A
WWTLayer
object corresponding to the layer just created.
- ui_settings(setting_name, setting_value, **kwargs)[source]¶
Change user interface settings, without altering the layer data. For the settings list see:
https://docs.worldwidetelescope.org/lcapi-guide/1/lcapicommands/#uisettings