Closed ScottLindstrom closed 2 years ago
I tried to color-enhance today.
Could you explain what you mean by "color-enhance"? You ran add_colormap.sh
?
The series of commands I used is here: https://ftp.ssec.wisc.edu/pub/ssec/scottl/MakeVis Original color table that didn't work: https://ftp.ssec.wisc.edu/pub/ssec/scottl/WV_Chile_Short.txt And then I expanded it: https://ftp.ssec.wisc.edu/pub/ssec/scottl/WV_Chile.txt
For the record and easier viewing:
../p2g_grid_helper.sh Dora -170.75 -14.0 1000 -1500 960 840 > $GEO2GRID_HOME/Samoa.yaml
#
#
## 08 February at 0130 UTC/0730LST, 0300 UTC/0900 LST, 0400 UTC/1200 LST, 0900 UTC/1500 LST, 1130 UTC/1730 LST (VIS/IR)
##
../geo2grid.sh -r abi_l1b -w geotiff -p C02 C13 -g Dora --grid-configs $GEO2GRID_HOME/Samoa.yaml --method nearest -f /arcdata/goes_restricted/grb/goes17/2022/2022_03_29_088/abi/L1b/RadF/OR_ABI-L1b-RadF-M6???_G17_s20220880400*.nc
../add_coastlines.sh --add-coastlines --coastlines-outline='white' --coastlines-resolution=f --add-grid --grid-text-size 12 --grid-d 3.0 3.0 --grid-D 3.0 3.0 GOES-17_ABI_RadF_C02_20220329_0400??_Dora.tif
../add_colormap.sh ./WV_Chile.txt GOES-17_ABI_RadF_C13_20220329_0400??_Dora.tif
../add_coastlines.sh --add-coastlines --coastlines-outline='white' --coastlines-resolution=f --add-grid --grid-text-size 12 --grid-d 3.0 3.0 --grid-D 3.0 3.0 --add-colorbar --colorbar-align right --colorbar-vertical GOES-17_ABI_RadF_C13_20220329_0400??_Dora.tif
Colormap:
0,0,0,0,255
110,126,126,126,255
130,0,0,126,255
145,126,126,126,255
180,255,255,255,255
195,0,85,0,255
200,0,247,0,255
203,255,255,0,255
212,255,3,0,255
217,134,0,0,255
222,255,255,255,255
255,127,127,127,255
Thanks @ScottLindstrom. I'll take a look at this.
So I have tests for the add_colormap.sh
but I missed the obvious and most important use case of a colormap with less than 256 values. I've added your colormap to the tests and as expected it fails, but at least now I have a test that fails and it matches your use case. I can hopefully fix this this week and get you and the Imagery team a new G2G tarball.
I tried to color-enhance today. In the past, my color enhancements have specified breakpoints only, and interpolation between the values happened. With the latest geo2grid (v1.1 beta) that didn't work. I had to specify all 255 values in the color table.
My original .txt file had 6 or 8 entries in it -- and this resulted in just the first 6 greyscale values (that is -- all the mostly black pixels!) being enhanced by those 6 or 8 colors.