(from Roberto Nesci, INAF/IAPS-Roma, Italy)
I have got the API and downloaded the photometry file for my source.
It is a bit different from the previous version, some fields have been
added, but the structure seems the same. Unfortunately the python script
which you sent me to read the photometry file, now crashes giving this
error:
Traceback (most recent call last):
File “/home/nesci/script/prove_python/read_json2.py”, line 5, in
for c in j[‘candidates’]:
TypeError: list indices must be integers or slices, not str
Dear Roy, I modified the script and it works perfectly.
Looking at the json data, I notice that there are several more fields
but the old dc_mag is no more present: it was the apparent magnitude of
the source, which could be directly compared with the photometry from
another telescopes.
I assume that the field magnr is the reference magnitude of the source,
and magpsf is the magnitude difference with respect to magnr, but how
can I compute the old dc_mag value from magpsf and magnr ?
By the way I have a nearly simultaneous photometry of my source
ZTFaauazqz on August 26, at r=14.96 in the PanSTARRS scale, while the
ZTF diff.mag value is r=16.31 and magnr=15.19 in the r band: I would
expect a diff.mag value brighter than magnr !
Thanks for your help in understanding the ZTF photometry.
Hi Roberto
In earlier versions of Lasair, we tried to compute an apparent magnitude from the reference + difference magnitudes, and it is not so simple. Unfortunately we found that computation unreliable and decided to remove it from the published attributes.
However, the code that computes apparent magnitude is still available here.
The function defined in that code uses 7 attributes (fid, magpsf,sigmapsf, magnr,sigmagnr, magzpsci, isdiffpos), and all of these are available from the lightcurves method of the API, as defined here.
So you can compute your own apparent magnitudes. I hope things will be easier with LSST than they are with ZTF.
Roy
Thank you very much for your suggestions Roy, I will try to do myself with the code indicated. Hope that with the Vera Rubin Telescope things will be better. Roberto