Index: /trunk/SophyaPI/PIext/Makefile
===================================================================
--- /trunk/SophyaPI/PIext/Makefile	(revision 2612)
+++ /trunk/SophyaPI/PIext/Makefile	(revision 2613)
@@ -17,7 +17,20 @@
  
 $(OBJ)basexecut.o: basexecut.cc piacmd.h \
- $(INC)machdefs.h dlftypes.h \
+ $(INC)machdefs.h \
+ $(INC)commander.h \
  $(INC)pdlmgr.h \
- $(INC)ctimer.h basexecut.h pistdimgapp.h \
+ $(INC)dvlist.h \
+ $(INC)objfio.h \
+ $(INC)anydataobj.h \
+ $(INC)ppersist.h \
+ $(INC)pexceptions.h \
+ $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
+ $(INC)mutyv.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h dlftypes.h basexecut.h \
+ $(INC)strutilxx.h pistdimgapp.h \
  $(INC)pisysdep.h \
  $(INC)piapplx.h \
@@ -71,45 +84,47 @@
  $(INC)pi3dwdg.h \
  $(INC)pi3ddrw.h \
- $(INC)pigraph3d.h nobjmgr.h \
- $(INC)anydataobj.h \
- $(INC)ppersist.h \
- $(INC)pexceptions.h \
- $(INC)gnumd5.h \
- $(INC)dvlist.h \
- $(INC)objfio.h \
- $(INC)mutyv.h pisiadw.h \
+ $(INC)pigraph3d.h nobjmgr.h pisiadw.h \
  $(INC)pilistx.h \
  $(INC)pilistgen.h \
  $(INC)pistzwin.h \
  $(INC)pitherm.h \
- $(INC)resusage.h servnobjm.h \
+ $(INC)resusage.h servnobjm.h nomgadapter.h \
+ $(INC)ntupintf.h \
+ $(INC)generalfit.h \
+ $(INC)tvector.h \
+ $(INC)tmatrix.h \
+ $(INC)tarray.h \
+ $(INC)basarr.h \
+ $(INC)ndatablock.h \
+ $(INC)utilarr.h \
+ $(INC)generaldata.h \
+ $(INC)poly.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)perrors.h \
+ $(INC)fmath.h \
+ $(INC)piyfxdrw.h \
+ $(INC)pibargraph.h \
+ $(INC)pitxtdrw.h \
  $(INC)histos.h \
- $(INC)peida.h \
- $(INC)utils.h \
- $(INC)perrors.h \
- $(INC)fmath.h \
- $(INC)tvector.h \
- $(INC)tmatrix.h \
- $(INC)tarray.h \
- $(INC)basarr.h \
- $(INC)ndatablock.h \
- $(INC)utilarr.h \
  $(INC)histos2.h \
  $(INC)hisprof.h \
- $(INC)ntuple.h \
- $(INC)ntupintf.h \
- $(INC)generaldata.h \
- $(INC)poly.h
+ $(INC)ntuple.h
 $(OBJ)contmodex.o: contmodex.cc contmodex.h \
- $(INC)machdefs.h piacmd.h dlftypes.h \
+ $(INC)machdefs.h piacmd.h \
+ $(INC)commander.h \
  $(INC)pdlmgr.h \
- $(INC)ctimer.h nobjmgr.h \
+ $(INC)dvlist.h \
+ $(INC)objfio.h \
  $(INC)anydataobj.h \
  $(INC)ppersist.h \
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
- $(INC)dvlist.h \
- $(INC)objfio.h \
- $(INC)mutyv.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
+ $(INC)mutyv.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h dlftypes.h nobjmgr.h \
  $(INC)pigncont.h \
  $(INC)pistdimgapp.h \
@@ -197,14 +212,19 @@
  $(INC)fmath.h servnobjm.h
 $(OBJ)cxxexecutor.o: cxxexecutor.cc cxxexecutor.h \
- $(INC)machdefs.h piacmd.h dlftypes.h \
+ $(INC)machdefs.h piacmd.h \
+ $(INC)commander.h \
  $(INC)pdlmgr.h \
- $(INC)ctimer.h nobjmgr.h \
+ $(INC)dvlist.h \
+ $(INC)objfio.h \
  $(INC)anydataobj.h \
  $(INC)ppersist.h \
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
- $(INC)dvlist.h \
- $(INC)objfio.h \
- $(INC)mutyv.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
+ $(INC)mutyv.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h dlftypes.h nobjmgr.h \
  $(INC)strutilxx.h \
  $(INC)cxxcmplnk.h nomgadapter.h \
@@ -281,15 +301,20 @@
  $(INC)resusage.h
 $(OBJ)cxxexecwin.o: cxxexecwin.cc cxxexecutor.h \
- $(INC)machdefs.h piacmd.h dlftypes.h \
+ $(INC)machdefs.h piacmd.h \
+ $(INC)commander.h \
  $(INC)pdlmgr.h \
- $(INC)ctimer.h nobjmgr.h \
+ $(INC)dvlist.h \
+ $(INC)objfio.h \
  $(INC)anydataobj.h \
  $(INC)ppersist.h \
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
- $(INC)dvlist.h \
- $(INC)objfio.h \
- $(INC)mutyv.h cxxexecwin.h \
- $(INC)pisysdep.h pistdimgapp.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
+ $(INC)mutyv.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h dlftypes.h nobjmgr.h \
+ cxxexecwin.h $(INC)pisysdep.h pistdimgapp.h \
  $(INC)piapplx.h \
  $(INC)piapplgen.h \
@@ -349,15 +374,20 @@
  $(INC)resusage.h
 $(OBJ)flowmodex.o: flowmodex.cc flowmodex.h \
- $(INC)machdefs.h piacmd.h dlftypes.h \
+ $(INC)machdefs.h piacmd.h \
+ $(INC)commander.h \
  $(INC)pdlmgr.h \
- $(INC)ctimer.h nobjmgr.h \
+ $(INC)dvlist.h \
+ $(INC)objfio.h \
  $(INC)anydataobj.h \
  $(INC)ppersist.h \
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
- $(INC)dvlist.h \
- $(INC)objfio.h \
- $(INC)mutyv.h pi2dvec.h pistdimgapp.h \
- $(INC)pisysdep.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
+ $(INC)mutyv.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h dlftypes.h nobjmgr.h \
+ pi2dvec.h pistdimgapp.h $(INC)pisysdep.h \
  $(INC)piapplx.h \
  $(INC)piapplgen.h \
@@ -439,4 +469,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)dvlist.h \
  $(INC)objfio.h \
@@ -509,5 +542,7 @@
  $(INC)pi3ddrw.h \
  $(INC)pigraph3d.h piacmd.h \
- $(INC)ctimer.h pisiadw.h \
+ $(INC)commander.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h pisiadw.h \
  $(INC)pilistx.h \
  $(INC)pilistgen.h \
@@ -548,4 +583,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)anydataobj.h \
  $(INC)pidrawer.h \
@@ -594,4 +632,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)anydataobj.h \
  $(INC)pidrawer.h \
@@ -646,4 +687,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)anydataobj.h \
  $(INC)pidrawer.h \
@@ -690,4 +734,5 @@
  $(INC)histos2.h \
  $(INC)hisprof.h \
+ $(INC)histerr.h \
  $(INC)ntuple.h \
  $(INC)xntuple.h pihisto.h pihisto2d.h \
@@ -708,5 +753,5 @@
  $(INC)picontainergen.h \
  $(INC)pieldrw.h pipodrw.h servnobjm.h \
- $(INC)pdlmgr.h dlftypes.h \
+ nobjmgr.h dlftypes.h $(INC)pdlmgr.h \
  $(INC)objfitter.h \
  $(INC)cimage.h \
@@ -723,4 +768,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)anydataobj.h \
  $(INC)pidrawer.h \
@@ -780,4 +828,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)anydataobj.h \
  $(INC)pidrawer.h \
@@ -834,7 +885,9 @@
  $(INC)HEALPixUtils.h \
  $(INC)localmap.h \
+ $(INC)sphereecp.h \
  $(INC)fiospherethetaphi.h \
  $(INC)fiospherehealpix.h \
- $(INC)fiolocalmap.h pitvmaad.h \
+ $(INC)fiolocalmap.h \
+ $(INC)fiosphereecp.h pitvmaad.h \
  $(INC)complexios.h \
  $(INC)fitsspherehealpix.h \
@@ -848,4 +901,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)anydataobj.h \
  $(INC)pidrawer.h \
@@ -898,4 +954,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)anydataobj.h \
  $(INC)pidrawer.h \
@@ -959,4 +1018,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)ndatablock.h \
  $(INC)utilarr.h \
@@ -1011,4 +1073,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)peida.h \
  $(INC)utils.h \
@@ -1025,9 +1090,12 @@
  $(INC)histos2.h \
  $(INC)hisprof.h \
+ $(INC)histerr.h \
  $(INC)ntuple.h \
  $(INC)ntupintf.h pawexecut.h piacmd.h \
- dlftypes.h $(INC)pdlmgr.h \
- $(INC)ctimer.h nobjmgr.h servnobjm.h \
- nomgadapter.h $(INC)pidrawer.h \
+ $(INC)commander.h \
+ $(INC)pdlmgr.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h dlftypes.h nobjmgr.h \
+ servnobjm.h nomgadapter.h $(INC)pidrawer.h \
  $(INC)pibwdggen.h \
  $(INC)pisysdep.h \
@@ -1096,4 +1164,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)peida.h \
  $(INC)utils.h \
@@ -1163,6 +1234,8 @@
  $(INC)pi3ddrw.h \
  $(INC)pigraph3d.h nobjmgr.h dlftypes.h \
- piacmd.h $(INC)pdlmgr.h \
- $(INC)ctimer.h pisiadw.h \
+ piacmd.h $(INC)commander.h \
+ $(INC)pdlmgr.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h pisiadw.h \
  $(INC)pilistx.h \
  $(INC)pilistgen.h \
@@ -1172,6 +1245,21 @@
  $(INC)piscdrawwdg.h
 $(OBJ)piacmd.o: piacmd.cc piacmd.h $(INC)machdefs.h \
- dlftypes.h $(INC)pdlmgr.h \
- $(INC)ctimer.h basexecut.h pistdimgapp.h \
+ $(INC)commander.h \
+ $(INC)pdlmgr.h \
+ $(INC)dvlist.h \
+ $(INC)objfio.h \
+ $(INC)anydataobj.h \
+ $(INC)ppersist.h \
+ $(INC)pexceptions.h \
+ $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
+ $(INC)mutyv.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h dlftypes.h basexecut.h \
+ $(INC)strutil.h \
+ $(INC)strutilxx.h \
+ $(INC)srandgen.h pistdimgapp.h \
  $(INC)pisysdep.h \
  $(INC)piapplx.h \
@@ -1225,12 +1313,5 @@
  $(INC)pi3dwdg.h \
  $(INC)pi3ddrw.h \
- $(INC)pigraph3d.h nobjmgr.h \
- $(INC)anydataobj.h \
- $(INC)ppersist.h \
- $(INC)pexceptions.h \
- $(INC)gnumd5.h \
- $(INC)dvlist.h \
- $(INC)objfio.h \
- $(INC)mutyv.h pisiadw.h \
+ $(INC)pigraph3d.h nobjmgr.h pisiadw.h \
  $(INC)pilistx.h \
  $(INC)pilistgen.h \
@@ -1268,4 +1349,7 @@
  $(INC)ppersist.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)ndatablock.h \
  $(INC)utilarr.h \
@@ -1310,5 +1394,7 @@
  $(INC)lut.h \
  $(INC)pdlmgr.h dlftypes.h piacmd.h \
- $(INC)ctimer.h nobjmgr.h pistdimgapp.h \
+ $(INC)commander.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h nobjmgr.h pistdimgapp.h \
  $(INC)piapplx.h \
  $(INC)piapplgen.h \
@@ -1345,4 +1431,5 @@
  $(INC)pitherm.h \
  $(INC)resusage.h nomhistadapter.h \
+ $(INC)histerr.h \
  $(INC)xntuple.h nomgfdadapter.h \
  nomimagadapter.h nomtmatvecadapter.h
@@ -1355,4 +1442,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)ntupintf.h \
  $(INC)poly.h \
@@ -1398,4 +1488,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)ntupintf.h \
  $(INC)poly.h \
@@ -1444,4 +1537,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)peida.h \
  $(INC)utils.h \
@@ -1521,18 +1617,21 @@
  $(INC)ppersist.h \
  $(INC)gnumd5.h \
- $(INC)tvector.h \
- $(INC)tmatrix.h \
- $(INC)tarray.h \
- $(INC)basarr.h \
- $(INC)mutyv.h \
- $(INC)dvlist.h \
- $(INC)ndatablock.h \
- $(INC)utilarr.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
+ $(INC)tvector.h \
+ $(INC)tmatrix.h \
+ $(INC)tarray.h \
+ $(INC)basarr.h \
+ $(INC)mutyv.h \
+ $(INC)dvlist.h \
+ $(INC)ndatablock.h \
+ $(INC)utilarr.h \
+ $(INC)pidrawer.h \
+ $(INC)pigratt.h \
+ $(INC)piaxes.h \
  $(INC)piscdrawwdg.h \
  $(INC)piwindowx.h \
  $(INC)piwindowgen.h \
- $(INC)pidrawer.h \
- $(INC)pigratt.h \
- $(INC)piaxes.h \
  $(INC)pieldrw.h \
  $(INC)nbrandom.h \
@@ -1600,9 +1699,14 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)dvlist.h \
  $(INC)objfio.h \
  $(INC)mutyv.h dlftypes.h piacmd.h \
+ $(INC)commander.h \
  $(INC)pdlmgr.h \
- $(INC)ctimer.h pisiadw.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h pisiadw.h \
  $(INC)pilistx.h \
  $(INC)pilistgen.h \
@@ -1628,4 +1732,5 @@
  $(INC)histos2.h \
  $(INC)hisprof.h \
+ $(INC)histerr.h \
  $(INC)ntuple.h \
  $(INC)xntuple.h nomgfdadapter.h \
@@ -1645,4 +1750,5 @@
  $(INC)HEALPixUtils.h \
  $(INC)localmap.h \
+ $(INC)sphereecp.h \
  $(INC)specrespvector.h \
  $(INC)specresp.h \
@@ -1735,4 +1841,7 @@
  $(INC)ppersist.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)tvector.h \
  $(INC)tmatrix.h \
@@ -1808,8 +1917,13 @@
  $(INC)ppersist.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)dvlist.h \
  $(INC)objfio.h \
  $(INC)mutyv.h dlftypes.h piacmd.h \
- $(INC)pdlmgr.h pisiadw.h \
+ $(INC)commander.h \
+ $(INC)pdlmgr.h \
+ $(INC)zthread.h pisiadw.h \
  $(INC)pilistx.h \
  $(INC)pilistgen.h \
@@ -1835,4 +1949,7 @@
  $(INC)ppersist.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)ndatablock.h \
  $(INC)utilarr.h \
@@ -1891,10 +2008,12 @@
  $(INC)pi3ddrw.h \
  $(INC)pigraph3d.h nobjmgr.h dlftypes.h \
- piacmd.h $(INC)pdlmgr.h pisiadw.h \
+ piacmd.h $(INC)commander.h \
+ $(INC)pdlmgr.h \
+ $(INC)zthread.h pisiadw.h \
  $(INC)pilistx.h \
  $(INC)pilistgen.h \
  $(INC)pistzwin.h \
  $(INC)pitherm.h \
- $(INC)resusage.h \
+ $(INC)resusage.h servnobjm.h \
  $(INC)piimgtools.h \
  $(INC)pidrwtools.h \
@@ -1921,4 +2040,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)ndatablock.h \
  $(INC)utilarr.h \
@@ -1930,4 +2052,7 @@
  $(INC)pexceptions.h \
  $(INC)gnumd5.h \
+ $(INC)ppfbinstream.h \
+ $(INC)rawstream.h \
+ $(INC)ppfnametag.h \
  $(INC)dvlist.h \
  $(INC)objfio.h \
@@ -2000,5 +2125,7 @@
  $(INC)pi3ddrw.h \
  $(INC)pigraph3d.h piacmd.h \
- $(INC)ctimer.h pisiadw.h \
+ $(INC)commander.h \
+ $(INC)ctimer.h \
+ $(INC)zthread.h pisiadw.h \
  $(INC)pilistx.h \
  $(INC)pilistgen.h \
Index: /trunk/SophyaPI/PIext/nomskymapadapter.cc
===================================================================
--- /trunk/SophyaPI/PIext/nomskymapadapter.cc	(revision 2612)
+++ /trunk/SophyaPI/PIext/nomskymapadapter.cc	(revision 2613)
@@ -99,4 +99,6 @@
 SphereHEALPix<T>* sg = dynamic_cast< SphereHEALPix<T> * >(mMap); 
 if (sg != NULL) type = "SphereHEALPix< ";
+SphereECP<T>* se = dynamic_cast< SphereECP<T> * >(mMap); 
+if (se != NULL) type = "SphereECP< ";
 
 // type +=  DecodeTypeIdName(typeid(T).name());
@@ -116,4 +118,6 @@
 SphereHEALPix<T>* sg = dynamic_cast< SphereHEALPix<T> * >(mMap); 
 if (sg != NULL) return( new SphereHEALPix<T>(*sg, share) );
+SphereECP<T>* se = dynamic_cast< SphereECP<T> * >(mMap); 
+if (se != NULL) return( new SphereECP<T>(*se, share) );
 return(NULL);
 }
@@ -210,4 +214,10 @@
 if (sg != NULL) {
   FIO_SphereHEALPix<T> fio(sg);
+  fio.Write(pos, nom);
+  return;
+  }
+SphereECP<T>* se = dynamic_cast< SphereECP<T> * >(mMap); 
+if (se != NULL) {
+  FIO_SphereECP<T> fio(se);
   fio.Write(pos, nom);
   return;
@@ -233,5 +243,5 @@
 /* --Methode-- */
 template <class T> 
-P2DArrayAdapter* NOMAdapter_PixelMap<T>::Get2DArray(string &)
+P2DArrayAdapter* NOMAdapter_PixelMap<T>::Get2DArray(string & opt)
 {
 LocalMap<T>* lm = dynamic_cast< LocalMap<T> * >(mMap); 
@@ -239,4 +249,18 @@
 int nr = 250;
 int nc = 500;
+SphereECP<T>* se = dynamic_cast< SphereECP<T> * >(mMap); 
+size_t olen = opt.length();
+if ((se != NULL) && (opt.find("ecparray") < olen)) {
+  // On veut la carte bi-dim complete de la sphere ECP
+  TMatrix<T> * mtxecp = new TMatrix<T>(se->GetPixelArray(), true);  // on partage les donnees
+  POTMatrixAdapter<T> * potmtxecp = new POTMatrixAdapter<T>(mtxecp, true);
+  if (opt.find("ecpscaledeg") < olen)  // Echelle angulaire en degre
+    potmtxecp->DefineXYCoordinates(se->MinPhi()*180./M_PI, se->MinTheta()*180./M_PI, 
+				   se->DeltaPhi()*180./M_PI, se->DeltaTheta()*180./M_PI);
+  else if (opt.find("ecpscalerad") < olen)  // Echelle angulaire en radian
+    potmtxecp->DefineXYCoordinates(se->MinPhi(), se->MinTheta(), se->DeltaPhi(), se->DeltaTheta());
+
+  return ( potmtxecp );
+}
 SphericalMap<T>* sm = dynamic_cast< SphericalMap<T> *>(mMap);
 if (sm != NULL) { nr = sqrt(0.75*mMap->NbPixels());  nc = 2*nr; }
Index: /trunk/SophyaPI/PIext/piaversion.h
===================================================================
--- /trunk/SophyaPI/PIext/piaversion.h	(revision 2612)
+++ /trunk/SophyaPI/PIext/piaversion.h	(revision 2613)
@@ -2,5 +2,5 @@
 #define PIAPPVERSION_H_SEEN
 
-#define PIAPP_VERSIONNUMBER  3.96
+#define PIAPP_VERSIONNUMBER  3.97
 
 #endif
Index: /trunk/SophyaPI/PIext/piinit.cc
===================================================================
--- /trunk/SophyaPI/PIext/piinit.cc	(revision 2612)
+++ /trunk/SophyaPI/PIext/piinit.cc	(revision 2613)
@@ -19,4 +19,5 @@
 #include "spherehealpix.h"
 #include "localmap.h"
+#include "sphereecp.h"
 
 #include "specrespvector.h"
@@ -92,16 +93,21 @@
   serv->RegisterClass(new SphereThetaPhi<int_4>, new NOMAdapter_PixelMap<int_4> );
   serv->RegisterClass(new SphereHEALPix<int_4>, new NOMAdapter_PixelMap<int_4> );
+  serv->RegisterClass(new SphereECP<int_4>, new NOMAdapter_PixelMap<int_4> );
   serv->RegisterClass(new LocalMap<r_4>, new NOMAdapter_PixelMap<r_4> );
   serv->RegisterClass(new SphereThetaPhi<r_4>, new NOMAdapter_PixelMap<r_4> );
   serv->RegisterClass(new SphereHEALPix<r_4>, new NOMAdapter_PixelMap<r_4> );
+  serv->RegisterClass(new SphereECP<r_4>, new NOMAdapter_PixelMap<r_4> );
   serv->RegisterClass(new LocalMap<r_8>, new NOMAdapter_PixelMap<r_8> );
   serv->RegisterClass(new SphereThetaPhi<r_8>, new NOMAdapter_PixelMap<r_8> );
   serv->RegisterClass(new SphereHEALPix<r_8>, new NOMAdapter_PixelMap<r_8> );
+  serv->RegisterClass(new SphereECP<r_8>, new NOMAdapter_PixelMap<r_8> );
   serv->RegisterClass(new LocalMap<complex<float> >, new NOMAdapter_PixelMap<complex<float> > );
   serv->RegisterClass(new SphereThetaPhi<complex<float> >, new NOMAdapter_PixelMap<complex<float> > );
   serv->RegisterClass(new SphereHEALPix<complex<float> >, new NOMAdapter_PixelMap<complex<float> > );
+  serv->RegisterClass(new SphereECP<complex<float> >, new NOMAdapter_PixelMap<complex<float> > );
   serv->RegisterClass(new LocalMap<complex<double> >, new NOMAdapter_PixelMap<complex<double> > );
   serv->RegisterClass(new SphereThetaPhi<complex<double> >, new NOMAdapter_PixelMap<complex<double> > );
   serv->RegisterClass(new SphereHEALPix<complex<double> >, new NOMAdapter_PixelMap<complex<double> > );
+  serv->RegisterClass(new SphereECP<complex<double> >, new NOMAdapter_PixelMap<complex<double> > );
 
   serv->RegisterClass(new GaussianFilter, new NOMAdapter_SpectralResponse );
