Making composite images
Assuming that we have the H-alpha and [OIII] images Ha.fit and O3.fit. First of all, use rfits to read the .fit files:
Hafit = rfits('Ha.fit'); O3fit = rfits('O3.fit'); ha = Hafit.data; o3 = O3fit.data; imagesc(ha), imagesc(o3);
![]() |
![]() |
We also need to create a matrix that has 3 planes of the correct size
rgb=zeros([size(ha),3]);
Then we need to shift one of the images so that the structure is aligned. See Shifting Images for more details.
has=imshift(ha,nrow,ncol);
After aligning, we normalize the two images so that the values are between 0 and 1.
rgb(:,:,3)=imscale(has,100,250);
This rescales the shifted Ha image, and insert it in the last plane (the red).
We then store the normalized [OIII] image in both green and blue
rgb(:,:,2)=imscale(o3,150,350); rgb(:,:,1)=imscale(o3,150,350);
Now we can display the image:
imagesc(rgb)
