Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 
Table of contents Previous: Image Command Examples - Enhance/Colorize Next: Graphics and the Cursor

5.1.4 Image Command Examples - Manipulation

The IMGCOPY, IMGOPER, and IMGREMAP commands can be used to copy and maniuplate images. Later in the workshop, we will look at these commands in more detail.

  1. Show frame 4, copy the first GOES-7 4km Vis image from the BLIZZARD dataset to position 1 in your MYDATA/TEST-IMAGES (AKA TI) dataset and display the image on frame 4. The SIZE=ALL keyword copies the entire image to the destination dataset.

    Type: SF 4
    Type: IMGCOPY GV4.1 TI.1 SIZE=ALL;IMGDISP TI.1 4

  2. List the two image directories

    Type: IMGLIST GV4.1 FORM=BAND;IMGLIST TI.1 FORM=BAND

    Notice that the images now contain the same information and the image resolutions are the same.

    
    Image file directory listing for:GV4
     Pos Satellite/         Date       Time      Center      Res (km)   Image_Size
         sensor                                 Lat  Lon    Lat   Lon
     --- -------------  ------------  --------  ---- ----  ----- ----- ------------
       1  GOES-7        13 MAR 93072  17:01:00    26   87
        Band: 1   0.65 um Daytime cloud detection            4.0   4.0  1335 x 1608
    
    Image file directory listing for:TI
     Pos Satellite/         Date       Time      Center      Res (km)   Image_Size
         sensor                                 Lat  Lon    Lat   Lon
     --- -------------  ------------  --------  ---- ----  ----- ----- ------------
       1  GOES-7        13 MAR 93072  17:01:00    26   87
        Band: 1   0.65 um Daytime cloud detection            4.0   4.0  1335 x 1608
    

  3. Show frame 5, copy the first GOES-7 4km IR image to the second position in your TI dataset and display the image on frame 5 centered on Boston.

    Type: SF 5
    Type: IMGCOPY GI4.1 TI.2 STATION=BOS;IMGDISP TI.2 5

  4. List the two image directories.

    Type: IMGLIST GI4.1 FORM=BAND;IMGLIST TI.2 FORM=BAND

    In GI4.1, the image size is 1335 X 1608. Notice that the image size for TI.2 is 480 X 640 on image TI.2. If the SIZE=ALL keyword is not specified, a 480 by 640 image sector is copied to the new area (the size of the image frame).

    
    Image file directory listing for:GI4
     Pos Satellite/         Date       Time      Center      Res (km)   Image_Size
         sensor                                 Lat  Lon    Lat   Lon
     --- -------------  ------------  --------  ---- ----  ----- ----- ------------
       1  GOES-7 IR     13 MAR 93072  17:01:00    26   87
        Band: 8  11.2 um Night cloud detection, sfc temp     4.0   4.0  1335 x 1608
    
    Image file directory listing for:TI
     Pos Satellite/         Date       Time      Center      Res (km)   Image_Size
         sensor                                 Lat  Lon    Lat   Lon
     --- -------------  ------------  --------  ---- ----  ----- ----- ------------
       2  GOES-7 IR     13 MAR 93072  17:01:00    42   71
        Band: 8  11.2 um Night cloud detection, sfc temp     4.0   4.0   480 x  640
    
    

  5. Show frame 6, copy latest GOES-7 4km Visible image to TI.3 centered on Mobile, Alabama, and increase the resolution by a factor of 2. Display it on frame 6.

    Type: SF 6;IMGCOPY GV4 TI.3 STATION=KMOB MAG=2;IMGDISP TI.3 6

    The image is displayed on frame 6 with a resolution of 2 km.

  6. List the two images to compare image resolutions. Note that the lat and lon resolution values are different between the images.

    Type: IMGLIST GV4 FORM=BAND;IMGLIST TI.3 FORM=BAND

    The original image (GV4.3) had a resolution of 4 km and the new area (TI.3) has a resolution of 2 km. This is a blow up.

  7. Remap the latest GOES-7 Visible image in the BLIZZARD dataset to a mercator projection centered on Washington, DC and place it in the fourth position in the TI dataset. Keep the output resolution at 4 km and remap the entire area

    Type: IMGREMAP GV4 TI.4 STATION=DCA PRO=MERC RES=4 DSIZE=ALL

  8. List out the directory information for these images.

    Type: IMGLIST GV4 FORM=BAND;IMGLIST TI.4 FORM=BAND

    Image file directory listing for:GV4
     Pos Satellite/         Date       Time      Center      Res (km)   Image_Size
         sensor                                 Lat  Lon    Lat   Lon
     --- -------------  ------------  --------  ---- ----  ----- ----- ------------
       3  GOES-7        13 MAR 93072  18:01:00    26   87
        Band: 1   0.65 um Daytime cloud detection            4.0   4.0  1337 x 1604
    
    Image file directory listing for:TI
     Pos Satellite/         Date       Time      Center      Res (km)   Image_Size
         sensor                                 Lat  Lon    Lat   Lon
     --- -------------  ------------  --------  ---- ----  ----- ----- ------------
       4  GOES-7        13 MAR 93072  18:01:00    41   78
        Band: 1   0.65 um Daytime cloud detection            4.0   4.0  2274 x 1940
    

    Notice that the second image now has a different center lat/lon and is a different size than the original image.

  9. Show frame 1. Display the images in frames 1 and 2 centered over Washington, DC. Draw a map of dashed lat/lon lines in color 3 on each image. You will learn more about the MAP command in the Graphics and the Cursor lesson.

    Type: SF 1
    Type: IMGDISP GV4 1 STATION=DCA REFRESH='MAP LALO -3 GRA=(GRA) IMA=(GRA)'
    Type: IMGDISP TI.4 2 STATION=DCA REFRESH='MAP LALO -3 GRA=(GRA) IMA=(GRA)'

  10. Loop between the frames.

    Type: LS 1-2
    Press: Alt L

    Notice that the images have different projections.

  11. Stop the loop.

    Press: Alt L

  12. Create a new image using subsequent GOES-7 IR images in the BLIZZARD dataset using the formula GI4.1 - GI4.2. This will show the shift in the clouds from one image to the next. Put the new image into position 5 of the TI dataset.

    Type: IMGOPER GI4.1 GI4.2 TI.5 COEF=1 -1 FORM=ADD MAG=-3

    IMGOPER generates a new image by applying mathematical functions to data from one or more source images. The following equation computes the data value for each line/element pair in the destination image. This operation is performed repeatedly using data from source image line/element pairs as input values (input) until the entire image is completed.
    output data value=  
    FUNC[ACON+(MCON*(FORM((COEF1*(OFF1+((SIGN1)*input1)**POW1))
     (COEF2*(OFF2+((SIGN2)*input2)**POW2)) . .
     (COEFn*(OFFn+((SIGNn)*inputn)**POWn)))))]

    The part of the equation operating on a single input data value, (COEFn*(OFFn+((SIGNn)*inputn)**POWn)) , is referred to as a term. n represents the number of sdataset images. It may not be larger than 100. input1 . . n represents the individual data values from each of the source images. The FORM determines how the terms are combined. For example, if you specify FORM=MULT, the terms are multiplied.

  13. Display the images in frames 3-5 using a blowdown factor of -3 for the original images.

    Type: IMGDISP GI4.1 3 MAG=-3
    Type: IMGDISP GI4.2 4 MAG=-3
    Type: IMGDISP TI.5 5

  14. Loop through the images.

    Type: LS 3-5
    Press: Alt L

  15. Stop the loop.

    Press: Alt L

  16. Add a label to the image frame.

    Type: SF 5;FRMLABEL IMA=5 "CLOUD MOVEMENT FROM 17:01 TO 17:31

  17. Exit McIDAS


Table of contents Previous: Image Command Examples - Enhance/Colorize Next: Graphics and the Cursor

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690