Login | Signup

Filter the ZTF object database

The form below is a builder for SQL SELECT queries on the ZTF database of objects. There are three tables that can be joined in SELECT queries (only SELECT queries are allowed). See examples below. The tables are:

  • objects: The astrophysical objects which consist of a series of candidates (aka detections). The object has a light curve, the candidate has a single magnitude and date.
  • sherlock_crossmatches: Information about each object derived from multiple catalogs by the Sherlock software. The crossmatches have a rank 1,2,3... where 1 is considered most likely.
  • candidates: The individual detections provided by ZTF each night. Each is associated with an object, which is a cluster of detections within 1.5 arcsec, and presumed to be an astrophysical object.

For detailed information about the attributes of these three tables, that you can use in the filters : click here.

  • The public survey uses two filters: fid=1 (g) and fid=2 (r)
  • For each observing field of the survey and each of the g and r filters, ZTF will only issue candidate alerts when it has built up a reference image of that field with that filter, by stacking 15 good images.
  • Once that is in place, each fresh image is subtracted from the reference, and any 5-sigma difference generates a candidate alert.
  • When a candidate is within 1.5 arcseconds of a previous candidate, it gets the same objectId. Thus a light curve can be obtained from all the candidates that have a given objectId.
  • More details of the processing pipeline are available here.
  • Further cuts can be made to remove spurious candidates, using the "drb" attribute of each candidate: the range is 0 to 1 where closer to 1 is more reliable.
  • If you would like to learn the SQL language, this is a good resource.
SELECT FROM JOIN OF
candidates
noncandidates
objects comments
sherlock_classifications
sherlock_crossmatches
WHERE ORDER

(check this box for JSON output )
(If you would like to create your own stored filters, you should be signed in. See links at top left.)

Contributed Stored Filters

Stored filters created and made public are listed below. Click on the name of the filter to push it into the area above.
Name Owner Description Query
SN-like candidates in last 14 days

Stream: SN-likecandidatesinlast14days

Stephen Smartt SN-like candidates (Sherlock classifications SN, NT and orphans). Rejects Pan-STARRS star matches
objects.objectId,
    objects.ramean,
    objects.decmean,
    objects.jdmin - 2400000.5 AS mjdmin,
    objects.jdmax - 2400000.5 AS mjdmax,
    objects.magrmin,
    latestrmag,
    sherlock_classifications.classification,
    IF(distpsnr1 < 2 AND candidates.sgscore1 > 0.49, "Within 2arcsec of PS1 star", "Not Near PS1 star") score
----
objects,candidates,sherlock_classifications
----
sherlock_classifications.classification NOT IN ("VS" , "AGN", "CV", "BS")
        AND objects.jdmin > JDNOW() - 14
        AND objects.ncand > 3
        AND candidates.objectId = objects.objectId
        AND (candidates.jd > JDNOW() - 14)
        AND candidates.magpsf < 20
        AND candidates.rb >= 0.75
        AND candidates.nbad = 0
        AND candidates.isdiffpos = "t"
        AND candidates.fwhm <= 5
        AND ABS(candidates.magdiff) <= 0.1
        AND candidates.elong <= 1.2
ORDER BY  score , mjdmin DESC
All nuclear transients and TDE candidates

Stream: AllnucleartransientsandTDEcandidates

Stephen Smartt Near core of inactive catalogued galaxies (within 1"), flags Pan-STARRS stellar matches to let user judge star/galaxy separation. Objects discovered in last 30 days.
objects.objectId,
    objects.ramean,
    objects.decmean,
    objects.jdmin - 2400000.5 AS mjdmin,
    objects.jdmax - 2400000.5 AS mjdmax,
    objects.magrmin,
    latestrmag,
    sherlock_classifications.classification,
    IF(distpsnr1 < 2 AND candidates.sgscore1 > 0.49, "Within 2arcsec of PS1 star", "Not Near PS1 star") score
----
objects,candidates,sherlock_classifications
----
sherlock_classifications.classification IN ("NT")
        AND objects.ncand > 3
        AND candidates.objectId = objects.objectId
        AND candidates.magpsf < 20
        AND candidates.rb >= 0.75
        AND candidates.nbad = 0
        AND candidates.isdiffpos = "t"
        AND candidates.fwhm <= 5
        AND ABS(candidates.magdiff) <= 0.1
        AND candidates.elong <= 1.2
ORDER BY  score , mjdmin DESC 
An Asteroid"s Tail

Stream: inactive

Ken Smith Check ZTF detections for active asteroid (6478) Gault
objectId, jd-2400000.5 as mjd, ssnamenr
----
candidates
----
ssnamenr = "6478"
SN-like candidates

Stream: inactive

Stephen Smartt SN-like candidates (Sherlock classifications SN, NT and orphans), discovered within the last 3 days. Also rejects Pan-STARRS star matches.
    objects.objectId,
    objects.ramean,
    objects.decmean,
    objects.jdmin - 2400000.5 AS mjdmin,
    objects.jdmax - 2400000.5 AS mjdmax,
    objects.magrmin,
    objects.latestrmag,
    sherlock_classifications.classification,
    IF(candidates.distpsnr1 < 2 AND candidates.sgscore1 > 0.49, "Within 2arcsec of PS1 star", "Not Near PS1 star") score
----
objects,candidates,sherlock_classifications
----
   sherlock_classifications.classification NOT IN ("VS" , "AGN", "CV", "BS")
        AND objects.ncand > 3
        AND candidates.objectId = objects.objectId
        AND candidates.magpsf < 20
        AND candidates.rb >= 0.75
        AND candidates.nbad = 0
        AND candidates.isdiffpos = "t"
        AND candidates.fwhm <= 5
        AND ABS(candidates.magdiff) <= 0.1
        AND candidates.elong <= 1.2
ORDER BY  score , mjdmin DESC
Milliquas quasars

Stream: Milliquasquasars

Roy Williams Finds all ZTF objects crossmatched with the Milliquas quasar catalog.
objects.objectId, objects.ncand
----
objects,sherlock_crossmatches
----
sherlock_crossmatches.catalogue_view_id=41 ORDER BY objects.ncand DESC
TNS crossmatch

Stream: TNScrossmatch

Roy Williams This query finds all Lasair objects that are in the <a href=https://wis-tns.weizmann.ac.il/>Transient Name Server</a>, meaning they have a comment that includes the string 'TNS'. The most recent are first.
objects.objectId, 
comments.content
----
objects, comments
----
comments.content LIKE '%TNS%'