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 ATTRIBUTES TABLES TO USE
candidates
noncandidates
objects comments
sherlock_classifications
sherlock_crossmatches
Watchlist
    Cataclysmic Variables inactive
    BL Lac for TeV inactive
    AM CVn
    AM Her
    Stripe82 AGN
    Abell Clusters
    Giant Binaries
    IPs
    E+A galaxies
WHERE

(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
Detail

Stream: 42SN-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, objects.latestrmag, 
sherlock_classifications.classification, 
IF(objects.distpsnr1 < 2 AND objects.sgscore1 > 0.49, "Within 2arcsec of PS1 star", "Not Near PS1 star") score 
----
objects, sherlock_classifications
----
objects.objectId = objects.objectId AND 
objects.primaryId = sherlock_classifications.transient_object_id AND 
objects.jdmax > JDNOW() - 14.00000 AND 
sherlock_classifications.classification NOT IN ("VS" , "AGN", "CV", "BS") AND 
objects.ncand > 3 AND 
objects.latestgmag < 20 AND 
objects.ncandgp > 1 
ORDER BY score , mjdmin DESC 
All nuclear transients and TDE candidates
Detail

Stream: 42AllnucleartransientsandTDEcandidates

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 14 days.
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(objects.distpsnr1 < 2 AND objects.sgscore1 > 0.49, "Within 2arcsec of PS1 star", "Not Near PS1 star") score 
----
objects, sherlock_classifications
----
objects.objectId = objects.objectId AND 
objects.primaryId = sherlock_classifications.transient_object_id AND 
objects.jdmax > JDNOW() - 14.00000 AND 
sherlock_classifications.classification IN ("NT") AND 
objects.ncand > 3 AND 
objects.latestgmag < 20 AND 
objects.ncandgp > 1 
ORDER BY score , mjdmin DESC 
An Asteroid"s Tail
Detail

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
Detail

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
Detail

Stream: 2Milliquasquasars

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

Stream: 2TNScrossmatch

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.time,
comments.content
----
objects, comments
----
comments.content LIKE '%TNS%' ORDER BY comments.time DESC
Outburst AMCanVen
Detail

Stream: 2OutburstAMCanVen

Roy Williams Outburst from moving averages, and watchlist of AMCanVen
objects.objectId, objects.ncandgp, watchlist_hits.name, jdnow()- objects.jdmax
----
objects, watchlist:58
----
(-objects.latest_dc_mag_g02 > -objects.latest_dc_mag_g28 + 0.5)
and
(-objects.latest_dc_mag_r02 > -objects.latest_dc_mag_r28 + 0.5)
SN Candidates for MCARG
Detail

Stream: 150SNCandidatesforMCARG

Chris Duston Using Mag < 18, restricting to "SN"-classified, still getting brighter, and including basic observable information for Australia/Spain/NM.
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(objects.distpsnr1 < 2 AND objects.sgscore1 > 0.49, "Within 2arcsec of PS1 star", "Not Near PS1 star") score 
----
objects, sherlock_classifications
----
objects.objectId = objects.objectId AND
objects.primaryId = sherlock_classifications.transient_object_id AND
objects.jdmax > JDNOW() - 14.00000 AND
sherlock_classifications.classification NOT IN ("VS" , "AGN", "CV", "BS", "NT", "UNCLEAR") AND
objects.ncand > 3 AND
objects.latestrmag < 18 AND
objects.latestrmag <= objects.magrmin AND 
objects.ncandgp > 1 AND
objects.decmean > -32 AND
objects.decmean < 39 AND
objects.ramean > 20 AND
objects.ramean < 160
ORDER BY latestrmag , score , mjdmin DESC
bright stars
Detail

Stream: 2brightstars

Roy Williams bright stars
objects.objectId, objects.latestrmag, jdnow()-objects.jdmax as since
----
objects
----
objects.latestrmag < 12
SN-likethings
Detail

Stream: 218SN-likethings

Rafia Omer
objects.objectId,
JDNOW() - 2400000.5 as mjdnow,
objects.jdmin - 2400000.5 AS mjdmin,
objects.jdmax - 2400000.5 AS mjdmax,
objects.magrmin, objects.latestrmag,
sherlock_classifications.classification,
IF(objects.distpsnr1 < 2 AND objects.sgscore1 > 0.49, "Within 2arcsec of PS1 star", "Not Near PS1 star") score
----
objects, sherlock_classifications
----
sherlock_classifications.classification IN ( "SN" , "ORPHAN" , "NT")
AND objects.ncand > 2
AND objects.ncandgp > 2
SGLF TNS discovery reports
Detail

Stream: inactive

Ismael Perez-Fournon Possible SNe reported to TNS by SGLF (Supernovae and Gravitational Lenses Follow up) project
objects.objectId, comments.content, objects.ramean, objects.decmean, 
objects.jdmin - 2400000.5 AS mjdmin, objects.jdmax - 2400000.5 AS mjdmax, 
objects.magrmin, objects.latestrmag, 
sherlock_classifications.classification, 
IF(objects.distpsnr1 < 2 AND objects.sgscore1 > 0.49, "Within 2arcsec of PS1 star", "Not Near PS1 star") score 
----
objects, comments, sherlock_classifications
----
comments.content LIKE '%SGLF%'
ORDER BY mjdmin DESC 
AMCVn
Detail

Stream: 104AMCVn

Gavin Ramsay AMCVns
objects.objectId
----
objects, watchlist:128
----
(-objects.latest_dc_mag_g02 > -objects.latest_dc_mag_g28 + 0.5) and (-objects.latest_dc_mag_r02 > -objects.latest_dc_mag_r28 + 0.5)
TDE-candidates
Detail

Stream: 23TDE-candidates

Matt Nicholl
DISTINCT objects.objectId, 
ROUND(objects.maggmean - objects.magrmean,2) as g_minus_r_mean, 
ROUND(objects.latestgmag - objects.latestrmag,2) as g_minus_r_latest, 
objects.latestgmag as g, 
objects.latestrmag as r, 
ROUND(objects.jdmin - 2400000.5 ,1) as disc_mjd, 
ROUND(objects.jdmax - 2400000.5 ,1) as latest_mjd, 
objects.ncandgp as N_obs,
IF(ABS(objects.latestgmag - objects.maggmin) < 0.2 AND objects.latestgmag <= objects.maggmean AND ABS(objects.latestrmag - objects.magrmin) < 0.2 AND objects.latestrmag <= objects.magrmean, "rising/peak", "") rising,
IF(objects.latestgmag > objects.maggmin + 0.2 OR objects.latestrmag > objects.magrmin + 0.2, "fading", "") fading,
objects.sherlock_classification as sherlock,
ROUND(sherlock_crossmatches.separationArcsec,2) as offset,
objects.maggmin as g_max, 
objects.magrmin as r_max, 
comments.content as TNS,
objects.sgscore1 as sg_score,
objects.sgmag1 as g_host, 
objects.srmag1 as r_host, 
objects.ramean as ra, 
objects.decmean as decl
----
objects, comments, sherlock_crossmatches
----
objects.ncand > 2
AND objects.ncand - objects.ncandgp < 3
AND objects.sherlock_classification = 'NT'
AND sherlock_crossmatches.separationArcsec < 1.0
AND (objects.maggmean - objects.magrmean < 0.05 OR objects.latestgmag - objects.latestrmag < 0.05)
AND (objects.latestrmag < 20.0 OR objects.latestgmag < 20.0) 
AND (objects.glatmean > 10 OR objects.glatmean < -10) 
AND objects.sgmag1 - objects.srmag1 > 0
AND comments.content NOT LIKE '%Classified as a SN%'
ORDER BY objects.jdmax DESC
TDE-candidates-E+A
Detail

Stream: 23TDE-candidates-EA

Matt Nicholl Same as TDE-candidate query but cross-matched with E+A galaxy watchlist
DISTINCT objects.objectId, 
ROUND(objects.maggmean - objects.magrmean,2) as g_minus_r_mean, 
ROUND(objects.latestgmag - objects.latestrmag,2) as g_minus_r_latest, 
objects.latestgmag as g, 
objects.latestrmag as r, 
ROUND(objects.jdmin - 2400000.5 ,1) as disc_mjd, 
ROUND(objects.jdmax - 2400000.5 ,1) as latest_mjd, 
objects.ncandgp as N_obs,
IF(ABS(objects.latestgmag - objects.maggmin) < 0.2 AND objects.latestgmag <= objects.maggmean AND ABS(objects.latestrmag - objects.magrmin) < 0.2 AND objects.latestrmag <= objects.magrmean, "rising/peak", "") rising,
IF(objects.latestgmag > objects.maggmin + 0.2 OR objects.latestrmag > objects.magrmin + 0.2, "fading", "") fading,
objects.sherlock_classification as sherlock,
ROUND(sherlock_crossmatches.separationArcsec,2) as offset,
objects.maggmin as g_max, 
objects.magrmin as r_max, 
comments.content as TNS,
objects.sgscore1 as sg_score,
objects.sgmag1 as g_host, 
objects.srmag1 as r_host, 
objects.ramean as ra, 
objects.decmean as decl
----
objects, comments, sherlock_crossmatches, watchlist:269
----
objects.ncand > 2
AND objects.ncand - objects.ncandgp < 3
AND objects.sherlock_classification = 'NT'
AND sherlock_crossmatches.separationArcsec < 1.0
AND (objects.maggmean - objects.magrmean < 0.05 OR objects.latestgmag - objects.latestrmag < 0.05)
AND (objects.latestrmag < 20.0 OR objects.latestgmag < 20.0) 
AND (objects.glatmean > 10 OR objects.glatmean < -10) 
AND objects.sgmag1 - objects.srmag1 > 0
AND comments.content NOT LIKE '%Classified as a SN%'
ORDER BY objects.jdmax DESC
TDE's candidates E+A 2
Detail

Stream: 264TDEscandidatesEA2

yael dgany same as the first TDE's -candidates E+A query only with latestr/gmag < 19.0 and without objects.sgmag1 - objects.srmag1 > 0
DISTINCT objects.objectId, 
ROUND(objects.maggmean - objects.magrmean,2) as g_minus_r_mean, 
ROUND(objects.latestgmag - objects.latestrmag,2) as g_minus_r_latest, 
objects.latestgmag as g, 
objects.latestrmag as r, 
ROUND(objects.jdmin - 2400000.5 ,1) as disc_mjd, 
ROUND(objects.jdmax - 2400000.5 ,1) as latest_mjd, 
objects.ncandgp as N_obs,
IF(ABS(objects.latestgmag - objects.maggmin) < 0.2 AND objects.latestgmag <= objects.maggmean AND ABS(objects.latestrmag - objects.magrmin) < 0.2 AND objects.latestrmag <= objects.magrmean, "rising/peak", "") rising,
IF(objects.latestgmag > objects.maggmin + 0.2 OR objects.latestrmag > objects.magrmin + 0.2, "fading", "") fading,
objects.sherlock_classification as sherlock,
ROUND(sherlock_crossmatches.separationArcsec,2) as offset,
objects.maggmin as g_max, 
objects.magrmin as r_max, 
comments.content as TNS,
objects.sgscore1 as sg_score,
objects.sgmag1 as g_host, 
objects.srmag1 as r_host, 
objects.ramean as ra, 
objects.decmean as decl
----
objects, comments, sherlock_crossmatches, watchlist:269
----
objects.ncand > 2
AND objects.ncand - objects.ncandgp < 3
AND objects.sherlock_classification = 'NT'
AND sherlock_crossmatches.separationArcsec < 1.0
AND (objects.maggmean - objects.magrmean < 0.5)
AND (objects.latestrmag < 19.0 OR objects.latestgmag < 19.0) 
AND (objects.glatmean > 10 OR objects.glatmean < -10) 
AND comments.content NOT LIKE '%Classified as a SN%'
ORDER BY objects.jdmax DESC