pyckett


Namepyckett JSON
Version 0.1.13 PyPI version JSON
download
home_pageNone
SummaryA wrapper around Pickett's SPFIT and SPCAT
upload_time2024-04-16 14:23:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords pickett spectroscopy spfit spcat
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pyckett

Pyckett is a python wrapper around the SPFIT/SPCAT package (*H. M. Pickett, "The Fitting and Prediction of Vibration-Rotation Spectra with Spin Interactions," **J. Mol. Spectrosc. 148,** 371-377 (1991)*).

Install the package with pip by using the following command

```
pip install pyckett
```

If SPFIT and SPCAT cannot be executed via the commands *spfit* and *spcat* (if they are not in your PATH or have different names) point to them by setting the *PYCKETT_SPFIT_PATH* and *PYCKETT_SPCAT_PATH* environment variables to their full paths.

# Documentation

Currently, the documentation is limited to the docstrings of the main library.
To easily access the docstrings you can run
```
pip install pdoc
pdoc pyckett
```
after having installed Pyckett.

The CLI tools provide help texts via the -h or --help flags.

# CLI Tools

Pyckett provides a set of command line utilities which perform common steps of an iterative fitting process.

*pyckett_add* helps adding new parameters to the fit, *pyckett_omit* is used for evaluating which parameters can be omitted.

*pyckett_separatefits* can be used to separate a global fit into separate fits for each state.

*pyckett_uncertainties* evaluates the uncertainties of the parameters.

*pyckett_partitionfunction* calculates the partition function for different temperatures.

*pyckett_auto* automatically builds up the Hamiltonian step by step.

*pyckett_fit* and *pyckett_cat* are shortcuts to SPFIT and SPCAT, respectively.


See the respective help functions (by adding *--help* after the command) to see their syntax.

# Examples

You can read files from the SPFIT/SPCAT universe with the following syntax

```python
var_dict = pyckett.parvar_to_dict(r"path/to/your/project/molecule.var")
par_dict = pyckett.parvar_to_dict(r"path/to/your/project/molecule.par")
int_dict = pyckett.int_to_dict(r"path/to/your/project/molecule.int")
lin_df = pyckett.lin_to_df(r"path/to/your/project/molecule.lin")
cat_df = pyckett.cat_to_df(r"path/to/your/project/molecule.cat")
egy_df = pyckett.egy_to_df(r"path/to/your/project/molecule.egy")

erham_df = pyckett.erhamlines_to_df(r"path/to/your/project/molecule.in")
```

## Finalize cat file

This function merges the cat and lin dataframes, sums up duplicate values in the cat file and allows to translate quantum numbers:

```python
fin_cat_df, fin_lin_df = pyckett.finalize(cat_df, lin_df, qn_tdict, qn)
```

## Find candidates for double-resonance measurements

This function finds possible transition arrangements for double-resonance measurements.
Input two cat dataframes with the transitions that are in the range of your probe and pump source.

```python
results_df = pyckett.get_dr_candidates(cat_df1, cat_df2)
```

## Check Crossings

```python
pyckett.check_crossings(egy_df, [1], range(10))
```

## Plot Mixing Coefficients

```python
pyckett.mixing_coefficient(egy_df, "qn4 == 1 and qn2 < 20 and qn1 < 20 and qn1==qn2+qn3")
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyckett",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "pickett, spectroscopy, spfit, spcat",
    "author": null,
    "author_email": "Luis Bonah <bonah@ph1.uni-koeln.de>",
    "download_url": "https://files.pythonhosted.org/packages/ad/67/88ac00c0740819f1ec5f78d7038c8a36d6da8895b472dc9086b53d5ed98a/pyckett-0.1.13.tar.gz",
    "platform": null,
    "description": "# Pyckett\r\n\r\nPyckett is a python wrapper around the SPFIT/SPCAT package (*H. M. Pickett, \"The Fitting and Prediction of Vibration-Rotation Spectra with Spin Interactions,\" **J. Mol. Spectrosc. 148,** 371-377 (1991)*).\r\n\r\nInstall the package with pip by using the following command\r\n\r\n```\r\npip install pyckett\r\n```\r\n\r\nIf SPFIT and SPCAT cannot be executed via the commands *spfit* and *spcat* (if they are not in your PATH or have different names) point to them by setting the *PYCKETT_SPFIT_PATH* and *PYCKETT_SPCAT_PATH* environment variables to their full paths.\r\n\r\n# Documentation\r\n\r\nCurrently, the documentation is limited to the docstrings of the main library.\r\nTo easily access the docstrings you can run\r\n```\r\npip install pdoc\r\npdoc pyckett\r\n```\r\nafter having installed Pyckett.\r\n\r\nThe CLI tools provide help texts via the -h or --help flags.\r\n\r\n# CLI Tools\r\n\r\nPyckett provides a set of command line utilities which perform common steps of an iterative fitting process.\r\n\r\n*pyckett_add* helps adding new parameters to the fit, *pyckett_omit* is used for evaluating which parameters can be omitted.\r\n\r\n*pyckett_separatefits* can be used to separate a global fit into separate fits for each state.\r\n\r\n*pyckett_uncertainties* evaluates the uncertainties of the parameters.\r\n\r\n*pyckett_partitionfunction* calculates the partition function for different temperatures.\r\n\r\n*pyckett_auto* automatically builds up the Hamiltonian step by step.\r\n\r\n*pyckett_fit* and *pyckett_cat* are shortcuts to SPFIT and SPCAT, respectively.\r\n\r\n\r\nSee the respective help functions (by adding *--help* after the command) to see their syntax.\r\n\r\n# Examples\r\n\r\nYou can read files from the SPFIT/SPCAT universe with the following syntax\r\n\r\n```python\r\nvar_dict = pyckett.parvar_to_dict(r\"path/to/your/project/molecule.var\")\r\npar_dict = pyckett.parvar_to_dict(r\"path/to/your/project/molecule.par\")\r\nint_dict = pyckett.int_to_dict(r\"path/to/your/project/molecule.int\")\r\nlin_df = pyckett.lin_to_df(r\"path/to/your/project/molecule.lin\")\r\ncat_df = pyckett.cat_to_df(r\"path/to/your/project/molecule.cat\")\r\negy_df = pyckett.egy_to_df(r\"path/to/your/project/molecule.egy\")\r\n\r\nerham_df = pyckett.erhamlines_to_df(r\"path/to/your/project/molecule.in\")\r\n```\r\n\r\n## Finalize cat file\r\n\r\nThis function merges the cat and lin dataframes, sums up duplicate values in the cat file and allows to translate quantum numbers:\r\n\r\n```python\r\nfin_cat_df, fin_lin_df = pyckett.finalize(cat_df, lin_df, qn_tdict, qn)\r\n```\r\n\r\n## Find candidates for double-resonance measurements\r\n\r\nThis function finds possible transition arrangements for double-resonance measurements.\r\nInput two cat dataframes with the transitions that are in the range of your probe and pump source.\r\n\r\n```python\r\nresults_df = pyckett.get_dr_candidates(cat_df1, cat_df2)\r\n```\r\n\r\n## Check Crossings\r\n\r\n```python\r\npyckett.check_crossings(egy_df, [1], range(10))\r\n```\r\n\r\n## Plot Mixing Coefficients\r\n\r\n```python\r\npyckett.mixing_coefficient(egy_df, \"qn4 == 1 and qn2 < 20 and qn1 < 20 and qn1==qn2+qn3\")\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A wrapper around Pickett's SPFIT and SPCAT",
    "version": "0.1.13",
    "project_urls": {
        "Homepage": "https://github.com/Ltotheois/Pyckett/"
    },
    "split_keywords": [
        "pickett",
        " spectroscopy",
        " spfit",
        " spcat"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43d3d45b2fb93b07b0be539884fc098ec71e4c7c583e3ca7b7ab22635ecc05ef",
                "md5": "3ffc03d9748d92b269de75ead01e81c1",
                "sha256": "1ac3a8604bc19394727388402d9120377a4cd85f33818c9568ef16d50c93abe8"
            },
            "downloads": -1,
            "filename": "pyckett-0.1.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3ffc03d9748d92b269de75ead01e81c1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 28984,
            "upload_time": "2024-04-16T14:23:02",
            "upload_time_iso_8601": "2024-04-16T14:23:02.896782Z",
            "url": "https://files.pythonhosted.org/packages/43/d3/d45b2fb93b07b0be539884fc098ec71e4c7c583e3ca7b7ab22635ecc05ef/pyckett-0.1.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad6788ac00c0740819f1ec5f78d7038c8a36d6da8895b472dc9086b53d5ed98a",
                "md5": "073e42a43b120f133a183ab5a05dd6ff",
                "sha256": "af6c276a72c634b048299b098066139e7d6d487e876a0df8254514eacc390dd7"
            },
            "downloads": -1,
            "filename": "pyckett-0.1.13.tar.gz",
            "has_sig": false,
            "md5_digest": "073e42a43b120f133a183ab5a05dd6ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 24696,
            "upload_time": "2024-04-16T14:23:04",
            "upload_time_iso_8601": "2024-04-16T14:23:04.328843Z",
            "url": "https://files.pythonhosted.org/packages/ad/67/88ac00c0740819f1ec5f78d7038c8a36d6da8895b472dc9086b53d5ed98a/pyckett-0.1.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-16 14:23:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Ltotheois",
    "github_project": "Pyckett",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyckett"
}
        
Elapsed time: 0.22255s