pencil.read.pdfs ================ .. py:module:: pencil.read.pdfs .. autoapi-nested-parse:: Reads the output of the pdf subroutine (power_spectrum.f90) 03-Nov-2025/Kishore: coded Classes ------- .. autoapisummary:: pencil.read.pdfs.pdf pencil.read.pdfs.PDFContainer Module Contents --------------- .. py:class:: pdf(datadir='data', filename=None, debug=False) Reads the output of the power_xy subroutine Arguments datadir: path to the data directory. Default: "data" filename: name of the file to read. Default: all files named pdf_*.dat Examples >>> p = pc.read.pdfs() >>> p.t #1D array, length nt >>> p.lnrho #PDFContainer instance >>> p.lnrho.bins: #1D array, length nb >>> p.lnrho.counts #2D array, size (nt,nb): counts in each bin at a particular timestep >>> plt.semilogy(p.lnrho.bin_centers, p.lnrho.calc_counts(t_min=10)) #plots the PDF of lnrho for t>10 Attributes t: 1D array, times Remaining attributes are PDFContainer instances, named after the variables whose PDFs are being calculated. .. py:method:: keys() .. py:class:: PDFContainer(bins, ts, counts, logscale) Attributes bins: 1D array, bin edges counts: 2D array, counts in bins (second axis) at different times (first axis) .. py:attribute:: bins .. py:attribute:: counts .. py:property:: bin_centers .. py:method:: calc_counts(t_min=None, t_max=None) .. py:method:: calc_pdf(*args, **kwargs) Calculate the PDF of the variable 'variable' by summing over the counts saved between t_min and t_max.