View > Explorer Windows > Object Explorer for a list of scriptable objects and processes and their properties and methods.
View > Script Editor to create, edit, save, and execute your .js script file.
Here is sample code to try. You'll want to edit the viewId, the channel (a number from 0 to 3), and the factor.
The expression encodes pixel position as a channel number and uses a conditional to either apply the factor or not.
This should give you something to start with. Adding a user interface is a bit more work.
Use PI's "Undo" icon or ^Z to undo the script's operation on the view.
Mike
// CFAApply.js
// Parameters
var viewId = "frame_001";
var channel = 1;
var factor = 2;
// Expressions and view
var expression = "iif((xpos() % 2) + 2 * (ypos() % 2) == channel, factor * $target, $target)";
var symbols = format("channel = %d, factor = %f", channel, factor);
var view = View.viewById(viewId);
// Evaluation
var pixelMath = new PixelMath;
pixelMath.expression = expression;
pixelMath.symbols = symbols;
pixelMath.executeOn(view, true);