2D classification ValueError: total size of new array must be unchanged

Hey @Guillaume,

Is it possible if you can run this code for me, and email me the file it creates (sarulthasan@structura.bio)?

First, identify 3 variables, including the path to where the output of this script will be written to:
project_uid : the uid of the project where the import particles job exists (e.g., P1)
job_uid : the uid of the import particles job (e.g., J1)
output_path : The path to the file where the stats will be written to (file will be created when the script is run)

Then, in a shell, run cryosparcm icli , which will open up an interactive python shell. You can then copy and paste this code, with the 3 variables modified:

import os
from cryosparc2_compute.blobio import mrc
project_uid = "P1"
job_uid = "J1"
output_path = '/u/cryosparcuser/header_stats.txt'
particles_dset = rc.load_output_group_direct(project_uid, job_uid, 'imported_particles')
proj_dir_abs = cli.get_project_dir_abs(project_uid)
for path in particles_dset.data['blob/path']:
    filepath = os.path.join(proj_dir_abs, path)
    with open(output_path, 'a') as file_out:
        with open(filepath, 'rb') as file_obj:
            header = mrc.read_mrc_header(file_obj)
            file_out.write(filepath + ' : ')
            file_out.write(str(header) + ', ')
            total_file_size = float(os.path.getsize(filepath))
            file_out.write("File size: {}, ".format(total_file_size))
            file_out.write("Data Integrity: CORRUPT") if float(((header['nx']*header['ny']*header['nz']*4) + header['nsymbt'] + 1024)) != total_file_size else file_out.write("Data Integrity: Normal")
            file_out.write('\n')