McIDAS User's Guide
Version 2016.1

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


IMGOPER

Applies mathematical functions to image data.


Format

IMGOPER sdataset1 . . sdatasetn ddataset [keywords] "comment


Parameters

sdataset1 . . n

source ADDE dataset names and positions; specify one of the following formats:

 

 

group/descriptor.position

alias.position

 

a position greater than zero represents an absolute position in the dataset; a position less than or equal to zero represents a relative position in the dataset based on image time; for example, 0 is the most recent and -1 is the next most recent; to use default position, do not specify .position (no default for group/descriptor or alias; default=0 for position)

ddataset

destination ADDE dataset name and absolute position; specify one of the following formats:

 

 

group/descriptor.position

alias.position

 

use only positive integers position

"comment

description placed in the image file directory's memo field; 32 characters maximum (default=no comment)


Image Positioning Keywords

LATlon=

lat lon

latitude and longitude of sdataset images to place at ddataset image location specified in the PLACE keyword

LINele=

line ele sys

 

 

line

line number of the sdataset image to place at the ddataset image location specified in the PLACE keyword (default=0)

 

 

ele

element number of the sdataset image to place at the ddataset image location specified in the PLACE keyword (default=line)

 

 

sys

coordinate system of the line and ele values; specify either F for file (area) coordinates or I for image coordinates (default=F)

PLAce=

location in the ddataset image to place the point specified in the LATLON, STATION or LINELE keyword; use one of the following:

 

ULEFT

upper-left corner of the image (default when the LINELE keyword is used)

 

CENTER

center of the image (default when the LATLON or STATION keyword is used)

STAtion=

station ID to place at the ddataset image location specified in the PLACE keyword; specify as the ID, e.g., KMSN or YSSY, optionally followed by the station type in brackets, e.g., ARX[N] or ARX[V]; see the TYPE keyword in the STNLIST command for valid station types


Image Selection Keywords

DAY=

selects from sdataset images with the specified day

ID=

selects from sdataset images with the specified NEXRAD station ID, e.g., MKX

RTIme=

bmin emin

selects from sdataset images within the specified range of minutes in the current hour; overrides the TIME keyword

TIMe=

btime etime

selects from sdataset images within the specified time range


Data Selection Keywords

BANd=

b1 . . bn

applies the function to the specified image bands (default=existing band for single-band images; no default for multiband images)

LLMt=

l1 . . ln

lower limit thresholds for each input data value in the equation; if input value is less than the specified limit, the output value is zero

MAG=

lmag emag

line and element magnification of the data; use a positive integer for blowup and a negative integer for blowdown (default=1 lmag)

MISs=

m1 . . mn

missing data values for source datasets; if input value equals missing data value, the output value is zero (default=0)

 

NONE

all pixels from source datasets are included in the analysis

SIZe=

line  ele

applies the function to the specified number of sdataset lines and elements (default=480 640)

 

ALL

applies the function to the entire sdataset image; all image positioning keywords are invalid with SIZE=ALL

TRACKing=

YES

tracks image if allowed by the server; tracking allows commands to receive data as it's being ingested by the server; commands complete when their data request has been fulfilled; tracking is only supported on some servers (e.g., Area, GVAR and MTSAT) and it can be disabled by the server administrator

 

NO

does not track image so server only sends data that is currently available (default=value of MCTRACK environment variable; if MCTRACK is not set, default=value set by server or server administrator)

ULMt=

u1 . . un

upper limit thresholds for each input data value in the equation; if input value is greater than the specified limit, the output value is zero

UNIt=

calibration type for the data, for example, BRIT, RAD, TEMP (default=BRIT)


Equation Format Keywords

ACOn=

additive constant for the equation (default=0.0)

COEf=

c1 . . cn

coefficients for each term in the equation (default=1.0)

FORm=

ADD

addition; adds each term in the equation; to subtract terms, specify COEF=-1 or SIGN=M (default)

 

CMAX  max new  

conditional maximum; uses only the term in the equation with the highest value less than the specified maximum; if all terms are greater than max, the new value is used (default=255 255)

 

CMIN  min new

conditional minimum; uses only the term in the equation with the lowest value greater than the specified minimum; if all terms are less than min, the new value is used (default=0 0)

 

MAX

maximum; uses only the term in the equation with the maximum value

 

MIN

minimum; uses only the term in the equation with the minimum value

 

MULT

multiplication; multiplies each term in the equation; to divide terms, specify POW=-1

FUNc=

transcendental function used in the equation; use one of the following:

 

ALOG

antilogarithm

 

EXP

exponential function

 

LN

natural log

 

LOG

logarithm

 

SQRT

square root

MCOn=

multiplicative constant for the equation (default=1.0)

OFF=

o1 . . on

offsets for each term in the equation (default= 0.0)

POWer=

p1 . . pn

powers for each term in the equation (default=1.0)

SIGn=

s1 . .  sn

multiplies the data values by 1 or -1

 

 

P

plus; multiplies by 1 (default)

 

 

M

minus; multiplies by -1


Output Keywords

CF=

YES

creates a CF-compliant netCDF file (default)

 

NO

creates a netCDF file in the previous (pre-2009.2) format, which is not CF-compliant; the CF=YES/NO keyword is valid only when writing to netCDF format destination datasets; it is ignored when writing to datasets of other formats

DOC=

YES

copies the sdataset image line documentation to the ddataset image (default=NO)

NAVtype=

RECT

remaps MODIS imagery into a rectilinear projection and applies a bowtie correction using MRTSwath (MODIS Reprojection Tool - Swath, package courtesy of the U.S. Geological Survey); use this keyword only when the source image is MODIS Level 1B or Level 2 data on a remote server with the MRTSwath package installed; this keyword is ignored if used with any other type of data

PROd=

user-defined product name for the ddataset image, up to four characters (default=PROD)

SCAle=

prodlo prodhi britlo brithi

minimum and maximum product and brightness values for the calibration (default=0 255 0 255)


Remarks

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.

Before the input data values are used in the equation, they are checked against the lower and upper limit thresholds set with the keywords LLMT and ULMT. If you do not specify limit thresholds, all data is used.

To use data from more than one band in a single multibanded image, you must specify that image with the sdataset parameter for each band used. For example, the following entry subtracts data values for band 10 from band 8, both in image A/A.1, and places the resulting image in A/A.5.

IMGOPER A/A.1 A/A.1 A/A.5 FORM=ADD BAND=8 10 COEF=1 -1

All source images must have the same projection, resolution and navigation. If they do not, use the command IMGCOPY or IMGREMAP before using IMGOPER. The source image can have unlimited number of lines and no more than 22,000 elements.

The destination image receives the directory information from the last source image. To change the image directory information, use the IMGCHA command.

To get better precision for operations that result in small values, use the keywords MCON and SCALE.

When using multiple source images, you must specify keyword values in the same order as the source images: value1 applies to the data in sdataset1. If a keyword allows for multiple values, the last entered value is the default for all subsequent values. The default listed for the keyword only applies if the keyword is not used. In the following command, for example, because an offset was specified only for images A/A.1 and A/A.2, image A/A.3 receives an offset of 10, the last entered value.

IMGOPER A/A.1 A/A.2 A/A.3 D/D.5 FORM=ADD OFF=1 10

Currently each data value in the output image, ddataset, can contain only 1-byte data. If the range of output data values is greater than 256, the output data loses accuracy.

You can use IMGOPER to create a netCDF image file. To do so, the destination dataset must be NCDF-format and IMAGE-type. See the Remarks section in the DSSERVE command for more information.


Examples

IMGOPER A/A.1 A/A.1 A/A.5 FORM=ADD BAND=8 10 SIGN=P M

This entry subtracts data values of band 10 from band 8, both in the image in position 1 in dataset A/A, and places the resulting image in position 5 in dataset A/A.

IMGOPER A/A.1 A/A.4 A/A.5 FORM=ADD BAND=2 3 COEF=1 -2

This entry multiplies the data values of band 3 of the image in position 4 in dataset A/A by 2 and subtracts them from band 2 of the image in position 1 in dataset A/A and places the resulting image in position 5 in dataset A/A.

IMGOPER OLD/DATA.1 OLD/DATA.1 OLD/PROD BAND=8 10 COEF=1 -1 SCALE=-10 10 PROD=DIFF UNIT=TEMP

This entry subtracts band 10 temperature data from band 8 temperature data of the image in position 1 in dataset OLD/DATA and places the resulting image in dataset OLD/PROD in the position following the most recent image. The output values are given the product name DIFF. The difference values between -10 and 10 are scaled from 0 to 255.

IMGOPER MSI.4 MSI.4 RATIO.1 FORM=MULT BAND=7 8 POW=1 -1 PROD=RATI SCALE=50 150 50 200 UNIT=BRIT MCON=100

This entry divides the brightness values from band 7 by the brightness values from band 8 of the image in position 4 in the dataset with the alias name MSI. The resulting image is placed in position 1 in the dataset with the alias name RATIO. The output values are given the product name RATI and multiplied by 100. The product values from 50 to 150 are scaled from brightness 50 to 200.

IMGOPER GOES/IR.1 GOESIR.2 PROD.4 BAND=8 8 COEF=-1 1 SCALE=-10000 10000 UNIT=RAD PROD=TEST MCON=1000

This entry subtracts band 8 radiance data in the image in position 1 in dataset GOES/IR from band 8 radiance data in the image in position 2 in dataset GOES/IR and places the resulting image in position 4 in dataset PROD. The output values are given the product name TEST and multiplied by 1000. The product values from -10000 to 10000 are scaled from brightness 0 to 255.

IMGOPER I/TEST.8 I/PROD.4 FUNC=LOG SCALE=0 20 0 255 UNIT=RAD MCON=1000

This entry multiplies the data values in the image in position 8 in dataset I/TEST by 1000 and then takes the logarithm. The results from 0 to 20 are scaled from brightness 0 to 255 and placed in position 4 in dataset I/PROD.

IMGOPER A/ALL.8344 A/ALL.4004 MISS=0 FUNC=LN PROD=NTLN SCALE=0 6 UNIT=BRIT

This entry takes the natural logarithm of the brightness image data in the image in position 8344 in dataset A/ALL and places the resulting image in position 4004 in the same dataset. The output values are given the product name NTLN. The product values from 0 to 6 are scaled from brightness 0 to 255.

IMGOPER G-7.1 MET3.1 A.1 SCALE=0 130050 0 255 PROD=PRMS POW=2 FORM=ADD "Intermediate RMS
IMGOPER A.1 A.2 PROD=RMS FUNC=SQRT MCON=0.5 UNIT=PRMS "Actual RMS

These entries compute the Root Mean Square (RMS) difference between the data in the images in position 1 in the datasets with the alias names G-7 and MET3. The first entry computes the sum of the squares of the data. The second entry computes the average square root of the results of the first command. Before running IMGOPER, the two source images must be remapped so that they have identical navigation.

IMGOPER GOES7/IR.30 METEOSAT/IR.3 COMPOSITE.1 FORM=CMIN SIZE=ALL

This entry takes the entire image in position 30 in dataset GOES7/IR and the entire image in position 3 in dataset METEOSAT/IR and combines the two images using the CMIN option. Before running IMGOPER, the two source images must be remapped so that they have identical navigation.

IMGOPER TEST/AREA.1 TEST/AREA.2 LLMT=108 ULMT=144 SCALE=108 144 2 38
IMGOPER TEST/AREA.1 TEST/AREA.3 LLMT=148 ULMT=196 SCALE=148 196 43 136
IMGOPER TEST/AREA.2 TEST/AREA.3 TEST/AREA.4 FORM=ADD MISS=NONE

These entries apply a series of scaling to the brightness values in the image in position 1 in dataset TEST/AREA. All brightness values between 0 and 107 are set to zero, all brightness values between 108 and 144 are scaled from 2 to 38, and all brightness values between 148 and 196 are scaled from 43 to 136. All values outside the specified LLMT and ULMT values are assigned a value of zero. The third command adds the output from the first two together so that TEST/AREA.4 has the desired results.

IMGCOPY NEXRAD/BREF1.1 DTX/RADAR.51 ID=DTX SIZE=ALL
IMGCOPY NEXRAD/BREF1.3 DTX/RADAR.52 ID=DTX SIZE=ALL
IMGCOPY NEXRAD/BREF1.5 DTX/RADAR.53 ID=DTX SIZE=ALL
IMGCOPY NEXRAD/BREF1.7 DTX/RADAR.54 ID=DTX SIZE=ALL
IMGOPER DTX/RADAR.51 DTX/RADAR.52 DTX/RADAR.53 DTX/RADAR.54 DTX/RADAR.55 FORM=ADD COEF=0.25 0.25 0.25 0.25

These four IMGCOPY entries copy the four images in positions 1, 3, 5 and 7 of dataset NEXRAD/BREF1 to positions 51-54 of dataset DTX/RADAR. The IMGOPER entry then computes the mean of the four images and writes the output to the image in position 55 of dataset DTX/RADAR.


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]