McIDAS-X Expanded Stretch Feature
McIDAS-X versions 2017.2 and later include improvements to visualize more bit-depth in the data and provide more contrast in the images.
This expanded stretch feature was added to increase the detail shown in visible, water vapor and short-wave infrared imagery when displayed with IMGDISP from an updated ADDE server or copied to a 1-byte Area file using commands like IMGCOPY with STYPE=VISR or IMGREMAP. This is done by expanding the range of data values stretched out over the 8-bit brightness values in the higher reflectances in visible bands, and in the very hot temperatures in short-wave IR bands. The range of data values is narrowed in both colder and warmer temperatures in the water vapor bands.
Additional information, including how to use the expanded stretch feature, which satellite and band combinations use the feature, and how to modify existing enhancement tables to work with imagery, is found in the Details section below.
WHAT YOU WILL SEE
Water Vapor Bands
The example below shows a GOES-16 band 8 water vapor image displayed in McIDAS-X version 2017.2 on the left, and the same image displayed in version 2017.1 on the right. Note that the expanded stretch feature in 2017.2 (left image) results in more contrast due to using a smaller range of data values stretched out over the 8-bit brightness values.
NEW | PREVIOUSLY |
Visible Bands
The example below shows a GOES-16 band 2 visible image displayed in McIDAS-X version 2017.2 on the left, and the same image displayed in version 2017.1 on the right. Note that the expanded stretch feature in 2017.2 (left image) shows more detail in the highly reflective cloud tops near the center of the image due to its use of a larger range of data values stretched out over the 8-bit brightness values.
NEW | PREVIOUSLY |
The improved contrast is not easy to see in the grayscale image, but adding a color enhancement shows the detail in the clouds that is washed out and white in the previous versions of McIDAS. The example below shows the same GOES-16 band 2 visible images as the example above, but with a color enhancement applied.
Since the enhancement tables map colors to 8-bit brightness values and the brightness values had changed, we needed to update the enhancement table to use the new values. The enhancement on the left was created from the one on the right by using the new EU CONV option to convert an enhancement table created prior to 2017.2 to work with the expanded stretch feature. It now maps the same image values to the same display colors/shades as it did without the expanded stretch, as well as showing the improved contrast.
NEW | PREVIOUSLY |
Short-wave IR Bands
The changes in the IR are not as dramatic visually, but make automated tasks like fire detection much easier to accomplish. The example below shows a GOES-16 band 7 short-wave IR image displayed in McIDAS-X version 2017.2 on the left, and the same image displayed in version 2017.1 on the right. Note that the expanded stretch feature in 2017.2 (left image) shows additional detail because the temperatures in the warmer regions are stretched out over the 8-bit brightness values.
NEW | PREVIOUSLY |
The example below shows the same GOES-16 band 7 short-wave IR images as above, but zoomed in on the dark fire region in the upper-right quarter of the image and enhanced to show the subtle differences in the pixel values of the fire region. In particular, there is a larger range of brightness temperature values in the perimeter of the fire. In very hot regions that are likely fires, the expanded stretch lets you more easily identify the hottest regions versus those that are slightly cooler.
NEW | PREVIOUSLY |
New Command Options
If you have old enhancement tables that you use with water vapor, visible, or short-wave IR images, a warning message will be displayed if you try to use the old enhancement table with an image displayed with the expanded stretch. Use the EU CONV command to covert your old enhancement table to one that will map the same color to the same data values as it did previously.
If you prefer your images to be displayed with the pre-2017.2 stretch, or need it to match the grayscale enhancement of an older image, use the MCS=ORIG keyword in your IMG* command (see the Details below).
Details
Scanning instruments on newer satellites are often more sensitive than on earlier satellites and thus record more detailed information in their imagery. For example, the visible bands in GOES-16 ABI and Himawari-8 AHI data can detect reflectance/albedo values up to 120%, and the short-wave IR bands for those satellites can record higher maximum temperatures (e.g., near or above 400 K).
In order to better utilize and display this data, a new feature was added to McIDAS-X beginning with version 2017.2. The new feature, called the expanded stretch, increases the detail shown in certain visible, water vapor and short-wave IR imagery when displayed with IMGDISP or copied to a 1-byte Area file using commands like IMGCOPY with STYPE=VISR or IMGREMAP. The expanded stretch was added for all of the operational satellites, so that the grayscale images would match for all satellites.
The bullets below describe how to use the expanded stretch feature, which satellite and band combinations use the feature, and how to modify existing enhancement tables to work with imagery displayed using the expanded stretch.
- The expanded stretch feature is implemented through the MCSTRETCH environment variable and MCSTRETCH= command-line keyword. The options are EXP or ORIG, where EXP requests the expanded stretch feature and ORIG requests the previous stretch that was used in all McIDAS-X versions prior to 2017.2.
- The default for the McIDAS-X session is determined by the MCSTRETCH environment variable. If the environment variable is not set, then EXP is assumed. This means that unless the MCSTRETCH environment variable is explicitly set to ORIG or the command-line keyword MCSTRETCH=ORIG is specified in the McIDAS command, the expanded stretch feature is requested. The command-line keyword is valid in the AXFORM, IMGCOPY, IMGDISP, IMGFILT, IMGOPER, IMGPARM, IMGPROBE, IMGREMAP, and IMGRGB commands. GEO, IMGMAG, IMGTRACK, and LEO do not use the keyword, but do honor the environment variable.
- Because the expanded stretch option is available only in versions 2017.2 and later, requests for the expanded stretch will not work if the image specified in your command is located on a remote server running a version earlier than 2017.2. You can, however, first IMGCOPY or IMGREMAP it to your local workstation running 2017.2 or later, then specify the local image in your command requesting the expanded stretch.
- In addition to the 2017.2 version requirement above, the expanded stretch feature is also used only if the image matches one of the satellite and band combinations that can use the feature. The table below lists the satellite and band combinations in the latest version of McIDAS-X, the old range of values (prior to McIDAS-X 2017.2), and the new range of values that the specified stretch table automatically applies when the expanded stretch feature is used. The table can also be listed in your version of McIDAS-X by running the command SEE MCSTRETCH.TXT. Its content was last updated in version 2023.1.
Satellite / Server SS number(s) Band Old Range New Range Units StretchTable ------------------ ------------ ---- --------- --------- ----- ------------ COMS-1 250 2 163 - 330 190 - 400 K SWIRCORE COMS-1 250 3 163 - 330 180 - 280 K WVXXCORE EWS-G1,G2,G3 174,176,178 2 163 - 330 190 - 400 K SWIRCORE EWS-G1,G2,G3 174,176,178 3 163 - 330 180 - 280 K WVXXCORE FY-2D,E,F,G,H 36,37,38,39,40 4 163 - 330 180 - 280 K WVXXCORE FY-2D,E,F,G,H 36,37,38,39,40 5 163 - 330 190 - 400 K SWIRCORE GOES-8,9,10,11 70,72,74,76 2 163 - 330 190 - 400 K SWIRCORE GOES-8,9,10,11 70,72,74,76 3 163 - 330 180 - 280 K WVXXCORE GOES-12,13,14,15 78,180,182,184 2 163 - 330 190 - 400 K SWIRCORE GOES-12,13,14,15 78,180,182,184 3 163 - 330 180 - 280 K WVXXCORE GOES-16,17,18,19 186,188,190,192 2 0 - 100 0 - 116 % ALBXCORE GOES-16,17,18,19 186,188,190,192 7 163 - 330 190 - 400 K SWIRCORE GOES-16,17,18,19 186,188,190,192 8 163 - 330 180 - 280 K WVXXCORE GOES-16,17,18,19 186,188,190,192 9 163 - 330 180 - 280 K WVXXCORE GOES-16,17,18,19 186,188,190,192 10 163 - 330 180 - 280 K WVXXCORE Himawari-8,9 86,287 3 0 - 100 0 - 116 % ALBXCORE Himawari-8,9 86,287 7 163 - 330 190 - 400 K SWIRCORE Himawari-8,9 86,287 8 163 - 330 180 - 280 K WVXXCORE Himawari-8,9 86,287 9 163 - 330 180 - 280 K WVXXCORE Himawari-8,9 86,287 10 163 - 330 180 - 280 K WVXXCORE HimawariCast-8,9 286,288,289 3 0 - 100 0 - 116 % ALBXCORE HimawariCast-8,9 286,288,289 7 163 - 330 190 - 400 K SWIRCORE HimawariCast-8,9 286,288,289 8 163 - 330 180 - 280 K WVXXCORE HimawariCast-8,9 286,288,289 9 163 - 330 180 - 280 K WVXXCORE HimawariCast-8,9 286,288,289 10 163 - 330 180 - 280 K WVXXCORE Meteosat-8,9,10,11 51,52,53,354 4 163 - 330 190 - 400 K SWIRCORE Meteosat-8,9,10,11 51,52,53,354 5 163 - 330 180 - 280 K WVXXCORE Meteosat-8,9,10,11 51,52,53,354 6 163 - 330 180 - 280 K WVXXCORE Meteosat-12,13,14 355,356,357 3 0 - 100 0 - 116 % REFLCORE Meteosat-12,13,14 355,356,357 9 163 - 330 190 - 400 K SWIRCORE Meteosat-12,13,14 355,356,357 10 163 - 330 180 - 280 K WVXXCORE Meteosat-12,13,14 355,356,357 11 163 - 330 180 - 280 K WVXXCORE Metop-A,B,C 240,241,242 3 163 - 330 190 - 400 K SWIRCORE MODIS 101,111 20 163 - 330 190 - 400 K SWIRCORE MODIS 101,111 21 163 - 330 190 - 400 K SWIRCORE MODIS 101,111 22 163 - 330 190 - 400 K SWIRCORE MODIS 101,111 23 163 - 330 190 - 400 K SWIRCORE MODIS 101,111 27 163 - 330 180 - 280 K WVXXCORE MODIS 101,111 28 163 - 330 180 - 280 K WVXXCORE NOAA-10 to -19 60-69 3 163 - 330 190 - 400 K SWIRCORE NOAA-20 to -23 301-304,321-324 18 163 - 330 190 - 400 K SWIRCORE Suomi NPP 300,320 18 163 - 330 190 - 400 K SWIRCORE
- Because the expanded stretch feature automatically applies the stretch tables in the table above (ALBXCORE, SWIRCORE, WVXXCORE) when you display any of the satellite and band combinations in the table, you may want to update the enhancement tables that you use with them. The EU command includes a new option to do so. The new option, CONV, converts an existing enhancement table to use the new ranges so that when it’s applied to an image displayed with the expanded stretch option, it maps the same image values to the same display colors/shades as it did without the expanded stretch (as shown in the color enhancement example above). A backup copy of the original enhancement table is automatically created when you specify the CONV option.
- Another setting that affects the appearance of image displays is the number of image display levels in your McIDAS-X session. For regular (foreground) sessions, the number is set by the -imageColors flag in the .mcidasrc file. Its default is 128, which is the setting used when creating the sample images on this page. For background sessions (scripts or commands run from the Unix prompt), the number is set by the -i flag specified with the mcenv command. Its default is 48. Setting -imageColors or -i to a larger value provides more detail in displayed imagery because of the increased number of image display levels. Because the -i default for background sessions is only 48 image display levels, increasing its value is useful if image detail/quality is important. See the Configuring McIDAS-X Sessions with .mcidasrc, the Image and Graphics Colors and the Running Scripts and Commands Using mcenv pages in the McIDAS User’s Guide for more information. As noted in the Image and Graphics Colors page, the maximum number of colors is 253 or 254, depending on your hardware. So the total number specified in the -imageColors and -graphicsColors flags (-i and -g in mcenv) cannot be greater than 253 or 254.
- These changes may affect your locally-developed McIDAS code. (See http://www.ssec.wisc.edu/mcidas/software/x/fastrack2017.2_changes.txt for the complete list of code changes included in McIDAS-X 2017.2.) SSEC recommends that you always compile and link all local code after installing each new version of McIDAS-X. The modules that were updated in McIDAS-X 2017.2 for the addition of the expanded stretch feature are listed below.
abinaget.cp, ALBXCORE.ST, areaagetsub.for, AreaDir.h, avgi.pgm, axform.pgm, comsaget2.for, eu.pgm, globkey.pgm, gvaraget.cp, imgcopy.pgm, imgdisp.pgm, imgdparm.inc, imgplot.pgm, imgprobe.pgm, imgremap.pgm, initblok.for, isenhstr.for, kbenhstr.for, kbxabin.dlm, kbxcoms.dlm, kbxfy2.dlm, kbxgvar.dlm, kbxmods.dlm, kbxmsg.dlm, kbxvisr.dlm, kbxwarc.dlm, kbxwari.dlm, m0arg.h, m0brkset.for, m0grayscale.for, mcaget.for, MCSTRETCH.TXT, modsaget.cp, msgtaget2.for, opnara.for, setenhstr.for, su.pgm, SWIRCORE.ST, warcaget2.f, wariaget.cp, WVXXCORE.ST