johnbachman / py-fcm

Automatically exported from code.google.com/p/py-fcm
0 stars 1 forks source link

Non-intuitive behavior of gating #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is not so much of a bug as likely intentional behavior, but this behavior 
is not intuitive (at least from my point of view), and I would suggest to 
change the gating to behave in a different way.

What steps will reproduce the problem?
1. Create a quad gate, making sure that one of the four regions does not 
contain any data points.

What is the expected output? What do you see instead?

I expect the tree to look like this:

t1
-> q1
-> q2
-> q3
-> q4

Instead if there is no data in gate q2, I get:

t1
-> q1
-> q3
-> q4

With q2 completely missing.

I would prefer to be able to go to node q2 and get either NaN when I query for 
data or else empty arrays.

What version of the product are you using? On what operating system?

ubuntu 12.04 
fcm 0.9.1

Please provide any additional information below.

Original issue reported on code.google.com by eyurt...@gmail.com on 4 Apr 2013 at 9:10

GoogleCodeExporter commented 9 years ago
I'll look into this.  As I recall when I wrote this, there were problems with 
empty arrays, which led to me not populating empty nodes.  But I can see how 
this would break using common gates if one file had an empty node and expected 
to have sub nodes off of it (which should be empty too), and it is somewhat 
un-intuitive.

Original comment by Jacob.Frelinger@gmail.com on 4 Apr 2013 at 10:34

GoogleCodeExporter commented 9 years ago
I'll look into this.  As I recall when I wrote this, there were problems with 
empty arrays, which led to me not populating empty nodes.  But I can see how 
this would break using common gates if one file had an empty node and expected 
to have sub nodes off of it (which should be empty too), and it is somewhat 
un-intuitive.

Original comment by Jacob.Frelinger@gmail.com on 4 Apr 2013 at 10:36

GoogleCodeExporter commented 9 years ago
okay I've got a fix that needs testing for this that now adds an optional 
argument for the init method quad gates of allow_empty,defaulting to true, 
setting to False preserves the old behavior.  It needs some more testing but 
should be pushed in shortly.

Original comment by Jacob.Frelinger@gmail.com on 1 May 2013 at 4:01

GoogleCodeExporter commented 9 years ago
quad gate now has signature
def __init__(self, vert, channels, name=None, allow_empty=True)

allow_empty creates empty nodes, setting to false doesn't create those nodes 
within the tree.

Original comment by Jacob.Frelinger@gmail.com on 2 Oct 2013 at 9:08

GoogleCodeExporter commented 9 years ago

Original comment by Jacob.Frelinger@gmail.com on 2 Oct 2013 at 9:08