This function may be performed alone by calling the script with entrystage and finalstage=`imsample'.
When the list of detected sources is matched with the list of simulated sources, it is undesirable to match with simulated sources which lie outside the region of sky where the exposure is significant. Such sources are, in essence, flagged at this stage by use of the task imsample. I say `in essence' because what actually happens is that imsample measures the value of a reciprocal sensitivity map at each source position and writes this to a column INV_SENSY. The value of this column has no effect on the likelihood of a particular simulated source being matched with a detection, but sources which have a zero value in this column are screened out within the eimsimcompleteness and eimsimreliability tasks (called during script eimsimreduce).