I'm trying to create a formula for an RGB composite. I added the following to my Local Jython User's Library:
def AVHRR_DAYTIME_RGB(ch01,ch03,ch04):
red = rescale(ch01,0,1,0,255);
grn = rescale(ch03-ch04,0,50,0,255);
blu = rescale(ch04,320,220,0,255);
return combineRGB(red,grn,blu);
The formula I entered in the Formula Editor is AVHRR_DAYTIME_RGB(ch01,ch03,ch04)
When I select the formula, I am prompted for my ch01, ch03, and ch04 parameters. When I create display, I get a message in the bottom of my display window "image values must be mapped to Red, Green, or Blue only" and nothing displays on the map. What am I doing wrong here?
creating a formula for an RGB composite
Re: creating a formula for an RGB composite
What "Display" type are you selecting? I believe you have to use "3 Color (RGB) Image"...
Re: creating a formula for an RGB composite
aha, good call, I was using image display. When I use 3 Color (RGB) Image, it works. All is well! Thanks