bright = False; noPointUnderneath = True; mover = True; real = False; slope = 0.0; t_slope = 0.0; rb = 0.0; positiveSubtraction = False; brightstar = False; scorr = 0.0; latitude = True; prevCandidates = observation["prv_candidates"]; m_now = observation["candidate"]["magpsf"]; m_app = observation["candidate"]["magap"]; t_now = observation["candidate"]["jd"]; fid_now = observation["candidate"]["fid"]; sgscore = observation["candidate"]["sgscore1"]; sgscore2 = observation["candidate"]["sgscore2"]; sgscore3 = observation["candidate"]["sgscore3"]; srmag = observation["candidate"]["srmag1"]; srmag2 = observation["candidate"]["srmag2"]; srmag3 = observation["candidate"]["srmag3"]; sgmag = observation["candidate"]["sgmag1"]; simag = observation["candidate"]["simag1"]; rbscore = observation["candidate"]["rb"]; magnr = observation["candidate"]["magnr"]; distnr = observation["candidate"]["distnr"]; distpsnr1=observation["candidate"]["distpsnr1"]; distpsnr2=observation["candidate"]["distpsnr2"]; distpsnr3=observation["candidate"]["distpsnr3"]; scorr = observation["candidate"]["scorr"]; fwhm = observation["candidate"]["fwhm"]; elong = observation["candidate"]["elong"]; nbad = observation["candidate"]["nbad"]; chipsf = observation["candidate"]["chipsf"]; gal_lat = observation["candidate"]["gal_lat"]; bright = m_now < 19.0; if (gal_lat and gal_lat < 10 and gal_lat > -10) { latitude = False; } # seemingly the only change... if (observation["candidate"]["isdiffpos"] and (observation["candidate"]["isdiffpos"] = "t" or observation["candidate"]["isdiffpos"] = "1")) { positiveSubtraction = True; } if (rbscore and rbscore > 0.2) { real = True; } if (sgscore and distpsnr1 and sgscore > 0.76 and distpsnr1<2) { noPointUnderneath = False; } if ((distpsnr1 and srmag and distpsnr1 < 20 and srmag < 16.0 and srmag>0 and sgscore > 0.49) or (distpsnr2 and srmag2 and distpsnr2 < 20 and srmag2 < 16.0 and srmag2>0 and sgscore2 > 0.49) or (distpsnr3 and srmag3 and distpsnr3 < 20 and srmag3 < 16.0 and srmag3>0 and sgscore3 > 0.49) ) { brightStar = True; } for candidate in prevCandidates { if (candidate["jd"] and candidate["magpsf"] and candidate["fid"] and candidate["isdiffpos"] and (candidate["isdiffpos"] = "t" or candidate["isdiffpos"] = "1")) { dt = t_now - candidate["jd"]; if (dt > 0.02 and candidate["magpsf"] < 99) { mover = False; } if (dt = 0.0 and candidate["magpsf"] < 99) { if (candidate["jd"] > t_slope and candidate["fid"] == fid_now) { t_slope = candidate["jd"]; slope = (m_now - candidate["magpsf"]) / dt; } } } } annotate "magnitude" m_now; annotate "sgscore" sgscore; annotate "slope" slope; annotate "rbscore" rbscore; annotate "mover" mover; annotate "real" real; annotate "positiveSubtraction" positiveSubtraction; annotate "brightStar" brightStar; annotate "magnr" magnr; annotate "distnr" distnr; annotate "scorr" scorr; annotate "gal_lat" gal_lat; filteron latitude and bright and noPointUnderneath and (not mover) and real and positiveSubtraction and (not brightStar);