Index: /trunk/psModules/src/concepts/pmConcepts.c
===================================================================
--- /trunk/psModules/src/concepts/pmConcepts.c	(revision 15769)
+++ /trunk/psModules/src/concepts/pmConcepts.c	(revision 15770)
@@ -505,4 +505,11 @@
         }
 
+        // FPA.COMMENT
+        {
+            psMetadataItem *item = psMetadataItemAllocStr("FPA.COMMENT", "Obs Comment", "");
+            pmConceptRegister(item, NULL, NULL, false, PM_FPA_LEVEL_FPA);
+            psFree(item);
+        }
+
         // FPA.FOCUS
         {
@@ -697,4 +704,36 @@
             psMetadataItem *item = psMetadataItemAllocF32("FPA.ENV.DIR", "Environment: Wind Direction", NAN);
             pmConceptRegister(item, NULL, NULL, false, PM_FPA_LEVEL_FPA);
+            psFree(item);
+        }
+
+        // FPA.TELTEMP.*
+        {
+            psMetadataItem *item = psMetadataItemAllocF32("FPA.TELTEMP.M1", "Telescope Temperatures: M1", NAN);
+            pmConceptRegister(item, p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
+            psFree(item);
+        }
+        {
+            psMetadataItem *item = psMetadataItemAllocF32("FPA.TELTEMP.M1CELL", "Telescope Temperatures: M1 CELL", NAN);
+            pmConceptRegister(item, p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
+            psFree(item);
+        }
+        {
+            psMetadataItem *item = psMetadataItemAllocF32("FPA.TELTEMP.M2", "Telescope Temperatures: M2", NAN);
+            pmConceptRegister(item, p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
+            psFree(item);
+        }
+        {
+            psMetadataItem *item = psMetadataItemAllocF32("FPA.TELTEMP.SPIDER", "Telescope Temperatures: SPIDER", NAN);
+            pmConceptRegister(item, p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
+            psFree(item);
+        }
+        {
+            psMetadataItem *item = psMetadataItemAllocF32("FPA.TELTEMP.TRUSS", "Telescope Temperatures: TRUSS", NAN);
+            pmConceptRegister(item, p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
+            psFree(item);
+        }
+        {
+            psMetadataItem *item = psMetadataItemAllocF32("FPA.TELTEMP.EXTRA", "Telescope Temperatures: EXTRA", NAN);
+            pmConceptRegister(item, p_pmConceptParse_TELTEMPS, NULL, false, PM_FPA_LEVEL_FPA);
             psFree(item);
         }
Index: /trunk/psModules/src/concepts/pmConceptsStandard.c
===================================================================
--- /trunk/psModules/src/concepts/pmConceptsStandard.c	(revision 15769)
+++ /trunk/psModules/src/concepts/pmConceptsStandard.c	(revision 15770)
@@ -45,4 +45,58 @@
     psAbort("Should never ever get here.\n");
     return NAN;
+}
+
+// TELTEMPS : parse a list of the form 'X1 X2 X3 X4 X5 ...' : for now use median
+psMetadataItem *p_pmConceptParse_TELTEMPS(const psMetadataItem *concept,
+					  const psMetadataItem *pattern,
+					  pmConceptSource source,
+					  const psMetadata *cameraFormat,
+					  const pmFPA *fpa,
+					  const pmChip *chip,
+					  const pmCell *cell)
+{
+    assert(concept);
+    assert(pattern);
+
+    double value = NAN;
+    switch (concept->type) {
+      case PS_TYPE_F32:
+        value = concept->data.F32;
+        break;
+      case PS_TYPE_F64:
+        value = concept->data.F64;
+        break;
+      case PS_DATA_STRING: {
+	  // parse the list of values into an array of substrings
+	  psArray *strValues = psStringSplitArray (concept->data.V, " ,;", false);
+	  assert (strValues);
+
+	  // convert the substrings into a vector
+	  psVector *fltValues = psVectorAlloc (strValues->n, PS_DATA_F32);
+	  for (int i = 0; i < strValues->n; i++) {
+	      fltValues->data.F32[i] = atof(strValues->data[i]);
+	  }
+
+	  // take the (for now) MEDIAN of the data
+	  psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN);
+
+	  if (!psVectorStats (stats, fltValues, NULL, NULL, 0)) {
+	      psAbort ("how can this stats function fail?");
+	  }
+    
+	  value = stats->sampleMedian;
+	  psFree (stats);
+	  psFree (fltValues);
+	  psFree (strValues);
+	  break;
+      }
+
+      default:
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Invalid type for %s (%x)\n", pattern->name, concept->type);
+        return NULL;
+    }
+
+    psMetadataItem *item = psMetadataItemAllocF32(pattern->name, pattern->comment, value);
+    return (item);
 }
 
Index: /trunk/psModules/src/concepts/pmConceptsStandard.h
===================================================================
--- /trunk/psModules/src/concepts/pmConceptsStandard.h	(revision 15769)
+++ /trunk/psModules/src/concepts/pmConceptsStandard.h	(revision 15770)
@@ -4,6 +4,6 @@
  * @author Paul Price, IfA
  *
- * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-10-12 03:18:11 $
+ * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-12-08 03:15:37 $
  * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
  */
@@ -18,4 +18,13 @@
 psList *p_pmConceptParseRegions(const char *region ///< Regions, separated by whitespace
     );
+
+// Parse the TELTEMPS concept : parse a list of the form 'X1 X2 X3 X4 X5 ...' : for now use median
+psMetadataItem *p_pmConceptParse_TELTEMPS(const psMetadataItem *concept,
+					  const psMetadataItem *pattern,
+					  pmConceptSource source,
+					  const psMetadata *cameraFormat,
+					  const pmFPA *fpa,
+					  const pmChip *chip,
+					  const pmCell *cell);
 
 /// Parse the FPA.FILTER concept to apply a lookup table
