For simple cases there is no need for a script. Create an image container, load the images to be processed, set the output directory and input the new file name, e.g. "&filename;_mod.xisf" into the 'Output template' field.
Open PixelMath, input the expression. ($T is the placeholder for the currently processed image in the image container.)
Drag the blue triangle icon of the image container (New Image Container Instance) to the gray bar at the bottom of the PixelMath window.
Note that this will only succeed when the expression is the very same for all images in the image container. So there are limitations.
also, dave, yes they are monochrome images and i'm just "fixing" some frames from a KAF-50100 CCD. it's a "split" CCD so one side is uniformly different than the other side. for some reason calibration is not fixing this problem. from what i've researched, this issue has come up with other owners of this CCD, and the pixelmath fix is a quick way to solve the problem. i just needed a way to do it in bulk.
In this case also Overscan correction might work correctly, perhaps it is worth a try. The manufacturer of the sensor, ON Semiconductor, published a data sheet of the KAF-50100, see https://www.onsemi.com/pub/Collateral/KAF-50100-D.PDF . On page 3 the architecture of the chip is described.
I tried this and it works, sort of. After I dragged the triangle onto the pixelmath bar it opened all 40 pictures in the workspace and I can see that it did the math. But the images in the output directory I've specified (different one than the source) are all not modified, they still look the same as the original ones. What am I missing?
in PixelMath make sure "replace target image" is selected. otherwise PM makes a new image with the modifications and puts it in the workspace. generally speaking when using ImageContainer the process being applied has to put it's result in the input image for ImageContainer to work right.
Somebody pointed me to this thread as I am having the exact same issue with the 50100 chip...
It seems as if you got your calibration such that there is a constant quotient between all your images. For me, there is quiet a range, i.e. I can't correct all images by the same factor. How did you do your calibration?