def tst_all():
    # make sure NAN stuff is working
    F = testuple()
    assert F == (1, 2, 3, 4)
    #
    # image number
    img_num = 1
    # check for any command-line options
    import sys
    if len(sys.argv) > 1:
        img_num = int(sys.argv[1])
    num = format(img_num, "05d")
    fileout = "noiseimage_" + num + ".cbf"
    SIM = run_sim(seed=img_num, phi=(img_num - 1) / 10, osc=0.1)
    # mark the window panes
    mask_pixels(SIM.raw_pixels)
    # output the file
    write_cbf(SIM, fileout)

    # how do you do a destructor in Python?
    SIM.free_all()
    import os
    assert os.path.isfile(fileout)

    exit()
def tst_all():
    F = testuple()
    assert F == (1, 2, 3, 4)
    #
    fileout = "noiseimage_001.cbf"
    run_sim2smv(fileout)
    import os
    assert os.path.isfile(fileout)

    exit()
Beispiel #3
0
def tst_all():
  F = testuple()
  assert F == (1,2,3,4)
  #
  fileout = "noiseimage_001.cbf"
  #
  for x in range(10000):
    print(("memory",x))
    #memory_leak_1(fileout)
    run_sim2smv(fileout)
  import os
  assert os.path.isfile(fileout)