This page was created by the IDL library routine `mk_html_help2`.

Last modified: Thu Jun 7 01:15:08 2007.

# Directory Listing of Routines

# ssl_general/misc/thm_time_check

- THM_DISCRETE_DERIVATIVE
- THM_GET_MNEM_FILE
- THM_TIME_CHECK
- THM_TIME_LIST
- THM_TIME_LIST_DIR
- THM_UNION
- THM_VARIABLE_DEFINED
- THM_WRITE_DERIVATIVE_LIMITS
- THM_WRITE_LIMS_DIR

# Routine Descriptions

## THM_DISCRETE_DERIVATIVE

[Next Routine] [List of Routines]

    FUNCTION: discrete_derivative
    PURPOSE:   takes a length n array and returns a length n-1 array with
    each element of the return array representing the ith-(i-1th) element
    of that array
    INPUT:
       a = the array on which the check is done
       b = name var to return result in
    KEYWORDS:
       none

    EXAMPLE: discrete_derivative,a,b

    CREATED BY:    Patrick Cruce (cruce@gmail.com)

(See ssl_general/misc/thm_time_check/thm_discrete_derivative.pro)

## THM_GET_MNEM_FILE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:     get_mnem_file
    PURPOSE:   gets every value of a 1-d mnemonic from a file
    INPUT:
       filename: The name of the file from which the values should be
       acquired
       mnem: the mnem from which the values should be acquired
       a: the named var in which values should be stored

    KEYWORDS:
       none

    EXAMPLE: get_mnem_file,'filename','mnem',a

    CREATED BY:    Patrick Cruce (pcruce@gmail.com)

(See ssl_general/misc/thm_time_check/thm_get_mnem_file.pro)

## THM_TIME_CHECK

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:     time_check.pro
    PURPOSE:   prints information about gaps between timestamps in cdf files
    INPUT:
       dir: The directory in which to search for cdfs
       out: the output directory for the limit files
       LIM: reassign the limit if you want it is a 2 element array
       MNEM: optional regex to filter timestamp mnems
    KEYWORDS:
       none

    COMMENTS: Will check all timestamps for all cdfs in the directory and
    output a seperate file for each type of timestamp.
    File format is:
    timestamp1 timestamp2 gap_size record_number

    currently it signals a gap if a gap is over 180 seconds or negative

    EXAMPLE: time_check,'/','/dev/null'

    CREATED BY:    Patrick Cruce (pcruce@gmail.com)

(See ssl_general/misc/thm_time_check/thm_time_check.pro)

## THM_TIME_LIST

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:     time_list
    PURPOSE:   lists the timestamp mnemonics for in a cdf file
    INPUT:
       filename: The name of the file to be checked, or no filename to
       get dialog
       in: a named var to return the array of time names in
    KEYWORDS:
       none

    EXAMPLE: time_list,'filename'

    CREATED BY:    Patrick Cruce (pcruce@gmail.com)

(See ssl_general/misc/thm_time_check/thm_time_list.pro)

## THM_TIME_LIST_DIR

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:     time_list_dir
    PURPOSE:   lists the union of timestamp mnemonics for all cdfs in a directory
    INPUT:
       list: a list of files to be searched
       in: a named var to return the array of time names in
    KEYWORDS:
       none

    EXAMPLE: time_list_dir,'dirname'

    CREATED BY:    Patrick Cruce (pcruce@gmail.com)

(See ssl_general/misc/thm_time_check/thm_time_list_dir.pro)

## THM_UNION

[Previous Routine] [Next Routine] [List of Routines]

    FUNCTION:     union
    PURPOSE: returns the union of two arrays,elements returned sorted
             runs in O(nlogn)

    INPUT:
       a:the first array
       b:the second array
    KEYWORDS:
       none

    EXAMPLE: c = union(a,b)

    CREATED BY:    Patrick Cruce (pcruce@gmail.com)

(See ssl_general/misc/thm_time_check/thm_union.pro)

## THM_VARIABLE_DEFINED

[Previous Routine] [Next Routine] [List of Routines]

    FUNCTION:     variable_defined
    PURPOSE:   checks to see if a variable is defined in a given cdf file
    INPUT:
       file: the name of the file
       mnem: the name of the mnem
    OUTPUT:
       returns 1 if yes 0 if no
    KEYWORDS:
       none

    EXAMPLE: b=variable_defined('filename','variable')

    CREATED BY:    Patrick Cruce (pcruce@gmail.com)

(See ssl_general/misc/thm_time_check/thm_variable_defined.pro)

## THM_WRITE_DERIVATIVE_LIMITS

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:     write_derivative_limits
    PURPOSE:   takes the discrete derivative of a 1-d input array, and
    writes an entry to a specified file whenever that derivative is out
    of range
     output format is:
     v e1 e2 d i
     where:
     v= -1 if d le lim[0] and 1 if d gt lim[1]
     e1 = the preceding element to the boundary violation
     e2 = the following element
     d = e2-e1 or the difference that generated the violation
     i = the approximate record entry where the violation occurred
    INPUT:
       file: the file to be written
       a: the array to be analysed
       lim: 2-element array with format [low,high] representing interval [low,high)
    KEYWORDS:
       none

    EXAMPLE: write_derivative_limits,file,a,lim

    CREATED BY:    Patrick Cruce (pcruce@gmail.com)

(See ssl_general/misc/thm_time_check/thm_write_derivative_limits.pro)

## THM_WRITE_LIMS_DIR

[Previous Routine] [List of Routines]

    PROCEDURE:     write_lims_dir
    PURPOSE:   searches all the cdfs in a directory and writes the
    results of a limit check over the discrete derivative of the
    specified mnem in a file
    INPUT:
       dir: The directory in which to search for cdfs
       mnem: the mnemonic to be acquired
       lim: a 2-element array specifying the required limits
       out: the output directory for the limit file
    KEYWORDS:
       none

    EXAMPLE: write_lims_dir,'in_directory','out_directory','mnem_name',[0.0,1.0]

    CREATED BY:    Patrick Cruce (pcruce@gmail.com)

(See ssl_general/misc/thm_time_check/thm_write_lims_dir.pro)