How to specify first transient detection in filters

Hello: I’m trying to filter only the first measurement of a newly discovered transient for ZTF.

I used the following :

AND objects.jdmin > JDNOW() - 1

However, here is just one example of many a transient that was discovered long ago that passed my filter just now:

ZTF20abaohfi

Discovery Date: 2021-06-05 09:39:10 UTC

Can you please tell me how to select the first detection of a new object by ZTF?

Thanks,

-Bruce

Hi Bruce,
Thanks for the question, would you mind letting us know what service you’re using to try to filter the first measurement of the transient?

Hello: Thanks very much for reply.

I put in my filters at Filters. Is that what you mean?

Thanks,

-Bruce

I hope you can see the link to the service this time: [Preformatted text](https://lasair-ztf.lsst.ac.uk/filters/)

Hi Bruce, ah I see, so you’re using the filters from Larsair. I’m looking through the schema and objects.jdmin should indeed provide the “Earliest Julian Day of candidates that cite this object”, but I’m not sure if the JDNOW() function is predefined? Let’s also ping @roy to see if you can help out with this.

Lasair filters on the objects, not the candidates. To get the first candidate, you will need to get relevant object, then look at its candidates (web or API). To get a new orphan object, I suggest objects.jdmax < jdnow()-3 AND objects.ncand=1.

The attribute jdmin in lasair-ztf has always been misunderstood, its actually the earliest candidate from the 30-day lightcurve that we get with the alert. So there can be earlier detections, but the alert did not include them. We have asked Rubin to add an attribute firstDiaSourceMJD which is the real time of the first diaSource.

I am sure this is the solution to your question.

Hi @cosmicbruce – just checking in to see if Roy’s comment above has provided a solution. Thanks…