If I understand your objectives correctly, these are really 'masking/selection problems' to be solved. To select the sky (and not the trees) you can use the 'Color Range' selection. Select a piece of the sky and adjust the slider until it looks like you got about what you want. You will pick up a few stray pieces in the roof and windows but you can paint them out in Quick Mask mode. Then expand the selection by a pixel or two, depending on the resoluiton of your image,to get rid of the "fringe". The attached image was created from your upload. I'm sure your original is a higher res image and if so your results should look better than mine. To create the rays you can use the same selection (save it as an alpha channel once you make it) and simply (okay, it may not be simple) paint away where you dont want the rays in Quick Mask (after you dup the selection so you don't screw up the original). Then just paint in your rays. If I have misunderstood what your are trying to accomplish I apoligize.