title: Custom Polygon Image Boolean Mask
body: <p>I am having trouble formulating a solution to a problem and I don't really know the right keywords to search for so I come here for some help.</p>
  
  <p>I have an astronomy image that has stars mapped to the image, which is essentially saying I have some image with a set of points randomly spread out over the it with x and y pixel coordinates.  The only problem is some of these "stars" are just bad detections and our attempts to filter them out while also keeping good points as yielded lack luster results.  These points come from bad pixel columns or foreground stars that are saturating the imager.</p>
  
  <p>I want to then be able to go into the image by hand an specify shapes bound by coordinates that will exclude any points from these areas.  For example, I have some big blown up diffraction spiking star that I want to put some kind of boxy star around it.  Another is some slanted bad column that I want to exclude so I want to put a rhombus around this and exclude all the bad points within it.</p>
  
  <p>This is tantamount to me wanting to be able to form some kind of polygon mask given a set of connecting points, and be able to apply that to the image where it will then exclude those points within.</p>
  
  <p>Just doing some brain storming and trying to find something on the internet, I had a thought of making some kind of custom polygon object that can be applied to all points which thus widdling down the bad points one shape at a time.  </p>
  
  <p>The only problem is I am having a hard time imagining how I would do this.  Is there any good resources or advice for implementing such a mask?  Elsewise, is there a better technique for what I am trying to achieve?</p>