Hi Dan
I can't answer you Remove_Phase questin, as I've never tried doing that, but one way to work around it might be something like
(pseudo-code)
prm sc 0.1
scale = If(Or(current_range < 10, current_range > 20, 0, sc);
which would make the scale factor for the phase be zero if the range number is ouside the values 10..20.
There is probably another way to do it with # commands too.
.
On making a ranged raw file.. WHy are you doing that? Why not just use the XYE files directly? I always use the xye files directly for my surface refinements.
Matthew