atompy.save_2d_as_txt#
- atompy.save_2d_as_txt(H, xedges, yedges, fname, **savetxt_kwargs)[source]#
Save a 2d histogram to a file.
The first column in the file will be y, the second x, the third z. (this is chosen as such because the the standard hist2ascii-macro of the Atomic Physics group has this format)
- Parameters:
- H
ndarrayshape(nx,ny) A bi-dimensional histogram of samples x and y.
- xedges
ndarray, shape(nx+1,) Edges along x.
- yedges
ndarray, shape(ny+1,) Edges along y.
- fname
str Filename, including filetype.
- **savetxt_kwargs
numpy.savetxt()keyword arguments. Useful to, e.g., set a header with theheaderkeyword.
- H