On Fri, Jan 16, 2015 at 03:38:13PM +0100, Mark S. Bentley wrote:
> I currently generate Gwyddion data files from an instrument and use the 
> per channel mask to flag "bad" pixels. I now also want to add a second 
> indicator that flags a different (boolean) property per pixel (another 
> type of good/bad, but distinct from the first).
> 
> I assume that only one mask per channel is allowed? Is there a sensible 
> way to flag another set of boolean per-pixel properties for a given data 
> channel? From the docs, boolean arrays are not permitted. I could use 
> another array type, but (a) my file sizes increase further (another 
> array of 32-bit elements) and (b) this would not be a property of the 
> data channel per say.

Are you talking about the user interface or internal representation?

Anyway, there is indeed one mask per channel.  Furthermore, mask data
are represented as doubles even though nowadays all functions use them
as binary values.  This is for historical reasons and can't be really
changed without breaking GWY files seriously (the idea of mask values
between 0 and 1, which is useful for instance in the GIMP, did not turn
out to be so useful in AFM data processing).  So, when file sizes are
considered, it sucks.  Fortunately, the Moore's law for storage size has
a shorter time scale that the corresponding law for CPU power so it is
not that much a concern...

There are some tricks to use multiple masks.  ‘Extract mask’ and ‘Mark
with’ are your best friends.  The first creates a channel containing the
mask.  The latter can set/modify the mask of a channel using another
channel/mask and some logical operators.  It may be less convenient than
if masks were first-class entities with their own identity, but
incidentally I did rather a lot of these things recently and it works
quite well.

Regards,

Yeti


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to