Skip to content

Commit

Permalink
pxscale option is now an integer as stated in the vispy's Canvas docu…
Browse files Browse the repository at this point in the history
…mentation
  • Loading branch information
Filippo Bergamasco committed Sep 20, 2022
1 parent dab7f9c commit 3fd6767
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,11 @@ WASSncplot is a command-line tool. You can get a description of the available pr
arguments with the following command:

```
$ wassncplot -h
wassncplot v. 2.0.1
wassncplot v. 2.0.4
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Copyright (C) Filippo Bergamasco 2022
usage: wassncplot [-h] [-f FIRST_INDEX] [-l LAST_INDEX] [-s STEP_INDEX] [-sd STEP_DATA_INDEX] [-b BASELINE] [--zmin ZMIN] [--zmax ZMAX] [--alpha ALPHA] [--pxscale PXSCALE]
[--wireframe] [--no-wireframe] [--savexyz] [--saveimg] [--ffmpeg] [--ffmpeg-delete-frames] [--ffmpeg-fps FFMPEG_FPS]
ncfile out
usage: __main__.py [-h] [-f FIRST_INDEX] [-l LAST_INDEX] [-s STEP_INDEX] [-sd STEP_DATA_INDEX] [-b BASELINE] [--zmin ZMIN] [--zmax ZMAX] [--alpha ALPHA] [--pxscale PXSCALE] [--wireframe] [--no-wireframe] [--savexyz] [--saveimg] [--ffmpeg] [--ffmpeg-delete-frames] [--ffmpeg-fps FFMPEG_FPS] ncfile out
positional arguments:
ncfile Input NetCDF4 file
Expand All @@ -62,7 +57,7 @@ optional arguments:
--zmin ZMIN Minimum 3D point elevation (used for colorbar limits)
--zmax ZMAX Maximum 3D point elevation (used for colorbar limits)
--alpha ALPHA Surface transparency [0..1]
--pxscale PXSCALE Desktop pixel scale (set to 0.5 if using OSX with retina display)
--pxscale PXSCALE A scale factor to apply between logical and physical pixels in addition to the actual scale factor determined by the backend.
--wireframe Render surface in wireframe
--no-wireframe Render shaded surface
--savexyz Save mapping between image pixels and 3D coordinates as numpy data file
Expand All @@ -72,7 +67,6 @@ optional arguments:
Delete the produced frames after running ffmpeg
--ffmpeg-fps FFMPEG_FPS
Sequence framerate
```


Expand All @@ -84,8 +78,6 @@ $ python wassncplot.py ./wass_20140327_0910/3D/wass__20140327_091000.nc ./out

Will render the sequence stored in ```./wass_20140327_0910/3D/wass__20140327_091000.nc``` to the directory ```./out```.

*** Note for OSX users: *** If using retina display you may get uncorrect results. To solve this, try setting ```--pixscale 0.5```


## License

Expand Down
4 changes: 2 additions & 2 deletions src/wassncplot/WaveFieldVisualize/waveview2.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def gen_triang_indices( M, N ):

class WaveView(app.Canvas):

def __init__(self, title, width=800, height=600, wireframe=False, pixel_scale=1.0 ):
app.Canvas.__init__(self, resizable=False, size=(width, height), show=False, px_scale=pixel_scale )
def __init__(self, title, width=800, height=600, wireframe=False, pixel_scale=1 ):
app.Canvas.__init__(self, resizable=False, size=(int(width), int(height)), show=False, px_scale=int(pixel_scale) )

self.width = width
self.height = height
Expand Down
4 changes: 2 additions & 2 deletions src/wassncplot/wassncplot2.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import scipy.io


VERSION="2.0.3"
VERSION="2.0.4"



Expand All @@ -33,7 +33,7 @@ def wassncplot_main():
parser.add_argument("--zmin", type=float, help="Minimum 3D point elevation (used for colorbar limits)")
parser.add_argument("--zmax", type=float, help="Maximum 3D point elevation (used for colorbar limits)")
parser.add_argument("--alpha", default=0.5, type=float, help="Surface transparency [0..1]")
parser.add_argument("--pxscale", default=1.0, type=float, help="Desktop pixel scale (set to 0.5 if using OSX with retina display)")
parser.add_argument("--pxscale", default=1, type=int, help="A scale factor to apply between logical and physical pixels in addition to the actual scale factor determined by the backend.")
parser.add_argument("--wireframe", dest="wireframe", action="store_true", help="Render surface in wireframe")
parser.add_argument("--no-wireframe", dest="wireframe", action="store_false", help="Render shaded surface")
parser.add_argument("--savexyz", dest="savexyz", action="store_true", help="Save mapping between image pixels and 3D coordinates as numpy data file")
Expand Down

0 comments on commit 3fd6767

Please sign in to comment.