pencil.read.powers ================== .. py:module:: pencil.read.powers .. autoapi-nested-parse:: Contains the classes and methods to read the power spectra. Classes ------- .. autoapisummary:: pencil.read.powers.Power Functions --------- .. autoapisummary:: pencil.read.powers.power Module Contents --------------- .. py:class:: Power Bases: :py:obj:`object` Power -- holds power spectrum data. Fill members with default values. .. py:attribute:: t :value: [] .. py:method:: keys() .. py:method:: read(datadir='data', file_name=None, quiet=False, time_range=None, lazy=False, sim=None) read(datadir='data', file_name='', quiet=False) Read the power spectra. :param datadir: Directory where the data is stored. :type datadir: string :param file_name: Filename to read. If a filename is given, only that power spectrum is read. By default it reads all the power spectrum files. :type file_name: string :param quiet: Flag for switching off output. :type quiet: bool :param lazy: If True, the HDF5 files will not be completely read into memory; rather, just the relevant portions will be read into memory and returned when the user applies indices. Default: False :type lazy: bool :param sim: If passed, get datadir from this. :type sim: Simulation object :rtype: Class containing the different power spectrum as attributes. .. rubric:: Notes Use the attribute keys to get a list of attributes .. rubric:: Examples >>> pw = pc.read.power() >>> pw.keys() t kin krms hel_kin .. py:function:: power(*args, **kwargs) Wrapper for :py:meth:`Power.read`