From 7dbcc8bb5d7465fe6e9bebc2ef525ea5286dff9d Mon Sep 17 00:00:00 2001 From: Jacopo Cassinis <12469744+RAD750@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:39:09 +0100 Subject: [PATCH] Added a bunch of composites --- resources/lut/IR108-IR62-10+50_HIRS.png | Bin 5356 -> 0 bytes resources/lut/cal/CIMSSLUT.png | Bin 0 -> 269 bytes resources/scripted_compos/IR108-IR62_HIRS.lua | 56 ---- .../scripted_compos/IR108-IR62_MODIS.lua | 57 ---- satdump_cfg.json | 243 +++++++++++++++++- 5 files changed, 230 insertions(+), 126 deletions(-) delete mode 100644 resources/lut/IR108-IR62-10+50_HIRS.png create mode 100644 resources/lut/cal/CIMSSLUT.png delete mode 100644 resources/scripted_compos/IR108-IR62_HIRS.lua delete mode 100644 resources/scripted_compos/IR108-IR62_MODIS.lua diff --git a/resources/lut/IR108-IR62-10+50_HIRS.png b/resources/lut/IR108-IR62-10+50_HIRS.png deleted file mode 100644 index e8c43e2aff962abc7fe07b2ca3284d7745e27b16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5356 zcmeHKd2kcw760TL8G|WcjsUZ>95tBL?rK-k?%KjOw!tEZ2&00b;Ci*Yk{7Ha(qc=d z5QVD)fs`ZRXb6yYiYc@}fB>NZ%+Ugq2?>PK1Pqv?KsjR4rhx=(`mJOen=sR13i-?O zXmIYZMy_WknoYQmu#a*KcGSG_DvBz!i-u^B6<_Fq>jj2=Tjqf{J*Dz;Lie=#& zzpI<%yX$)YX5HmKZl1FlNoou;natq5g$phYoR>ykc(wNMjEfKa_xjdtUAcN{#S!qc z9gFO!PTanE_}%X28`bRWu?tpzzb1XqC3gQ;m##dR@|G*~_Xf7=?KQ{2x|}}3UcQSr z_0#f6-1V84iHuR&ui3BX=Jpsc>+0Uy|9a{A?8CFx_A;LOL+CQ`zO797aPh>GwguG- z`Y+rxc7OJj?T12d?3lD=`!(}-$$6|>T77Hh{G~PM3S@YA(U4K;hlj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XeuKXZX9BlR*K?Cg`}n0; z^1%OPE8#0|?=8z*@O3%C@$$%g@JRhzzpr{Zv~=(lP7DB$+*SQ*z;D*{gvLb0Vl7C# zk=&(AU%ak<(*^)yPFV7D?ZLBmYIDaND(yD!WZEWVTXK)OHA|^`*{2Iut?HIM>e1em zU(~ZN-(QZeTsi2QDZ7;=Q+v+8*8NyYoo`Pl-XF{K!%JSj8sBqYOd5y-A2ww&L;&c4q@Ks1wdhxXxkSw^W zAtUafMlrp%sK5u@XM@mIyx~Gdsir0-401qS0!Rj%JJk(=9FP&(YPxjPm}-Lm(Z=C5 z*H=zJnDF@>6A)AQ&d2Ylm-FBKEhBaFfnR>4vfuC3kVzlZJiJg}@_Ow{r4t`w+Jl;% zp>MUtFu@}YaZ^8mfpP!>e6itppiu)Na3u+hPYu@t6_f-Ecsk@}d|f82FAl^2(-TnD z4cfz1n){uiyb&o{L)Cj2Z+!{aAKR9{1=^I(#vcDqDo+;HSowkj{y4SQRF!9GjyHn8 X6z#fg52s&;!wxJ3WAe8QFP;5giLecC diff --git a/resources/lut/cal/CIMSSLUT.png b/resources/lut/cal/CIMSSLUT.png new file mode 100644 index 0000000000000000000000000000000000000000..7dcc957afa5a9e7bd074a00a4e9f69a8bff1f3ef GIT binary patch literal 269 zcmV+o0rLKdP)q{Qd01{jn@hU;eoMEBsn}?mf4bThG1a zcG27Jo&GqrYwgckA9r?+??zzhx4`*?@h3nf4MAai$cw(_zs@2da|tsfmtk@l5@s%O zaNG>-v2E}zwmF#~n3yO)Ff~ztU}~ZO!PG 50 to 0 -> 256 - local ndvi_lutval = (((ndvi-(-10))*256) / (50-(-10))) - - --sanity checks (noise) - if ndvi_lutval < 0 then - ndvi_lutval = 0 - end - - if ndvi_lutval > 255 then - ndvi_lutval = 255 - end - - - --don't forget to create a table! - local lut_result = {} - - --send the ndvi_lutval to the LUT, retrieve it back in the table as 3 R,G,B channels - lut_result[0] = img_lut:get(0 * img_lut:height() * img_lut:width() + ndvi_lutval * img_lut:width() + ndvi_lutval) / 255.0 - lut_result[1] = img_lut:get(1 * img_lut:height() * img_lut:width() + ndvi_lutval * img_lut:width() + ndvi_lutval) / 255.0 - lut_result[2] = img_lut:get(2 * img_lut:height() * img_lut:width() + ndvi_lutval * img_lut:width() + ndvi_lutval) / 255.0 - - - - --return RGB 0=R 1=G 2=B - set_img_out(0, x, y, lut_result[0]) - set_img_out(1, x, y, lut_result[1]) - set_img_out(2, x, y, lut_result[2]) - - end - --set the progress bar accordingly - set_progress(x, rgb_output:width()) - end -end diff --git a/resources/scripted_compos/IR108-IR62_MODIS.lua b/resources/scripted_compos/IR108-IR62_MODIS.lua deleted file mode 100644 index 68bca6695..000000000 --- a/resources/scripted_compos/IR108-IR62_MODIS.lua +++ /dev/null @@ -1,57 +0,0 @@ --- IR 10.8 - IR 6.2 split window for HIRS & MODIS (C) LEGO11 2024 - -function init() - --create an empty image for the LUT - img_lut = image_t.new() - --load the LUT - image_load_png(img_lut, get_resource_path("lut/IR108-IR62-10+50_HIRS.png")) - --return 3 channels, RGB - return 3 -end - -function process() - for x = 0, rgb_output:width() - 1, 1 do - for y = 0, rgb_output:height() - 1, 1 do - - --get channels from satdump.json - - local cch32 = get_calibrated_value(32, x, y, true) - local cch28 = get_calibrated_value(28, x, y, true) - - - --perform split window - local ndvi = cch32-cch28 - - --range convert from -10 -> 50 to 0 -> 256 - local ndvi_lutval = (((ndvi-(-10))*256) / (50-(-10))) - - --sanity checks (noise) - if ndvi_lutval < 0 then - ndvi_lutval = 0 - end - - if ndvi_lutval > 255 then - ndvi_lutval = 255 - end - - - --don't forget to create a table! - local lut_result = {} - - --send the ndvi_lutval to the LUT, retrieve it back in the table as 3 R,G,B channels - lut_result[0] = img_lut:get(0 * img_lut:height() * img_lut:width() + ndvi_lutval * img_lut:width() + ndvi_lutval) / 255.0 - lut_result[1] = img_lut:get(1 * img_lut:height() * img_lut:width() + ndvi_lutval * img_lut:width() + ndvi_lutval) / 255.0 - lut_result[2] = img_lut:get(2 * img_lut:height() * img_lut:width() + ndvi_lutval * img_lut:width() + ndvi_lutval) / 255.0 - - - - --return RGB 0=R 1=G 2=B - set_img_out(0, x, y, lut_result[0]) - set_img_out(1, x, y, lut_result[1]) - set_img_out(2, x, y, lut_result[2]) - - end - --set the progress bar accordingly - set_progress(x, rgb_output:width()) - end -end diff --git a/satdump_cfg.json b/satdump_cfg.json index 76ca0c101..66d89977c 100644 --- a/satdump_cfg.json +++ b/satdump_cfg.json @@ -590,6 +590,96 @@ } } }, + "Split Water Vapor": { + "channels": "cch5, cch6", + "remove_background": true, + "draw_map_overlay": true, + "calib_cfg": { + "cch5": { + "type": "temperature", + "min": 150, + "max": 300 + }, + "cch6": { + "type": "temperature", + "min": 150, + "max": 300 + } + }, + "vars": { + "minval": -35, + "maxval": 5, + "input_range": 150, + "lut": "lut/cal/CIMSSLUT.png" + }, + "lua": "scripted_compos/split_difference.lua", + "borders_color": [ + 1.0, + 1.0, + 1.0 + ], + "autogen": false + }, + "Split Ozone": { + "channels": "cch8, cch9", + "remove_background": true, + "draw_map_overlay": true, + "calib_cfg": { + "cch8": { + "type": "temperature", + "min": 150, + "max": 300 + }, + "cch9": { + "type": "temperature", + "min": 150, + "max": 300 + } + }, + "vars": { + "minval": -45, + "maxval": 5, + "input_range": 150, + "lut": "lut/cal/CIMSSLUT.png" + }, + "lua": "scripted_compos/split_difference.lua", + "borders_color": [ + 1.0, + 1.0, + 1.0 + ], + "autogen": false + }, + "Split Cloud Phase": { + "channels": "cch9, cch8", + "remove_background": true, + "draw_map_overlay": true, + "calib_cfg": { + "cch9": { + "type": "temperature", + "min": 150, + "max": 350 + }, + "cch8": { + "type": "temperature", + "min": 150, + "max": 350 + } + }, + "vars": { + "minval": -10, + "maxval": 25, + "input_range": 200, + "lut": "lut/cal/CIMSSLUT.png" + }, + "lua": "scripted_compos/split_difference.lua", + "borders_color": [ + 1.0, + 1.0, + 1.0 + ], + "autogen": false + }, "Cloud Top IR": { "channels": "cch9", "autogen": false, @@ -1066,7 +1156,7 @@ "geo_correct": true, "autogen": false }, - "Fog Brightness Temperature Difference": { + "Night Fog Difference": { "channels": "cch4, cch3b", "calib_cfg": { "cch4": { @@ -2141,7 +2231,7 @@ ], "autogen": false // Needs to be optimized... }, - "Fog Brightness Temperature Difference": { + "Night Fog Difference": { "channels": "cch13, cch7", "remove_background": true, "draw_map_overlay": true, @@ -2877,7 +2967,7 @@ "white_balance": true, "description": "descriptions/FireTempRGB.md" }, - "Fog Brightness Temperature Difference": { + "Night Fog Difference": { "channels": "cch13, cch7", "remove_background": true, "draw_map_overlay": true, @@ -3362,19 +3452,31 @@ }, "IR 10.8µm - IR 6.2 µm Difference": { "channels": "cch32, cch28", + "draw_map_overlay": true, "calib_cfg": { "cch32": { "type": "temperature", - "min": 0, - "max": 1000 + "min": 100, + "max": 400 }, "cch28": { "type": "temperature", - "min": 0, - "max": 1000 + "min": 100, + "max": 400 } }, - "lua": "scripted_compos/IR108-IR62_MODIS.lua", + "vars": { + "minval": -10, + "maxval": 50, + "input_range": 300, + "lut": "lut/cal/IR108-IR62-10+50.png" + }, + "lua": "scripted_compos/split_difference.lua", + "borders_color": [ + 1.0, + 1.0, + 1.0 + ], "autogen": false }, "Night Microphysics": { @@ -4096,6 +4198,64 @@ } } }, + "Split Water Vapor": { + "channels": "cch12, cch11", + "draw_map_overlay": true, + "calib_cfg": { + "cch12": { + "type": "temperature", + "min": 150, + "max": 300 + }, + "cch11": { + "type": "temperature", + "min": 150, + "max": 300 + } + }, + "vars": { + "minval": -35, + "maxval": 5, + "input_range": 150, + "lut": "lut/cal/CIMSSLUT.png" + }, + "lua": "scripted_compos/split_difference.lua", + "borders_color": [ + 1.0, + 1.0, + 1.0 + ], + "autogen": false + }, + "Split Ozone": { + "channels": "cch10, cch9", + "draw_map_overlay": true, + "calib_cfg": { + "cch10": { + "type": "temperature", + "min": 150, + "max": 300 + }, + "cch9": { + "type": "temperature", + "min": 150, + "max": 300 + } + }, + "vars": { + "minval": -45, + "maxval": 5, + "input_range": 150, + "lut": "lut/cal/CIMSSLUT.png" + }, + "lua": "scripted_compos/split_difference.lua", + "borders_color": [ + 1.0, + 1.0, + 1.0 + ], + "autogen": false + }, "Mid Stratosphere CO2 Temperature": { "description": "descriptions/sounders/MidStratoCO2T.md", "lut": "lut/cal/bluered.png", @@ -4190,20 +4350,47 @@ }, "IR 10.8µm - IR 6.2 µm Difference": { "channels": "cch9, cch12", + "draw_map_overlay": true, "calib_cfg": { "cch9": { "type": "temperature", - "min": 0, - "max": 1000 + "min": 100, + "max": 350 }, "cch12": { "type": "temperature", - "min": 0, - "max": 1000 + "min": 100, + "max": 350 } }, - "lua": "scripted_compos/IR108-IR62_HIRS.lua", + "vars": { + "minval": -10, + "maxval": 50, + "input_range": 250, + "lut": "lut/cal/IR108-IR62-10+50.png" + }, + "lua": "scripted_compos/split_difference.lua", + "borders_color": [ + 1.0, + 1.0, + 1.0 + ], "autogen": false + }, + "Differential Water Vapor RGB": { + "equation": "(1-(3/200-cch11+cch12)*(200/33))^0.2587, (1-((cch11*200+200-213.15)/(278.15-213.15)))^0.4, (1-((cch12*200+200-208.5)/(243.9-208.5)))^0.4", + "calib-cfg": { + "cch11": { + "type": "temperature", + "min": 200, + "max": 400 + }, + "cch12": { + "type": "temperature", + "min": 200, + "max": 400 + } + } } } }, @@ -4879,6 +5066,36 @@ } } }, + "Split Water Vapor": { + "channels": "cch10, cch11", + "remove_background": true, + "draw_map_overlay": true, + "calib_cfg": { + "cch10": { + "type": "temperature", + "min": 150, + "max": 300 + }, + "cch11": { + "type": "temperature", + "min": 150, + "max": 300 + } + }, + "vars": { + "minval": -35, + "maxval": 5, + "input_range": 150, + "lut": "lut/cal/CIMSSLUT.png" + }, + "lua": "scripted_compos/split_difference.lua", + "borders_color": [ + 1.0, + 1.0, + 1.0 + ], + "autogen": false + }, "Cloud Top IR": { "channels": "cch14", "autogen": false,