<commit_before>Spectra fitting with emcee
==========================

``emcee_specfit`` is a set of functions designed to make MCMC spectral fitting
easier. It is based on the powerful `emcee <http://dan.iel.fm/emcee>`_ MCMC sampling package.

Installation
------------

Just run

::

    python setup.py install

or, to pull also the needed dependencies, use pip as 

::

    python setup.py sdist
    pip install dist/emcee_specfit-0.1.tar.gz


Usage
-----

The package consists of several convenience functions to which you must provide
a model function, a probability function for the parameter priors, and the
spectral data to be fit enclosed in a dictionary. An example is shown in the
file `velax_demo.py`.<commit_msg>add todo<commit_after>Spectra fitting with emcee
==========================

``emcee_specfit`` is a set of functions designed to make MCMC spectral fitting
easier. It is based on the powerful `emcee <http://dan.iel.fm/emcee>`_ MCMC sampling package.

Installation
------------

Just run

::

    python setup.py install

or, to pull also the needed dependencies, use pip as 

::

    python setup.py sdist
    pip install dist/emcee_specfit-0.1.tar.gz


Usage
-----

The package consists of several convenience functions to which you must provide
a model function, a probability function for the parameter priors, and the
spectral data to be fit enclosed in a dictionary. An example is shown in the
file `velax_demo.py`.

ToDo
----

- ProtonOZM for pp interactions
- Write standard labels for parameters as a property of
  ``emcee.EnsembleSampler`` so that they can be accessed by other functions
  without knowing their order.
- For X-ray (sync) and GeV/TeV (IC) data, estimate initial magnetic field from
  Fx/Fvhe ratio.

{'fraction_non_alphanumeric': 0.10634648370497427, 'fraction_numerical': 0.002287021154945683, 'mean_word_length': 3.6296296296296298, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1391958', 'n_tokens_mistral': 514, 'n_tokens_neox': 492, 'n_words': 226}