Grab Points

This program is pretty simple, and hopefully easy to use. You can find everything it needs here. Just extract the files, stick them in your IDL path, and then type grab_points to launch the dialog. It loads up a blank screen. Just go to the file menu and select open. It will then look like this:



Specify a filename or click browse to pick a file. If you want, specify a minx, max, miny, and maxy. These are the range of values that will be displayed on the plot (i.e. they go into xrange and yrange for the plot command). If you leave them blank, grab_points will attempt to pick something reasonable to use (it doesn't try terribly hard though). xcol and ycol are required - set them to the column in the file to use for x, and the column to use for y (zero-indexed, of course). Once you're done, hit accept, and the data will be loaded. Once the data loads, just click on the plot anywhere to add a point. Click the point again to remove it. The screen should start to look something like this:



Once you're satisfied, use the save option to right out an ascii file that contains the coordinates for the points, one point per line. If you select the extract option, the points you have selected will be assumed to outline a polygon, and grab_points will go ahead and pick out all the points inside the polygon. It will then write out a file containing an index list letting you know which ones are inside the polygon. Essentially, this file is the exact same sort of result that you get from a WHERE() command, and can be used in the same way.