Index: trunk/SophyaPI/ProgPI/skymapmodule.pic
===================================================================
--- trunk/SophyaPI/ProgPI/skymapmodule.pic	(revision 2175)
+++ trunk/SophyaPI/ProgPI/skymapmodule.pic	(revision 2177)
@@ -1,3 +1,3 @@
-#----------------------
+#---------------------- Create Maps and Save
 shell rm -f h4*.fits t4*.ppf h8*.fits t8*.ppf clh*.ppf clt*.ppf almh*.ppf almt*.ppf
 delobjs *
@@ -39,8 +39,8 @@
 disp h4 zoom/4
 disp t4 zoom/4
-zone
-
-#----------------------
-delobjs *
+
+#---------------------- test Map2Double
+delobjs *
+zone
 openfits h4.fits
 
@@ -50,4 +50,5 @@
 
 delobjs *
+zone
 openppf t4.ppf
 map2double t4
@@ -55,6 +56,18 @@
 saveppf t8 t8.ppf
 
-#----------------------
-delobjs *
+#---------------------- test Map2Float
+delobjs *
+zone
+openfits h8.fits
+openppf t8.ppf
+
+map2float h8
+map2float t8
+typemap h8
+typemap t8
+
+#---------------------- test TypeMap
+delobjs *
+zone
 openfits h4.fits
 openfits h8.fits
@@ -66,6 +79,7 @@
 typemap t8
 
-#----------------------
-delobjs *
+#---------------------- test Map2Map
+delobjs *
+zone
 openfits h8.fits
 openppf t8.ppf
@@ -73,6 +87,7 @@
 map2map t8 h
 
-#----------------------
-delobjs *
+#---------------------- test MapMult
+delobjs *
+zone
 openfits h8.fits
 openppf t8.ppf
@@ -80,6 +95,7 @@
 mapmult t8 1000
 
-#----------------------
-delobjs *
+#---------------------- test MapProj
+delobjs *
+zone
 openfits h8.fits
 maproj h8 h8p
@@ -92,4 +108,5 @@
 
 delobjs *
+zone
 openppf t8.ppf
 maproj t8 t8p
@@ -101,6 +118,7 @@
 saveppf t8p100 t8p100.ppf
 
-#----------------------
-delobjs *
+#---------------------- test Map2Cl
+delobjs *
+zone
 openfits h8p64.fits
 map2cl h8p64 clh64
@@ -112,4 +130,5 @@
 
 delobjs *
+zone
 openppf t8p100.ppf
 map2cl t8p100 clt100 191
@@ -117,6 +136,7 @@
 n/plot clt100.n*(n+1)*val%n ! ! crossmarker5
 
-#----------------------
-delobjs *
+#---------------------- test Map2Alm
+delobjs *
+zone
 openfits h8p64.fits
 map2alm h8p64 almh64
@@ -125,4 +145,5 @@
 
 delobjs *
+zone
 openppf t8p100.ppf
 map2alm t8p100 almt100 191
@@ -130,6 +151,28 @@
 disp almt100
 
-#----------------------
-delobjs *
+#---------------------- test Alm2Cl
+delobjs *
+zone
+openppf clh64.ppf
+openppf almh64.ppf
+alm2cl almh64 clh64fralm
+n/plot clh64.n*(n+1)*val%n ! ! crossmarker5
+n/plot clh64fralm.n*(n+1)*val%n ! ! "red same circlemarker5"
+c++exec clh64fralm -= clh64;
+n/plot clh64fralm.n*(n+1)*val%n ! ! crossmarker5
+
+delobjs *
+zone
+openppf clt100.ppf
+openppf almt100.ppf
+alm2cl almt100 clt100fralm
+n/plot clt100.n*(n+1)*val%n ! ! crossmarker5
+n/plot clt100fralm.n*(n+1)*val%n ! ! "red same circlemarker5"
+c++exec clt100fralm -= clt100;
+n/plot clt100fralm.n*(n+1)*val%n ! ! crossmarker5
+
+#---------------------- test Cl2Map et SetTypeMap
+delobjs *
+zone
 openppf clh64.ppf
 settypemap h
@@ -139,4 +182,5 @@
 
 delobjs *
+zone
 openppf clt100.ppf
 settypemap t
@@ -145,6 +189,7 @@
 disp t8p100frcl
 
-#----------------------
-delobjs *
+#---------------------- test Alm2Map et SetTypeMap
+delobjs *
+zone
 openppf almh64.ppf
 settypemap h
@@ -154,4 +199,5 @@
 
 delobjs *
+zone
 openppf almt100.ppf
 settypemap t
@@ -160,6 +206,105 @@
 disp t8p100fralm
 
-#----------------------
-delobjs *
+#---------------------- test Cl2llCl
+delobjs *
+zone
+openppf clh64.ppf
+cl2llcl clh64 llclh64
+n/plot clh64.n*(n+1)*val%n ! ! crossmarker5
+n/plot llclh64.val%n ! ! "red same circlemarker5"
+
+delobjs *
+zone
+openppf clt100.ppf
+cl2llcl clt100 llclt100
+n/plot clt100.n*(n+1)*val%n ! ! crossmarker5
+n/plot llclt100.val%n ! ! "red same circlemarker5"
+
+#---------------------- test ClMean
+delobjs *
+zone
+openppf clh64.ppf
+cl2llcl clh64 llclh64
+n/plot llclh64.val%n ! ! circlemarker5
+clmean llclh64
+clmean llclh64 !
+clmean llclh64 100,9999 mean
+echo $mean
+
+delobjs *
+zone
+openppf clt100.ppf
+cl2llcl clt100 llclt100
+n/plot llclt100.val%n ! ! circlemarker5
+clmean llclt100
+clmean llclt100 !
+clmean llclt100 100,9999 mean
+echo $mean
+
+#---------------------- test ClMult
+delobjs *
+openppf clh64.ppf
+zone 1 2
+n/plot clh64.val%n ! ! circlemarker5
+clmult clh64 1000.
+n/plot clh64.val%n ! ! circlemarker5
+
+delobjs *
+openppf clt100.ppf
+zone 1 2
+n/plot clt100.val%n ! ! circlemarker5
+clmult clt100 1000.
+n/plot clt100.val%n ! ! circlemarker5
+
+#---------------------- test ClOper
+delobjs *
+zone
+openppf clh64.ppf
+cp clh64 dum
+clop dum + clh64 - clh64 * clh64 / clh64
+n/plot clh64.val%n ! ! crossmarker5
+n/plot dum.val%n ! ! "same red circlemarker5"
+
+delobjs *
+zone
+openppf clt100.ppf
+cp clt100 dum
+clop dum + clt100 - clt100 * clt100 / clt100
+n/plot clt100.val%n ! ! crossmarker5
+n/plot dum.val%n ! ! "same red circlemarker5"
+
+delobjs *
+zone
+openppf clh64.ppf
+openppf clt100.ppf
+clop clh64 - clt100
+n/plot clh64.val%n ! ! crossmarker5
+
+#---------------------- test ClRebin
+delobjs *
+zone
+openppf clh64.ppf
+cl2llcl clh64 llclh64
+clrebin llclh64 clntu 10,0
+
+n/plot clntu.n%l ! ! crossmarker5
+
+n/plot llclh64.val%n  ! ! "crossmarker3"
+n/plot clntu.clmean%l ! ! "same circlemarker5 red"
+n/plot clntu.cllin%l  ! ! "same boxmarker5 blue"
+n/plot clntu.clpar%l  ! ! "same trianglemarker5 violet"
+
+n/plot llclh64.val%n  ! ! "crossmarker3"
+nt2d clntu l clmean 0 sclmean 1 " " "same circlemarker5 red thinline"
+
+n/plot llclh64.val%n  ! ! "crossmarker3"
+nt2d clntu l cllin 0 scllin 1 " " "same boxmarker5 blue thinline"
+
+n/plot llclh64.val%n  ! ! "crossmarker3"
+nt2d clntu l clpar 0 sclpar 1 " " "same trianglemarker5 violet thinline"
+
+#---------------------- test CrMaskMap et SetTypeMap
+delobjs *
+zone
 settypemap h
 crmapmask h8m 256 -20,20 100,130 0,1
@@ -168,4 +313,5 @@
 
 delobjs *
+zone
 settypemap t
 crmapmask t8m 400 -20,20 100,130 0,1
@@ -173,6 +319,7 @@
 disp t8m zoom/4
 
-#----------------------
-delobjs *
+#---------------------- test CrMaskFrMap
+delobjs *
+zone
 openfits h8.fits
 crmaskfrmap h8fm 256 h8 -1.e-30,1.e-30 0,1
@@ -181,4 +328,5 @@
 
 delobjs *
+zone
 openppf t8.ppf
 crmaskfrmap t8fm 400 t8 -1.e-30,1.e-30 0,1
@@ -186,6 +334,7 @@
 disp t8fm zoom/4
 
-#----------------------
-delobjs *
+#---------------------- test MaskMap
+delobjs *
+zone
 openfits h8.fits
 openfits h8m.fits
@@ -194,4 +343,5 @@
 
 delobjs *
+zone
 openppf t8.ppf
 openppf t8m.ppf
@@ -200,4 +350,5 @@
 
 delobjs *
+zone
 openfits h8.fits
 openppf t8m.ppf
@@ -206,4 +357,5 @@
 
 delobjs *
+zone
 openppf t8.ppf
 openfits h8m.fits
@@ -211,6 +363,7 @@
 disp t8 zoom/4
 
-#----------------------
-delobjs *
+#---------------------- test MapCover
+delobjs *
+zone
 openfits h8m.fits
 mapcover h8m 0.9,1 couvh8m
@@ -218,10 +371,12 @@
 
 delobjs *
+zone
 openppf t8m.ppf
 mapcover t8m 0.9,1 couvt8m
 echo $couvt8m
 
-#----------------------
-delobjs *
+#---------------------- test Map2Local
+delobjs *
+zone
 openfits h8.fits
 map2local h8 h8loc 200,300 20,30 0,90 !
@@ -231,4 +386,5 @@
 
 delobjs *
+zone
 openppf t8.ppf
 map2local t8 t8loc 200,300 20,30 0,90 !
@@ -237,25 +393,33 @@
 disp t8loc
 
-#----------------------
-delobjs *
-openfits h8.fits
-rename h8 h8save
-openfits h8.fits
-mapop h8 + h8save - h8save * h8save / h8save
+#---------------------- test MapOper
+delobjs *
+zone
+openfits h8.fits
+cp h8 h8save
+mapop h8save + h8 - h8 * h8 / h8
+disp h8save zoom/4
+mapop h8save - h8
+disp h8save zoom/4
+
+delobjs *
+zone
+openppf t8.ppf
+cp t8 t8save
+mapop t8save + t8 - t8 * t8 / t8
+disp t8save zoom/4
+mapop t8save - t8
+disp t8save zoom/4
+
+delobjs *
+zone
+openfits h8.fits
+openppf t8.ppf
+mapop h8 - t8
 disp h8 zoom/4
 
-openppf t8.ppf
-rename t8 t8save
-openppf t8.ppf
-mapop t8 + t8save - t8save * t8save / t8save
-disp t8 zoom/4
-
-mapop h8 - t8save
-disp h8 zoom/4
-mapop t8 - h8save
-disp t8 zoom/4
-
-#----------------------
-delobjs *
+#---------------------- test MapStat
+delobjs *
+zone
 openfits h8.fits
 openfits h8fm.fits
@@ -271,2 +435,34 @@
 mapstat t8 t8fm mean sig
 echo mean=$mean sig=$sig
+
+#---------------------- test VarOper
+varop 1000 + 100 result
+  echo result is $result
+varop 1000 - 100 result
+  echo result is $result
+varop 1000 * 100 result
+  echo result is $result
+varop 1000 / 100 result
+  echo result is $result
+varop 1000 / 0 result
+  echo result is $result
+
+varop 1000 sqrt ! result
+  echo result is $result
+varop -1000 sqrt ! result
+  echo result is $result
+varop 10 exp ! result
+  echo result is $result
+varop 1000 log ! result
+  echo result is $result
+varop -1000 log ! result
+  echo result is $result
+varop 1000 log10 ! result
+  echo result is $result
+varop -1000 log10 ! result
+  echo result is $result
+
+varop 1000 pow 2 result
+  echo result is $result
+varop 1000 pow 1000 result
+  echo result is $result
