CDF_EPOCH_DIFF -------------- The CDF_EPOCH_DIFF function computes the difference between the source epoch, either a scalar or an array of epoch values (date and time), against a base epoch, also a scalar or an array of values. The epoch can be one of the CDF formats, CDF_EPOCH, CDF_EPOCH16 or CDF_TIME_TT2000. While data of type CDF_EPOCH and CDF_EPOCH16 can be compared with each other, data in CDF_TIME_TT2000 can only be compared with the data of the same type. If the base epoch is a scalar, it is used to compute the differences with all values in the source epoch. If the base epoch is an array, same element in the source and base epoch array is compared. It returns a scalar value or an array of values, depending on the source epoch, in milliseconds or microseconds for CDF_EPOCH and CDF_EPOCH16 data types, or nanoseconds for CDF_TIME_TT2000 data type. Syntax Result = CDF_EPOCH_DIFF(epoch1, epoch2 [,/MILLI_SECONDS | ,/MICRO_SECONDS]) Arguments epoch1 A single or an array epoch value(s) returned from call to CDF_EPOCH,/compute, or CDF_EPOCH16,/compute for CDF_EPOCH or CDF_EPOCH16 data type, or CDF_TT2000,/compute for CDF_TIME_TT2000 data type, CDF_VARGET, or CDF_VARGET1. epoch2 A single or an array epoch value(s) returned from call to CDF_EPOCH,/compute, or CDF_EPOCH16,/compute for CDF_EPOCH or CDF_EPOCH16 data type, or CDF_TT2000,/compute for CDF_TIME_TT2000 data type, CDF_VARGET, or CDF_VARGET1. Keywords MILLI_SECONDS The default for CDF_EPOCH and CDF_EPOCH16 data comparison and not applicable to CDF_TIME_TT2000 data type. The resolution is in milliseconds. It indicates that the sub-millisecond portions are ignored for CDF_EPOCH16 data type. It has no effect to CDF_EPOCH data type. MICRO_SECONDS The resolution is in microseconds and the sub-microseconds portions of the data are ignored for CDF_EPOCH16 data type. CDF_EPOCH data is expanded to microseconds, but is not applicable to CDF_TIME_TT2000. Examples ; For CDF_EPOCH data type cdf_varget, id, "Epoch", ep, rec_count=1000,/zvariable cdf_epoch, base, 2005,6,1,10,18,17,2,/compute ret= cdf_epoch_diff(ep,base) help, ret ; For CDF_TIME_TT2000 cdf_varget, id2, "Epoch", ep2, rec_count=1000,/zvariable cdf_tt2000, base2, 2005,6,1,10,18,17,2,3,4,/compute ret2= cdf_epoch_diff(ep2,base2) help, ret2 Version History Introduced: CDF V3.4.0