-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing data when a public alert is first encountered in the previous history of a private alert #5
Comments
When processing an alert, the ingester first requests all photopoints associated with the associated transient (A projection is used so that only a subset of the existing fields are returned, currently: _id, alTags, jd, fid, rcid, alExcluded, magpsf). This query serves several purposes, it allows:
The way I thought of handling this issue was not to inherit properties from one photopoint to a another , but to make sure that the info of a givent photopoint contained in candidate are really present in the DB and if not to add them. More precisely:
Advantage: this is fairly simple to implement, should catch most of the cases and does not imply any performance penalty. Drawback 1: it only fixes photopoints that triggered an alert at some point. Say the first alert of a transient contains photopoints in prv_candidates: those will never be updated. For these, you would need to 'inherit' these properties. Drawback 2: the fix does not work if the alert is rejected for some reason (color too blue...) and auto-complete is not activated. |
Regarding Drawback 1: |
As photopoints are not reingested, a photopoint first encountered as a previous candidate is not saved again if it appears as a candidate at some later time. This matters since not all data are included in the previous candidate information. The DB will thus not be stable towards the order in which alerts are processed. (In principle this is a problem with the stream, rather than ampel.)
What can be done:
Right now it seems like the third, least invasive, option is sufficient. These are the affected keys:
Key that can be inherited: 'nmtchps', 'srmag2', 'objectidps1', 'distpsnr1', 'maggaiabright', 'sgmag2', 'simag2', 'maggaia', 'nmatches', 'objectidps3', 'distpsnr2', 'sgscore3', 'distpsnr3', 'sgmag3', 'objectidps2', 'simag3', 'jdstartref', 'sgmag1', 'neargaiabright', 'szmag3', 'szmag1', 'srmag1', 'srmag3', 'neargaia', 'jdendref', 'simag1', 'sgscore1', 'sgscore2', 'rfid', 'nframesref', 'szmag2'
(note that we are making the assumption that reference build did not change between history and new obs)
There are a number of keys that for principal reason should not be saved ['jdstarthist', 'ndethist', 'ncovhist', 'jdendhist']. This are different in that they do not only depend on the candidate, but rather on the state at processing (actually more similar to a science record)
A final list of properties which also cannot be inherited, as they are exposure dependent, but which should really be part of the alert. Should contact caltech about these: 'zpclrcov', 'ssnrms', 'dsdiff', 'dsnrms', 'clrrms', 'zpmed', 'clrmed', ,'exptime', 'tooflag'
The text was updated successfully, but these errors were encountered: