def filterVPDF(CameraAlert, rarityThreshold=1E7): dmag = CameraAlert.DeltaMag position = CameraAlert.LA.position() ra, dec = position rarityVPDF= VPDF.findRarity(ra, dec, dmag) if rarityVPDF < rarityThreshold: anotation = 'Alert variability less than VPDF threshold (%.2f < %.2f)' %(rarityVPDF, rarityThreshold) CameraAlert.divert(anotation)
def filterVPDF(CameraAlert, rarityThreshold=1E7): dmag = CameraAlert.DeltaMag position = CameraAlert.LA.position() ra, dec = position rarityVPDF = VPDF.findRarity(ra, dec, dmag) if rarityVPDF < rarityThreshold: anotation = 'Alert variability less than VPDF threshold (%.2f < %.2f)' % ( rarityVPDF, rarityThreshold) CameraAlert.divert(anotation)
def filterVPDF( alert, rarityThreshold=1E7 ): dmag = alert.CA.DeltaMagnitude.value ra = alert.ra decl = alert.decl rarityVPDF= VPDF.findRarity( ra, decl, dmag ) if rarityVPDF < rarityThreshold: annotation = 'Alert variability less than VPDF threshold (%.2f < %.2f)' %(rarityVPDF, rarityThreshold) print( alert.parent.ID, annotation ) alert.divert( annotation )