2a0ad3b709acb84aef25d2f05e28df8bce0b1070,hyperspy/tests/io/generate_dm_testing_files.py,,generate_3D_files,#,85

Before Change


def generate_3D_files(f, data_types, dmversion):
    for key in data_types.keys():
        f.write(
            "filename = ""
            "dm%i_3D_data\\\\test-%i.dm%i"\n"
            "im := NewImage("test", %i, 2, 2,2)\n"
            "im[0,0,0,1,1,1] = 1\n"
            "im[1,0,0,2,1,1] = 2\n"
            "im[0,1,0,1,2,1] = 3\n"
            "im[1,1,0,2,2,1] = 4\n"
            "im[0,0,1,1,1,2] = 5\n"
            "im[1,0,1,2,1,2] = 6\n"
            "im[0,1,1,1,2,2] = 7\n"
            "im[1,1,1,2,2,2] = 8\n"
            "im.SaveImage(filename)\n" % (dmversion, key, dmversion, key))


def generate_4D_files(f, data_types, dmversion):

After Change



def generate_3D_files(f, data_types, dmversion):
    subfolder = f"dm{dmversion}_3D_data"
    f.write(f"CreateDirectory(path+"{subfolder}")\n")
    for key in data_types.keys():
        f.write(
            "filename = path+""
            f"\\\\{subfolder}\\\\test-{key}.dm{dmversion}"\n"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: hyperspy/hyperspy
Commit Name: 2a0ad3b709acb84aef25d2f05e28df8bce0b1070
Time: 2019-11-23
Author: eric.prestat@gmail.com
File Name: hyperspy/tests/io/generate_dm_testing_files.py
Class Name:
Method Name: generate_3D_files


Project Name: hyperspy/hyperspy
Commit Name: 2a0ad3b709acb84aef25d2f05e28df8bce0b1070
Time: 2019-11-23
Author: eric.prestat@gmail.com
File Name: hyperspy/tests/io/generate_dm_testing_files.py
Class Name:
Method Name: generate_3D_files


Project Name: hyperspy/hyperspy
Commit Name: 2a0ad3b709acb84aef25d2f05e28df8bce0b1070
Time: 2019-11-23
Author: eric.prestat@gmail.com
File Name: hyperspy/tests/io/generate_dm_testing_files.py
Class Name:
Method Name: generate_4D_files


Project Name: hyperspy/hyperspy
Commit Name: 2a0ad3b709acb84aef25d2f05e28df8bce0b1070
Time: 2019-11-23
Author: eric.prestat@gmail.com
File Name: hyperspy/tests/io/generate_dm_testing_files.py
Class Name:
Method Name: generate_1D_files


Project Name: hyperspy/hyperspy
Commit Name: 2a0ad3b709acb84aef25d2f05e28df8bce0b1070
Time: 2019-11-23
Author: eric.prestat@gmail.com
File Name: hyperspy/tests/io/generate_dm_testing_files.py
Class Name:
Method Name: generate_2D_files