Граф коммитов

401 Коммитов

Автор SHA1 Сообщение Дата
Jeffrey SubbaRao 436cbab3a3 Make error messages legible by giving it a lighter color for the time being 2019-06-12 10:29:51 -05:00
Jeffrey SubbaRao 2be030f01f Fix typos 2019-06-12 10:14:30 -05:00
Jeffrey SubbaRao 39b7a7167c Added comment 2019-06-06 16:08:15 -05:00
Jeffrey SubbaRao de45ee4d0d Move the js scripts in the interactive figure to their own directory 2019-06-06 16:08:15 -05:00
Jeffrey SubbaRao efda8e4bd9 Added tests for the serialization of the widget state 2019-06-06 16:08:15 -05:00
Jeffrey SubbaRao ab46da1f5d Fixed serialization for specified units in table layers 2019-06-06 16:08:15 -05:00
Jeffrey SubbaRao b9e890dc2d Broke the serialization core out into its own method so that we can test that componenet. 2019-06-06 16:08:15 -05:00
Jeffrey SubbaRao 757d93cfaa Replace camel case variables in python with underscores 2019-06-06 16:08:15 -05:00
Jeffrey SubbaRao cd4583391f Add saving of annotations to the interactive figure. Also added the option of specifying the center of a circle annotation in the constructor. That way we do not have to make a potentially blocking call to the widget's get_center if we are going to change the center immediately anyways. 2019-06-06 16:08:15 -05:00
Jeffrey SubbaRao eba8e2b5ca A tiny bit of clean up. Use simple traits method instead of
class_own_traits
2019-06-06 16:08:15 -05:00
Jeffrey SubbaRao 5c8ee5c074 Add 3D view mode specific settings and tracking planets/moons to the interactive figures 2019-06-06 16:08:14 -05:00
Jeffrey SubbaRao 667a8f33c5 Allow creation of multiple directories if specified when saving a bundle 2019-06-06 16:08:14 -05:00
Jeffrey SubbaRao 941c5f6ec5 Tweaking the doc string 2019-06-06 16:08:14 -05:00
Jeffrey SubbaRao 4a719236b2 Added initial doc string for save_as_html_bundle. Also renamed widght/height to max_width/max_height for better clarity 2019-06-06 16:08:14 -05:00
Jeffrey SubbaRao 46d807d2ac Add initial public method to generate either zipped or unzipped figures. Might need to tweak the root directory of the zip file later. 2019-06-06 16:08:14 -05:00
Jeffrey SubbaRao 3d85f48d76 First version of the html and js files needed for the interactive figure. More states need to be serialized/decoded and the user notification of errors could be improved. 2019-06-06 16:08:14 -05:00
Jeffrey SubbaRao ffd5874f11 change variable name 2019-06-06 16:08:14 -05:00
Jeffrey SubbaRao f9d5a98aa6 Added private methods for total serialization of the widget. Public interface is still a WIP 2019-06-06 16:08:13 -05:00
Jeffrey SubbaRao 6ae4ac1d65 Have to serialize the frame for table layers 2019-06-06 16:08:13 -05:00
Jeffrey SubbaRao 1cd3985566 fix whitespace 2019-06-06 16:08:13 -05:00
Jeffrey SubbaRao dc706b09b2 Serialization for the layer manager 2019-06-06 16:08:13 -05:00
Jeffrey SubbaRao 1eb3919771 Initial serialization code for image layers. Also tweaked the way we save the table layer data to be consistent with the image layer 2019-06-06 16:08:13 -05:00
Jeffrey SubbaRao c5583c40d0 have to include layer type info in serialization 2019-06-06 16:08:13 -05:00
Jeffrey SubbaRao cbfacac5ab intial serialization functions for table layers 2019-06-06 16:08:13 -05:00
Peter Williams 359cc0f24c
Merge pull request #217 from pkgw/image-ux
Work on image-display user experience
2019-06-06 16:25:59 -04:00
Peter Williams 59994c61ad pywwt/jupyter_server.py: fix file service in JupyterHub contexts
When we're serving up files in JupyterHub, we need to include the notebook
server's base_url in the URL we generate. This is obnoxious to determine from
inside a kernel, but I found some code that shows how to do it.

Also added some module-level documentation outlining what's going on and why.
2019-06-06 14:54:52 -04:00
Peter Williams ac8b91930a Add min/max controls to the Jupyter image layer control widgets
Now by showing `my_image_layer.controls` you get widgets that let you adjust
the opacity, stretch function, and data range. The best UI I could come up
with for the data range has "coarse" controls that are typed in manually and
"fine" controls that use a range slider widget.

I note that in my testing, the adjustments don't apply until focus changes to
another widget, which makes for a kind of weak UX. I checked the ipywidgets
bug tracker but don't see any complaints about this; I'm not sure what's going
on, since this seems like a pretty basic piece of functionality.
2019-06-06 10:48:12 -04:00
Peter Williams af97e29d1d Make it so that the Jupyter widget can return a custom ImageLayer subclass
This custom subclass exposes some work-in-progress controls that allow the
image display parameters to be adjusted interactively.
2019-06-06 10:48:12 -04:00
Peter Williams 9826a7f283 pywwt/layers.py: honor user-supplied vmax/vmin and make sure settings are applied
The way that the ImageLayer constructor was structured, any user specification
of the vmax and vmin values would be overridden. Restructure to prefer them,
and also make sure that the settings are applied but not in a redundant way.
2019-06-06 10:48:12 -04:00
Peter Williams 3e880f14d8 pywwt/tests/test_qt_widget.py: hack the tolerance to get Windows/Py3.6/test_full_step4.png to pass 2019-06-06 00:34:33 -04:00
Peter Williams 8f5cddb962 Try to get Windows CI working again
When I added the hack to get Python 3.6 running on our AppVeyor Windows CI,
everything passed, but now we have a problem. The images generated on
Windows/Py36 are now different from what we've historically expected. This
isn't shocking since my hack was to fix the version of pyqt to avoid a library
incompatibility issue, for Python 3.6 only.

Let's try applying the same version constraint *everywhere*. From my
experiments, this seems to make Windows/Py3.x create images agreeing with the
'webkit' test corpus, while Windows/Py2.7 still agrees with 'webkit_win'. One
clear difference between the two is the reported OpenGL renderer, so revise
the test logic to factor that in when choosing which corpus to compare
against.
2019-06-05 23:59:28 -04:00
Peter Williams 3f9eb34b67
Merge pull request #212 from jsub1/fix-widget-reset
Fix widget reset bugs
2019-06-04 14:05:51 -04:00
Jeffrey SubbaRao 0fd4c7e225 Added the wwt_reset tag to traits that we want reset in the widget reset method 2019-05-31 12:10:25 -05:00
Thomas Robitaille 60760dd795 Back to development: v0.7.0 2019-05-29 22:33:18 +01:00
Thomas Robitaille 82671206b7 Preparing release v0.6.0 2019-05-29 22:25:16 +01:00
Peter Williams 9f914b9bd1
Merge pull request #207 from jsub1/csv-win-line-endings
Fix Table Layer issue in Windows
2019-05-29 09:12:11 -04:00
Jeffrey SubbaRao 0fb6ad6e0e Fix the regex to work properly against when at the beginning/ending of the string 2019-05-28 13:19:01 -05:00
Jeffrey SubbaRao 1fde0a8f81 Fix the widget reset method trowing in jupyter notebooks by only reseting the WWT traits to default values in the method. 2019-05-27 22:02:08 -05:00
Jeffrey SubbaRao a5b0c5d1aa Fixed the widget's reset method only half of the added layers instead of all of them. The culprit was using a iterator loop while removing elements in the list 2019-05-27 21:50:00 -05:00
Jeffrey SubbaRao 01a3ee78dc Added quick test to make sure that the csv table uses Windows line endings 2019-05-26 22:49:17 -05:00
Peter Williams cee80d8bda
Merge pull request #206 from jsub1/get_center-get_fov-work
Fix get_center method for the jupyter widget and add a get_fov method for both widgets
2019-05-23 12:12:54 -06:00
Jeffrey SubbaRao a0eec240aa removed unnecessary parentheses 2019-05-20 14:47:23 -04:00
Jeffrey SubbaRao 73d5a20f4f Fix the get_center and get_fov methods for the jupyter WWT widget 2019-05-20 14:47:23 -04:00
Jeffrey SubbaRao e343137fba Implemented traitlets for the notebook widget's ra, dec, and fov. This will allow the get_center and get_fov methods to work with the jupyter widgets. 2019-05-20 14:47:23 -04:00
Jeffrey SubbaRao 66a173939f Added a python method to query the WWT window about its fov. 2019-05-20 14:47:23 -04:00
Jeffrey SubbaRao 043840882c Added other common fits extensions 2019-05-20 13:57:05 -04:00
Jeffrey SubbaRao f5bcae90ff Register fits mime with mimetype library 2019-05-20 13:57:05 -04:00
Jeffrey SubbaRao 4e63ce53ae typo fix 2019-05-15 10:15:26 -05:00
Jeffrey SubbaRao c1413750c4 Make sure we enforce windows line endings properly when already on windows 2019-05-13 17:03:56 -05:00
Peter Williams d570455145 Update GitBooks URLs with fresher ones
GitBooks redirects the old ones, but some of the HTML anchors don't work anymore,
and that's enough to make the Sphinx link check mad.
2019-05-07 15:36:32 -04:00
Thomas Robitaille b74b2b849e
Merge pull request #201 from pkgw/data-layer-fallback
pywwt/layers.py: have `add_data_layer()` fallback to `add_table_layer()`
2019-04-24 20:52:28 +01:00
Thomas Robitaille b965620afe Handle cases where parent() isn't set 2019-04-24 19:10:50 +01:00
Thomas Robitaille 0957372e82 Make sure we use the WWTWebEngineView class 2019-04-24 18:11:46 +01:00
Thomas Robitaille 8c059e7fe1 Pass drag and drop up to parent in Qt widget 2019-04-24 17:22:43 +01:00
Peter Williams 258bdd1955 pywwt/tests/test_layers.py: test that the deprecated function works but warns 2019-04-24 09:33:25 -04:00
Peter Williams 47a393e629 pywwt/layers.py: issue an actual DeprecationWarning in add_data_layer() 2019-04-24 09:33:06 -04:00
Peter Williams d9cedf8ab1 pywwt/layers.py: have `add_data_layer()` fallback to `add_table_layer()`
The method name `add_data_layer()` may be deprecated, but to maintain
compatibility we should still actually do something. So, fall back to
`add_table_layer()` when called. This fixes glue-wwt, which hasn't been
updated to the new API yet.
2019-04-23 16:39:46 -04:00
Peter Williams d1b9f4262f Fix pywwt on `notebook >=5.7.6`
Version 5.7.6 of the Jupyter notebook module adds a new security feature
related to the HTTP content types
(https://github.com/jupyter/notebook/issues/4467#issuecomment-471353499). It
breaks pywwt because pywwt has not been returning valid MIME types (AKA
content types) from its internal Jupyter server.

From looking at the main `notebook` implementation, it seems that the correct
approach is to use the `mimetypes` module to get the right value to put in the
Content-Type header, so let's go ahead and do that.

Closes #191.
2019-04-09 10:15:10 +01:00
Thomas Robitaille 8efd486476 Use an isolated Qt widget to test the image layers due to an unknown issue with loadFits affecting the widget subsequently and causing center_on_coordinates to not work correctly. 2019-04-08 18:47:27 +01:00
Thomas Robitaille b1717e372c Rename add_data_layer to add_table_layer 2019-03-21 15:17:54 +00:00
Thomas Robitaille c73eeef58c Added reference images 2019-03-21 14:29:59 +00:00
Thomas Robitaille 1d477ce657 Remove old load_fits_data method 2019-03-21 13:39:37 +00:00
Thomas Robitaille 205eace87e Fix images so that black is not transparent 2019-03-08 18:34:14 +00:00
Thomas Robitaille 87451863ff Added support for showing FITS images via layers, including on-the-fly reprojection 2019-03-08 17:58:34 +00:00
Thomas Robitaille de9af1de29 Consolidate code for load_fits_data 2019-03-08 13:06:18 +00:00
Thomas Robitaille 35e67b2bfc Remove unused imports 2019-02-20 17:00:35 +00:00
Thomas Robitaille 7c1ffae099 Only have one widget open over the lifetime of the tests 2019-02-20 17:00:28 +00:00
Thomas Robitaille 6a6b358bec Fix typo in comment 2019-02-20 17:00:26 +00:00
Thomas Robitaille 23255f470c Fix a few bugs 2019-02-20 17:00:26 +00:00
Thomas Robitaille 58d23e3c61 Try resetting the page and web attributes to avoid segmentation faults 2019-02-20 17:00:25 +00:00
Thomas Robitaille 5322c5c93c Cache data server 2019-02-20 17:00:25 +00:00
Thomas Robitaille 5ac0a31a23 Provide mechanism to shut down data server 2019-02-20 17:00:25 +00:00
Thomas Robitaille d71e7d8010 Make sure widgets are properly closed during testing, and skip image testing in CI for layers for now. 2019-02-20 17:00:24 +00:00
Thomas Robitaille cc21929d9d Allow colormap objects to be passed to cmap 2019-02-20 17:00:24 +00:00
Thomas Robitaille 5072797bbf Use updateData instead of loadFromString to ensure cache invalidation in WWT 2019-02-20 10:29:29 +00:00
Thomas Robitaille dde71c1644 Added image test for layers 2019-02-20 10:29:29 +00:00
Thomas Robitaille 1b3295a17d Make sure we use a unique column name for size and color 2019-02-20 10:29:29 +00:00
Thomas Robitaille 5571faba03 Added support for color-coding points using values and a colormap 2019-02-20 10:29:29 +00:00
Thomas Robitaille 91db53064c Started implementing support for specifying the size of markers based on one of the columns in the table 2019-02-20 10:29:28 +00:00
Thomas Robitaille f8c929153c Change default to match previous behavior 2019-01-16 10:26:26 +00:00
Thomas Robitaille 5ce613c99b Enable option to turn SDSS data on/off 2019-01-16 10:00:26 +00:00
Thomas Robitaille 2776299062 Make sure altitude type is in sync 2019-01-16 09:59:25 +00:00
Thomas Robitaille 9ccb546d28 Fixed an issue with layers not appearing under certain circumstances. Undefined columns should have a value of -1. 2019-01-08 22:33:43 +00:00
Thomas Robitaille 91bb4bcaca Fix view mode for Mars (which is called 'Visible Imagery' not 'Mars' in WWT) 2019-01-04 21:09:21 +00:00
Thomas Robitaille bea8c5f344 Added workaround for issue related to refreshing when updating layer data 2019-01-04 12:18:34 +00:00
Thomas Robitaille d9c99097bf Removed workaround that is no longer needed 2019-01-04 12:17:34 +00:00
Thomas Robitaille bf68825bb2 Override any guessing carried out by WWT based on column names 2019-01-04 12:17:17 +00:00
Thomas Robitaille 1acb992608 Back to development: v0.6.0 2019-01-04 09:24:24 +00:00
Thomas Robitaille fe835341db Preparing release v0.5.0 2019-01-04 09:18:06 +00:00
Thomas Robitaille c7bc331474 Added documentation 2019-01-03 15:12:31 +00:00
Thomas Robitaille cfbd60af1d Added setting for showing markers on the far side of an object 2019-01-03 15:12:09 +00:00
Thomas Robitaille 70f6c7c1b1 Implement marker scale and marker type. In addition, add a workaround for a bug in WWT which causes the radius of the layer reference object to always be the radius of the Earth. 2019-01-03 15:12:09 +00:00
Thomas Robitaille 7af0e3e481 Use custom event names to avoid overriding default behavior with trackpad/mouse 2019-01-03 14:02:31 +00:00
Thomas Robitaille 1725eb70cd Updated js versions 2018-12-23 11:41:42 +00:00
Thomas Robitaille 0173a17b00 Back to development: v0.5.0 2018-12-20 23:18:23 +00:00
Thomas Robitaille 0de4851d5e Preparing release v0.4.0 2018-12-20 23:13:42 +00:00
Thomas Robitaille 26a8c2f491 Fixed corner cases in keyboard shortcuts for panning/zooming 2018-12-20 23:00:52 +00:00
Thomas Robitaille 739a875f21
Merge pull request #81 from ojustino/keyb-zoom
Keyboard-controlled zoom
2018-12-20 22:48:18 +00:00
Thomas Robitaille f22b707afd
Merge pull request #158 from astrofrog/earth-day
Set default earth map to daytime
2018-12-20 16:55:58 +00:00
Thomas Robitaille fec1f47f48
Merge pull request #155 from astrofrog/column-guessing
Try and guess which column to use for lon/lat
2018-12-20 16:55:22 +00:00