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

20050608: could not get the McIDAS shell programs (cont.)



>From: "Mekonnen Gebremichael" <address@hidden>
>Organization: Pratt School of Engineering, Duke University
>Keywords: 200504201601.j3KG1gv2005753 McIDAS probing image values

Hi Mekonnen,

>Following your suggestion, I uncompressed one file (for 01:45 on the same
>day) and did as per your steps. I found that it contains only zeroes,

How did you determine this?  By using imgdisp.k to display the
image and seeing nothing but black?

>and
>hence, performed the 'redirect' and 'lwu' commands. So it seems to be
>working. 

OK, very good.

>By the way, in order to check I created a new dataset - but you said..
>"The ADDE definition for GLOBIR allows both of these images to be viewed
>as part of the same dataset." I did not quite get it.

The regular expression used in the DIRFILE= keyword of DSSERVE (dsserve.k)
will match all image files that in the directory specified.

>For example, when you
>typed 'imgdisp.k GLOBIR/AREA.1 MAG=-4'. How did it know if the file
>displayed is '*.0045' and not '*.0015'?

To see all of the elements of the dataset, use the IMGLIST (imglist.k)
command:

imglist.k GLOBIR/AREA.ALL

You should see one line for every image that you have added to the
dataset (i.e., one for each file you copy to the directory specified
in the DIRFILE= regular expression).

By the way, the best way to test the dataset definition (DIRFILE=
value is to clip out the regular expression and use it ias the target
of the Unix 'ls' command.

>Could we now revisit my ultimate goal of dumping out data values?

Sure.  Previously, I outlined a procedure you could use to create a new
image that contained the subset (sector) of interest from the original
and then use a McIDAS command called AXFORM to dump out the values from
the newly created sector.  For simplicity sake, I have included my
earlier comments after updating the dataset name to match what
we have been using in our later emails:

  (2) I would like to produce an ascii file that contains the subset of this
  image over the US, but it is not clear from the Learning Guide how to do
  this. I would appreciate your insight into this.
  
  The steps I would use are:
  
  - create an output dataset of type AREA into which you can wite images.
    I would use the default MYDATA/IMAGES dataset since there is a McIDAS
    BATCH file that will create the dataset for you:
  
  BATCH MYDATA.BAT
  
    This will create a dataset with group name MYDATA with 4 descriptors:
  
    MYDATA/IMAGES
    MYDATA/GRIDS
    MYDATA/PTSRCS
    MYDATA/TOPO
  
    You will be interested in using the MYDATA/IMAGES dataset.
  
  - create a new image that contains the coverage you want using IMGCOPY.
    Here is one example of how to do this:
  
  IMGCOPY GLOBIR/AREA.1 MYDATA/IMAGES.3000 LATLON=30 100 SIZE=600 800
  
    This will result in the extraction of a sector of 600 lines by 800
    elements centered on 30N and 100W.  The new sector will be written
    into AREA3000.  AREA3000 should be located in your ~mcidas/workdata
    directory.
  
    You will need to adjust the LATLON= center Latitude and Longitude
    to what you want and the SIZE= to the size you want to get the
    coverage you desire.
  
  - write the ASCII values from the newly created image sector out to
    disk files using AXFORM.  Here is an example:
  
  AXFORM 3000 mekonnen FTYPE=ASC 
  
    This will result in the creation of the files mekonnen.* in the
    McIDAS working directory which will be ~mcidas/workdata if you
    are doing all of this as the user 'mcidas'.

There is another way to list out values, use the IMGPROBE (imgprobe.k)
command on the original image and specify the aree you are interested
in.  Please refer to the online help and User Guide documentation for
IMGPROBE for information on how to use it.

The following is an example using IMGPROBE to list out values from a
specific element (image) of your GLOBIR/AREA dataset:

imgprobe.k LIST BOX BRIT MODE=N LATLON=40 105 SIZE=100 100 DATASET=GLOBIR/AREA.1

This command will list out brightness values from the image that
occupies the first element of the GLOBIR/AREA dataset.  The listing
(LIST) will be for a rectangular area (BOX) of brightnesses (BRIT)
centered on 40N, 105W (LATLON=40 105; NB: McIDAS specifies western
longitudes as positive and eastern as negative (!)).  The coverage of
the rectangular area is specified by the number of image lines
(vertical) and elements (horizontal) comprising the area (SIZE=100
100).  The MODE=N keyword tells the command that you are not doing the
probe interactively.  IMGRPOBE allows the user to probe a displayed
image by moving the mouse to the location of interest and clicking a
mouse button.  This, however, requires that you run an interactive
McIDAS sessoin, so it does not lend itself to batch processing of
images.

The thing I don't like about IMGPROBE listings is they are segmented.
Try an example and you will see what I mean.  The thing I do like about
the IMGPROBE listing is that you can specify the unit of the output
value (e.g., for your images you can list out Temperatures in K)

McIDAS commands allow you to write their textual output to a "device"
(e.g., printer, file) of your choosing using the global keyword DEV=
(global keywords work for all McIDAS commands; they will not be listed
individually in the online help or in the Users Guide section for the
command; see the Users Guide Appendix that discusses global keywords).

So, if you wanted to tell IMGPROBE to write its textual output to an
ASCII file, you would add the 'DEV=T fname' sequence to the command.
Here is the example above modified to write the output to a file named
globir.data:

imgprobe.k LIST BOX BRIT MODE=N LATLON=40 105 SIZE=100 100 
DATASET=GLOBIR/AREA.1 DEV=T globir.data

The file you are writing to will be located in your McIDAS working
directory or in the directory specified by a file REDIRECTion.  For
simplicity since you are a new McIDAS user, let's not get into file
REDIRECTions (they are the source of the largest confusion to new
McIDAS users).  So, your output file will be written to the $MCDATA
directory since the environment you defined in your shell-definition
file (~mek11/cshrc.mcidas in your case) specifies this directory as the
first value in MCPATH.

Please give the IMGPROBE and AXFORM approaches a try and let me
know if you have questions.

Cheers,

Tom
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly 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.


pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy