diff --git a/crpptbx/AUG/adaptPFM_rda.m b/crpptbx/AUG/adaptPFM_rda.m
new file mode 100644
index 0000000000000000000000000000000000000000..cd73a1d9f478dd559e36f92208ac10d1a4df7197
--- /dev/null
+++ b/crpptbx/AUG/adaptPFM_rda.m
@@ -0,0 +1,17 @@
+function [nodeout]=adaptPFM_rda(nodein,ndim1,ndim2,ndim3);
+%
+% 3D case is special
+%
+% adapt nodein to keep only 1st ndim1 points in dim1 and ndim2 points in dim2 and same for ndim3
+%
+% re-generate .x and .t
+%
+% change .value, .data, .x and .t 
+%
+
+nodeout = nodein;
+
+nodeout.value = nodeout.value(1:ndim1,1:ndim2,1:ndim3);
+nodeout.data = nodeout.value;
+nodeout.x = [1:ndim1];
+nodeout.t = [1:ndim3];
diff --git a/crpptbx/AUG/adapt_rda.m b/crpptbx/AUG/adapt_rda.m
new file mode 100644
index 0000000000000000000000000000000000000000..58e4fd9bcce7b37728c3300791ce00f91ef797eb
--- /dev/null
+++ b/crpptbx/AUG/adapt_rda.m
@@ -0,0 +1,22 @@
+function [nodeout]=adapt_rda(nodein,ndim1,ndim2,itotransposeback,varargin);
+%
+% adapt nodein to keep only 1st ndim1 points in dim1 and ndim2 points in dim2
+% if itotransposeback==1, transpose back matrix and use ndim1 for ndim2 and vice versa
+%
+% change .value, .data, .x and .t 
+%
+
+nodeout = nodein;
+
+if itotransposeback==1
+  nodeout.value = nodeout.value';
+  nodeout.data = nodeout.data';
+  temp = nodeout.x;
+  nodeout.x = nodeout.t;
+  nodeout.t = temp;
+end
+
+nodeout.value = nodeout.value(1:ndim1,1:ndim2);
+nodeout.data = nodeout.value;
+nodeout.x = nodeout.x(1:ndim1);
+nodeout.t = nodeout.t(1:ndim2);