make the recarray viewer also handle tabular data (and add save) - #624
Conversation
There was a problem hiding this comment.
Lintly has detected code quality issues in this pull request.
Codecov Report
@@ Coverage Diff @@
## master #624 +/- ##
=========================================
- Coverage 8.29% 8.27% -0.02%
=========================================
Files 848 849 +1
Lines 97595 97989 +394
=========================================
+ Hits 8093 8110 +17
- Misses 89502 89879 +377
Continue to review full report at Codecov.
|
|
I gave it a whirl. Pretty cool! A few thoughts.
|
There was a problem hiding this comment.
Lintly has detected code quality issues in this pull request.
There was a problem hiding this comment.
Lintly has detected code quality issues in this pull request.
|
Save should default to .csv, as I think this is the more common use case. You can already save to .hdf from the File menu. I wish I could click on the line in between tiles (and the area between the line and the data source name) to launch the tabular view. It's slightly annoying to have to double-click just on the data source name only, and I think this will make this feature less discoverable. A bigger target would be helpful. It would be nice if this worked on the Data pipeline view down the left side of the viewing window. Clicking on a column to sort would be nice |
There was a problem hiding this comment.
Lintly has detected code quality issues in this pull request.
| bSave = wx.BitmapButton(self, -1, wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE), style=wx.NO_BORDER | wx.BU_AUTODRAW, name='Save') | ||
| bSave.Bind(wx.EVT_BUTTON, self.OnSave) | ||
| tool_sizer.Add(bSave) | ||
|
|
There was a problem hiding this comment.
W293: blank line contains whitespace
| sizer = wx.BoxSizer(wx.VERTICAL) | ||
|
|
||
| tool_sizer = wx.BoxSizer(wx.HORIZONTAL) | ||
| bSave = wx.BitmapButton(self, -1, wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE), style=wx.NO_BORDER | wx.BU_AUTODRAW, name='Save') |
There was a problem hiding this comment.
E501: line too long (135 > 130 characters)
|
|
||
| self.grid = RecarrayTableGrid(self, recarray) | ||
| sizer = wx.BoxSizer(wx.VERTICAL) | ||
|
|
There was a problem hiding this comment.
W293: blank line contains whitespace
| class ArrayTableGrid(gridlib.Grid): | ||
| def __init__(self, parent, data): | ||
| gridlib.Grid.__init__(self, parent, -1, size = (-1,-1)) | ||
|
|
There was a problem hiding this comment.
W293: blank line contains whitespace
|
|
||
| class ArrayTableGrid(gridlib.Grid): | ||
| def __init__(self, parent, data): | ||
| gridlib.Grid.__init__(self, parent, -1, size = (-1,-1)) |
There was a problem hiding this comment.
E231: missing whitespace after ','
|
|
||
| class ArrayTableGrid(gridlib.Grid): | ||
| def __init__(self, parent, data): | ||
| gridlib.Grid.__init__(self, parent, -1, size = (-1,-1)) |
There was a problem hiding this comment.
E251: unexpected spaces around keyword / parameter equals
|
|
||
| def GetValue(self, row, col): | ||
| return str( self.recarray[row][col] ) | ||
| return str(self.recarray[row][col] ) |
There was a problem hiding this comment.
E202: whitespace before ')'
| import wx | ||
| import wx.grid as gridlib | ||
| import wx.grid as gridlib | ||
| import numpy as np |
There was a problem hiding this comment.
F401: 'numpy as np' imported but unused
| mode = 'lite' | ||
|
|
||
| dv = ViewIm3D(outp, mode=mode, glCanvas=self.recipes.dsviewer.glCanvas) | ||
|
|
There was a problem hiding this comment.
W293: blank line contains whitespace
|
|
||
|
|
||
| vObjFit = recArrayView.recArrayPanel(self.dsviewer, self.objFitRes[chnum]['fitResults']) | ||
| vObjFit = recArrayView.ArrayPanel(self.dsviewer, self.objFitRes[chnum]['fitResults']) |
There was a problem hiding this comment.
E303: too many blank lines (2)
Addresses issue #584.
Proposed changes:
Makes the existing recarray view handle tabular data as well and adds a save button.
TODOs: