Speedup: Assemble 2D images only when really needed. 1) Sum powder patterns in raw data only; assemble once right before writing to file; 2) Assemble image only for frames that will be saved.