Put the documentation for each module/package into its own file to make
things more tractable. The `api.rst` index page is now just a stub table
of contents, which should be filled out in more detail. More
restructuring to be done but, combined with the new theme, this is
*much* nicer.
This commit is contained in:
Peter Williams 2021-11-19 11:29:54 -05:00
Родитель 0ef16c44d1
Коммит 8c0a653c62
88 изменённых файлов: 1433 добавлений и 74 удалений

5
.gitignore поставляемый
Просмотреть файл

@ -1,3 +1,4 @@
/docs/_build/
/docs/_static/embed-bundle.js
/docs/_static/embed-bundle.js.map
/pywwt/labextension/
@ -24,10 +25,6 @@ htmlcov
MANIFEST
.ipynb_checkpoints
# Sphinx
docs/api
docs/_build
# Eclipse editor project files
.project
.pydevproject

Просмотреть файл

@ -1,30 +1,28 @@
API Documentation
=================
.. automodapi:: pywwt
:no-inheritance-diagram:
:no-inherited-members:
.. toctree::
:maxdepth: 1
.. automodapi:: pywwt.jupyter
:no-inheritance-diagram:
:no-inherited-members:
.. automodapi:: pywwt.qt
:no-inheritance-diagram:
:no-inherited-members:
.. automodapi:: pywwt.windows
:no-inheritance-diagram:
:no-inherited-members:
.. automodapi:: pywwt.solar_system
:no-inheritance-diagram:
:no-inherited-members:
.. automodapi:: pywwt.layers
:no-inheritance-diagram:
:no-inherited-members:
.. automodapi:: pywwt.instruments
:no-inheritance-diagram:
:no-inherited-members:
api/pywwt
api/pywwt.annotation
api/pywwt.app
api/pywwt.core
api/pywwt.data_server
api/pywwt.imagery
api/pywwt.instruments
api/pywwt.jupyter
api/pywwt.jupyter_relay
api/pywwt.jupyter_server
api/pywwt.layers
api/pywwt.logger
api/pywwt.qt
api/pywwt.solar_system
api/pywwt.traits
api/pywwt.utils
api/pywwt.windows
api/pywwt.windows.client
api/pywwt.windows.layer
api/pywwt.windows.misc
api/pywwt.windows.mods
api/pywwt.windows.utils

Просмотреть файл

@ -0,0 +1,35 @@
Annotation
==========
.. currentmodule:: pywwt
.. autoclass:: Annotation
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Annotation.hover_label
~Annotation.label
~Annotation.opacity
~Annotation.shape
~Annotation.tag
.. rubric:: Methods Summary
.. autosummary::
~Annotation.remove
.. rubric:: Attributes Documentation
.. autoattribute:: hover_label
.. autoattribute:: label
.. autoattribute:: opacity
.. autoattribute:: shape
.. autoattribute:: tag
.. rubric:: Methods Documentation
.. automethod:: remove

Просмотреть файл

@ -0,0 +1,133 @@
BaseWWTWidget
=============
.. currentmodule:: pywwt
.. autoclass:: BaseWWTWidget
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~BaseWWTWidget.actual_planet_scale
~BaseWWTWidget.alt_az_grid
~BaseWWTWidget.available_hips_catalog_names
~BaseWWTWidget.available_layers
~BaseWWTWidget.available_views
~BaseWWTWidget.background
~BaseWWTWidget.constellation_boundaries
~BaseWWTWidget.constellation_boundary_color
~BaseWWTWidget.constellation_figure_color
~BaseWWTWidget.constellation_figures
~BaseWWTWidget.constellation_selection
~BaseWWTWidget.constellation_selection_color
~BaseWWTWidget.crosshairs
~BaseWWTWidget.crosshairs_color
~BaseWWTWidget.current_mode
~BaseWWTWidget.ecliptic
~BaseWWTWidget.ecliptic_grid
~BaseWWTWidget.foreground
~BaseWWTWidget.foreground_opacity
~BaseWWTWidget.galactic_grid
~BaseWWTWidget.galactic_mode
~BaseWWTWidget.grid
~BaseWWTWidget.imagery
~BaseWWTWidget.instruments
~BaseWWTWidget.layers
~BaseWWTWidget.local_horizon_mode
~BaseWWTWidget.location_altitude
~BaseWWTWidget.location_latitude
~BaseWWTWidget.location_longitude
~BaseWWTWidget.most_recent_source
~BaseWWTWidget.selected_sources
~BaseWWTWidget.solar_system
.. rubric:: Methods Summary
.. autosummary::
~BaseWWTWidget.add_circle
~BaseWWTWidget.add_collection
~BaseWWTWidget.add_fov
~BaseWWTWidget.add_line
~BaseWWTWidget.add_polygon
~BaseWWTWidget.becomes_ready
~BaseWWTWidget.center_on_coordinates
~BaseWWTWidget.clear_annotations
~BaseWWTWidget.get_center
~BaseWWTWidget.get_current_time
~BaseWWTWidget.get_fov
~BaseWWTWidget.load_image_collection
~BaseWWTWidget.load_tour
~BaseWWTWidget.pause_time
~BaseWWTWidget.pause_tour
~BaseWWTWidget.play_time
~BaseWWTWidget.reset
~BaseWWTWidget.reset_view
~BaseWWTWidget.resume_tour
~BaseWWTWidget.save_as_html_bundle
~BaseWWTWidget.set_current_time
~BaseWWTWidget.set_selection_change_callback
~BaseWWTWidget.set_view
.. rubric:: Attributes Documentation
.. autoattribute:: actual_planet_scale
.. autoattribute:: alt_az_grid
.. autoattribute:: available_hips_catalog_names
.. autoattribute:: available_layers
.. autoattribute:: available_views
.. autoattribute:: background
.. autoattribute:: constellation_boundaries
.. autoattribute:: constellation_boundary_color
.. autoattribute:: constellation_figure_color
.. autoattribute:: constellation_figures
.. autoattribute:: constellation_selection
.. autoattribute:: constellation_selection_color
.. autoattribute:: crosshairs
.. autoattribute:: crosshairs_color
.. autoattribute:: current_mode
.. autoattribute:: ecliptic
.. autoattribute:: ecliptic_grid
.. autoattribute:: foreground
.. autoattribute:: foreground_opacity
.. autoattribute:: galactic_grid
.. autoattribute:: galactic_mode
.. autoattribute:: grid
.. autoattribute:: imagery
.. autoattribute:: instruments
.. autoattribute:: layers
.. autoattribute:: local_horizon_mode
.. autoattribute:: location_altitude
.. autoattribute:: location_latitude
.. autoattribute:: location_longitude
.. autoattribute:: most_recent_source
.. autoattribute:: selected_sources
.. autoattribute:: solar_system
.. rubric:: Methods Documentation
.. automethod:: add_circle
.. automethod:: add_collection
.. automethod:: add_fov
.. automethod:: add_line
.. automethod:: add_polygon
.. automethod:: becomes_ready
.. automethod:: center_on_coordinates
.. automethod:: clear_annotations
.. automethod:: get_center
.. automethod:: get_current_time
.. automethod:: get_fov
.. automethod:: load_image_collection
.. automethod:: load_tour
.. automethod:: pause_time
.. automethod:: pause_tour
.. automethod:: play_time
.. automethod:: reset
.. automethod:: reset_view
.. automethod:: resume_tour
.. automethod:: save_as_html_bundle
.. automethod:: set_current_time
.. automethod:: set_selection_change_callback
.. automethod:: set_view

37
docs/api/pywwt.Circle.rst Normal file
Просмотреть файл

@ -0,0 +1,37 @@
Circle
======
.. currentmodule:: pywwt
.. autoclass:: Circle
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Circle.fill
~Circle.fill_color
~Circle.line_color
~Circle.line_width
~Circle.radius
~Circle.shape
.. rubric:: Methods Summary
.. autosummary::
~Circle.set_center
.. rubric:: Attributes Documentation
.. autoattribute:: fill
.. autoattribute:: fill_color
.. autoattribute:: line_color
.. autoattribute:: line_width
.. autoattribute:: radius
.. autoattribute:: shape
.. rubric:: Methods Documentation
.. automethod:: set_center

Просмотреть файл

@ -0,0 +1,6 @@
DataPublishingNotAvailableError
===============================
.. currentmodule:: pywwt
.. autoexception:: DataPublishingNotAvailableError

Просмотреть файл

@ -0,0 +1,17 @@
FieldOfView
===========
.. currentmodule:: pywwt
.. autoclass:: FieldOfView
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~FieldOfView.remove
.. rubric:: Methods Documentation
.. automethod:: remove

31
docs/api/pywwt.Line.rst Normal file
Просмотреть файл

@ -0,0 +1,31 @@
Line
====
.. currentmodule:: pywwt
.. autoclass:: Line
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Line.color
~Line.shape
~Line.width
.. rubric:: Methods Summary
.. autosummary::
~Line.add_point
.. rubric:: Attributes Documentation
.. autoattribute:: color
.. autoattribute:: shape
.. autoattribute:: width
.. rubric:: Methods Documentation
.. automethod:: add_point

Просмотреть файл

@ -0,0 +1,35 @@
Polygon
=======
.. currentmodule:: pywwt
.. autoclass:: Polygon
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Polygon.fill
~Polygon.fill_color
~Polygon.line_color
~Polygon.line_width
~Polygon.shape
.. rubric:: Methods Summary
.. autosummary::
~Polygon.add_point
.. rubric:: Attributes Documentation
.. autoattribute:: fill
.. autoattribute:: fill_color
.. autoattribute:: line_color
.. autoattribute:: line_width
.. autoattribute:: shape
.. rubric:: Methods Documentation
.. automethod:: add_point

Просмотреть файл

@ -0,0 +1,6 @@
ViewerNotAvailableError
=======================
.. currentmodule:: pywwt
.. autoexception:: ViewerNotAvailableError

Просмотреть файл

@ -0,0 +1,35 @@
Annotation
==========
.. currentmodule:: pywwt.annotation
.. autoclass:: Annotation
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Annotation.hover_label
~Annotation.label
~Annotation.opacity
~Annotation.shape
~Annotation.tag
.. rubric:: Methods Summary
.. autosummary::
~Annotation.remove
.. rubric:: Attributes Documentation
.. autoattribute:: hover_label
.. autoattribute:: label
.. autoattribute:: opacity
.. autoattribute:: shape
.. autoattribute:: tag
.. rubric:: Methods Documentation
.. automethod:: remove

Просмотреть файл

@ -0,0 +1,37 @@
Circle
======
.. currentmodule:: pywwt.annotation
.. autoclass:: Circle
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Circle.fill
~Circle.fill_color
~Circle.line_color
~Circle.line_width
~Circle.radius
~Circle.shape
.. rubric:: Methods Summary
.. autosummary::
~Circle.set_center
.. rubric:: Attributes Documentation
.. autoattribute:: fill
.. autoattribute:: fill_color
.. autoattribute:: line_color
.. autoattribute:: line_width
.. autoattribute:: radius
.. autoattribute:: shape
.. rubric:: Methods Documentation
.. automethod:: set_center

Просмотреть файл

@ -0,0 +1,17 @@
FieldOfView
===========
.. currentmodule:: pywwt.annotation
.. autoclass:: FieldOfView
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~FieldOfView.remove
.. rubric:: Methods Documentation
.. automethod:: remove

Просмотреть файл

@ -0,0 +1,31 @@
Line
====
.. currentmodule:: pywwt.annotation
.. autoclass:: Line
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Line.color
~Line.shape
~Line.width
.. rubric:: Methods Summary
.. autosummary::
~Line.add_point
.. rubric:: Attributes Documentation
.. autoattribute:: color
.. autoattribute:: shape
.. autoattribute:: width
.. rubric:: Methods Documentation
.. automethod:: add_point

Просмотреть файл

@ -0,0 +1,35 @@
Polygon
=======
.. currentmodule:: pywwt.annotation
.. autoclass:: Polygon
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~Polygon.fill
~Polygon.fill_color
~Polygon.line_color
~Polygon.line_width
~Polygon.shape
.. rubric:: Methods Summary
.. autosummary::
~Polygon.add_point
.. rubric:: Attributes Documentation
.. autoattribute:: fill
.. autoattribute:: fill_color
.. autoattribute:: line_color
.. autoattribute:: line_width
.. autoattribute:: shape
.. rubric:: Methods Documentation
.. automethod:: add_point

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.annotation
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,6 @@
cleanup_qapp
============
.. currentmodule:: pywwt.app
.. autofunction:: cleanup_qapp

Просмотреть файл

@ -0,0 +1,6 @@
get_qapp
========
.. currentmodule:: pywwt.app
.. autofunction:: get_qapp

3
docs/api/pywwt.app.rst Normal file
Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.app
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,133 @@
BaseWWTWidget
=============
.. currentmodule:: pywwt.core
.. autoclass:: BaseWWTWidget
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~BaseWWTWidget.actual_planet_scale
~BaseWWTWidget.alt_az_grid
~BaseWWTWidget.available_hips_catalog_names
~BaseWWTWidget.available_layers
~BaseWWTWidget.available_views
~BaseWWTWidget.background
~BaseWWTWidget.constellation_boundaries
~BaseWWTWidget.constellation_boundary_color
~BaseWWTWidget.constellation_figure_color
~BaseWWTWidget.constellation_figures
~BaseWWTWidget.constellation_selection
~BaseWWTWidget.constellation_selection_color
~BaseWWTWidget.crosshairs
~BaseWWTWidget.crosshairs_color
~BaseWWTWidget.current_mode
~BaseWWTWidget.ecliptic
~BaseWWTWidget.ecliptic_grid
~BaseWWTWidget.foreground
~BaseWWTWidget.foreground_opacity
~BaseWWTWidget.galactic_grid
~BaseWWTWidget.galactic_mode
~BaseWWTWidget.grid
~BaseWWTWidget.imagery
~BaseWWTWidget.instruments
~BaseWWTWidget.layers
~BaseWWTWidget.local_horizon_mode
~BaseWWTWidget.location_altitude
~BaseWWTWidget.location_latitude
~BaseWWTWidget.location_longitude
~BaseWWTWidget.most_recent_source
~BaseWWTWidget.selected_sources
~BaseWWTWidget.solar_system
.. rubric:: Methods Summary
.. autosummary::
~BaseWWTWidget.add_circle
~BaseWWTWidget.add_collection
~BaseWWTWidget.add_fov
~BaseWWTWidget.add_line
~BaseWWTWidget.add_polygon
~BaseWWTWidget.becomes_ready
~BaseWWTWidget.center_on_coordinates
~BaseWWTWidget.clear_annotations
~BaseWWTWidget.get_center
~BaseWWTWidget.get_current_time
~BaseWWTWidget.get_fov
~BaseWWTWidget.load_image_collection
~BaseWWTWidget.load_tour
~BaseWWTWidget.pause_time
~BaseWWTWidget.pause_tour
~BaseWWTWidget.play_time
~BaseWWTWidget.reset
~BaseWWTWidget.reset_view
~BaseWWTWidget.resume_tour
~BaseWWTWidget.save_as_html_bundle
~BaseWWTWidget.set_current_time
~BaseWWTWidget.set_selection_change_callback
~BaseWWTWidget.set_view
.. rubric:: Attributes Documentation
.. autoattribute:: actual_planet_scale
.. autoattribute:: alt_az_grid
.. autoattribute:: available_hips_catalog_names
.. autoattribute:: available_layers
.. autoattribute:: available_views
.. autoattribute:: background
.. autoattribute:: constellation_boundaries
.. autoattribute:: constellation_boundary_color
.. autoattribute:: constellation_figure_color
.. autoattribute:: constellation_figures
.. autoattribute:: constellation_selection
.. autoattribute:: constellation_selection_color
.. autoattribute:: crosshairs
.. autoattribute:: crosshairs_color
.. autoattribute:: current_mode
.. autoattribute:: ecliptic
.. autoattribute:: ecliptic_grid
.. autoattribute:: foreground
.. autoattribute:: foreground_opacity
.. autoattribute:: galactic_grid
.. autoattribute:: galactic_mode
.. autoattribute:: grid
.. autoattribute:: imagery
.. autoattribute:: instruments
.. autoattribute:: layers
.. autoattribute:: local_horizon_mode
.. autoattribute:: location_altitude
.. autoattribute:: location_latitude
.. autoattribute:: location_longitude
.. autoattribute:: most_recent_source
.. autoattribute:: selected_sources
.. autoattribute:: solar_system
.. rubric:: Methods Documentation
.. automethod:: add_circle
.. automethod:: add_collection
.. automethod:: add_fov
.. automethod:: add_line
.. automethod:: add_polygon
.. automethod:: becomes_ready
.. automethod:: center_on_coordinates
.. automethod:: clear_annotations
.. automethod:: get_center
.. automethod:: get_current_time
.. automethod:: get_fov
.. automethod:: load_image_collection
.. automethod:: load_tour
.. automethod:: pause_time
.. automethod:: pause_tour
.. automethod:: play_time
.. automethod:: reset
.. automethod:: reset_view
.. automethod:: resume_tour
.. automethod:: save_as_html_bundle
.. automethod:: set_current_time
.. automethod:: set_selection_change_callback
.. automethod:: set_view

Просмотреть файл

@ -0,0 +1,6 @@
DataPublishingNotAvailableError
===============================
.. currentmodule:: pywwt.core
.. autoexception:: DataPublishingNotAvailableError

Просмотреть файл

@ -0,0 +1,6 @@
ViewerNotAvailableError
=======================
.. currentmodule:: pywwt.core
.. autoexception:: ViewerNotAvailableError

3
docs/api/pywwt.core.rst Normal file
Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.core
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,6 @@
get_data_server
===============
.. currentmodule:: pywwt.data_server
.. autofunction:: get_data_server

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.data_server
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,7 @@
Bandpass
========
.. currentmodule:: pywwt.imagery
.. autoclass:: Bandpass
:show-inheritance:

Просмотреть файл

@ -0,0 +1,7 @@
ImageryLayers
=============
.. currentmodule:: pywwt.imagery
.. autoclass:: ImageryLayers
:show-inheritance:

Просмотреть файл

@ -0,0 +1,6 @@
get_imagery_layers
==================
.. currentmodule:: pywwt.imagery
.. autofunction:: get_imagery_layers

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.imagery
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,7 @@
Instruments
===========
.. currentmodule:: pywwt.instruments
.. autoclass:: Instruments
:show-inheritance:

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.instruments
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,17 @@
WWTJupyterWidget
================
.. currentmodule:: pywwt.jupyter
.. autoclass:: WWTJupyterWidget
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~WWTJupyterWidget.layer_controls
.. rubric:: Attributes Documentation
.. autoattribute:: layer_controls

Просмотреть файл

@ -0,0 +1,17 @@
WWTLabApplication
=================
.. currentmodule:: pywwt.jupyter
.. autoclass:: WWTLabApplication
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~WWTLabApplication.layer_controls
.. rubric:: Attributes Documentation
.. autoattribute:: layer_controls

Просмотреть файл

@ -0,0 +1,6 @@
connect_to_app
==============
.. currentmodule:: pywwt.jupyter
.. autofunction:: connect_to_app

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.jupyter
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,21 @@
JupyterRelayHub
===============
.. currentmodule:: pywwt.jupyter_relay
.. autoclass:: JupyterRelayHub
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~JupyterRelayHub.get_static_files_url
~JupyterRelayHub.serve_file
~JupyterRelayHub.serve_tree
.. rubric:: Methods Documentation
.. automethod:: get_static_files_url
.. automethod:: serve_file
.. automethod:: serve_tree

Просмотреть файл

@ -0,0 +1,6 @@
get_relay_hub
=============
.. currentmodule:: pywwt.jupyter_relay
.. autofunction:: get_relay_hub

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.jupyter_relay
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,6 @@
load_jupyter_server_extension
=============================
.. currentmodule:: pywwt.jupyter_server
.. autofunction:: load_jupyter_server_extension

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.jupyter_server
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,33 @@
CatalogHipsLayer
================
.. currentmodule:: pywwt.layers
.. autoclass:: CatalogHipsLayer
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~CatalogHipsLayer.size_att
~CatalogHipsLayer.size_vmax
~CatalogHipsLayer.size_vmin
.. rubric:: Methods Summary
.. autosummary::
~CatalogHipsLayer.refresh
~CatalogHipsLayer.update_data
.. rubric:: Attributes Documentation
.. autoattribute:: size_att
.. autoattribute:: size_vmax
.. autoattribute:: size_vmin
.. rubric:: Methods Documentation
.. automethod:: refresh
.. automethod:: update_data

Просмотреть файл

@ -0,0 +1,35 @@
ImageLayer
==========
.. currentmodule:: pywwt.layers
.. autoclass:: ImageLayer
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~ImageLayer.cmap
~ImageLayer.opacity
~ImageLayer.stretch
~ImageLayer.vmax
~ImageLayer.vmin
.. rubric:: Methods Summary
.. autosummary::
~ImageLayer.remove
.. rubric:: Attributes Documentation
.. autoattribute:: cmap
.. autoattribute:: opacity
.. autoattribute:: stretch
.. autoattribute:: vmax
.. autoattribute:: vmin
.. rubric:: Methods Documentation
.. automethod:: remove

Просмотреть файл

@ -0,0 +1,27 @@
LayerManager
============
.. currentmodule:: pywwt.layers
.. autoclass:: LayerManager
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~LayerManager.add_data_layer
~LayerManager.add_hips_catalog_layer
~LayerManager.add_image_layer
~LayerManager.add_preloaded_image_layer
~LayerManager.add_table_layer
~LayerManager.remove_layer
.. rubric:: Methods Documentation
.. automethod:: add_data_layer
.. automethod:: add_hips_catalog_layer
.. automethod:: add_image_layer
.. automethod:: add_preloaded_image_layer
.. automethod:: add_table_layer
.. automethod:: remove_layer

Просмотреть файл

@ -0,0 +1,81 @@
TableLayer
==========
.. currentmodule:: pywwt.layers
.. autoclass:: TableLayer
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~TableLayer.alt_att
~TableLayer.alt_type
~TableLayer.alt_unit
~TableLayer.cmap
~TableLayer.cmap_att
~TableLayer.cmap_vmax
~TableLayer.cmap_vmin
~TableLayer.color
~TableLayer.coord_type
~TableLayer.far_side_visible
~TableLayer.lat_att
~TableLayer.lon_att
~TableLayer.lon_unit
~TableLayer.marker_scale
~TableLayer.marker_type
~TableLayer.opacity
~TableLayer.size_att
~TableLayer.size_scale
~TableLayer.size_vmax
~TableLayer.size_vmin
~TableLayer.time_att
~TableLayer.time_decay
~TableLayer.time_series
~TableLayer.x_att
~TableLayer.xyz_unit
~TableLayer.y_att
~TableLayer.z_att
.. rubric:: Methods Summary
.. autosummary::
~TableLayer.remove
~TableLayer.update_data
.. rubric:: Attributes Documentation
.. autoattribute:: alt_att
.. autoattribute:: alt_type
.. autoattribute:: alt_unit
.. autoattribute:: cmap
.. autoattribute:: cmap_att
.. autoattribute:: cmap_vmax
.. autoattribute:: cmap_vmin
.. autoattribute:: color
.. autoattribute:: coord_type
.. autoattribute:: far_side_visible
.. autoattribute:: lat_att
.. autoattribute:: lon_att
.. autoattribute:: lon_unit
.. autoattribute:: marker_scale
.. autoattribute:: marker_type
.. autoattribute:: opacity
.. autoattribute:: size_att
.. autoattribute:: size_scale
.. autoattribute:: size_vmax
.. autoattribute:: size_vmin
.. autoattribute:: time_att
.. autoattribute:: time_decay
.. autoattribute:: time_series
.. autoattribute:: x_att
.. autoattribute:: xyz_unit
.. autoattribute:: y_att
.. autoattribute:: z_att
.. rubric:: Methods Documentation
.. automethod:: remove
.. automethod:: update_data

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.layers
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,6 @@
load_jupyter_server_extension
=============================
.. currentmodule:: pywwt
.. autofunction:: load_jupyter_server_extension

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.logger
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,21 @@
WWTQtClient
===========
.. currentmodule:: pywwt.qt
.. autoclass:: WWTQtClient
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~WWTQtClient.close
~WWTQtClient.render
~WWTQtClient.wait
.. rubric:: Methods Documentation
.. automethod:: close
.. automethod:: render
.. automethod:: wait

3
docs/api/pywwt.qt.rst Normal file
Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.qt
:no-inheritance-diagram:
:no-inherited-members:

3
docs/api/pywwt.rst Normal file
Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,41 @@
SolarSystem
===========
.. currentmodule:: pywwt.solar_system
.. autoclass:: SolarSystem
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~SolarSystem.cosmos
~SolarSystem.lighting
~SolarSystem.milky_way
~SolarSystem.minor_orbits
~SolarSystem.objects
~SolarSystem.orbits
~SolarSystem.scale
~SolarSystem.stars
.. rubric:: Methods Summary
.. autosummary::
~SolarSystem.track_object
.. rubric:: Attributes Documentation
.. autoattribute:: cosmos
.. autoattribute:: lighting
.. autoattribute:: milky_way
.. autoattribute:: minor_orbits
.. autoattribute:: objects
.. autoattribute:: orbits
.. autoattribute:: scale
.. autoattribute:: stars
.. rubric:: Methods Documentation
.. automethod:: track_object

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.solar_system
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,7 @@
Any
===
.. currentmodule:: pywwt.traits
.. autoclass:: Any
:show-inheritance:

Просмотреть файл

@ -0,0 +1,29 @@
AstropyQuantity
===============
.. currentmodule:: pywwt.traits
.. autoclass:: AstropyQuantity
:show-inheritance:
.. rubric:: Attributes Summary
.. autosummary::
~AstropyQuantity.default_value
~AstropyQuantity.info_text
.. rubric:: Methods Summary
.. autosummary::
~AstropyQuantity.validate
.. rubric:: Attributes Documentation
.. autoattribute:: default_value
.. autoattribute:: info_text
.. rubric:: Methods Documentation
.. automethod:: validate

Просмотреть файл

@ -0,0 +1,7 @@
Bool
====
.. currentmodule:: pywwt.traits
.. autoclass:: Bool
:show-inheritance:

Просмотреть файл

@ -0,0 +1,17 @@
Color
=====
.. currentmodule:: pywwt.traits
.. autoclass:: Color
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~Color.validate
.. rubric:: Methods Documentation
.. automethod:: validate

Просмотреть файл

@ -0,0 +1,17 @@
ColorWithOpacity
================
.. currentmodule:: pywwt.traits
.. autoclass:: ColorWithOpacity
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~ColorWithOpacity.validate
.. rubric:: Methods Documentation
.. automethod:: validate

Просмотреть файл

@ -0,0 +1,7 @@
Float
=====
.. currentmodule:: pywwt.traits
.. autoclass:: Float
:show-inheritance:

Просмотреть файл

@ -0,0 +1,7 @@
Int
===
.. currentmodule:: pywwt.traits
.. autoclass:: Int
:show-inheritance:

Просмотреть файл

@ -0,0 +1,7 @@
Unicode
=======
.. currentmodule:: pywwt.traits
.. autoclass:: Unicode
:show-inheritance:

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.traits
:no-inheritance-diagram:
:no-inherited-members:

3
docs/api/pywwt.utils.rst Normal file
Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.utils
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,6 @@
sanitize_image
==============
.. currentmodule:: pywwt.utils
.. autofunction:: sanitize_image

Просмотреть файл

@ -0,0 +1,29 @@
WWTLayer
========
.. currentmodule:: pywwt.windows
.. autoclass:: WWTLayer
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~WWTLayer.activate
~WWTLayer.delete
~WWTLayer.get_properties
~WWTLayer.get_property
~WWTLayer.set_properties
~WWTLayer.set_property
~WWTLayer.update
.. rubric:: Methods Documentation
.. automethod:: activate
.. automethod:: delete
.. automethod:: get_properties
.. automethod:: get_property
.. automethod:: set_properties
.. automethod:: set_property
.. automethod:: update

Просмотреть файл

@ -0,0 +1,35 @@
WWTWindowsClient
================
.. currentmodule:: pywwt.windows
.. autoclass:: WWTWindowsClient
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~WWTWindowsClient.change_mode
~WWTWindowsClient.get_existing_layer
~WWTWindowsClient.get_frame_list
~WWTWindowsClient.get_layer_list
~WWTWindowsClient.get_state
~WWTWindowsClient.load
~WWTWindowsClient.move_view
~WWTWindowsClient.new_layer
~WWTWindowsClient.new_layer_group
~WWTWindowsClient.ui_settings
.. rubric:: Methods Documentation
.. automethod:: change_mode
.. automethod:: get_existing_layer
.. automethod:: get_frame_list
.. automethod:: get_layer_list
.. automethod:: get_state
.. automethod:: load
.. automethod:: move_view
.. automethod:: new_layer
.. automethod:: new_layer_group
.. automethod:: ui_settings

Просмотреть файл

@ -0,0 +1,35 @@
WWTWindowsClient
================
.. currentmodule:: pywwt.windows.client
.. autoclass:: WWTWindowsClient
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~WWTWindowsClient.change_mode
~WWTWindowsClient.get_existing_layer
~WWTWindowsClient.get_frame_list
~WWTWindowsClient.get_layer_list
~WWTWindowsClient.get_state
~WWTWindowsClient.load
~WWTWindowsClient.move_view
~WWTWindowsClient.new_layer
~WWTWindowsClient.new_layer_group
~WWTWindowsClient.ui_settings
.. rubric:: Methods Documentation
.. automethod:: change_mode
.. automethod:: get_existing_layer
.. automethod:: get_frame_list
.. automethod:: get_layer_list
.. automethod:: get_state
.. automethod:: load
.. automethod:: move_view
.. automethod:: new_layer
.. automethod:: new_layer_group
.. automethod:: ui_settings

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.windows.client
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,6 @@
convert_xyz_to_spherical
========================
.. currentmodule:: pywwt.windows
.. autofunction:: convert_xyz_to_spherical

Просмотреть файл

@ -0,0 +1,6 @@
generate_utc_times
==================
.. currentmodule:: pywwt.windows
.. autofunction:: generate_utc_times

Просмотреть файл

@ -0,0 +1,29 @@
WWTLayer
========
.. currentmodule:: pywwt.windows.layer
.. autoclass:: WWTLayer
:show-inheritance:
.. rubric:: Methods Summary
.. autosummary::
~WWTLayer.activate
~WWTLayer.delete
~WWTLayer.get_properties
~WWTLayer.get_property
~WWTLayer.set_properties
~WWTLayer.set_property
~WWTLayer.update
.. rubric:: Methods Documentation
.. automethod:: activate
.. automethod:: delete
.. automethod:: get_properties
.. automethod:: get_property
.. automethod:: set_properties
.. automethod:: set_property
.. automethod:: update

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.windows.layer
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,6 @@
map_array_to_colors
===================
.. currentmodule:: pywwt.windows
.. autofunction:: map_array_to_colors

Просмотреть файл

@ -0,0 +1,6 @@
WWTException
============
.. currentmodule:: pywwt.windows.misc
.. autoexception:: WWTException

Просмотреть файл

@ -0,0 +1,6 @@
get_soup
========
.. currentmodule:: pywwt.windows.misc
.. autofunction:: get_soup

Просмотреть файл

@ -0,0 +1,6 @@
handle_response
===============
.. currentmodule:: pywwt.windows.misc
.. autofunction:: handle_response

Просмотреть файл

@ -0,0 +1,6 @@
parse_kwargs
============
.. currentmodule:: pywwt.windows.misc
.. autofunction:: parse_kwargs

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.windows.misc
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.windows.mods
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.windows
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,6 @@
convert_xyz_to_spherical
========================
.. currentmodule:: pywwt.windows.utils
.. autofunction:: convert_xyz_to_spherical

Просмотреть файл

@ -0,0 +1,6 @@
generate_utc_times
==================
.. currentmodule:: pywwt.windows.utils
.. autofunction:: generate_utc_times

Просмотреть файл

@ -0,0 +1,6 @@
map_array_to_colors
===================
.. currentmodule:: pywwt.windows.utils
.. autofunction:: map_array_to_colors

Просмотреть файл

@ -0,0 +1,3 @@
.. automodapi:: pywwt.windows.utils
:no-inheritance-diagram:
:no-inherited-members:

Просмотреть файл

@ -0,0 +1,6 @@
write_data_to_csv
=================
.. currentmodule:: pywwt.windows.utils
.. autofunction:: write_data_to_csv

Просмотреть файл

@ -0,0 +1,6 @@
write_data_to_csv
=================
.. currentmodule:: pywwt.windows
.. autofunction:: write_data_to_csv

Просмотреть файл

@ -6,6 +6,12 @@ from xml.etree.ElementTree import ElementTree
import requests
__all__ = [
"get_imagery_layers",
"Bandpass",
"ImageryLayers",
]
def get_imagery_layers(url):
"""
@ -28,17 +34,17 @@ def get_imagery_layers(url):
e = ElementTree()
t = e.parse(b)
for survey in t.iter('ImageSet'):
name = survey.attrib['Name']
thumbnail_url = survey.find('ThumbnailUrl')
for survey in t.iter("ImageSet"):
name = survey.attrib["Name"]
thumbnail_url = survey.find("ThumbnailUrl")
if thumbnail_url is not None:
thumbnail_url = getattr(thumbnail_url, 'text', None) or None
available_layers[name] = {'thumbnail': thumbnail_url}
thumbnail_url = getattr(thumbnail_url, "text", None) or None
available_layers[name] = {"thumbnail": thumbnail_url}
return available_layers
class ImageryLayers():
class ImageryLayers:
"""
A supplemental class that standardizes layer names, sorts them by
bandpass, and makes it possible to tab complete them.
@ -46,10 +52,28 @@ class ImageryLayers():
def __init__(self, layer_list):
self._layers = {}
self._spectrum = ['gamma', 'x', 'uv', 'visible',
'ir', 'micro', 'radio', 'other']
self.integers = ['zero', 'one', 'two', 'three', 'four',
'five', 'six', 'seven', 'eight', 'nine']
self._spectrum = [
"gamma",
"x",
"uv",
"visible",
"ir",
"micro",
"radio",
"other",
]
self.integers = [
"zero",
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
]
for band in self._spectrum:
self._layers[band] = {}
@ -60,44 +84,52 @@ class ImageryLayers():
# (og_list) into a dict.
for layer in og_list:
if re.search(r'(?i)gamma', layer) is not None:
self._add2dict(self._layers, layer, 'gamma')
if re.search(r"(?i)gamma", layer) is not None:
self._add2dict(self._layers, layer, "gamma")
continue # automatically advance to next iteration
if re.search(r'(?i)x(-|\s)?ray', layer) is not None:
self._add2dict(self._layers, layer, 'x')
if re.search(r"(?i)x(-|\s)?ray", layer) is not None:
self._add2dict(self._layers, layer, "x")
continue
if (re.search(r'(?i)ultra(-|\s)?violet', layer) is not None or
re.search(r'(?i)[^\d\w]+uv|uv[^\d\w]+', layer) is not None):
self._add2dict(self._layers, layer, 'uv')
if (
re.search(r"(?i)ultra(-|\s)?violet", layer) is not None
or re.search(r"(?i)[^\d\w]+uv|uv[^\d\w]+", layer) is not None
):
self._add2dict(self._layers, layer, "uv")
continue
if (re.search(r'(?i)optical', layer) is not None or
re.search(r'(?i)visible', layer) is not None):
self._add2dict(self._layers, layer, 'visible')
if (
re.search(r"(?i)optical", layer) is not None
or re.search(r"(?i)visible", layer) is not None
):
self._add2dict(self._layers, layer, "visible")
continue
if (re.search(r'(?i)infrared', layer) is not None or
re.search(r'(?i)[^\d\w]+ir|ir[^\d\w]+', layer) is not None):
self._add2dict(self._layers, layer, 'ir')
if (
re.search(r"(?i)infrared", layer) is not None
or re.search(r"(?i)[^\d\w]+ir|ir[^\d\w]+", layer) is not None
):
self._add2dict(self._layers, layer, "ir")
continue
if (re.search(r'(?i)microwave', layer) is not None or
re.search(r'(?i)[^\d\w]+cmb|cmb[^\d\w]+', layer) is not None):
self._add2dict(self._layers, layer, 'micro')
if (
re.search(r"(?i)microwave", layer) is not None
or re.search(r"(?i)[^\d\w]+cmb|cmb[^\d\w]+", layer) is not None
):
self._add2dict(self._layers, layer, "micro")
continue
if re.search(r'(?i)radio', layer) is not None:
self._add2dict(self._layers, layer, 'radio')
if re.search(r"(?i)radio", layer) is not None:
self._add2dict(self._layers, layer, "radio")
continue
self._add2dict(self._layers, layer, 'other')
self._add2dict(self._layers, layer, "other")
def _add2dict(self, diction, full_layer, bandpass):
# Handles a layer's (full_layer) actual addition to the master
# dict of layers (diction) according to its bandpass.
suffix = ''
suffix = ""
short = self._shorten(full_layer) + suffix
while short in diction[bandpass]:
@ -109,24 +141,24 @@ class ImageryLayers():
short += str(suffix)
diction[bandpass][short] = {}
diction[bandpass][short]['full_name'] = full_layer
diction[bandpass][short]["full_name"] = full_layer
def _shorten(self, string):
# Unlocks tab completion by shortening a full layer's name
# (string) to a valid Python name based on its first word.
cut_left = re.search(r'^[_\W]+', string)
cut_left = re.search(r"^[_\W]+", string)
if cut_left is not None:
string = string[cut_left.end():]
string = string[cut_left.end() :]
cut_right = re.search(r'[_\W]', string)
cut_right = re.search(r"[_\W]", string)
if cut_right is not None:
string = string[:cut_right.start()].lower()
string = string[: cut_right.start()].lower()
digit = re.search(r'^\d', string)
digit = re.search(r"^\d", string)
if digit is not None:
for i, num in enumerate(self.integers, 0):
if str(i) == digit.group(0):
string = string[:digit.start()] + num + string[digit.end():]
string = string[: digit.start()] + num + string[digit.end() :]
break
return string
@ -138,7 +170,7 @@ class ImageryLayers():
return Bandpass(self._layers[band])
class Bandpass():
class Bandpass:
"""
Allows the __getattr__() method from ImageryLayers to reach into the
inner dict corresponding to layers of a particular bandpass.
@ -151,4 +183,4 @@ class Bandpass():
return sorted(self._band.keys())
def __getattr__(self, name):
return self._band[name]['full_name']
return self._band[name]["full_name"]

Просмотреть файл

@ -2,7 +2,7 @@
Routines for the pywwt notebook server extension.
In order to make files available to the WWT engine, we need to serve them over
HTTP. Most of this is now done using the `wwt_kernel_data_relay` server
HTTP. Most of this is now done using the ``wwt_kernel_data_relay`` server
extension, but we also provide a separate server extension that provides a
static copy of the WWT research app, for environments where security cookies
prevent an externally-hosted version of the app (i.e., wwtassets.org) from

Просмотреть файл

@ -125,7 +125,7 @@ class WWTWindowsClient(object):
Returns
-------
layer
A `WWTLayer` object corresponding to the layer just created.
A `~pywwt.windows.layer.WWTLayer` object corresponding to the layer just created.
"""
params = {}
params["cmd"] = "new"
@ -188,7 +188,7 @@ class WWTWindowsClient(object):
Returns
-------
layer
A `WWTLayer` object corresponding to the layer just created.
A `~pywwt.windows.layer.WWTLayer` object corresponding to the layer just created.
"""
if self.host not in ["127.0.0.1", "localhost", "localhost.localdomain"]:
raise WWTException("The 'load' method only works if you are on the same machine "
@ -219,7 +219,7 @@ class WWTWindowsClient(object):
def get_existing_layer(self, name):
"""
Return an existing layer as a `WWTLayer` object.
Return an existing layer as a `~pywwt.windows.layer.WWTLayer` object.
Parameters
----------
@ -231,7 +231,7 @@ class WWTWindowsClient(object):
Returns
-------
layer
A ``WWTLayer`` object corresponding to the named layer.
A `~pywwt.windows.layer.WWTLayer` object corresponding to the named layer.
"""
layers = self.get_layer_list()
if "id" in layers[name]: