shortened statement that determined the value of cutout passed to get_uri.

The 'locations' array holds a list of places that the get_image method will iterate through trying to find our image for us.  The list is a set of tuples.   (uri, cutout) where cutout (if not None) is passed as an argument to the data service.

For reasons that are lost on me the value set in the tuple was:

cutout is not None and cutout or None

So.. if the variable cutout is not None then the value in the variable is sent, otherwise the value None is sent.  But the value in cutout is None so basically we always send the value of the variable and the logic is just extra compute steps?

Why was this written this way before?
HACK to set the value of 'is_inverted'.

The flag 'is_inverted' is set to TRUE when we notice the the x/y coordinates of storage locations is flip/flopped compared to the orignal image.  This flip/flopping is done when removing a single extension from an MEF to ensure that North is up and East is left when passing that to OSSOS detection pipeline since the pipeline works in X/Y space not RA/DEC space.

 Why is this in astrom you ask.   The parse reads the measurements from a pipeline output and needs to know if it should try and 'flip/flop' the images before matching the recorded location to the image location.  The original MEF files, which are split for running the pipeline, are always stored in the MEF and thus must be flip/flopped but the 'scrambled' and 'fk' images are NOT stored in teh MEF but rather was single images... so they must not be flip/flopped.

  is_inverted === is the coordinate I just recorded flip/flop compared to how the image is stored on disk?

  One day we'll work in RA/DEC and this problem will go away... that day will never cover I suspect.

  @mtb55: This is to handle an original pipeline feature.
changed the column headers to not have spaces.

standard table reading tools expect the column headers to be space separated values with the same number of header values as column.  This change makes the Object.planted file easier to load into python.
A re-write of this script.

The planted_objects list reported at the end of the pipeline has been substantially re-written to address the following:

  - Better object list matching to ensure 'exact' matching between the planted list and the found list.
  - Reporting in the header of the file on the success of finding bright sources
  - use of astropy.table.Table object to keep build the output records.
  - reformat of the output header to be compatible with the astropy.io.ascii package file reader.
  - use of the standard 'uri lookup' work flow to find the name of the .astrom and Object.planted files that should be examined.
  - addition of command line arguments to set various tunable parameters.
  - recording of diagnostic results of matching as a 'tag' on the measure3 directory where the .match file is written to.
  - triggering of an error flag when match diagnostics are outside range.
  - improved generality in computing the rate and angle of motion based on sources detected in the image.
added get_cands_uri method to lookup the URI associated with a cands.astrom file stored  in measure3 area.

 This method should help in making the names that files are writen into measure3 with more uniform.  That will, in turn, allow new software to find the correct file without re-implementing the naming pattern convention.
Merge branch 'master' of https://github.com/ijiraq/MOP
removed some verbosity that was supposed to just be for development testing.