compiletime load "module_ppp.so"; PPP obj = {}; aperture_width = 100; # Aperture width on substrate in transport direction obj.read("density.pos", "n"); obj.read("velocity.pos", "v"); # Define vertical flux component obj.create_scalar("Fz", n*v_z); # Make cut plane of data just below the substrate surface obj.xy_plane(99.5, 10, "nearest_neighbour"); # Reduce input data to cut-plane (this is the important command) obj.reduce(); # Make another cut plane averaging over the aperture_width # in order to get the line profile obj.xz_plane(0, aperture_width/2, "average"); # Write line profile into TXT file obj.write_txt("absorption_line.txt", ["x", "avg_absorption", "rel_absorption"], [x, Fz, 100*Fz/Fz_max]);