diff --git a/pub/CHANGELOG b/pub/CHANGELOG
index 859736f47015b56bf810bbde45743f956b74af8c..30a7f733556a1c1dc0d1f5b56cbc60b1330d87b0 100644
--- a/pub/CHANGELOG
+++ b/pub/CHANGELOG
@@ -8,6 +8,7 @@ Release 2.3.6a of :
   - Command crp to restrict plot range
   - New integral operations firstwith, lastwith
 - Improved functionality:
+  - In binning (mpa, msa), computation of sampling error is now optional
   - Commands gp, gf, gp!, gf!, gfa to create, overwrite, or append to graphic file
   - Integral operations now return integers when appropriate
   - Cleaner implementation of refined curve plotting
diff --git a/pub/lib/commands.cpp b/pub/lib/commands.cpp
index 67655640f48a59557527fe43aac21c2c0f0c46e8..a017b94b27ef36948d0370b8ca94ea06eac67e84 100644
--- a/pub/lib/commands.cpp
+++ b/pub/lib/commands.cpp
@@ -466,6 +466,7 @@ bool frida_command(string cmd)
                 "  msd   delete\n"
                 "  msr   retain\n"
                 "  msa   average\n"
+                "  msas  average, error estimate includes sampling error\n"
                 "  msb   break into files\n"
                 "  msj   join\n"
                 "  ms*   spawn spectra\n"
@@ -518,7 +519,9 @@ bool frida_command(string cmd)
     } else if (cmd == "msr") {
         NManip::slices_select(false);
     } else if (cmd == "msa") {
-        NManip::slices_rebin();
+        NManip::slices_rebin(false);
+    } else if (cmd == "msas") {
+        NManip::slices_rebin(true);
     } else if (cmd == "msb") {
         NManip::slices_break();
     } else if (cmd == "msj") {
diff --git a/pub/lib/manip.cpp b/pub/lib/manip.cpp
index 041af96bdcd65ef2d3ad56ae373655276ec0b366..3c71184fa4c4e0c0cc133599ef2cb2b2e3d28b6a 100644
--- a/pub/lib/manip.cpp
+++ b/pub/lib/manip.cpp
@@ -116,7 +116,7 @@ void NManip::points_select(const bool sel_del)
 
 //! Bin points.
 
-void NManip::points_rebin(const bool sampling_error)
+void NManip::points_rebin(const bool sampling_err)
 {
     FileIterator fiter(SFSel::instance()->selD());
 
@@ -142,7 +142,7 @@ void NManip::points_rebin(const bool sampling_error)
                 throw S("First bin must start at 0");
             breaks.push_back(sin->size());
 
-            PSpec sout = sin->binned(breaks, sampling_error);
+            PSpec sout = sin->binned(breaks, sampling_err);
 
             fout->V.push_back(move(sout));
         }
@@ -153,7 +153,7 @@ void NManip::points_rebin(const bool sampling_error)
 
 //! Bin points.
 
-void NManip::points_rebin_by_factor(const bool sampling_error)
+void NManip::points_rebin_by_factor(const bool sampling_err)
 {
     FileIterator fiter(SFSel::instance()->selD());
     static int ng = 2;
@@ -175,7 +175,7 @@ void NManip::points_rebin_by_factor(const bool sampling_error)
             for (int iout = 0; iout < nout + 1; ++iout)
                 breaks[iout] = iout * ng;
 
-            PSpec sout = sin->binned(breaks, sampling_error);
+            PSpec sout = sin->binned(breaks, sampling_err);
 
             fout->V.push_back(move(sout));
         }
@@ -597,7 +597,7 @@ void NManip::slices_select(const bool sel_del)
 
 //! Bin spectra.
 
-void NManip::slices_rebin()
+void NManip::slices_rebin(const bool sampling_err)
 {
     FileIterator fiter(SFSel::instance()->sel());
     vector<int> JSel;
@@ -639,7 +639,7 @@ void NManip::slices_rebin()
             if (fd) {
                 PSpec sout(new CSpec());
                 bool in_with_dy = fd->VS(ji)->has_dy();
-                bool out_with_dy = in_with_dy || mj > 1;
+                bool out_with_dy = in_with_dy || (sampling_err && mj > 1);
                 int n = fd->nPts(ji);
                 sout->resize(n, out_with_dy);
                 // x grids must be equal:
@@ -677,10 +677,11 @@ void NManip::slices_rebin()
                             for (int jj = ji; jj < jf; jj++) {
                                 if (fd->VS(jj)->has_dy())
                                     vm_src += SQR(fd->VS(jj)->dy[i]);
-                                vm_grp += SQR(fd->VS(jj)->y[i] - ym);
+                                if (sampling_err)
+                                    vm_grp += SQR(fd->VS(jj)->y[i] - ym);
                             }
                             double vm = vm_src / mj / mj;
-                            if (mj > 1)
+                            if (sampling_err && mj > 1)
                                 vm += vm_grp / (mj - 1);
                             sout->dy[i] = sqrt(vm);
                         }
diff --git a/pub/lib/manip.hpp b/pub/lib/manip.hpp
index bedd2278fd5147be105b8ca45ef47d7b8292dc99..6d9f399b836e9e8b4d9714aee8ab92d010158a58 100644
--- a/pub/lib/manip.hpp
+++ b/pub/lib/manip.hpp
@@ -28,7 +28,7 @@ void points_remove_err();
 void points_interpolate();
 void points_redistribute();
 void slices_select(const bool sel_del);
-void slices_rebin();
+void slices_rebin(const bool sampling_err);
 void slices_merge();
 void slices_break();
 void slices_spawn();