Good Afternoon:
Probably not understanding how to do this but every time I display an GOES IR Temp image I want the range to be 330 to 200. Now I have to change the range after the image is displayed. After changing the range I did left click on IR Image > File > Save > Save as Parameter Defaults > OK. Exited McV and restarted. Loaded a IR Temp Image but range did not change. Still 0 to 287.1.
Any help is appreciated.
Oh, by the way, I had no luck in getting the jython code for brightness to temp to work.
Thanks ..
Greg ...
Saving Range when Displaying GOES IR Temp (band 4) Image
- jessica.braun
- Posts: 66
- Joined: Wed Jan 07, 2009 7:51 pm
Re: Saving Range when Displaying GOES IR Temp (band 4) Image
Hi Greg,
What was the problem you were having with the jython code? Can you describe a bit more where you are having trouble? I used the file you sent to the help desk and was able to successfully get the formula to work.
~Jess
What was the problem you were having with the jython code? Can you describe a bit more where you are having trouble? I used the file you sent to the help desk and was able to successfully get the formula to work.
~Jess
Re: Saving Range when Displaying GOES IR Temp (band 4) Image
Hi Jess:
Put method (below) in Local Jython User's library. Right clicked on brightnessToTemp > Insert IDV Action > General > Create Formula > this gets appended to the method ... idv.handleAction('action.edit.formula.create') > Save... get this .. There was an error in the Python library: Traceback (innermost last): (no code or object) at line 0 Syntax Error: ('invalid syntax', ('<string>','3,1, 'b=a[0];'))
def brightnessToTemp(a):
b = a[0];
m = mask(b,"<",176.)
b = m*(660.-b)/2. + (1.-m)*(418.-b)
return newUnit(b,"Temperature","K")
Greg ...
Put method (below) in Local Jython User's library. Right clicked on brightnessToTemp > Insert IDV Action > General > Create Formula > this gets appended to the method ... idv.handleAction('action.edit.formula.create') > Save... get this .. There was an error in the Python library: Traceback (innermost last): (no code or object) at line 0 Syntax Error: ('invalid syntax', ('<string>','3,1, 'b=a[0];'))
def brightnessToTemp(a):
b = a[0];
m = mask(b,"<",176.)
b = m*(660.-b)/2. + (1.-m)*(418.-b)
return newUnit(b,"Temperature","K")
Greg ...
- jessica.braun
- Posts: 66
- Joined: Wed Jan 07, 2009 7:51 pm
Re: Saving Range when Displaying GOES IR Temp (band 4) Image
Hi Greg,
I took a look at my Jython library and I think I know what the problem is. Jython can be picky about indentations. Try indenting everything below the first line (I used two spaces) and save again. I removed my indentations and got the same error you listed below.
~Jess
I took a look at my Jython library and I think I know what the problem is. Jython can be picky about indentations. Try indenting everything below the first line (I used two spaces) and save again. I removed my indentations and got the same error you listed below.
~Jess
Re: Saving Range when Displaying GOES IR Temp (band 4) Image
Hi Greg... Considering the saving range problem...
I guessing that it's not saved, because once you save a value in the Parameter defaults editor with your method, the "Parameter" by default is something like 78_Band4_TEMP (for a GOES-12 10.7 um image, satellite number, band number, unit). So, if you save that, only when you load another band 4 GOES-12 image would you see your change.
To make it more universal, you can change the Parameter name to ".*_TEMP" This should force any image display of TEMP values to use your saved range. If you are just considering GOES IR TEMP images of the 10.7 um variety, then I think "7.*_Band4_TEMP" should do it.
Note: For the wildcard, you need ".*" to mean "any text here" not just "*" I learned that in the help:
http://www.ssec.wisc.edu/mcidas/doc/mcv ... ditor.html
Let us know if you have problems with anything.
Thanks, Jay
I guessing that it's not saved, because once you save a value in the Parameter defaults editor with your method, the "Parameter" by default is something like 78_Band4_TEMP (for a GOES-12 10.7 um image, satellite number, band number, unit). So, if you save that, only when you load another band 4 GOES-12 image would you see your change.
To make it more universal, you can change the Parameter name to ".*_TEMP" This should force any image display of TEMP values to use your saved range. If you are just considering GOES IR TEMP images of the 10.7 um variety, then I think "7.*_Band4_TEMP" should do it.
Note: For the wildcard, you need ".*" to mean "any text here" not just "*" I learned that in the help:
http://www.ssec.wisc.edu/mcidas/doc/mcv ... ditor.html
Let us know if you have problems with anything.
Thanks, Jay
Re: Saving Range when Displaying GOES IR Temp (band 4) Image
Good Morning:
Well the brightnessToTemp formula is working. However, I am having no luck in saving data using the parameter defaults editor tool. I have tried all sorts of combinations for the parameter ("7.*_Band4_TEMP", ".*_TEMP", etc) but it does not save the values.
Any further help is appreciated.
Thanks ...
Greg ...
Well the brightnessToTemp formula is working. However, I am having no luck in saving data using the parameter defaults editor tool. I have tried all sorts of combinations for the parameter ("7.*_Band4_TEMP", ".*_TEMP", etc) but it does not save the values.
Any further help is appreciated.
Thanks ...
Greg ...
Re: Saving Range when Displaying GOES IR Temp (band 4) Image
Hi Greg... I'm seeing the same problem you are in beta1. When I was doing my testing, I was using a test version of beta2 and it appears to work correctly with aliases there. We plan to make beta2 available in the near future, but there are a couple of bugs and further enhancements that need to be resolved before we release it.
Thanks, Jay
Thanks, Jay