Discussion:
[Gwyddion-users] Gwyddion 2.45 was released
David Nečas (Yeti)
2016-04-26 17:08:36 UTC
Permalink
Gwyddion 2.45 is now available for download at

https://sourceforge.net/projects/gwyddion/files/gwyddion/2.45/
(all released files)

http://gwyddion.net/download/2.45/
(source code)

Released files are signed with PGP/GnuPG key

"David Nečas (Yeti) <***@gwyddion.net>", id 62A07732
fingerprint = 263F 9B1E C1E0 5261 C689 D83B 00FD D1D0 62A0 7732

-----------------------------------------------------------------------------

This is a stable version continuing the 2.x series, backward compatible with
previous 2.x versions.

More information about Gwyddion is available at

http://gwyddion.net/

Bugs should be reported to

***@gwyddion.net

the mailing list, or the project's web forum at SourceForge.

-----------------------------------------------------------------------------

Summary of changes:
Application:
- New translation: British English (accompanied with unification of the default
language to US English).
- Translations updated: Czech, French, Russian.
- Program messages: Are written to the log file by default on all platforms,
on Unix in addition to the console.
- Command line: New options --log-to-console and --no-log-to-console permit
controlling independently where the messages go (and where they do not).
- Program messages: Can be displayed in the GUI using Info → Program Messages.
- Files: The current file can be closed using Ctrl-W (or File → Close in the
menu).
- Tips of the day: Were updated and can be displayed on startup if enabled.

Libraries:
- libgwyddion: GwyNLFitter fit returns -1 and NULLs the covariance matrix when
it gets infinities or NaNs anywhere in the matrix or parameters.
- libgwyddion: New macro gwy_info() emits an INFO-level log message.
- libgwyddion, libgwyprocess: New standard boxed structs GwyXY and GwyXYZ were
added to gwymath. GwyTriangulationPointXY and GwyTriangulationPointXYZ are
now their aliases.
- libgwyprocess: New DataField distortion function that takes explicit list of
coordinates in the original data field.
- libgwyprocess: GwySurface is a new data object representing XYZ data,
currently providing just a few basic methods.
- libgwyprocess: GwySpline is a new helper data structure for sampling along
curves.
- libgwyprocess: Wrong estimated sizes for tip models were corrected.
- libgwyprocess: Two new tip models were added: Parabola and Cone.
- libgwyprocess: Function for filling missing valies in GwyDataLine using
Laplace data correction was added.
- libgwyprocess: GwyDataField line statistics caulcates rms using local line
means, not the global mean.
- libgwyprocess: Raw 2D FFT transform using the SimpleFFT backend (i.e. with
FFTW unavailable) overwriting the input data field was fixed.
- libgwyprocess: New function gwy_data_field_area_renormalize() transforms
values in just a part of data field.
- libgwyprocess: Crash in gwy_data_field_area_get_entropy_at_scales() for data
fields filled with a constant value was fixed.
- libgwyprocess: gwy_data_field_clear() no longer sets cached area to zero.
- libgwyprocess: Resampling of constant valued data fields always produces
constant valued data fields. This fixes odd rounding error patterns in
thumbnails for constant valued fields.
- libgwyprocess: Tip dilation and erosion functions were optimised.
- libgwydgets: A large number of new stock icons were added.
- libgwydgets: The gradient can be unset using data window colour axis menu.
The colour gradient and GL material can be unset in the 3D window as well.
- libgwydgets: Positions of graph labels are remembered and restored.
- libgwydgets: GwyGraphCurveModel has a method for ensuring data points are
ordered by abscissa.
- libgwydgets: Convenience combo box constructor for graph curves was added.
- libgwydgets: Editability of graph area selections can be controlled.
- libgwydgets: Function for setting graph curve data from a single interleaved
array was added.
- libgwydgets: Graph and 3D windows can be resized using keyboard, similarly
to other data windows.
- libgwydgets: GwyDataView with physical aspect ratio resizes itself now when
the physical dimensions change but pixel dimensions do not.
- libgwymodule: XYZ data processing module management functions were added.
- libgwyapp: All program messages are gathered by the default logger and
displayed in a text view.
- libgwyapp: Data browser can show warnings and other messages ocurring during
the opening or merging of specific files.
- libgwyapp: Data browser displays thumbnails for graphs. A new function for
graph thumbnail creation was added.
- libgwyapp: Thumbnails are generated from any kind of data found in the image,
preferring volume, XYZ, channels and then graphs.
- libgwyapp: File open dialogue previews almost all visual data types:
channels, graphs, volume and xyz.
- libgwyapp: XYZ data support was added to validation, logging, metadata
browsing, data choosers, enumeration and other places.
- libgwyapp: gwy_app_sync_data_items() only replicates non-empty selections
now.
- libgwyapp: Functions for enumerating ids of data in a container now work
also for containers not managed by the data browser.
- libgwyapp: GwyAppFileChooser open dialogue can filter files by name.
- libgwyapp: It is possible to query the current data browser page using
gwy_app_data_browser_get_current().
- libgwyapp: Data can be duplicated with Ctrl-D, deleted with Ctrl-Delete and
extracted to a new file with Ctrl-Insert.
- libgwyapp: Zooms and sizes of all kinds data windows are saved and restored
when the data are displayed again (if they seem sane for the current screen).

Modules:
- Straighten path (new): Extracts image sampled along a spline curve and the
direction perpendicular to the curve.
- Path layer (new): A single spline curve with arbitrary number of points.
- Extract path selection (new): Extracts positions and tangents of sampled
path selections as graph curves.
- Find graph peaks (new): Simple location of peaks on graph curves.
- Rasterize XYZ (new): Renders XYZ data to an image.
- XYZ Correct Drift (new): Corrects drift in timestamped XYZ data.
- Coerce (new): Transforms surfaces to have prescribed statistical properties.
- XYZize (new): Creates XYZ data (with regular point grid) from an image.
- Data processing modules with preview: Data with non-square aspect ratio
should look like in 2.43 again.
- IntelliWave (new): Imports IntelliWave ESD data files (experimental).
- Nano Measuring Machine: Parameters from the main DSC file are imported as
metadata.
- Align rows: Median difference method no longer changes the overall data tilt.
- Spectro tool: Always disabled ‘Apply’ button (broken in 2.44) works again.
- Points, Lines layers: Numbering works with more than 999 objects.
- 1D FFT filter: GUI was reorganised and the previews enlarged.
- Image export: Support for path selection drawing was added.
- Level: Zero mean value supports masking. Individual module functions have
separate settings now.
- Columnar synthesis: New option to continuously ‘melt’ the film during the
growth.
- RHK SPM32 and SM4: Imported graph curves are sorted by abscissa, fixing
some graph functionality being broken.
- WSxM: Files starting ‘WSxM file copyright WSxM solutions’ are also
recognised now. Single-precision files are loaded correctly.
- Nanoscantech: Support for files using UTF-8 encoding was added.
- GWYXYZF: Byte order handling was corrected to follow the specification.
- GWYXYZF, Raw XZY: The data are loaded a native XYZ data instead of being
regularised to image upon import.
- Statistical functions: Local range was added as a new quantity.
- Object synthesis: Coverage parameter was fixed to actually mean what the
documentation describes. Multiply old values by 4 to get the same coverage.
- Mark disconnected: The operation is undoable now.
- XYZ export: Can export both channels and XYZ data.
- APE DAX: Complete metadata are imported, miscellaneous other improvements.
- Seiko: Image resolutions should be correct for all files, with no guessing
involved.
- OME TIFF: Data split to several files can be loaded at least file by file
now, instead of getting a cryptic error message.
- Volumize layers: Memory handling error causing a crash after closing the
volumized data was fixed. Units are set properly and can be controlled
in the module dialogue.
- Volumize: The created volume data are now 1 under the surface (inside the
material) and 0 above the surface (outside the material).

-----------------------------------------------------------------------------

Thanks all who contributed,

Yeti
Mark S. Bentley
2016-05-10 13:40:32 UTC
Permalink
Dear all,

I would like to read an existing Gwyddion file and save a single channel
as a VTK file. From the GUI this works fine, but I'm not sure how to do
it from python:

In [28]: C = gwy.gwy_file_load('test.gwy', gwy.RUN_NONINTERACTIVE)
In [29]: gwy.gwy_file_save(C, 'test.vtk', gwy.RUN_NONINTERACTIVE)
---------------------------------------------------------------------------
GError Traceback (most recent call last)
<ipython-input-29-6ece041b376c> in <module>()
----> 1 gwy.gwy_file_save(C, 'test.vtk', gwy.RUN_NONINTERACTIVE)
GError: File contains no exportable channel

I initially thought this was an issue that I should first (somehow?)
select the channel I want to save, sine saving as VTK presumably saves
only a single channel. But in the above text file there is only one
channel...

Any hints as to what I'm missing would be greatly appreciated!

Regards,

Mark
David Nečas (Yeti)
2016-05-10 14:25:36 UTC
Permalink
Post by Mark S. Bentley
I would like to read an existing Gwyddion file and save a single channel
as a VTK file. From the GUI this works fine, but I'm not sure how to do
In [28]: C = gwy.gwy_file_load('test.gwy', gwy.RUN_NONINTERACTIVE)
Use

C = gwy.gwy_app_file_load('test.gwy')
gwy.gwy_app_data_browser_select_data_field(C, 0)

instead.

The reason why is complicated.

The difference between these two functions is that the plain (non-app)
one just loads the data file and gives you the resulting Container. You
can do whatever you want with it; the main program does not know about
it. The app one loads the file as if the user opened it from the GUI.

The save function needs the main program to know about the data because
it asks the data browser which image is currently active. Because it is
in fact an export function – it cannot save the entire data (like true
saving to .gwy that would work even with a random Container).

Now, of course, that opens the image in the GUI, so you probably want to
add

gwy.gwy_app_data_browser_remove(C)

afterwards.

Regards,

Yeti
Mark S. Bentley
2016-05-10 16:49:29 UTC
Permalink
Hi Yeti,

Thanks for the advice! I tried this, but gwy.gwy_app_file_load() seems
to segfault for me (Gwyddion 2.45 on ubuntu 16.04 64-bit), no matter
which files I used (I also tried samples.gwy rather than my own):

***@laptop-mark:~/Downloads$ python
Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import gwy
C = gwy.gwy_app_file_load('samples.gwy')
(python:27272): GwyApp-CRITICAL **: _gwy_app_log_start_message_capture:
assertion 'log_setup.capturing_from == G_MAXUINT' failed
Segmentation fault (core dumped)

Coming back to the original question, can I use gwy.gwy_file_save() or
do I have to use gwy_app_file_save_as()?

Regards,

Mark
David Nečas (Yeti)
2016-05-10 18:15:16 UTC
Permalink
Post by Mark S. Bentley
assertion 'log_setup.capturing_from == G_MAXUINT' failed
Segmentation fault (core dumped)
Ah, this is a bug. There is no logging setup in standalone Python
scripts so they are broken by the message capturing – which no one
noticed. Calling gwy.gwy_app_setup_logging() with any sane argument
(e.g. zero) first should work around it. It should be also fixed by
r18186.

Buf for a standalone Python script you can try instead using the plain
functions and commanding the data browser directly:

C = gwy.gwy_file_load('test.gwy', gwy.RUN_NONINTERACTIVE)
gwy.gwy_app_data_browser_add(C)
gwy.gwy_app_data_browser_select_data_field(C, 0)
gwy.gwy_file_save(C, 'test.vtk', gwy.RUN_NONINTERACTIVE)
gwy.gwy_app_data_browser_remove(C)
Post by Mark S. Bentley
Coming back to the original question, can I use gwy.gwy_file_save() or
do I have to use gwy_app_file_save_as()?
Just gwy_file_save(). They both reduce to exports anyway.

Regards,

Yeti
Mark S. Bentley
2016-05-10 20:09:40 UTC
Permalink
Great, that works perfectly - many thanks! One additional question, the
VTK output doesn't have a 1:1:1 scaling, but it appears that the default
"Physical scale" that is used when one first opens the 3D view is also
used in the VTK output?

Is there a way to either directly output 1:1:1 data, or else to grab the
scaling that I would need to apply to the VTK file?

Regards,

Mark
Post by David Nečas (Yeti)
Buf for a standalone Python script you can try instead using the
David Nečas (Yeti)
2016-05-10 21:53:50 UTC
Permalink
Post by Mark S. Bentley
Great, that works perfectly - many thanks! One additional question, the
VTK output doesn't have a 1:1:1 scaling, but it appears that the default
"Physical scale" that is used when one first opens the 3D view is also
used in the VTK output?
Yes, it is like the default 3D view scaling (did not check the exact
formulae, but at least in spirit).
Post by Mark S. Bentley
Is there a way to either directly output 1:1:1 data, or else to grab the
scaling that I would need to apply to the VTK file?
The export module is very simple and it has no currently options. So,
no. Options can be added – but ideally by someone using the VTK export.

It should be quite easiy to write a VTK file from Python directly
though. It is just a six-line text header followed by XYZ data.

Regards,

Yeti
Mark S. Bentley
2016-05-11 09:37:27 UTC
Permalink
Post by David Nečas (Yeti)
It should be quite easiy to write a VTK file from Python directly
though. It is just a six-line text header followed by XYZ data.
True! For some reason I assumed there was some meshing or similar going
on, but you're right, it's a simple dump of vertices. Thanks for the hint!

Regards, Mark
David Nečas (Yeti)
2016-05-11 12:34:29 UTC
Permalink
Post by Mark S. Bentley
For some reason I assumed there was some meshing or similar going
on, but you're right, it's a simple dump of vertices.
There are several subtypes, including meshes and whatnot, but Gwyddion
can currently only export a plain vertex list.

Yeti
Scott Webster
2016-05-11 16:25:47 UTC
Permalink
VTK formats doc for reference:
http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf

I think Gwyddion uses the structured grid legacy format (discussed on this
list a while ago).
Post by David Nečas (Yeti)
Post by Mark S. Bentley
For some reason I assumed there was some meshing or similar going
on, but you're right, it's a simple dump of vertices.
There are several subtypes, including meshes and whatnot, but Gwyddion
can currently only export a plain vertex list.
Yeti
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data
untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Gwyddion-users mailing list
https://lists.sourceforge.net/lists/listinfo/gwyddion-users
Loading...