betternot


Namebetternot JSON
Version 0.1.3 PyPI version JSON
download
home_page
SummaryToolset for interacting with the Nordic Optical Telescope (NOT)
upload_time2023-09-01 12:12:17
maintainer
docs_urlNone
authorsimeonreusch
requires_python>=3.9,<3.12
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # betterNOT
Toolset for preparing observations with the Nordic Optical Telescope (NOT). Currently only set up to work with ZTF transients. You need [Fritz](https://fritz.science) credentials.

The observability code is largely based on the [`NOT Observing Tools`](https://github.com/steveschulze/NOT_Observing_Tools) by Steve Schulze.

Note the [observation guidelines](https://notes.simeonreusch.com/s/dHt_0XzwQ#)

## Installation
Simply run `pip install betternot`.

If you want to make local changes, clone the repository, `cd` into it and issue `poetry install`.

## Usage
### Prepare observations
The observation planning can be run with a command line interface. Simply issue
```
not ZTF23changeit ZTF23thistoo ...
```
This will generate a standard star observability plot, create an observability plot for all ZTF objects, download the finding charts for them from Fritz and print the coordinates as well as the last observed magnitude. They will all end up in the `betternot/DATE` directory. 

Optionally, you can specify a desired date with `-date YYYY-MM-DD` (the default is today). You can also specify a telescope site with `-site SITE` (available sites are listed [here](https://github.com/astropy/astropy-data/blob/gh-pages/coordinates/sites.json)). Default is the NOT site (Roque de los Muchachos).

### Uploading spectra to WISeREP
You will need a [TNS](https://www.wis-tns.org) and [WISeREP](https://www.wiserep.org) bot token for this. Uploading spectra can be done as follows:

```python
import logging
from betternot.wiserep import Wiserep

logging.basicConfig()
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)

Wiserep(
    ztf_id="ZTF23aaawbsc",
    spec_path="ZTF23aaawbsc_combined_3850.ascii",
    sandbox=True,
    quality="high", # "low", "medium" or "high". Default: "medium"
)
```
This will check TNS if an IAU object exists at the ZTF transient location, open the spectrum, extract the metadata, and upload the file to WISeREP as well as a report containing the extracted metadata.

After checking with the [WISeREP sandbox](https://sandbox.wiserep.org) that everything works fine, use `sandbox=False`
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "betternot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<3.12",
    "maintainer_email": "",
    "keywords": "",
    "author": "simeonreusch",
    "author_email": "simeon.reusch@desy.de",
    "download_url": "https://files.pythonhosted.org/packages/28/32/df87cdc78894c92532a44c2ba2ec03c60a10ee9db76dd2d8eafca2d36c47/betternot-0.1.3.tar.gz",
    "platform": null,
    "description": "# betterNOT\nToolset for preparing observations with the Nordic Optical Telescope (NOT). Currently only set up to work with ZTF transients. You need [Fritz](https://fritz.science) credentials.\n\nThe observability code is largely based on the [`NOT Observing Tools`](https://github.com/steveschulze/NOT_Observing_Tools) by Steve Schulze.\n\nNote the [observation guidelines](https://notes.simeonreusch.com/s/dHt_0XzwQ#)\n\n## Installation\nSimply run `pip install betternot`.\n\nIf you want to make local changes, clone the repository, `cd` into it and issue `poetry install`.\n\n## Usage\n### Prepare observations\nThe observation planning can be run with a command line interface. Simply issue\n```\nnot ZTF23changeit ZTF23thistoo ...\n```\nThis will generate a standard star observability plot, create an observability plot for all ZTF objects, download the finding charts for them from Fritz and print the coordinates as well as the last observed magnitude. They will all end up in the `betternot/DATE` directory. \n\nOptionally, you can specify a desired date with `-date YYYY-MM-DD` (the default is today). You can also specify a telescope site with `-site SITE` (available sites are listed [here](https://github.com/astropy/astropy-data/blob/gh-pages/coordinates/sites.json)). Default is the NOT site (Roque de los Muchachos).\n\n### Uploading spectra to WISeREP\nYou will need a [TNS](https://www.wis-tns.org) and [WISeREP](https://www.wiserep.org) bot token for this. Uploading spectra can be done as follows:\n\n```python\nimport logging\nfrom betternot.wiserep import Wiserep\n\nlogging.basicConfig()\nlogger = logging.getLogger()\nlogger.setLevel(logging.DEBUG)\n\nWiserep(\n    ztf_id=\"ZTF23aaawbsc\",\n    spec_path=\"ZTF23aaawbsc_combined_3850.ascii\",\n    sandbox=True,\n    quality=\"high\", # \"low\", \"medium\" or \"high\". Default: \"medium\"\n)\n```\nThis will check TNS if an IAU object exists at the ZTF transient location, open the spectrum, extract the metadata, and upload the file to WISeREP as well as a report containing the extracted metadata.\n\nAfter checking with the [WISeREP sandbox](https://sandbox.wiserep.org) that everything works fine, use `sandbox=False`",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Toolset for interacting with the Nordic Optical Telescope (NOT)",
    "version": "0.1.3",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0887681b14c8bc7c0c984a0d95e661aa5dcb16e1d77b5ace98e46219a0228101",
                "md5": "80a05c34c5da92255d6216dbce75ed26",
                "sha256": "1e279274e8121a86ec0351d5d2b2ce984a00e0e827c2a386ad79397ec990751e"
            },
            "downloads": -1,
            "filename": "betternot-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80a05c34c5da92255d6216dbce75ed26",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<3.12",
            "size": 12590,
            "upload_time": "2023-09-01T12:12:15",
            "upload_time_iso_8601": "2023-09-01T12:12:15.245211Z",
            "url": "https://files.pythonhosted.org/packages/08/87/681b14c8bc7c0c984a0d95e661aa5dcb16e1d77b5ace98e46219a0228101/betternot-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2832df87cdc78894c92532a44c2ba2ec03c60a10ee9db76dd2d8eafca2d36c47",
                "md5": "a535c83dd882c2cfa43f77ee024ba231",
                "sha256": "76b5bb9a115c55f4b6365c94c024228939746a8c36ca2a06484ab92de494c971"
            },
            "downloads": -1,
            "filename": "betternot-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a535c83dd882c2cfa43f77ee024ba231",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<3.12",
            "size": 10733,
            "upload_time": "2023-09-01T12:12:17",
            "upload_time_iso_8601": "2023-09-01T12:12:17.038438Z",
            "url": "https://files.pythonhosted.org/packages/28/32/df87cdc78894c92532a44c2ba2ec03c60a10ee9db76dd2d8eafca2d36c47/betternot-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-01 12:12:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "betternot"
}
        
Elapsed time: 0.21680s