Skip to main content

Astronomy units for the Ampel system to analyze nuclear events like TDEs

Project description

Ampel-nuclear

Central repository to host AMPEL code to search for and analyze nuclear transients. At the moment, this is exclusively code from the ZTFbh science working group.

Installation

Prerequisites

You need to export environment variables for the AMPEL ZTF archive (tokens are available here), for Fritz, and for the dropbox API (ask Sjoert).

Furthermore, you need a running instance of MongoDB. On macOS, make sure you have the command line tools installed (in doubt, run xcode-select –install).

Setup

Create a fresh Python 3.10 conda env

conda create -n tde_filter_upgrade python=3.10
conda activate tde_filter_upgrade

Install is done via poetry:

pip install poetry 
git clone https://github.com/AmpelProject/ampel-nuclear
cd Ampel-nuclear
poetry install

Now we have to build the ampel config and install it in the conda env. Issue

ampel config install

Note: this will throw some import errors, but you can ignore these because those packages are not needed locally.

Now you need to export the following tokens

export AMPEL_ARCHIVE_TOKEN='' 
export DROPBOX_TOKEN=''
export FRITZ_TOKEN=''

Test

To run the test, start your local MongoDB. And then issue

./run_tde_scan.py -i

If you cannot execute the file, issue chmod +x run_tde_scan.py.

Note: To push the result of a run to the dropbox, add -p.

The -i initiates (and saves) a new archive API stream token. To request one day, use -d YYYY-MM-DD for a certain day. The script will request alerts for the 24 hours after this date.

Your can also use --daysago n to scan the last n days.

Note: When requesting a full day with -d or the last n days with --daysago n from the archive, the first run will probably fail, as the archive database has not fully ramped up yet (URL is locked). In this case, just rerun ./run_tde_scan.py, without any parameters except for -p if you want to enable dropbox-push to prevent requesting a new stream token and overwriting the current one until the archive starts serving alerts (you will see them getting ingested).

To check the output, go to the temp directory that gets created when script is run without -p (push to dropbox), or check the dropbox.

To see all available commands of the test script, run ./run_tde_scan.py -h.

Examples

./run_tde_scan.py -i --daysago 4 -p

This will perform a search for the last 4 days and push the results to the dropbox.

./run_tde_scan.py -i -d 2022-10-06

This will perform a search for October 6, 2022 and save the result in a local directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ampel_nuclear-0.8.3.tar.gz (6.5 MB view details)

Uploaded Source

Built Distribution

ampel_nuclear-0.8.3-py3-none-any.whl (6.8 MB view details)

Uploaded Python 3

File details

Details for the file ampel_nuclear-0.8.3.tar.gz.

File metadata

  • Download URL: ampel_nuclear-0.8.3.tar.gz
  • Upload date:
  • Size: 6.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.10 Linux/5.15.0-1034-azure

File hashes

Hashes for ampel_nuclear-0.8.3.tar.gz
Algorithm Hash digest
SHA256 ca80911289b79abdd59553a4ea5aa2c153992267f362ad6cdc2cf25b6a1d4326
MD5 2284ed4c7e2e3baab0162a2ba67ea1ce
BLAKE2b-256 fd2141560cb5f865f91dc21257f19d8c3d00a73c30cf7e7bbe8a90825adffe92

See more details on using hashes here.

File details

Details for the file ampel_nuclear-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: ampel_nuclear-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 6.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.10 Linux/5.15.0-1034-azure

File hashes

Hashes for ampel_nuclear-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 53d47d248b14987f9d11509a7dafb82daf0ec58e5ff191feb2e7fa0cfbb02e78
MD5 b4b6d4d5701455c41140a14004c465a0
BLAKE2b-256 7790b4bb35b4fd1b906ea485f7fced4c6f86dba4367c0ce15c9b73f64115f53a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page