[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20040604: McIDAS - IMGCOPY usage



>From: Karthik Samudram Jayaraman <address@hidden>
>Organization: Western Michigan University
>Keywords: 200406041629.i54GTstK003141 McIDAS IMGCOPY

Karthik,

>We have downloaded some satellite data from SSEC by ftp ( .area 
>files ). They are multi banded images. Can you guide me how to 
>conver these multi banded images to many single banded images using 
>IMGCOPY ?

The process is simple, but it involves four steps:

1) setup an ADDE dataset that contains the images you downloaded from
   SSEC

2) setup an ADDE dataset in which you will create single-banded images

3) use IMGCOPY to copy single bands (using the BAND= keyword) from
   the dataset in 1) to the dataset in 2)

The McIDAS installation on s400 follows the Unidata recommendations,
so you already have a dataset you can use for 2), MYDATA/IMAGES.

Let's suppose that the images you FTPed from SSEC follow a naming
convention such that each has '.area' as a suffix.  Let's further
suppose that you FTPed the images into the single directory
/data/mcidas/images.  You can setup an ADDE dataset to serve those
images using the DSSERVE command from a McIDAS session:

DSSERVE ADD GOES/MULTIBAND AREA DIRFILE=/data/mcidas/images/*.area TYPE=IMAGE 
"Multibanded images FTPed from SSEC Data Center

After doing this, you should be able to list out the contents of the
images using IMGLIST.  Here is one example:

IMGLIST GOES/MULTIBAND.1 FORM=ALL

You can then use IMGCOPY to copy individual bands from the input dataset
to elements of the output dataset.  Here is one example:

IMGCOPY GOES/MULTIBAND.1 MYDATA/IMAGES.1234 BAND=1 SIZE=SAME

One other thing to note: the images you got from SSEC also have the
full GOES scanning, and GOES oversamples in the element dimension.
This means that if you look at the image without removing the
oversampling, the image will look stretched in th ehorizontal.

You can remove the oversampling in the same IMGCOPY invocation.  Here
is one example:

IMGCOPY GOES/MULTIBAND.1 MYDATA/IMAGES.1234 BAND=1 SIZE=SAME MAG=1 -2

Remember that each band from the input images will be written to a
separate file in the output dataset.  Since the MYDATA/IMAGES dataset
is setup to be able to access all IMAGES in AREA file format using the
AREAnnnn naming convention, this means that you must be
careful which MYDATA/IMAGES element you write to.  So, my advice
is to use output elements in the 123n - 8999 range, but do
so only after you verify that there is no image existing in the
element you specify.  For instance:

IMGLIST MYDATA/IMAGES.1234

If this shows that there is no image MYDATA/IMAGES.1234 (which would
be found in the file AREA1234), you can safely do the IMGCOPY.
If the image does exist, however, you have to decide if you really
want to overwrite it.

For reference the images received by the LDM in the UNIWISC datastream
are decoded into files that span the output name space AREA0001 - AREA1200,
so you should _NOT_ use those element numbers in your IMGCOPY.

Cheers,

Tom
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.