I have updated the ImageStack scripts here. The compressed folder now contains a new stack_raw.sh script, that can be used for the median stacking of RAW files.
The usage is rather simple: to process a series of .ARW files
/path_to_ImageStack/stack_raw.sh *.ARW
The RAW files will be processed and saved in UniWB and linear camera colorspace, like in the case of the exposure blend script. This will give the possibility to later adjust the WB and color conversion for the median stacked result.
The script will create a stack.tif and a stack.pfi file. The first is the result of the median stacking, while the .pfi file is used to load the stack.tif file and add the WB and color conversion layers.
The script can also do an automatic equalization of the image brightness using the vig_optimize command from Hugin.
The behaviour of the script can be tuned by putting a settings.sh file in the same folder as the RAW files. For example, the following content in the settings.sh file will disable the image alignment and will enable the brightness equalization:
auto_exposure=1
do_alignment=0
Hope this helps!!!