How to create a Mask - markmac99/ukmon-pitools GitHub Wiki
These instructions will work for any image editor where you can paste one image as a layer into another, then change the display mode to make the top layer transparent. I used Photoshop CS2 but you can also use GIMP.
- If your image editor can't open FITS files, copy one FF file the /tmp folder on your Pi, and then in a terminal window, run
python -m Utils.BatchFFtoImage /tmp jpg
to convert it into a JPG. Newer versions of Photoshop and GIMP can open the FITS file but you'll have to flip it vertically. - Copy the blank mask.bmp file from ~/source/RMS plus the image file to somewhere convenient on your PC or Mac for image editing.
- Open the image and mask in your image editor.
.
- Click on the mask, do select-all and copy it, then paste it as a layer into the fits or jpeg image.
- Set the layer to be displayed in "difference" or "transparent" mode so you can see the image through it.
- Using a black paintbrush, paint over every part of the mask where you can see foreground objects.
- Colour lots of space round objects that will grow or might move in the wind. Make sure you don't leave any holes in the mask.
- in GIMP, make sure the paintbrush Hardness is set to 100 otherwise the mask will have feathered edges.
- in GIMP, make sure the paintbrush Hardness is set to 100 otherwise the mask will have feathered edges.
- Copy the mask layer back into the original mask file. Check for holes - in this image you can see i've missed a bit (arrowed), so i'll need to go back and fill that in, then copy the mask layer back again.

- Once there are no holes, save the mask file as a windows BMP file (the same format as it originally had).
- in GIMP you will need to select Export As... from the file menu then set the file extension to .bmp and on the next window, make sure run-length-encoding is NOT ticked.
- Close your image editor, discarding any other changes.
- On the pi, rename the existing mask.bmp file to mask-old.bmp
- Copy the new mask file back to $HOME/source/RMS on the Pi.
- Make sure that the new mask.bmp is the right file by opening it with the Pi's image editor.