One row per sensor, one column per time. When there is no image at the requested time, the nearest one is
taken: the gap is printed and the actual time of the image is in the thumbnail's title. Each thumbnail is centred on the raw position (x, y) of the sensor
in the "advanced" export, read at the measurement nearest to the image; the pixels are not retouched, so the brightness
can be compared from one thumbnail to another. Prints the positions used, the background (median of the pixels of the
thumbnail), the 99th percentile and the peak (maximum) of the grey level of each thumbnail (0 to 255), then the path of the PNG.
--contrast: all thumbnails in grey levels, with the same stretch for the whole sheet, so that a faint
spot shows and can be compared from one thumbnail to another. Without a value, the stretch goes from the 1st percentile to the maximum
of the sheet (a saturated pixel somewhere crushes it: then give --contrast MIN,MAX again, with the help of the background and the
peak printed for each thumbnail). A smaller --radius (30 to 50) magnifies. The bounds are printed.
The frame centre (px) is written under each thumbnail: when the x, y of the export jump, the frame moves
by as much. --fixed keeps, on each row, the frame centred on the position at the first requested time, and marks
the x, y of the export at each time with a red cross: a spot that enters or leaves the frame is not confused with
a spot that appears. A frame cut by the edge of the image is flagged (image size): on some
exports, x, y are not pixels (values close to 0), and the frame falls in the corner of the image.
--zone X,Y,W,H: the same zone of the image (pixels of the original image: top left corner, width, height, as
gif.py) at each time, side by side (up to 4 per row, fewer when the zone is wide), same stretch with --contrast; --sensors becomes optional:
those given are marked with a red cross and their name at their x, y at each time. For the scene around
the targets (foreground, object, lighting), which a large --radius would make too small.
Each thumbnail is rendered at its size in pixels (one image pixel for one PNG pixel) from 260 to 1000 px a side;
Read shrinks a PNG that is too wide: with a large --radius or a large --zone, few times per sheet.
a.add_argument("--sensors",default="",help="comma-separated list (optional with --zone)")
a.add_argument("--times",required=True,help="times of the images, comma-separated (UTC)")
a.add_argument("--radius",type=int,default=100,help="half side of the thumbnail in pixels (default 100)")
a.add_argument("--contrast",nargs="?",const="auto",metavar="MIN,MAX",help="grey levels, same stretch for the whole sheet: MIN,MAX (0 to 255) or, without a value, from the 1st percentile to the maximum of the sheet")
a.add_argument("--fixed",action="store_true",help="one fixed frame per sensor (position at the first time), x, y of each time marked with a cross")
a.add_argument("--zone",metavar="X,Y,W,H",help="the same zone of the image at each time (pixels of the original image: top left corner, width, height)")
a.add_argument("--out",default=os.path.join("out","diagnostic"),help="folder of the PNG")