Fink TNS
This repository hosts scripts to define a TNS bot to push extragalactic candidates from Fink to TNS. Usage:
# ZTF
$ python submit_from_ztf_api.py -h
# LSST
python submit_from_lsst_api.py -h
You need credentials to submit objects.
LSST submission example
Set up credentials
Create a folder credentials at the root of the repository:
mkdir credentials
Put you credentials inside:
ls credentials/
-rw-r--r-- 1 fink 56 Jun 2 09:36 tns_marker.txt
-rw-r--r-- 1 fink 41 Jun 2 09:35 tns_api.key
Build report and check
Specify the source ID, and some metadata, and run the script with the argument --dry-run:
#!/bin/bash
# LSST diaObjectId
OID="170296772058939493"
# Any remarks to be reported
REMARKS="Whatever is useful to say"
# Who is reporting, comma separated
REPORTER="YOUR NAMES, on behalf of the Fink Collaboration"
# 0 is Other, 1 is PSN, 2 is PNV, 3 is AGN, 4 is NUC, 6 is FRB
ATTYPE=1
# Path to credentials
OUTPATH="credentials"
python submit_from_lsst_api.py \
-diaObjectId "$OID" \
-remarks "$REMARKS" \
-reporter "$REPORTER" \
-attype "$ATTYPE" \
-outpath "$OUTPATH" \
--dry_run # Only show the report without sending
You will get the report printed on screen:
{'at_report': {'0': {'ra': {'value': 150.43671674454322, 'error': 0.06033093561674197, 'units': 'arcsec'}, 'dec': ...
Inspect carefully the values. If you are happy with, validate this report using the sandbox option:
python submit_from_lsst_api.py \
-diaObjectId "$OID" \
-remarks "$REMARKS" \
-reporter "$REPORTER" \
-attype "$ATTYPE" \
-outpath "$OUTPATH" \
--sandbox # Send to the sandbox
If you get:
{'id_code': 401, 'id_message': 'Unauthorized'}
You are likely using a wrong API key and/or marker. If all good, you should see:
{'id_code': 200, 'id_message': 'OK', 'data': {'report_id': 277675}}
Connect to the sandbox website to confirm your transient is there:
- go to https://sandbox.wis-tns.org, and connect
- submit your coordinates
- check your report appears at the bottom
Final submission
If all above is right (or if you are using a stable release of fink-tns), just submit your report:
python submit_from_lsst_api.py \
-diaObjectId "$OID" \
-remarks "$REMARKS" \
-reporter "$REPORTER" \
-attype "$ATTYPE" \
-outpath "$OUTPATH"
Connect to the sandbox website to confirm your transient is there:
- go to https://wwww.wis-tns.org, and connect
- submit your coordinates
- check your report appears at the bottom
Metadata
Release files for fink-tns 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fink_tns-1.0.tar.gz | 13.5 kB | Without provenance | Details for fink_tns-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fink_tns-1.0-py3-none-any.whl | Python 3 | none | any | Details for fink_tns-1.0-py3-none-any.whl |
Total release size: 32.8 kB
Release files / fink_tns-1.0.tar.gz
| Download URL | fink_tns-1.0.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a303ee262e718b512dc667abf501f65187de454e08b436ffccdbb7bd798348ce
|
|
BLAKE2b-256 checksum How to use checksums |
d6686a220c37d3c7d9c8dca3fa830e76627444737d8a4ae5aed86c4f0f6216ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / fink_tns-1.0-py3-none-any.whl
| Download URL | fink_tns-1.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
099bf5a3689f1e6dad6071b506eaacf18b636179ef7eef5decffbf81c5e1434a
|
|
BLAKE2b-256 checksum How to use checksums |
b1bbe744f66768cc995069d64805b292b3ff80b5625258da0cf0662701d3d44e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for fink-tns 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.