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 e8c43e2af..000000000 Binary files a/resources/lut/IR108-IR62-10+50_HIRS.png and /dev/null differ diff --git a/resources/lut/cal/CIMSSLUT.png b/resources/lut/cal/CIMSSLUT.png new file mode 100644 index 000000000..7dcc957af Binary files /dev/null and b/resources/lut/cal/CIMSSLUT.png differ diff --git a/resources/scripted_compos/IR108-IR62_HIRS.lua b/resources/scripted_compos/IR108-IR62_HIRS.lua deleted file mode 100644 index ec5534584..000000000 --- a/resources/scripted_compos/IR108-IR62_HIRS.lua +++ /dev/null @@ -1,56 +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 cch9 = get_calibrated_value(8, x, y, true) - local cch12 = get_calibrated_value(11, x, y, true) - - - --perform split window - local ndvi = cch9-cch12 - --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/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,