I am interested in obtaining the light curves of variable stars. I have followed what I understood to be best practice by using some code that joins the ForcedSourceOnDiaObject and Visit tables. I obtained the light curve but some results did not look right and so I queried the image data for each datapoint (i.e. visit). The second HDU contains mask bits for each pixel of the image and manually reviewing how widespread (across the image) individual mask bits being set can subjectively determine whether to discount the datapoint. However this is very labour and processor intensive.
My question is whether there is an easy way of filtering visit data as the Visit table does not include any mask data.