In [17]:
%pylab inliyyne


Populating the interactive namespace from numpy and matplotlib

In [18]:
import sys
import os.path as op
pth = op.abspath("../")
print pth
sys.path.insert(0, pth)
import profile


/Users/mjirik/projects/ndnoise

In [19]:
import ndnoise

In [ ]:
pth = op.abspath("../")
print pth
sys.path.insert(0, pth)

#import scipy.misc
#lena = scipy.misc.ascent()
#spectrum = np.fft.fftn(lena)

def noise_test():
    noise = ndnoise.generator.noises(
        [401, 402, 403],
        sample_spacing=[1,1,1],
        random_generator_seed=5,
        lambda_start=20,
        lambda_stop=22,
        exponent=0.0
    )


/Users/mjirik/projects/ndnoise

In [ ]:
profile.run("noise_test()", "pfile.stats")
import pstats

In [ ]:
stats = pstats.Stats("pfile.stats")
stats.sort_stats("cumulative")
stats.print_stats("ndnoise")

In [ ]:
stats.print_stats()

In [ ]:
ctx = dict(
        # shape=[100,102,103],
        sample_spacing=[1,1,1],
        random_generator_seed=5,
        lambda_start=20,
        lambda_stop=22,
        exponent=0.0
)
profile.runctx(
    "ndnoise.generator.noises([100, 100, 100], sample_spacing, random_generator_seed, lambda_start, lambda_stop, exponent)",
    globals(),
    ctx,
    
)

In [ ]:
profile.runctx("ndnoise.generator.noises()")