Skip to main content

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, ebv=0, A=10000, T=8, t0=-6, kr=1, kf=0.1

Where

  • nforced is the number of forced phot points utilised before discovery
  • ebv is the E(B-V) extinction, default zero
  • A is the overall scale (in nanoJanskies for LSST and microJanskies for ZTF)
  • and T is the initial guess for the temparature in kiloKelvins
  • and kr and kf are 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

bazinblackbody-0.7.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

BazinBlackBody-0.7-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file bazinblackbody-0.7.tar.gz.

File metadata

  • Download URL: bazinblackbody-0.7.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for bazinblackbody-0.7.tar.gz
Algorithm Hash digest
SHA256 3fe6053ea4261d1fd2e6ad88e28a151b0abd2edd6bd05f2770f112ae6f7066b7
MD5 5e69e3726a673fce3a09740c031dcfe6
BLAKE2b-256 5378f78258dda78d075144f01fd98ee23095870117118c0084720665c64a121e

See more details on using hashes here.

File details

Details for the file BazinBlackBody-0.7-py3-none-any.whl.

File metadata

  • Download URL: BazinBlackBody-0.7-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for BazinBlackBody-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 83d8f08e8382f890be338ac34bc26636b8d48f2e37be22f0426b05c7fb57e37c
MD5 dbb0b0ee0a3df40f8f06315eacc1f9a9
BLAKE2b-256 85dcaaa976251f7963258265bca4cd760f49e8bd8c1a82b5ada085ed59f4e5ab

See more details on using hashes here.

Supported by

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