PRO distance_1d_vec, xsize, x0, dist
; Description: This module creates a one-dimensional pixel vector "dist" of length "xsize" with
; values representing the distance of each pixel from the x coordinate "x0".
;
; Input Parameters:
;
; xsize - INTEGER/LONG - The length of the one-dimensional pixel array "dist" in the x direction
; (pix). If this value is zero or negative, then it will be reset to the
; default value of "1".
; x0 - FLOAT/DOUBLE - The x coordinate of the point from which distances are to be calculated (pix).
;
; Output Parameters:
;
; dist - DOUBLE VECTOR - A one-dimensional pixel vector of length "xsize" with values representing
; the distance of each pixel from the x coordinate "x0". If the module fails,
; then "dist" is returned with a value of "0.0".
;
; Author: Dan Bramich (dan.bramich@hotmail.co.uk)
;
; History:
;
; 24/07/2008 - Module created (dmb)
;Check that "xsize" and "x0" are numbers of the correct type, and reset the value of "xsize" if it is
;out of range
;Generate the one-dimensional pixel vector representing distances from "x0"