FUNCTION test_bit_pattern_bpm_1dvec, bpmdata, xsize
; Description: This function tests that the parameter "bpmdata" contains a one-dimensional
; bit-pattern bad pixel mask of length "xsize" pixels. A bit-pattern bad pixel
; mask stores a non-negative integer value at each pixel that represents the
; pattern of bits that are set (or the equivalent binary number). If no bits
; are set, then the integer value is "0", and this is generally considered to
; be a good pixel. If at least one bit is set, then the integer value will be
; positive, and this is generally considered to be a bad pixel with the "bad
; pixel" properties indicated by which bits are set.
; Therefore, this function tests that the parameter "bpmdata" is a
; one-dimensional vector of length "xsize" pixels that is of BYTE, INTEGER,
; or LONG type, and that contains no negative pixel values.
;
; Input Parameters:
;
; bpmdata - ANY - The parameter to be tested whether or not it satisfies the properties
; that a one-dimensional bit-pattern bad pixel mask would have.
; xsize - INTEGER/LONG - The length of the input parameter "bpmdata" should be equal to
; the value of "xsize". If this parameter is not of the correct
; number type, or if it is zero or negative, then the input
; parameter "bpmdata" is allowed to be of any length.
;
; Return Value:
;
; The function returns an INTEGER value set to "1" if "bpmdata" satsifies the properties
; that a one-dimensional bit-pattern bad pixel mask would have. Otherwise, the function
; returns an INTEGER value set to "0".
;
; Author: Dan Bramich (dan.bramich@hotmail.co.uk)
;
; History:
;
; 08/01/2012 - Module created (dmb).
;Check that "bpmdata" is a one-dimensional vector that contains numbers of the type BYTE,
;INTEGER, or LONG
;If required, check that "bpmdata" is of length "xsize" pixels
;Check that "bpmdata" does not have any negative pixel values
;If "bpmdata" satisfies the properties that a one-dimensional bit-pattern bad pixel mask
;would have, then return a value of "1"