Skip to content

ZwickyTransientFacility/ztfcosmo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI

ztfcosmo

ZTF Cosmo Data Release repository

Download and visualize ZTF SN Ia DR2 (Rigault et al. 2025). See also the dedicated ZTF SN Ia DR2 frontend.


Setup

installation

pip install ztfcosmo

data

By default ztfcosmo will work as is, using remote data access from ztfcosmo.in2p3.fr.

However, if you need lot of data (like many lightcurves or spectra) or want to quickly access observing logs, it is suggested to use local data copy.

To use a local datacopy:

  1. Download these data and uncompress the zip file. Move the generated directory anywhere you want (e.g. in '~/data/ztf/')
  2. Create the environmnent variable named $ZTFCOSMODIR pointing to the ztfsniadr2 directory you just created (e.g., '~/data/ztf/ztfsniadr2')

And that's it ! ztfcosmo will recognize that you have data locally (it looks for $ZTFCOSMODIR) and will use them instead of the remove access.


Basic usage

access data tables

import ztfcosmo
data = ztfcosmo.get_data() # see options

Plot a lightcurve

lc = ztfcosmo.get_target_lightcurve("ZTF18aaqfziz", as_data=False) # see options
fig = lc.show()

Plot a spectrum

Remark that a target may have several spectra, if so spec is a list.

spec = ztfcosmo.get_target_spectra("ZTF18aaqfziz", as_data=False) 
fig = spec.show()


Citing

If you have been using ztfcosmo for your research, please cite Rigault et al. 2025.

About

ZTF Cosmo Data Release repo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages