Skip to content

ndi.setup.conv.marder.preptemp

  PREPTEMP - identify temperature parameters for a temperature record

  OUT = PREPTEMP(T, D, TEMP_TABLE, ...)

  Identify the temperature of a Marder lab record. The timestamps of the
  record are provided in T, and the data in degrees C are provided in
  D.

  The program attempts to identify which of several command temperatures
  in TEMP_TABLE are employed in the record.

  The record is categorized as 'constant' or 'change' if the record exhibits
  a change greater than 'change_threshold'.

  OUT is a structure with fields:
    'type':  takes the value 'constant or 'change'
    'temp': that contains the values in TEMP_TABLE that most closely match
            the record. In the case of a 'constant' record,
            'temp' will have one value; in the case of a 'change' record,
            it will have two values (the beginning and end values).
    'raw':  the raw temperature values before they are translated to
            table entries.
  'range':  the observed temperature range


  The function takes name/value pairs that modify its default behavior:
  |----------------------------|--------------------------------------|
  | Parameter (default)        | Description                          |
  |----------------------------|--------------------------------------|
  | change_threshold (3)       | Threshold at which to describe the   |
  |                            |   record as a 'change'.              |
  | beginning_time (2)         | Time in seconds that constitutes the |
  |                            |   beginning of the record.           |
  | ending_time (2)            | Time in seconds from the end of the  |
  |                            |   record that constitutes the ending |
  |                            |   time to be averaged.               |
  | filter ( ones(5,1)/5 )     | A convolution filter to smooth data  |
  | interactive (false)        | Should we ask the user for input?    |
  |----------------------------|--------------------------------------|