# portrait
<p align="center">
<img src="docs/_static/portrait.png" height="200">
</p>
<p align="center">
Observation metrics for periodic events
<br>
<p align="center">
<a href="https://github.com/lgrcia/portrait">
<img src="https://img.shields.io/badge/github-lgrcia/portrait-blue.svg?style=flat" alt="github"/></a>
<a href="">
<img src="https://img.shields.io/badge/license-MIT-lightgray.svg?style=flat" alt="license"/></a>
<a href="https://portrait.readthedocs.io">
<img src="https://img.shields.io/badge/documentation-black.svg?style=flat" alt="documentation"/></a>
</p>
</p>
A Python package to compute and visualize observation metrics for periodic events.
In Astronomy, *portrait* is useful to answer the following questions:
- How much of an orbit with period $P$ has been observed given certain observation times? ([tutorial](https://portrait.readthedocs.io/en/latest/coverage.html))
- What period $P$ matches with this list of events? ([tutorial](https://portrait.readthedocs.io/en/latest/periodmatch.html))
- How a certain target must be observed to cover all orbits with periods lower than $P$ days?
Documentation at [portrait.readthedocs.io](https://portrait.readthedocs.io)
## Example
Given the range of periods you want to cover, here is how to compute the amout of phase covered by your observation times
```python
from portrait import coverage
time = ... # your observation times
periods = np.linspace(0.1, 10, 2000)
covered = coverage(times)(periods)
```
And plotting it with `matplotlib`
```python
import matplotlib.pyplot as plt
plt.subplot(111, xlabel="periods", ylabel="coverage")
plt.plot(periods, covered, c="0.5")
```
![image](https://github.com/lgrcia/portrait/assets/20612771/b1fdf523-c0ea-41fe-9b9f-246c9f77d7e6)
## Installation
```bash
pip install portrait
```
Raw data
{
"_id": null,
"home_page": null,
"name": "portrait",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "astronomy, image processing, jax",
"author": "Lionel Garcia",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f5/b2/39d6db866fe022df38c304e7eb89ce3fe8cdfaa094400929ccd2aec0ec70/portrait-0.0.5b0.tar.gz",
"platform": null,
"description": "# portrait\n\n<p align=\"center\">\n <img src=\"docs/_static/portrait.png\" height=\"200\">\n</p>\n\n<p align=\"center\">\n Observation metrics for periodic events\n <br>\n <p align=\"center\">\n <a href=\"https://github.com/lgrcia/portrait\">\n <img src=\"https://img.shields.io/badge/github-lgrcia/portrait-blue.svg?style=flat\" alt=\"github\"/></a>\n <a href=\"\">\n <img src=\"https://img.shields.io/badge/license-MIT-lightgray.svg?style=flat\" alt=\"license\"/></a>\n <a href=\"https://portrait.readthedocs.io\">\n <img src=\"https://img.shields.io/badge/documentation-black.svg?style=flat\" alt=\"documentation\"/></a>\n </p>\n</p>\n\nA Python package to compute and visualize observation metrics for periodic events.\n\nIn Astronomy, *portrait* is useful to answer the following questions:\n- How much of an orbit with period $P$ has been observed given certain observation times? ([tutorial](https://portrait.readthedocs.io/en/latest/coverage.html))\n- What period $P$ matches with this list of events? ([tutorial](https://portrait.readthedocs.io/en/latest/periodmatch.html))\n- How a certain target must be observed to cover all orbits with periods lower than $P$ days?\n\nDocumentation at [portrait.readthedocs.io](https://portrait.readthedocs.io)\n\n## Example\nGiven the range of periods you want to cover, here is how to compute the amout of phase covered by your observation times\n```python\nfrom portrait import coverage\n\ntime = ... # your observation times\nperiods = np.linspace(0.1, 10, 2000)\n\ncovered = coverage(times)(periods) \n```\nAnd plotting it with `matplotlib`\n```python\nimport matplotlib.pyplot as plt\n\nplt.subplot(111, xlabel=\"periods\", ylabel=\"coverage\")\nplt.plot(periods, covered, c=\"0.5\")\n```\n\n![image](https://github.com/lgrcia/portrait/assets/20612771/b1fdf523-c0ea-41fe-9b9f-246c9f77d7e6)\n\n## Installation\n\n```bash\npip install portrait\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Compute and visualize observations phase coverage",
"version": "0.0.5b0",
"project_urls": null,
"split_keywords": [
"astronomy",
" image processing",
" jax"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a24225f7acb391cb1d81bd938bb5942d2940eb33d8b53e9505a09246b71adddb",
"md5": "c7bcf435fb71f9b05c0377daf7a8e522",
"sha256": "7c75d15fe46efcdbf393baea01c0973be5d84423df73a74e6386c913d47c904d"
},
"downloads": -1,
"filename": "portrait-0.0.5b0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c7bcf435fb71f9b05c0377daf7a8e522",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4956,
"upload_time": "2024-05-28T10:55:46",
"upload_time_iso_8601": "2024-05-28T10:55:46.525465Z",
"url": "https://files.pythonhosted.org/packages/a2/42/25f7acb391cb1d81bd938bb5942d2940eb33d8b53e9505a09246b71adddb/portrait-0.0.5b0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f5b239d6db866fe022df38c304e7eb89ce3fe8cdfaa094400929ccd2aec0ec70",
"md5": "924925a7e71e5b928ccd6719c8800abf",
"sha256": "511372f93179ba013cb6eab20f2d71baa6e8a9191a78381d048b3c56fdcca47e"
},
"downloads": -1,
"filename": "portrait-0.0.5b0.tar.gz",
"has_sig": false,
"md5_digest": "924925a7e71e5b928ccd6719c8800abf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 168823,
"upload_time": "2024-05-28T10:55:47",
"upload_time_iso_8601": "2024-05-28T10:55:47.958839Z",
"url": "https://files.pythonhosted.org/packages/f5/b2/39d6db866fe022df38c304e7eb89ce3fe8cdfaa094400929ccd2aec0ec70/portrait-0.0.5b0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-28 10:55:47",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "portrait"
}