Hi Dave,
The parameter you are looking for is:
int StarMask.waveletLayers
which is the number of wavelet layers used for structure detection.
You don't have to call (shouldn't call, actually) View.beginProcess() and View.endProcess() to execute a process instance. These methods are only required to modify image data by calling pure JavaScript objects, properties and methods. For instance execution, just call executeOn(), which takes care of all the necessary history management.
If you want to execute an instance without generating swap files, use the second parameter of executeOn:
Boolean ProcessInstance.executeOn( View view[, Boolean swapFile=true] )
For example:
starmask.executeOn( SSView.mainView, false/*swapFile*/ );
Let me know if this helps.