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.
pip install ztfcosmo
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:
- Download these data and uncompress the zip file. Move the generated directory anywhere you want (e.g. in
'~/data/ztf/'
) - Create the environmnent variable named
$ZTFCOSMODIR
pointing to theztfsniadr2
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.
import ztfcosmo
data = ztfcosmo.get_data() # see options
lc = ztfcosmo.get_target_lightcurve("ZTF18aaqfziz", as_data=False) # see options
fig = lc.show()
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()
If you have been using ztfcosmo for your research, please cite Rigault et al. 2025.