Index: trunk/ippScripts/scripts/register_exp.pl
===================================================================
--- trunk/ippScripts/scripts/register_exp.pl	(revision 15738)
+++ trunk/ippScripts/scripts/register_exp.pl	(revision 15740)
@@ -59,24 +59,39 @@
    [   
        #          PPSTATS KEYWORD         STATISTIC          CHIPTOOL FLAG
-       { name => "exp_name",       type => "constant",   flag => "-exp_name",       dtype => "string" }, # File level
-       { name => "telescope",      type => "constant",   flag => "-telescope",      dtype => "string" }, # File level
-       { name => "camera",         type => "constant",   flag => "-inst",           dtype => "string" }, # File level
-       { name => "filelevel",      type => "constant",   flag => "-filelevel",      dtype => "string" }, # File level
-       { name => "object",         type => "constant",   flag => "-object",         dtype => "string" },
-       { name => "exp_type",       type => "constant",   flag => "-exp_type",       dtype => "string" }, # File level
-       { name => "filter",         type => "constant",   flag => "-filter",         dtype => "string" }, # File level
-       { name => "dateobs",        type => "constant",   flag => "-dateobs",        dtype => "string" }, # File level
-       { name => "ccd_temp",       type => "mean",       flag => "-ccd_temp",       dtype => "float"  }, # CCD temperature
-       { name => "exp_time",       type => "mean",       flag => "-exp_time",       dtype => "float"  }, # Exposure time
-       { name => "sat_pixel_frac", type => "mean",       flag => "-sat_pixel_frac", dtype => "float"  }, # Fraction of saturated pixels
-       { name => "airmass",        type => "mean",       flag => "-airmass",        dtype => "float"  }, # Airmass
-       { name => "ra",             type => "mean",       flag => "-ra",             dtype => "float"  }, # Right ascension
-       { name => "decl",           type => "mean",       flag => "-decl",           dtype => "float"  }, # Declination
-       { name => "posang",         type => "mean",       flag => "-posang",         dtype => "float"  }, # Position angle
-       { name => "alt",            type => "mean",       flag => "-alt",            dtype => "float"  }, # Altitude
-       { name => "az",             type => "mean",       flag => "-az",             dtype => "float"  }, # Azimuth
-       { name => "bg",             type => "mean",       flag => "-bg",             dtype => "float"  }, # background
-       { name => "bg",             type => "stdev",      flag => "-bg_mean_stdev",  dtype => "float"  }, # Azimuth
-       { name => "bg_stdev",       type => "rms",        flag => "-bg_stdev",       dtype => "float"  }, # Azimuth
+       { name => "exp_name",        type => "constant",   flag => "-exp_name",        dtype => "string" }, # File level
+       { name => "telescope",       type => "constant",   flag => "-telescope",       dtype => "string" }, # File level
+       { name => "camera",          type => "constant",   flag => "-inst",            dtype => "string" }, # File level
+       { name => "filelevel",       type => "constant",   flag => "-filelevel",       dtype => "string" }, # File level
+       { name => "object",          type => "constant",   flag => "-object",          dtype => "string" },
+       { name => "exp_type",        type => "constant",   flag => "-exp_type",        dtype => "string" }, # File level
+       { name => "filter",          type => "constant",   flag => "-filter",          dtype => "string" }, # File level
+       { name => "dateobs",         type => "constant",   flag => "-dateobs",         dtype => "string" }, # File level
+       { name => "ccd_temp",        type => "mean",       flag => "-ccd_temp",        dtype => "float"  }, # CCD temperature
+       { name => "exp_time",        type => "mean",       flag => "-exp_time",        dtype => "float"  }, # Exposure time
+       { name => "sat_pixel_frac",  type => "mean",       flag => "-sat_pixel_frac",  dtype => "float"  }, # Fraction of saturated pixels
+       { name => "airmass",         type => "mean",       flag => "-airmass",         dtype => "float"  }, # Airmass
+       { name => "ra",              type => "mean",       flag => "-ra",              dtype => "float"  }, # Right ascension
+       { name => "decl",            type => "mean",       flag => "-decl",            dtype => "float"  }, # Declination
+       { name => "posang",          type => "mean",       flag => "-posang",          dtype => "float"  }, # Position angle
+       { name => "alt",             type => "mean",       flag => "-alt",             dtype => "float"  }, # Altitude
+       { name => "az",              type => "mean",       flag => "-az",              dtype => "float"  }, # Azimuth
+       { name => "M1_x",            type => "constant",   flag => "-M1_x",            dtype => "float"  }, # M1X
+       { name => "M1_y",            type => "constant",   flag => "-M1_y",            dtype => "float"  }, # M1Y
+       { name => "M1_z",            type => "constant",   flag => "-M1_z",            dtype => "float"  }, # M1Z
+       { name => "M1_tip",          type => "constant",   flag => "-M1_tip",          dtype => "float"  }, # M1TIP
+       { name => "M1_tilt",         type => "constant",   flag => "-M1_tilt",         dtype => "float"  }, # M1TILT
+       { name => "M2_x",            type => "constant",   flag => "-M2_x",            dtype => "float"  }, # M2X
+       { name => "M2_y",            type => "constant",   flag => "-M2_y",            dtype => "float"  }, # M2Y
+       { name => "M2_z",            type => "constant",   flag => "-M2_z",            dtype => "float"  }, # M2Z
+       { name => "M2_tip",          type => "constant",   flag => "-M2_tip",          dtype => "float"  }, # M2TIP
+       { name => "M2_tilt",         type => "constant",   flag => "-M2_tilt",         dtype => "float"  }, # M2TILT
+       { name => "env_temperature", type => "constant",   flag => "-env_temperature", dtype => "float"  }, # external temp
+       { name => "env_humidity",    type => "constant",   flag => "-env_humidity",    dtype => "float"  }, # external humidity
+       { name => "env_wind_speed",  type => "constant",   flag => "-env_wind_speed",  dtype => "float"  }, # external wind speed
+       { name => "env_wind_dir",    type => "constant",   flag => "-env_wind_dir",    dtype => "float"  }, # external wind direction
+       { name => "pon_time",        type => "constant",   flag => "-pon_time",        dtype => "float"  }, # time since last power on
+       { name => "bg",              type => "mean",       flag => "-bg",              dtype => "float"  }, # background
+       { name => "bg",              type => "stdev",      flag => "-bg_mean_stdev",   dtype => "float"  }, # Azimuth
+       { name => "bg_stdev",        type => "rms",        flag => "-bg_stdev",        dtype => "float"  }, # Azimuth
        ];
 my $stats = PS::IPP::Metadata::Stats->new($STATS); # Stats parser
Index: trunk/ippScripts/scripts/register_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/register_imfile.pl	(revision 15738)
+++ trunk/ippScripts/scripts/register_imfile.pl	(revision 15740)
@@ -64,24 +64,39 @@
    [   
        #          PPSTATS KEYWORD         STATISTIC          CHIPTOOL FLAG
-       { name => "FILE.LEVEL",     type => "constant", flag => "-filelevel",      dtype => "string" }, # File level
-       { name => "CLASS.ID",       type => "constant", flag => "-class_id",       dtype => "string" }, # Real Class ID
-       { name => "FPA.OBJECT",     type => "constant", flag => "-object",         dtype => "string" }, # Object
-       { name => "FPA.OBSTYPE",    type => "constant", flag => "-exp_type",       dtype => "string" }, # Exposure type
-       { name => "FPA.FILTER",     type => "constant", flag => "-filter",         dtype => "string" }, # Filter used
-       { name => "FPA.AIRMASS",    type => "constant", flag => "-airmass",        dtype => "float"  }, # Airmass
-       { name => "FPA.RA",         type => "constant", flag => "-ra",             dtype => "float"  }, # Right ascension
-       { name => "FPA.DEC",        type => "constant", flag => "-decl",           dtype => "float"  }, # Declination
-       { name => "FPA.ALT",        type => "constant", flag => "-alt",            dtype => "float"  }, # Altitude
-       { name => "FPA.AZ",         type => "constant", flag => "-az",             dtype => "float"  }, # Azimuth
-       { name => "FPA.POSANGLE",   type => "constant", flag => "-posang",         dtype => "float"  }, # Position angle
-       { name => "FPA.TIME",       type => "constant", flag => "-dateobs",        dtype => "string" }, # Date of observation (UTC)
-       { name => "FPA.TELESCOPE",  type => "constant", flag => "-telescope",      dtype => "string" }, # Telescope
-       { name => "FPA.INSTRUMENT", type => "constant", flag => "-inst",           dtype => "string" }, # Instrument 
-       { name => "CHIP.TEMP",      type => "mean",     flag => "-ccd_temp",       dtype => "float"  }, # CCD temperature
-       { name => "CELL.EXPOSURE",  type => "mean",     flag => "-exp_time",       dtype => "float"  }, # Exposure time
-       { name => "SAT_PIXEL_FRAC", type => "mean",     flag => "-sat_pixel_frac", dtype => "float"  }, # fraction of saturated pixels
-       { name => "ROBUST_MEDIAN",  type => "mean",     flag => "-bg",             dtype => "float"  },
-       { name => "ROBUST_MEDIAN",  type => "stdev",    flag => "-bg_mean_stdev",  dtype => "float"  },
-       { name => "ROBUST_STDEV",   type => "rms",      flag => "-bg_stdev",       dtype => "float"  },
+       { name => "FILE.LEVEL",     type => "constant", flag => "-filelevel",       dtype => "string" }, # File level
+       { name => "CLASS.ID",       type => "constant", flag => "-class_id",        dtype => "string" }, # Real Class ID
+       { name => "FPA.OBJECT",     type => "constant", flag => "-object",          dtype => "string" }, # Object
+       { name => "FPA.OBSTYPE",    type => "constant", flag => "-exp_type",        dtype => "string" }, # Exposure type
+       { name => "FPA.FILTER",     type => "constant", flag => "-filter",          dtype => "string" }, # Filter used
+       { name => "FPA.AIRMASS",    type => "constant", flag => "-airmass",         dtype => "float"  }, # Airmass
+       { name => "FPA.RA",         type => "constant", flag => "-ra",              dtype => "float"  }, # Right ascension
+       { name => "FPA.DEC",        type => "constant", flag => "-decl",            dtype => "float"  }, # Declination
+       { name => "FPA.ALT",        type => "constant", flag => "-alt",             dtype => "float"  }, # Altitude
+       { name => "FPA.AZ",         type => "constant", flag => "-az",              dtype => "float"  }, # Azimuth
+       { name => "FPA.POSANGLE",   type => "constant", flag => "-posang",          dtype => "float"  }, # Position angle
+       { name => "FPA.TIME",       type => "constant", flag => "-dateobs",         dtype => "string" }, # Date of observation (UTC)
+       { name => "FPA.TELESCOPE",  type => "constant", flag => "-telescope",       dtype => "string" }, # Telescope
+       { name => "FPA.INSTRUMENT", type => "constant", flag => "-inst",            dtype => "string" }, # Instrument 
+       { name => "FPA.M1X",        type => "constant", flag => "-M1_x",            dtype => "float"  }, # M1X
+       { name => "FPA.M1Y",        type => "constant", flag => "-M1_y",            dtype => "float"  }, # M1Y
+       { name => "FPA.M1Z",        type => "constant", flag => "-M1_z",            dtype => "float"  }, # M1Z
+       { name => "FPA.M1TIP",      type => "constant", flag => "-M1_tip",          dtype => "float"  }, # M1TIP
+       { name => "FPA.M1TILT",     type => "constant", flag => "-M1_tilt",         dtype => "float"  }, # M1TILT
+       { name => "FPA.M2X",        type => "constant", flag => "-M2_x",            dtype => "float"  }, # M2X
+       { name => "FPA.M2Y",        type => "constant", flag => "-M2_y",            dtype => "float"  }, # M2Y
+       { name => "FPA.M2Z",        type => "constant", flag => "-M2_z",            dtype => "float"  }, # M2Z
+       { name => "FPA.M2TIP",      type => "constant", flag => "-M2_tip",          dtype => "float"  }, # M2TIP
+       { name => "FPA.M2TILT",     type => "constant", flag => "-M2_tilt",         dtype => "float"  }, # M2TILT
+       { name => "FPA.ENV.TEMP",   type => "constant", flag => "-env_temperature", dtype => "float"  }, # external temp
+       { name => "FPA.ENV.HUMID",  type => "constant", flag => "-env_humidity",    dtype => "float"  }, # external humidity
+       { name => "FPA.ENV.WIND",   type => "constant", flag => "-env_wind_speed",  dtype => "float"  }, # external wind speed
+       { name => "FPA.ENV.DIR",    type => "constant", flag => "-env_wind_dir",    dtype => "float"  }, # external wind direction
+       { name => "FPA.PON.TIME",   type => "constant", flag => "-pon_time",        dtype => "float"  }, # time since last power on
+       { name => "CHIP.TEMP",      type => "mean",     flag => "-ccd_temp",        dtype => "float"  }, # CCD temperature
+       { name => "CELL.EXPOSURE",  type => "mean",     flag => "-exp_time",        dtype => "float"  }, # Exposure time
+       { name => "SAT_PIXEL_FRAC", type => "mean",     flag => "-sat_pixel_frac",  dtype => "float"  }, # fraction of saturated pixels
+       { name => "ROBUST_MEDIAN",  type => "mean",     flag => "-bg",              dtype => "float"  },
+       { name => "ROBUST_MEDIAN",  type => "stdev",    flag => "-bg_mean_stdev",   dtype => "float"  },
+       { name => "ROBUST_STDEV",   type => "rms",      flag => "-bg_stdev",        dtype => "float"  },
    ];
 my $stats = PS::IPP::Metadata::Stats->new($STATS); # Stats parser
