reggae.qtconsole ================ .. py:module:: reggae.qtconsole Attributes ---------- .. autoapisummary:: reggae.qtconsole.FIELDS reggae.qtconsole.BOUNDS reggae.qtconsole.STYLE Classes ------- .. autoapisummary:: reggae.qtconsole.ReggaeDebugWindow reggae.qtconsole.Signals reggae.qtconsole.Worker Module Contents --------------- .. py:data:: FIELDS .. py:data:: BOUNDS .. py:data:: STYLE .. py:class:: ReggaeDebugWindow(input=None, session=None) Bases: :py:obj:`matplotlib.backends.qt_compat.QtWidgets.QMainWindow` GUI tuning tool for dipole mixed-mode parameters. There are two ways we recommend launching this: 1. Running reggae as a raw python module: `python -m reggae` This will instantiate an instance of the GUI with no arguments. 2. Instantiating a class by passing an existing `DipoleStar` or `pbjam.star` instance as positional argument. This is equivalent to launching an empty GUI, and using either of the import buttons in the sidebar. .. py:attribute:: qapp .. py:method:: init_ui() Initialize UI parameters .. py:method:: tqdm(gen, total=None, **kwargs) Make a custom tqdm Parameters ---------- gen: generator obj Generator object to loop through total: int, optional Total number of iterations in the generator. Default is None. .. py:method:: sweep(i) Parameter sweep over given bounds .. py:method:: recompute() Make the recompute button .. py:method:: replot(θreg, norm, label='Manual') Make button to regenerate echelle diagrams .. py:method:: load_pickle(description) Button to load pickle file Parameters ---------- descripttion: str Button tooltip. .. py:method:: write_pickle(obj, description) Button to write pickle file Parameters ---------- descripttion: str Button tooltip. .. py:method:: load_pbjam(*, pbjam=None) Button to load pickled PBjam star class instance Parameters ---------- pbjam: obj PBjam.star.star class instance. .. py:method:: load_reggae(*, reggae=None) Button to load pickled reggae star class instance Parameters ---------- reggae: obj reggae.dipolestar.dipolestar class instance. .. py:method:: load_reggae_actions() Button to populate diagnostic plots .. py:method:: update_n_g() Update the list of g-mode radial orders. .. py:method:: get_ΔΠ() Get the period spacing .. py:method:: get_q() Get the classical coupling strength .. py:method:: get_ν_p() Get the p-mode frequencies .. py:method:: frequency_echelle_power_plot() Generate a frequency-echelle power diagram. .. py:method:: period_echelle_power_plot() Generate a stretched period-echelle power diagram. .. py:method:: sync_state() Synchronise UI with state of reggae object .. py:method:: load(*, session=None) Load GUI session output .. py:method:: print(text) Custom print function Parameters ---------- text: str String to print. .. py:method:: optimize(maxiter=1000) Start optimization Parameters ---------- maxiter: int, optional Maximum iterations to try optimization. Default is 10000. .. py:method:: de() Button to start differential evolution. .. py:method:: newbounds() Set new bounds on the model parameters. .. py:method:: dynesty() Initialize and run a Dynesty nested sampling run. .. py:method:: get_state() .. py:method:: get_bounds() .. py:method:: dump() Store the Reggae session variables. .. py:method:: dump_reggae() Pickle the reggae result. .. py:method:: plot_MCMC() Plot the MCMC sampler results. .. py:method:: closeEvent(*args) .. py:method:: reset() Reset the UI to starting conditions. .. py:class:: Signals Bases: :py:obj:`matplotlib.backends.qt_compat.QtCore.QObject` Signal handler .. py:attribute:: error .. py:attribute:: finished .. py:attribute:: result .. py:class:: Worker(fn, *args, **kwargs) Bases: :py:obj:`matplotlib.backends.qt_compat.QtCore.QRunnable` Worker thread Inherits from QRunnable to handler worker thread setup, signals and wrap-up. Parameters ---------- callback: callable The function callback to run on this worker thread. Supplied args and kwargs will be passed through to the runner. args: list Arguments to pass to the callback function kwargs:cdict Keywords to pass to the callback function .. py:attribute:: fn .. py:attribute:: args :value: () .. py:attribute:: kwargs .. py:attribute:: signals .. py:method:: run() Initialise the runner function with passed args, kwargs.