;+
; Project     : SOLAR-B - EIS
;
; Name        : EIS_CPT_DIFFERENCE
;
; Purpose     : Checks difference between two arrays.
;
; Explanation : Checks difference between two arrays.
;
; Use         : < res = eis_cpt_difference (table0, table1, DIFFERENCES=differences) >
;
; Inputs      : table0  :    ARRAY[n] table data
;               table1  :    ARRAY[n] table data
;
; Opt. Inputs : None.
;
; Outputs     : res : INT 0 : no differences
;                     INT 1 : arrays different
;
; Opt. Outputs: None.
;
; Keywords    : DIFFERENCES : INTARR[n] FLAG indicating whether each ekement of input array is different.
;
; Calls       : None.
;
; Common      : None.
;
; Restrictions: None.
;
; Side effects: May output ASCII files.
;
; Category    : EIS_CPT.
;
; Prev. Hist. : None.
;
; Written     : Martin Carter RAL 11/06/08
;
; Modified    : Version 0.0, 11/06/08, MKC
;                 Adapted from eis cpt table difference.
;
; Version     : 0.0, 11/06/08
;-
;**********************************************************

FUNCTION eis_cpt_difference, table0, table1, DIFFERENCES=differences

  ; get array indicating if each value if different

  differences = table0 NE table1

  ; find no. of differences

  no_of_differences = TOTAL(differences)

  ; if tables are the same then difference measure is zero

  IF no_of_differences EQ 0 THEN RETURN, 0 ELSE RETURN, 1

END





