Index: /trunk/Cosmo/SimLSS/cmvdefsurv.cc
===================================================================
--- /trunk/Cosmo/SimLSS/cmvdefsurv.cc	(revision 3346)
+++ /trunk/Cosmo/SimLSS/cmvdefsurv.cc	(revision 3347)
@@ -367,8 +367,8 @@
 
  PlanckSpectra planck(T_CMB_Par);
- planck.SetApprox(1);  // Rayleigh spectra
- planck.SetVar(0); // frequency
- planck.SetUnitOut(0); // output en W/....
- planck.SetTypSpectra(0); // radiance W/m^2/Sr/Hz
+ planck.SetSpectraApprox(PlanckSpectra::RAYLEIGH);  // Rayleigh spectra
+ planck.SetSpectraVar(PlanckSpectra::NU); // frequency
+ planck.SetSpectraPower(PlanckSpectra::POWER); // output en W/....
+ planck.SetSpectraUnit(PlanckSpectra::ANGSFLUX); // radiance W/m^2/Sr/Hz
 
  // Signal
Index: /trunk/Cosmo/SimLSS/cmvtstblack.cc
===================================================================
--- /trunk/Cosmo/SimLSS/cmvtstblack.cc	(revision 3346)
+++ /trunk/Cosmo/SimLSS/cmvtstblack.cc	(revision 3347)
@@ -22,32 +22,44 @@
   //{compute_xroot(); return -41;}
  double T = 2.718, nutest=-1.;
- unsigned short deriv = 0;
+ unsigned short funcderiv = 0;
  double x0;
 
  if(narg>1) sscanf(arg[1],"%lf,%lf",&T,&nutest);
  if(T<=0.) T = 2.718;
- if(narg>2) sscanf(arg[2],"%hu",&deriv);
- if(deriv!=0) deriv = 1;
-
- cout<<"Temperature "<<T<<" K , deriv="<<deriv<<endl;
+ if(narg>2) sscanf(arg[2],"%hu",&funcderiv);
+ PlanckSpectra::SpectraFunc deriv = (funcderiv==0) ? PlanckSpectra::VALUE : PlanckSpectra::DERIV;
+
+ cout<<"Temperature "<<T<<" K , deriv="<<(int)deriv<<endl;
 
  //--------------------------------- Radiance Frequence
  // frequence planck radiance W/..
  PlanckSpectra pradf(T);
- pradf.SetDeriv(deriv); pradf.SetVar(0);
- pradf.SetApprox(0); pradf.SetTypSpectra(0); pradf.SetUnitOut(0);
- PlanckSpectra phpradf(pradf); phpradf.SetUnitOut(1);
+ pradf.SetSpectraFunc(deriv);
+ pradf.SetSpectraVar(PlanckSpectra::NU);
+ pradf.SetSpectraApprox(PlanckSpectra::PLANCK);
+ pradf.SetSpectraUnit(PlanckSpectra::ANGSFLUX);
+ pradf.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phpradf(pradf);
+ phpradf.SetSpectraPower(PlanckSpectra::PHOTON);
 
  // frequence rayleigh radiance W/..
  PlanckSpectra rradf(T);
- rradf.SetDeriv(deriv); rradf.SetVar(0);
- rradf.SetApprox(1); rradf.SetTypSpectra(0); rradf.SetUnitOut(0);
- PlanckSpectra phrradf(rradf); phrradf.SetUnitOut(1);
+ rradf.SetSpectraFunc(deriv);
+ rradf.SetSpectraVar(PlanckSpectra::NU);
+ rradf.SetSpectraApprox(PlanckSpectra::RAYLEIGH);
+ rradf.SetSpectraUnit(PlanckSpectra::ANGSFLUX);
+ rradf.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phrradf(rradf);
+ phrradf.SetSpectraPower(PlanckSpectra::PHOTON);
 
  // frequence wien radiance W/..
  PlanckSpectra wradf(T);
- wradf.SetDeriv(deriv); wradf.SetVar(0);
- wradf.SetApprox(2); wradf.SetTypSpectra(0); wradf.SetUnitOut(0);
- PlanckSpectra phwradf(wradf); phwradf.SetUnitOut(1);
+ wradf.SetSpectraFunc(deriv);
+ wradf.SetSpectraVar(PlanckSpectra::NU);
+ wradf.SetSpectraApprox(PlanckSpectra::WIEN);
+ wradf.SetSpectraUnit(PlanckSpectra::ANGSFLUX);
+ wradf.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phwradf(wradf);
+ phwradf.SetSpectraPower(PlanckSpectra::PHOTON);
 
  // Check
@@ -61,57 +73,93 @@
  // frequence planck density W/..
  PlanckSpectra pdensf(T);
- pdensf.SetDeriv(deriv); pdensf.SetVar(0);
- pdensf.SetApprox(0); pdensf.SetTypSpectra(2); pdensf.SetUnitOut(0);
- PlanckSpectra phpdensf(pdensf); phpdensf.SetUnitOut(1);
+ pdensf.SetSpectraFunc(deriv);
+ pdensf.SetSpectraVar(PlanckSpectra::NU);
+ pdensf.SetSpectraApprox(PlanckSpectra::PLANCK);
+ pdensf.SetSpectraUnit(PlanckSpectra::DENSENERG);
+ pdensf.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phpdensf(pdensf);
+ phpdensf.SetSpectraPower(PlanckSpectra::PHOTON);
 
  // frequence rayleigh density W/..
  PlanckSpectra rdensf(T);
- rdensf.SetDeriv(deriv); rdensf.SetVar(0);
- rdensf.SetApprox(1); rdensf.SetTypSpectra(2); rdensf.SetUnitOut(0);
- PlanckSpectra phrdensf(rdensf); phrdensf.SetUnitOut(1);
+ rdensf.SetSpectraFunc(deriv);
+ rdensf.SetSpectraVar(PlanckSpectra::NU);
+ rdensf.SetSpectraApprox(PlanckSpectra::RAYLEIGH);
+ rdensf.SetSpectraUnit(PlanckSpectra::DENSENERG);
+ rdensf.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phrdensf(rdensf);
+ phrdensf.SetSpectraPower(PlanckSpectra::PHOTON);
 
  // frequence wien density W/..
  PlanckSpectra wdensf(T);
- wdensf.SetDeriv(deriv); wdensf.SetVar(0);
- wdensf.SetApprox(2); wdensf.SetTypSpectra(2); wdensf.SetUnitOut(0);
- PlanckSpectra phwdensf(wdensf); phwdensf.SetUnitOut(1);
+ wdensf.SetSpectraFunc(deriv);
+ wdensf.SetSpectraVar(PlanckSpectra::NU);
+ wdensf.SetSpectraApprox(PlanckSpectra::WIEN);
+ wdensf.SetSpectraUnit(PlanckSpectra::DENSENERG);
+ wdensf.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phwdensf(wdensf);
+ phwdensf.SetSpectraPower(PlanckSpectra::PHOTON);
 
  //--------------------------------- Radiance Longeur d'onde
  // longueur d'onde planck radiance W/..
  PlanckSpectra pradl(T);
- pradl.SetDeriv(deriv); pradl.SetVar(1);
- pradl.SetApprox(0); pradl.SetTypSpectra(0); pradl.SetUnitOut(0);
- PlanckSpectra phpradl(pradl); phpradl.SetUnitOut(1);
+ pradl.SetSpectraFunc(deriv);
+ pradl.SetSpectraVar(PlanckSpectra::LAMBDA);
+ pradl.SetSpectraApprox(PlanckSpectra::PLANCK);
+ pradl.SetSpectraUnit(PlanckSpectra::ANGSFLUX);
+ pradl.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phpradl(pradl);
+ phpradl.SetSpectraPower(PlanckSpectra::PHOTON);
 
  // longueur d'onde rayleigh radiance W/..
  PlanckSpectra rradl(T);
- rradl.SetDeriv(deriv); rradl.SetVar(1);
- rradl.SetApprox(1); rradl.SetTypSpectra(0); rradl.SetUnitOut(0);
- PlanckSpectra phrradl(rradl); phrradl.SetUnitOut(1);
+ rradl.SetSpectraFunc(deriv);
+ rradl.SetSpectraVar(PlanckSpectra::LAMBDA);
+ rradl.SetSpectraApprox(PlanckSpectra::RAYLEIGH);
+ rradl.SetSpectraUnit(PlanckSpectra::ANGSFLUX);
+ rradl.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phrradl(rradl);
+ phrradl.SetSpectraPower(PlanckSpectra::PHOTON);
 
  // longueur d'onde wien radiance W/..
  PlanckSpectra wradl(T);
- wradl.SetDeriv(deriv); wradl.SetVar(1);
- wradl.SetApprox(2); wradl.SetTypSpectra(0); wradl.SetUnitOut(0);
- PlanckSpectra phwradl(wradl); phwradl.SetUnitOut(1);
+ wradl.SetSpectraFunc(deriv);
+ wradl.SetSpectraVar(PlanckSpectra::LAMBDA);
+ wradl.SetSpectraApprox(PlanckSpectra::WIEN);
+ wradl.SetSpectraUnit(PlanckSpectra::ANGSFLUX);
+ wradl.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phwradl(wradl);
+ phwradl.SetSpectraPower(PlanckSpectra::PHOTON);
 
  //--------------------------------- Densite Longeur d'onde
  // longueur d'onde planck density W/..
  PlanckSpectra pdensl(T);
- pdensl.SetDeriv(deriv); pdensl.SetVar(1);
- pdensl.SetApprox(0); pdensl.SetTypSpectra(2); pdensl.SetUnitOut(0);
- PlanckSpectra phpdensl(pdensl); phpdensl.SetUnitOut(1);
+ pdensl.SetSpectraFunc(deriv);
+ pdensl.SetSpectraVar(PlanckSpectra::LAMBDA);
+ pdensl.SetSpectraApprox(PlanckSpectra::PLANCK);
+ pdensl.SetSpectraUnit(PlanckSpectra::DENSENERG);
+ pdensl.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phpdensl(pdensl);
+ phpdensl.SetSpectraPower(PlanckSpectra::PHOTON);
 
  // longueur d'onde rayleigh density W/..
  PlanckSpectra rdensl(T);
- rdensl.SetDeriv(deriv); rdensl.SetVar(1);
- rdensl.SetApprox(1); rdensl.SetTypSpectra(2); rdensl.SetUnitOut(0);
- PlanckSpectra phrdensl(rdensl); phrdensl.SetUnitOut(1);
+ rdensl.SetSpectraFunc(deriv);
+ rdensl.SetSpectraVar(PlanckSpectra::LAMBDA);
+ rdensl.SetSpectraApprox(PlanckSpectra::RAYLEIGH);
+ rdensl.SetSpectraUnit(PlanckSpectra::DENSENERG);
+ rdensl.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phrdensl(rdensl);
+ phrdensl.SetSpectraPower(PlanckSpectra::PHOTON);
 
  // longueur d'onde wien density W/..
  PlanckSpectra wdensl(T);
- wdensl.SetDeriv(deriv); wdensl.SetVar(1);
- wdensl.SetApprox(2); wdensl.SetTypSpectra(2); wdensl.SetUnitOut(0);
- PlanckSpectra phwdensl(wdensl); phwdensl.SetUnitOut(1);
+ wdensl.SetSpectraFunc(deriv);
+ wdensl.SetSpectraVar(PlanckSpectra::LAMBDA);
+ wdensl.SetSpectraApprox(PlanckSpectra::WIEN);
+ wdensl.SetSpectraUnit(PlanckSpectra::DENSENERG);
+ wdensl.SetSpectraPower(PlanckSpectra::POWER);
+ PlanckSpectra phwdensl(wdensl);
+ phwdensl.SetSpectraPower(PlanckSpectra::PHOTON);
 
  //--------------------------------- Le maximum des spectres de planck
Index: /trunk/Cosmo/SimLSS/planckspectra.cc
===================================================================
--- /trunk/Cosmo/SimLSS/planckspectra.cc	(revision 3346)
+++ /trunk/Cosmo/SimLSS/planckspectra.cc	(revision 3347)
@@ -105,11 +105,12 @@
 //************************************************************************
 PlanckSpectra::PlanckSpectra(double T)
-  : T_(T) , approx_(0) , deriv_(0) , typvar_(0) , typspec_(0) , unitout_(0)
+  : T_(T) , spectraapprox_(PLANCK) , spectrafunc_(VALUE) , spectravar_(NU)
+  , spectraunit_(ANGSFLUX) , spectrapower_(POWER)
 {
 }
 
 PlanckSpectra::PlanckSpectra(PlanckSpectra& s)
-  : T_(s.T_) , approx_(s.approx_) , deriv_(s.deriv_) , typvar_(s.typvar_) , typspec_(s.typspec_)
-  , unitout_(s.unitout_)
+  : T_(s.T_) , spectraapprox_(s.spectraapprox_) , spectrafunc_(s.spectrafunc_) , spectravar_(s.spectravar_)
+  , spectraunit_(s.spectraunit_), spectrapower_(s.spectrapower_)
 {
 }
@@ -120,60 +121,40 @@
 
 //************************************************************************
-void PlanckSpectra::SetApprox(unsigned short approx)
-// approx = 0 : Planck spectra
-//        = 1 : Rayleigh spectra
-//        = 2 : Wien spectra
-{
-  if(approx>2) {
-    cout<<"PlanckSpectra::SetApprox : unknown approximation"<<endl;
-    throw ParmError("PlanckSpectra::SetApprox : unknown approximation");
-  }
-  approx_ = approx;
-}
-
-void PlanckSpectra::SetDeriv(unsigned short deriv)
-// deriv = 0 : spectra
-//       = 1 : derivative of spectra relative to temperature
-{
-  if(deriv>1) {
-    cout<<"PlanckSpectra::SetDeriv : parameter out of range"<<endl;
-    throw ParmError("PlanckSpectra::SetDeriv : parameter out of range");
-  }
-  deriv_ = deriv;
-}
-
-void PlanckSpectra::SetVar(unsigned short typvar)
-// typvar = 0 : variable is frequency (Hz)
-//        = 1 : variable is wavelength (m)
-{
-  if(typvar>1) {
-    cout<<"PlanckSpectra::SetVar : parameter out of range"<<endl;
-    throw ParmError("PlanckSpectra::SetVar : parameter out of range");
-  }
-  typvar_ = typvar;
-}
-
-void PlanckSpectra::SetUnitOut(unsigned short unitout)
-// unitout = 0 : in W/...
-//         = 1 : in photon/s/...
-{
-  if(unitout>1) {
-    cout<<"PlanckSpectra::SetUnitOut : parameter out of range"<<endl;
-    throw ParmError("PlanckSpectra::SetUnitOut : parameter out of range");
-  }
-  unitout_ = unitout;
-}
-
-void PlanckSpectra::SetTypSpectra(unsigned short typspec)
-// typspec = 0 : radiance   W/m^2/Sr/Hz  or ...
-//         = 1 : emittance  W/m^2/Hz     or ... 
-//         = 2 : density    J/m^3/Hz     or ...
-//         = 3 : just the function exp() or equivalent for Rayleigh
-{
-  if(typspec>3) {
-    cout<<"PlanckSpectra::SetTypSpectra : parameter out of range"<<endl;
-    throw ParmError("PlanckSpectra::SetTypSpectra : parameter out of range");
-  }
-  typspec_ = typspec;
+void PlanckSpectra::SetSpectraApprox(SpectraApprox spectraapprox)
+// spectraapprox = PLANCK   : Planck spectra
+//               = RAYLEIGH : Rayleigh spectra
+//               = WIEN     : Wien spectra
+{
+  spectraapprox_ = spectraapprox;
+}
+
+void PlanckSpectra::SetSpectraFunc(SpectraFunc spectrafunc)
+// spectrafunc = VALUE : spectra
+//             = DERIV : derivative of spectra relative to temperature
+{
+  spectrafunc_ = spectrafunc;
+}
+
+void PlanckSpectra::SetSpectraVar(SpectraVar spectravar)
+// spectravar = NU     : variable is frequency (Hz)
+//            = LAMBDA : variable is wavelength (m)
+{
+  spectravar_ = spectravar;
+}
+
+void PlanckSpectra::SetSpectraPower(SpectraPower spectrapower)
+// spectrapower = POWER : in W/...
+//              = PHOTON : in photon/s/...
+{
+  spectrapower_ = spectrapower;
+}
+
+void PlanckSpectra::SetSpectraUnit(SpectraUnit spectraunit)
+// spectraunit = ANGSFLUX  : radiance   W/m^2/Sr/Hz  or ...
+//             = SFLUX     : emittance  W/m^2/Hz     or ... 
+//             = DENSENERG : density    J/m^3/Hz     or ...
+//             = EXPON     : just the function exp() or equivalent for Rayleigh
+{
+  spectraunit_ = spectraunit;
 }
 
@@ -190,11 +171,11 @@
 double PlanckSpectra::PlanckExp(double fl)
 {
-  double x = (typvar_) ? HCsK_/(fl*T_) : HsK_*fl/T_;
-
-  if(approx_ == 1) return 1./x;  // Rayleigh
+  double x = (spectravar_==LAMBDA) ? HCsK_/(fl*T_) : HsK_*fl/T_;
+
+  if(spectraapprox_ == RAYLEIGH) return 1./x;  // Rayleigh
 
   if(x>MAXARGEXP) return 0.;
 
-  if(approx_ == 2) return exp(-x);  // Wien
+  if(spectraapprox_ == WIEN) return exp(-x);  // Wien
 
   if(x<MINARGEXP) return 1./(x*(1.+x/2.));
@@ -204,11 +185,12 @@
 double PlanckSpectra::DPlanckExp_DT(double fl)
 {
-  if(approx_ == 1) return (typvar_) ? fl/HCsK_: 1. / (HsK_*fl);  // Rayleigh
-
-  double x = (typvar_) ? HCsK_/(fl*T_) : HsK_*fl/T_;
+  if(spectraapprox_ == RAYLEIGH)
+    return (spectravar_==LAMBDA) ? fl/HCsK_: 1. / (HsK_*fl);  // Rayleigh
+
+  double x = (spectravar_==LAMBDA) ? HCsK_/(fl*T_) : HsK_*fl/T_;
 
   if(x>MAXARGEXP) return 0.;
 
-  if(approx_ == 2) return x/T_ * exp(-x);  // Wien
+  if(spectraapprox_ == WIEN) return x/T_ * exp(-x);  // Wien
 
   double v;
@@ -225,17 +207,18 @@
 {
   // --- type de spectre et d'approximation selon choix variable
-  double fex = (deriv_) ? DPlanckExp_DT(x): PlanckExp(x);
+  double fex = (spectrafunc_==DERIV) ? DPlanckExp_DT(x): PlanckExp(x);
 
   // --- le coefficient multiplicateur devant l'expo
-  if(typspec_ == 3) return fex;  // expo seule
-
-  // radiance en ph/...       longeur d'onde         frequency
-  double coeff = (typvar_) ? 2.*CinM_/(x*x*x*x): 2.*x*x/(CinM_*CinM_);
-
-  if(typspec_ == 1)      coeff *= M_PI;  // emittance en ph/...
-  else if(typspec_ == 2) coeff *= 4.*M_PI/CinM_;  // densite en ph/...
-
-  // unite en W/...                       longeur d'onde         frequency
-  if(unitout_ == 0) coeff *= (typvar_) ? h_Planck_Cst*CinM_/x: h_Planck_Cst*x;
+  if(spectraunit_ == EXPON) return fex;  // expo seule
+
+  // radiance en ph/...               longeur d'onde         frequency
+  double coeff = (spectravar_==LAMBDA) ? 2.*CinM_/(x*x*x*x): 2.*x*x/(CinM_*CinM_);
+
+  if(spectraunit_ == SFLUX)      coeff *= M_PI;  // emittance en ph/...
+  else if(spectraunit_ == DENSENERG) coeff *= 4.*M_PI/CinM_;  // densite en ph/...
+
+  // unite en W/...                longeur d'onde         frequency
+  if(spectrapower_ == POWER)
+    coeff *= (spectravar_==LAMBDA) ? h_Planck_Cst*CinM_/x: h_Planck_Cst*x;
 
   return coeff * fex;
@@ -274,32 +257,32 @@
 {
   double x=-1.;
-  if(typvar_ == 0) { // Frequence
-    if(deriv_ == 0) {  // Le spectre
-      if(unitout_ == 0) //  W/...
-        {if(approx_==0) x=2.82143938074; else if(approx_==2) x=3.;}
-      else if(unitout_ == 1) //  Ph/s/...
-        {if(approx_==0) x=1.59362426; else if(approx_==2) x=2.;}
-    } else if(deriv_ == 1) {  // La derivee du spectre
-      if(unitout_ == 0) //  W/... 
-        {if(approx_==0) x=3.830016095; else if(approx_==2) x=4.;}
-      else if(unitout_ == 1) //  Ph/s/...
-        {if(approx_==0) x=2.575678888; else if(approx_==2) x=3.;}
+  if(spectravar_ == NU) { // Frequence
+    if(spectrafunc_ == VALUE) {  // Le spectre
+      if(spectrapower_ == POWER) //  W/...
+        {if(spectraapprox_==PLANCK) x=2.82143938074; else if(spectraapprox_==WIEN) x=3.;}
+      else if(spectrapower_ == PHOTON) //  Ph/s/...
+        {if(spectraapprox_==PLANCK) x=1.59362426; else if(spectraapprox_==WIEN) x=2.;}
+    } else if(spectrafunc_ == DERIV) {  // La derivee du spectre
+      if(spectrapower_ == POWER) //  W/... 
+        {if(spectraapprox_==PLANCK) x=3.830016095; else if(spectraapprox_==WIEN) x=4.;}
+      else if(spectrapower_ == PHOTON) //  Ph/s/...
+        {if(spectraapprox_==PLANCK) x=2.575678888; else if(spectraapprox_==WIEN) x=3.;}
     }
   } else { // Longeur d'onde
-    if(deriv_ == 0) {  // Le spectre
-      if(unitout_ == 0) //  W/...
-        {if(approx_==0) x=4.96511420; else if(approx_==2) x=5.;}
-      else if(unitout_ == 1) //  Ph/s/...
-        {if(approx_==0) x=3.9206904099; else if(approx_==2) x=4.;}
-    } else if(deriv_ == 1) {  // La derivee du spectre
-      if(unitout_ == 0) //  W/...
-        {if(approx_==0) x=5.969409190; else if(approx_==2) x=6.;}
-     else if(unitout_ == 1) //  Ph/s/...
-        {if(approx_==0) x=4.928119345; else if(approx_==2) x=5.;}
+    if(spectrafunc_ == VALUE) {  // Le spectre
+      if(spectrapower_ == POWER) //  W/...
+        {if(spectraapprox_==PLANCK) x=4.96511420; else if(spectraapprox_==WIEN) x=5.;}
+      else if(spectrapower_ == PHOTON) //  Ph/s/...
+        {if(spectraapprox_==PLANCK) x=3.9206904099; else if(spectraapprox_==WIEN) x=4.;}
+    } else if(spectrafunc_ == DERIV) {  // La derivee du spectre
+      if(spectrapower_ == POWER) //  W/...
+        {if(spectraapprox_==PLANCK) x=5.969409190; else if(spectraapprox_==WIEN) x=6.;}
+     else if(spectrapower_ == PHOTON) //  Ph/s/...
+        {if(spectraapprox_==PLANCK) x=4.928119345; else if(spectraapprox_==WIEN) x=5.;}
     }
   }
 
   if(x<0.) return x;  // Rayleigh n'a pas de maximum
-  if(typvar_ == 0) return x / HsK_ *T_; // Frequence
+  if(spectravar_ == NU) return x / HsK_ *T_; // Frequence
   return HCsK_ / x /T_; // Longeur d'onde
 }
@@ -308,5 +291,5 @@
 // Retourne le maximum des spectres (a la precicion eps)
 {
-  if(approx_ == 1) {  // Pas de maximum pour les spectres de Raleigh
+  if(spectraapprox_ == RAYLEIGH) {  // Pas de maximum pour les spectres de Raleigh
     cout<<"PlanckSpectra::FindMaximum : no maximum for Raleigh spectra"<<endl;
     throw ParmError("PlanckSpectra::FindMaximum : no maximum for Raleigh spectra");
Index: /trunk/Cosmo/SimLSS/planckspectra.h
===================================================================
--- /trunk/Cosmo/SimLSS/planckspectra.h	(revision 3346)
+++ /trunk/Cosmo/SimLSS/planckspectra.h	(revision 3347)
@@ -10,4 +10,11 @@
 class PlanckSpectra : public GenericFunc {
 public:
+
+  typedef enum {PLANCK=0, RAYLEIGH=1, WIEN=2} SpectraApprox;
+  typedef enum {POWER=0, PHOTON=1} SpectraPower;
+  typedef enum {VALUE=0, DERIV=1} SpectraFunc;
+  typedef enum {NU=0, LAMBDA=1} SpectraVar;
+  typedef enum {ANGSFLUX=0, SFLUX=1, DENSENERG=2, EXPON=3} SpectraUnit;
+
   PlanckSpectra(double T);
   PlanckSpectra(PlanckSpectra& s);
@@ -17,9 +24,9 @@
   inline double GetTemperature(void) {return T_;}
 
-  void SetApprox(unsigned short approx=0);
-  void SetDeriv(unsigned short deriv=0);
-  void SetVar(unsigned short typvar=0);
-  void SetTypSpectra(unsigned short typspec=0);
-  void SetUnitOut(unsigned short unitout=0);
+  void SetSpectraApprox(SpectraApprox spectraapprox=PLANCK);
+  void SetSpectraFunc(SpectraFunc spectrafunc=VALUE);
+  void SetSpectraVar(SpectraVar spectravar=NU);
+  void SetSpectraUnit(SpectraUnit spectraunit=ANGSFLUX);
+  void SetSpectraPower(SpectraPower spectrapower=POWER);
 
 
@@ -34,5 +41,9 @@
 protected:
   double T_;
-  unsigned short approx_,deriv_,typvar_,typspec_,unitout_;
+  SpectraApprox spectraapprox_;
+  SpectraFunc spectrafunc_;
+  SpectraVar spectravar_;
+  SpectraUnit spectraunit_;
+  SpectraPower spectrapower_;
 
   double PlanckExp(double fl);
