I am using the camera for astronomy. It appears the CRW image itself is off center. This is not present in the JPG's. Is there a way to eliminate this border by recentering the image via a script, or is this a deeper issue?
Are you using CHDK raw or DNG? I would suggest using DNG.
CHDK "CRW" raw is just a copy of the raw framebuffer, including any masked or unused areas, so there is nothing to adjust in CHDK. If you want to crop it, you must do it yourself.
DNG contains the same raw data, but the DNG header defines an "active area" and "default crop". The active area should define the part that contains image data. The default crop should define what DNG processing software actually uses, though some might just use the active area. In the CHDK raw menu, you can choose whether the default crop is the full sensor (including unused / masked), the active area, or an area the same size as a camera jpeg.