Fitting multiband lightcurves with a Bazin-Blackbody surface
Project description
The BazinBlackBody package (BBB)
Time-Wavelength fit to find fast rising transients. BazinBlackBody or ExponentialBlackBody
The algorithm is motivated and defined here
The input is either a ZTF or LSST alert structure, and the output is the temperature T and rise rate kr or k, and perhaps the fall rate kf.
The k and kr are rise rate in mags per day, and T is black body temperature in kiloKelvin.
How to use the package:
-
Copy the settings_bbb_template.py into your own settings.py. Most of this is intended for using the 'annotate' feature of BBB, which pulls filtered alerts from Lasair, runs BBB, then pushes them back to Lasair as annotations.
-
Decide which survey you will use: LSST or ZTF. This decides the schema that BBB will use to get its inputs from the alert packet. What is wanted are in the first column, and the idiosyncratic survey name in other columns.
| name | ZTF | LSST |
|---|---|---|
| MJD | mjd | midpointMjdTai |
| Object | diaObject |
|
| Sources | diaSourceList |
candidates |
| Forced | forcedphot |
diaForcedSourcesList |
| Band index | fid |
band |
| Flux | converted from magpsf |
psfFlux |
| Flux error | converted from sigmapsf |
psfFluxError |
| Forced Flux | forcediffimflux |
psfFlux |
| Forced Flux error | forcediffimfluxunc |
psfFluxErr |
Now the code can be called as follows:
import BBBEngine
BE = BBBEngine.BBB('ZTF', verbose=True)
(dicte, dictb) = BE.make_fit(alert)
if dicte:
BE.plot(alert, dicte, 'image/%s.png'%objectId)
if dictb:
BE.plot(alert, dictb, 'image/%s.png'%objectId)
In addition to the survey names (mandatory), and the verbose flag, the class instantiation can have other parameters for the initial conditions of the fitting process:
nforced=4, A=10000, T=8, t0=-6, kr=1, kf=0.1
Where
nforcedis the number of forced phot points utilised before discoveryAis the overall scale (in nanoJanskies for LSST and microJanskies for ZTF)- and
Tis the initial guess for the temparature in kiloKelvins - and
krandkfare initial guesses for the rise rate per day and the fall rate per day.
The return from make_fit may contain two dictionaries, one for the Exponential-Blackbody fit to the lightcurve (linear in magnitude), and the other the result of the Bazin-Blackbody fit.
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
File details
Details for the file BazinBlackBody-0.4.tar.gz.
File metadata
- Download URL: BazinBlackBody-0.4.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89f154c7930b306d48407d1d3a9c3cfe4f2fee93c645f25e91dcb00c7bae1bd9
|
|
| MD5 |
873da28a710292835523df71550d1328
|
|
| BLAKE2b-256 |
811144fa1cd339111b9da82cc6e96b13079554a185019d503dbf2a54d385d691
|