~wecacuee/mrol/mrol-dev

« back to all changes in this revision

Viewing changes to test/mapper_test.py

  • Committer: Vikas Dhiman
  • Date: 2012-05-22 15:26:38 UTC
  • Revision ID: wecacuee@gmail.com-20120522152638-j6srlkgrpdq4kdfe
Added support for userdata in terms of colored voxels. Added benchmark test and corresponding data

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    noise = np.random.normal(scale=0.05, size=di.shape)
82
82
    inf = (di == di.max())
83
83
    noise[inf] = 0
84
 
    # noise should increase with depth
85
 
    scalednoise = di * noise / di.max()
 
84
    # noise should increase with square of depth
 
85
    di_max = di.max()
 
86
    scalednoise = di*di * noise / (di_max * di_max)
86
87
    return di + scalednoise
87
88
 
88
89
def get_PC(i):