var.append(args.type) frames = [] for frame, _file in enumerate(system.datamaps): cells = [] if args.average and len(system.datamaps) > 1: print("\rReading %s (%d of %d) ... " % (_file, frame+1, len(system.datamaps)), end='') sys.stdout.flush() elif len(system.datamaps) > 1: print("\n==> %s <==" % _file) datamap = DataMap(_file, min_mass = args.min_mass) if args.type == 'shear': datamap._calc_cell_shear(args.shear_numcells, mass_flow=False, if_droplet=args.shear_remove_edges) interface = datamap.interface(get_cell_numbers=True) floor = interface[0][1] ceil = floor + args.num_cells[1] - 1 edge = {'left': interface[0][0], 'right': interface[-1][0]} columns = get_columns(edge) print_separator = to_print_separator(columns) data = [] for row in range(ceil, floor-1, -1): cells.append(add_row(datamap.cells[row], columns, data)) frames.append(cells)
save = args.save else: save = '' if not args.quiet: print("\rReading %s (%d of %d) ... " % (_file, frame+1, len(system.datamaps)), end='') sys.stdout.flush() datamap = DataMap(_file, min_mass = args.min_mass) if not args.quiet: print("Done!", end='') if args.type == 'flow': datamap.flow( show = args.show, save = save, dpi = args.dpi, transparent = args.transparent, temp = args.temp, clim = [args.Tmin, args.Tmax], color = args.colour, xlim = xlims, ylim = ylims, axis = args.axis, noaxis = args.noaxis, width = args.width, scale = args.scale, xlabel = args.xlabel, ylabel = args.ylabel, title = args.title ) else: if args.type == 'shear': datamap._calc_cell_shear(args.shear_numcells, args.shear_massflow) draw_colourmap(datamap, args.type, xlims, ylims) if not args.quiet: print()