comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » PV-Wave FAQ
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
PV-Wave FAQ [message #4794] Tue, 25 July 1995 00:00
rep2857 is currently offline  rep2857
Messages: 28
Registered: December 1994
Junior Member
Hello all:

Following is the PV-Wave FAQ. It began life as the IDL FAQ and
therefore looks quite a bit like the IDL FAQ. There are not many major
differences between the two FAQ's, but that's bound to change as the
two companies (Visual Numerics, Inc. and Research Systems, Inc.) slowly
diverge. Note that some questions are missing from the IDL FAQ since
they don't pertain to PV-Wave. I have left gaps in the question numbers
to reflect the missing numbers from the IDL FAQ. Since this is an
initial release I expect people to find plenty of problems. Please
report them to me along with whatever needs to be done to correct the
problem.

An HTML version of this faq is available at:
ftp://fermi.jhuapl.edu/www/s1r/idl/idl_faq/pvwave_faq.html

If you are not familiar with the above syntax, further information for
interpreting the above line is available in Appendix 1 of this document.

Regards,

Mike Schienle

---- begin PV-Wave FAQ ----

PV-Wave FAQ

Frequently Asked Questions about the PV-Wave programming language.
------------------------------------------------------------ ----------------
Archive-name: pvwave_faq.html
Last-modified: 7/24/95
Version: 1.1

Latest PV-Wave FAQ: See Appendix A02.
FAQ maintainer: Mike Schienle
Email: (work) schienle@igate1.hac.com, (home) mgs@seldon.terminus.com
------------------------------------------------------------ ----------------

Table of Contents

Introduction
Section G: General Questions
Section T: Technical Questions
Section U: User Interface (GUI) Questions
Appendix 1: Disclaimer
Appendix 2: Obtaining the latest PV-Wave (and IDL) FAQ
Appendix 3: Acknowledgements
Appendix 4: Previous Changes
------------------------------------------------------------ ----------------

Introduction

This is a list of Frequently Asked Questions about the PV-Wave programming
language by Visual Numerics, Inc. These questions pop up fairly regularly in
the newsgroup comp.lang.idl-pvwave. This list is an attempt to cut down on
net traffic regarding commonly asked questions. Users are encouraged to read
through this list before posting a query to the newsgroup. A similar FAQ
geared for IDL users is also available. The PV-Wave FAQ has been copied from
the IDL FAQ due to various reasons (PV-Wave FAQ maintainer's past
association with IDL FAQ, similarity between languages, shared newsgroup,
etc.). The fact that the PV-Wave FAQ was copied from the IDL FAQ is the
reason for the gaps in the numerical sequences of some of the questions.
Information for obtaining the IDL FAQ is in Appendix 2. Many responses have
been copied verbatim from the newsgroup. and some effort will be made to
keep the two FAQ's similar. These responses may have been written from an
IDL or PV-Wave perspective, and contain references to the respective
languages. In general these references have been untouched if they work
correctly with either language.

A Note from the editor about IDL:
I am currently programming in both IDL and PV-Wave for different
projects. As such, I will try to minimize comments which appear to
favor one package or the other. On occasions where a procedure,
function or feature is present in one package and not the other, I will
try to provide or request concise descriptions of the differences
between the two packages.

------------------------------------------------------------ ----------------

General questions

* G01. What is PV-Wave?
* G02. Where can I contact VNI about PV-Wave?
* G03. How do I get PV-Wave?
* G04. What is the current version of PV-Wave?
* G05. On what systems does PV-Wave run?
* G06. What is IDL and how is it related to PV-Wave?
* G07. Are there anonymous FTP sites for PV-Wave?
* G08. How can I get help?
* G09. Why is there one newgroup for IDL and PV-Wave and another for IDL
only?
* G10. Does anyone at VNI read this group? Is anyone there listening?
* G11. When is the next version of PV-Wave due out?
* G12. Are there training courses available for PV-Wave?
* G13. Is there a World Wide Web server for PV-Wave or PV-Wave based
projects?
* G14. Is there a mailing list for PV-Wave?
* G15. Where can I find help to PV-WAVE questions?
* G16. How can I access the "tips" database at VNI?
* G17. Can I get support electronically?

------------------------------------------------------------ ----------------

Technical questions

* T01. Why doesn't polycontour fill open contours?
* T05. Is there on-line help for PV-Wave?
* T06. I run PV-Wave under X in SunOS 4.x, and after I logout, the screen
becomes completely blank. Typing in login names and passwords blindly
logs you in again with the correct colors. How to prevent this?
* T07. Sometimes my variables seem to disappear. Why is this?
* T08. Is there a major mode for editing PV-Wave code in Emacs?
* T11. Where are all the PV-Wave routines and userlib procedures?
* T12. Does anybody know how to put multiple image plots on one page in
PostScript?
* T13. Does case matter in PV-Wave?
* T14. How do I set up PV-Wave to get precise control over plot window
and text positioning with either portrait or landscape page orientation
on aPostScript or HP-GL printer?
* T15. I get the error message "Code Area Full". What do I do?
* T16. Sometimes Iget the following error message: %Unable to allocate
memory: to make array. not enough core
* T17. How can I set the cursor to a crosshair on my display?
* T18. How can I vectorize an equation of two different arrays?
* T19. How can I get PV-Wave to work with MacX
* T20. How can I determine if a variable is defined?
* T21. Why should KEYWORD_SET not be used to check if a variable is
defined?
* T22. What is the undocumented routine TVRDC?

------------------------------------------------------------ ----------------

User Interface (GUI) questions

* TBD

------------------------------------------------------------ ----------------

Appendices

* Appendix 1: Disclaimer
* Appendix 2: Obtaining the latest PV-Wave (and IDL) FAQ
* Appendix 3: Acknowledgements
* Appendix 4: Previous Changes

------------------------------------------------------------ ----------------

GENERAL QUESTIONS:

------------------------------------------------------------ ----------------

G01. What is PV-Wave?

PV-Wave is a visual data analysis product of Visual Numerics, Inc. (VNI)
It's roots go back to the late 1970's, but was initially released in 1988.

The following is quoted from Visual Numeric's home page. As such, it
describes PV-Wave's capabilities in an understandably subjective manner.

PV-WAVE is a software environment for solving problems requiring
the application of graphics, mathematics, numerics and statistics
to data and equations.

PV-WAVE is designed to solve problems fast, enabling you to:

1. quickly turn data into intuitive images
2. produce data analysis tools to fit your needs
3. increase the quality of your analysis

thereby giving you a strong competitive edge and increasing your
productivity.

PV-WAVE uses an intuitive fourth generation language (4GL) that
analyzes and displays data as you enter commands. With it you can
perform complex analysis, visualization, and application
development quickly and interactively.

Robust integrated graphics, numerics, data I/O, and data
management has made PV-WAVE the number one selling Visual Data
Analysis software family.

If you are interested in the history of PV-Wave and IDL, please see Appendix
2 and follow the links/directions to the IDL FAQ.
------------------------------------------------------------ ----------------

G02. Where can I contact VNI about PV-Wave?

Visual Numerics, Inc., United States office:

Visual Numerics, Inc.
6230 Lookout Rd.
Boulder, Colorado 80301 USA
Tel: (800)447-7147, (303)530-9000 FAX: (303)530-9329
Email: pvwave@boulder.vni.com

Visual Numerics Inc., International Distributor Offices

Visual Numerics SARL Tour Europe
33 Place des Corolles
Cedex 07
92049 Paris La Defense Cedex France
Tel: +33-1-46-93-94-20 FAX: +33-1-46-93-94-39
Email: info@vni-paris.fr

Visual Numerics Japan, Inc.
Hongo, MK Building, 3rd Floor
22-21 Nishikara 2-Chome
Bunkyo-ku, Tokyo, 113 Japan
Tel: +81-3-5689-7550 FAX: +81-3-5689-7553

Visual Numerics International, GmbH
Zettachring 10
D-70567 Stuttgart
Germany
Tel: +49-711/72 87-490 FAX: +49-711/132870
Email: support@visual-numerics.de

Visual Numerics International Ltd.
New Tithe Court
23 Datchet Road
Slough
Berkshire
SL3 7LL United Kingdom
Tel: +44 (0) 1753 790600 FAX: +44 (0) 1753 790601
Email: info@vniuk.co.uk

------------------------------------------------------------ ----------------

G03. How do I get PV-Wave?

Contact the sales office numbers provided in G02.
------------------------------------------------------------ ----------------

G04. What is the current version of PV-Wave?

PV-Wave 5.0 is the current version.
------------------------------------------------------------ ----------------

G05. On what systems does PV-Wave run?

PV-WAVE version 5 is available now on Sun, HP, IBM, DEC and SGI UNIX
systems, and on VAX and AXP OpenVMS systems. PV-Wave Personal Edition, a
scaled down version of PV-Wave Command Language, is available for
Intel-based PC systems running Windows 3.1. PV-WAVE 4.2 is available on NT
and Windows NT.
------------------------------------------------------------ ----------------

G06. What is IDL and how is it related to PV-Wave?

Around the time that the Unix version of IDL first became available (1988),
Precision Visuals Inc. (PVI) entered into an agreement with Research Systems
Inc. (RSI) under which they enhanced and resold IDL under the name PV-Wave.
In September of 1990, they exercised an option in that agreement that
resulted in the following:

* PVI received a copy of the IDL source code as it existed in September
1990 in return for a one-time payment to RSI.
* The connection between RSI and PVI was severed.
* PV-Wave and IDL are now on separate development tracks. Each company
enhances, supports, and maintains its own product.

PVI has since merged with IMSL and is now Visual Numerics, Inc. (VNI).
------------------------------------------------------------ ----------------

G07. Are there anonymous FTP sites for PV-Wave?

VNI maintains an anonymous FTP directory at their Web site:
http://www.vni.com/pvwave.dir/wavehome.html. Additionally, VNI maintains an
ftp site at: ftp.boulder.vni.com.
------------------------------------------------------------ ----------------

G08. How can I get help?

VNI has excellent telephone and email support. You can contact them at
numbers provided in G02. Keep in mind, however, that VNI's technical support
is for their paying customers, i.e. those with current support contracts.
------------------------------------------------------------ ----------------

G09. Why is there one newsgroup for IDL and PV-Wave and another for IDL
only?

Unfortunately, there are two very different packages with the abbreviation
"IDL". The newsgroup comp.lang.idl is for the Interface Definition Language.
The newsgroup for discussing issues related to RSI's IDL and VNI's PV-Wave
and the short-lived IMSL/IDL is comp.lang.idl-pvwave.
------------------------------------------------------------ ----------------

G10. Does anyone at VNI read this group? Is anyone out there listening?

The following response was submitted by VNI's technical support.

Yes, one technical support engineer is tasked with the
responsibility of reading the newsgroup routinely and responding
to the appropriate questions by sending E-mail directly to the
sender of the posting. Many others in VNI also monitor the group
in order to understand user's concerns, interests and issues. All
PV-WAVE users that would like VNI to respond to their technical
questions should call or E-mail our technical support group for
help. We also encourage PV-WAVE users to subscribe to the PV-WAVE
Mailing List in addition to or instead of using this newsgroup
since it provides a direct line to other PV-WAVE users and
internally to VNI employees.

------------------------------------------------------------ ----------------

G11. When is the next version of PV-Wave due out?

* PV-Wave 5.0 was released in October, 1994.
* Version 6.0 is scheduled for release in late 1995.

------------------------------------------------------------ ----------------

G12. Are there training courses available for PV-Wave?

Yes. Quoting from the training information web page:

The course is a very comprehensive introduction to the product.
The first three days of the course is designed to bring novice
users up to speed fast. The fourth optional day provides coverage
of intermediate topics such as interfacing PV-WAVE Advantageor
Command Language with software programs and building Graphical
User Interfaces (GUI).

The class is half lecture and half "hands-on." Classes are
normally held at our training facilities in
* Boulder, Colorado
* Stuttgart, Germany
* Paris, France
* Slough, Berkshire, UK We can, however, send an instructor to your
site should you wish to train a larger number of people.

You will learn how to:

* Read your data into PV-WAVE
* Display it in numerous ways
* Use the many data analysis and array manipulation commands
* Create and manipulate windows
* Perform image display and image processing commands
* Load and create new color tables
* Write PV-WAVE procedures, functions, and programs
* Interface PV-WAVE with C and Fortran programs (4 day class
only)
* Create Graphical User Interfaces using PV-WAVE Widgets (4
day class only)
* and more!

------------------------------------------------------------ ----------------

G13. Is there a World Wide Web server for PV-Wave or PV-Wave based projects?

VNI has WWW pages on PV-Wave in general:
http://www.vni.com/pvwave.dir/wavehome/html
------------------------------------------------------------ ----------------

G14. Is there a mailing list for PV-Wave?

The PV-WAVE mailing list is an electronic forum where users can communicate
via e-mail in order to discuss topics relating to PV-WAVE. Additionally, VNI
employees will be able to post announcements and reply to user's questions.
To subscribe please include: subscribe pv-wave Your_Firstname Your_Lastname
in the body of a message addressed to listproc@boulder.vni.com For more
information on the mailing list (without having to subscribe) please
include: info pv-wave in the body of a message addressed to
listproc@boulder.vni.com
------------------------------------------------------------ ----------------

G15. Where can I find help to PV-WAVE questions?

VNI has a Tips Searchable Database available on their WWW homepage and their
ftp site. The Tips Searchable Database is a database of over 500 PV-WAVE
questions and answers.
------------------------------------------------------------ ----------------

G16. How can I access the "tips" database at VNI?

You can search the Tips database for PV-WAVE information. A search engine is
provided to allow you to search through the 500-600 online tips.
------------------------------------------------------------ ----------------

G17. Can I get support electronically?

Yes. VNI has a Technical Services Home Page. You can (quoting from
selections on the support page):

* Search the Tips database for PV-WAVE information.
* Get articles covering PV-WAVE topics from the Tech Notes Library.
* Discuss PV-WAVE with other users via the PV-WAVE Mailing List
* Download useful files from the PV-WAVE anonymous ftp site.
* Obtain user-contributed PV-WAVE code from the PV-WAVE User Library.
* Softkey Information is available to help you unlock your PV-WAVE
software.
* Email Technical Support, or directly using support@boulder.vni.com
* Technical Support Phone Numbers
* PV-WAVE Training Information
* The Consulting Services Group can provide you with custom-tailored
solutions.

------------------------------------------------------------ ----------------

TECHNICAL QUESTIONS:

------------------------------------------------------------ ----------------

T01. Why doesn't polycontour fill open contours??

This problem is described in the POLYCONTOUR manual page.

RESTRICTIONS:

This routine will NOT draw open contours. To eliminate open
contours in your dataset, surround the original array with a
1-element border on all sides. The border should be set to a value
less than or equal to the minimum data array value.

For example, if A is an (N,M) array enter:

B = REPLICATE(MIN(A), N+2, M+2) ;Make background
B(1,1) = A ;Insert original data
CONTOUR, B, PATH=Filename ... ;Create the contour file.

The following is from Ray Sterner at Johns Hopkins University:
Here is a very simple algorithm that might be a useful addition to the
section of the FAQ on filled contours. It is for evenly spaced contours
only.

Z is an array to be contoured,
CI is the desired contour interval,
C0 is the desired starting color index,
D is the desired step between colors.

T = fix(Z/CI)
M = T - smooth(T,3)
F = (C0 + T*D)*(1-M)
is an array with filled contours with the contours
plotted with color 0. For contours of a different color
simply add M*CC where CC is the desired contour color index.

------------------------------------------------------------ ----------------

T05. Is there on-line help for PV-Wave?

Try "help" (sans quotes) from the WAVE> prompt. The on-line docs are not
available on DEC machines, because FrameMaker is not supported on this
platform.
------------------------------------------------------------ ----------------

T06. I run PV-Wave under X in SunOS 4.x, and after I logout, the screen
becomes completely blank. Typing in login names and passwords blindly logs
you in again with the correct colors. How to prevent this?

Put a call to clear_colormap in your .login file to be executed after
OpenWindows start up.
------------------------------------------------------------ ----------------

T07. Sometimes my variables seem to disappear. Why is this?

Quoting the PV-Wave User's Guide, page 10-8:

PV-Wave users may find that all their variables have seemingly
disappeared after an error occurs inside a procedure or function.
The misunderstood subtlety is that after the error occurs,
PV-Wave's context is inside the called procedure, not in the main
level. Typing RETALL or RETURN will make the lost variables
reappear.

RETALL is best suited for use when an error is detected in a
procedure and it is desired to return immediately to the main
program level despite nested procedure calls. RETALL issues RETURN
commands until the main program level is reached.

The HELP command can be used to see the current call stack (i.e.,
which program unit PV-Wave is in and which program unit called
it).

------------------------------------------------------------ ----------------

T08. Is there a major mode for editing PV-Wave code in Emacs?

Yes. Lubos Pochman (lubosp@pvi.com) of VNI has developed a PV-Wave major
mode. It has many of the features that one would like in such a mode. URLs
for this file are:

ftp://ftp.boulder.vni.com/PVI/emacs/wave-mode.shar
ftp://eos.crseo.ucsb.edu/pub/idl/wave-mode.shar

It is now part of the PV-Wave distribution and may be found in the
$WAVE_DIR/lib/emacs directory of recent releases.

Chris Chase (chase@jackson.jhuapl.edu) has written idl.el for editing IDL
code. He has also written idl-shell.el for running IDL as an inferior
process under emacs. URLs for these files are:

ftp://eos.crseo.ucsb.edu/pub/idl/idl.el
ftp://eos.crseo.ucsb.edu/pub/idl/idl-shell.el
ftp://fermi.jhuapl.edu/pub/idl_emacs/idl.el
ftp://fermi.jhuapl.edu/pub/idl_emacs/idl-shell.el

Given the (remaining) strong similarity between IDL and PV-Wave these ought
to be useable.

See Appendix A02 for details on using URLs.
------------------------------------------------------------ ----------------

T11. Where are all the PV-Wave routines and userlib procedures?

The "Kernal" C routines are not accessible, for proprietary reasons. The
userlib, standard lib and widget procedures are in $WAVE_DIR/lib/ andd are
disstributed on the PV-WAVE CDROM.The system variable !path also contains
the directory names for all accessible PV-Wave procedures. The most current
entries to the User Lib are available through VNI's WWW homepage and their
FTP site.
------------------------------------------------------------ ----------------

T12. Does anybody know how to put multiple image plots on one page in
PostScript?

Because PostScript has scalable pixels, you must specify the xsize and ysize
parameters, as well as the position parameter, in TV or TVSCL.

; Display four images in a 2x2 grid ; Assume
data(x,y,4) = array containing the 4 images

set_plot, 'ps' ;request PostScript output device, ...

;modify page size, orientation, etc. as desired ximsize =
0.5*!d.x_size ;define output image size yimsize = 0.5*!d.y_size
;note: 0.5 assumes 2x2 grid for i=0,3 do begin ;display the
4images, using i as position index tv, data(*,*,i), i,
xsize=ximsize, ysize=yimsize endfor

------------------------------------------------------------ ----------------

T13. Does case matter in PV-Wave?

No.

Compiled routines are case insensitive. The only catch is that, on Unix
systems, when executing a script via the .RUN command, the file name
argument must exactly match the file name as it appears on the disk. Once
the routines in the script are compiled, their names can be written in any
case. This is not a problem in operating systems such as VMS that do not
distinguish case for file names. This is usually not a problem under Unix
either since, by convention, most people use lower case file names.
------------------------------------------------------------ ----------------

T14. How do I set up PV-Wave to get precise control over plot window and
text positioning with either portrait or landscape page orientation on a
PostScript or HP-GL printer?

(This answer only applies to PostScript and HP-GL printers -- other printers
may differ in having the X and Y offsets measured from the upper left corner
of the portrait page instead of the lower left corner.)

PV-Wave uses portrait page orientation as a default. (The x axis is along
the shorter dimension of the paper.) In portrait orientation the lower left
corner of the page is the origin for the XOFFSET and YOFFSET page offsetting
keywords of the DEVICE command that determine the origin (lower left corner)
of the output window. (Normally one uses XOFFSET=0 and YOFFSET=0 for
portrait orientation.) Size of the output window is determined by the XSIZE
and YSIZE keywords of the DEVICE command. The origin for graph positioning
variables !P.POSITION and !P.REGION is the output window origin. X and Y
coordinates for portrait page orientation are shown on the sketch below as
upper case X and Y.

----------
| | ORIGINAL PORTRAIT PAGE (Printer only prints on
Y | | OUTPUT WINDOW this area.)
| |
| X |
o-----------
| y + | OUTPUT WINDOW ROTATED ABOUT LOWER LEFT CORNER
x | + |
| + |
------------
++++++++++ OUTPUT WINDOW RESIZED FOR LANDSCAPE ORIENTATION
^
| DIRECTION OF NEEDED OFFSET

If device,/landscape is specified, then the output window is rotated 90 deg.
clockwise about the lower left corner of the page. In this condition nothing
will be plotted on the page, since the rotation has carried the output
window entirely off the paper as shown in the sketch above. To correct this
mismatch, the rotated output window must be offset. XOFFSET AND YOFFSET are
still measured in the X and Y coordinates of the portrait page, but now
represent the position of the lower left corner of the rotated (and resized)
output window (marked by an o above) with respect to the lower left corner
of the portrait (actual) page. Hence, one generally uses XOFFSET=0 and
YOFFSET=long_dimension_of_page for landscape orientation.

In landscape orientation, the coordinates for graph positioning variables
!P.POSITION and !P.REGION are the lower case x and y coordinates shown in
the sketch above and having origin marked by the letter o. Position of
output window origin o on the page is, of course, affected by the setting of
XOFFSET and YOFFSET, as explained before. The XSIZE and YSIZE (output window
size) keywords of the DEVICE command are also measured in the x and y
directions when in landscape orientation. The resizing of the landscape page
generally means interchanging the values of XSIZE and YSIZE appropriate for
the portrait page.

Example of settings for a portrait page:

XPAGE=8.5 & YPAGE=11. & XOFFS=0. & YOFFS=0. ;Inches
DEVICE,/INCHES,XSIZE=XPAGE,YSIZE=YPAGE,XOFFSET=XOFFS,YOFFSET =YOFFS

Example of settings for a landscape page:

XPAGE=11. & YPAGE=8.5 & XOFFS=0. & YOFFS=XPAGE ;Inches
DEVICE,/LANDSCAPE,/INCHES,XSIZE=XPAGE,YSIZE=YPAGE,XOFFSET=XO FFS, $
YOFFSET=YOFFS

Example of setting position and size of a plot window:

X0=1.374 & Y0=1.283 & XLEN=3.622 & YLEN=6.157 ;Inches
!P.POSITION=[X0/XPAGE,Y0/YPAGE,(X0+XLEN)/XPAGE,(Y0+YLEN)/YPA GE]

Example of setting position and orientation of a text string:

x0=.35 & y0=.37 ;Inches
xyouts,x0/xpage,y0/ypage,!stime,orient=90,/normal ;Date, time

------------------------------------------------------------ ----------------

T15. I get the error message "Code Area Full". What do I do?

PV-Wave sets aside a certain amount of memory area for compiling programs.
The current code and area sizes can be seen with the INFO command, e.g.

Wave> info % At $MAIN$ . Code area
used: 0% (0/16384), Symbol area used: 0% (2/4096)

These sizes can be increased with the .SIZE command. Quoting the PV-Wave
User's Manual, section "Using Executive Commands" in Chapter 2:

The .SIZE command resizes the code area and data area. These
memory areas are used when PV-Wave commands are compiled. The code
area holds internal instruction codes that the compiler generates.
The data area, also used by the compiler, contains variable name,
common block, and keyword information for each compiled function,
procedure and main program.

Resizing the code and data areas erases the currently compiled
main program and all mail program variables.

For example, to extend the code and data areas to 40000 and 10000
bytes respectively:

.SIZE 40000 10000

The upper limit for both code_size and data_size is over 2 billion
bytes.

Getting "Code Area Full" is often an indication that the routine is large,
and would benefit by decomposition into sub-procedures/functions. It's
better to avoid use of .SIZE because your code will always work on other
systems where the users don't use a large .SIZE setting.
------------------------------------------------------------ ----------------

T16. Sometimes I get the following error message:

% Unable to allocate memory: to make
array. not enough core

RSI and VNI support replies:

The circumstances described happen when memory becomes fragmented.
Unfortunately, there is nothing you can do except use less memory
in your application, or get more for the system to work with.
There are Tips in the Tips Database regarding memory problems.
Additionally, memory management is discussed in chapter 11 of the
PV-WAVE Programmer's Guide.

------------------------------------------------------------ ----------------

T17. How can I set the cursor to a crosshair on my display?

Although this is very possible to do in PV-Wave, a routine which
accomplishes this has not been submitted to the FAQ maintainer for inclusion
here. There are two known versions of this capability available for IDL
which may be ported to PV-Wave.
------------------------------------------------------------ ----------------

T18. How can I vectorize an equation of two different arrays?

From the user community:
I have two different arrays, (8) of float and (300,8) of float. I want
to vectorize the equation and therefore I need to use both arrays in
the same equation. For example :

newarray=cos(small_array)*sin(large_array)

where I want the data in small_array to be used over and over 300 times
in this calculation.

From Dan Carr (dan@rsinc.com):

IDL> arr1 = Findgen(8)
IDL> arr2 =Findgen(300, 8)
IDL> newarr = (Replicate(1.0, 300) # Cos(arr1)) *Sin(arr2)

From Dave Landers (landers@boulder.vni.com)

to convert an array1(M) to array2(n,M) :
array2 = array1(Lindgen(n,M) / n )
or array2 =replicate(1,n) # array1
to convert an array1(M) to array2(M,n) :
array2 = array1(Lindgen(M,n) MOD M )
or array2 = array1 # replicate(1,n)

------------------------------------------------------------ ----------------

T19. How can I get PV-Wave and MacX to work without crashing?

Using MacX v1.2 and PV-Wave cause the Mac to crash quite often. This happens
especially during allocation of color resources or display windows. You can
get around the problem by downgrading to MacX v1.1.7 (apparently Apple will
supply this if you can prove to them that you rightfully own v1.2).

Another solution is to purchase White Pine's eXodus software. Although
eXodus is not without its share of problems, it does run PV-Wave quite well.
White Pine can be contacted at:

White Pine Software
40 Simon St. Suite 201
Nashua, NH 03060-3043
Tel: 603-886-9050
Fax: 603-886-9051

Yet another solution is to use Tenon's MachTen and X-Windows package. The
FAQ maintainer has tried all three of these packages for extended periods of
time and recommends Tenon. On a Mac IIfx, this provides excellent response
(2-5x faster) compared to both MacX and eXodus. The limiting factor is the
cost of the software. MacX and eXodus can be found for around $250, MachTen
and X-Windows retail for $1045. Substantial discounts ($350 total for both
packages) have been offered in the past during MacWorld shows. Keep in mind
that you are getting a full UNIX implementation as opposed to an X-Windows
emulator for this price. Tenon can be contacted at:

Tenon Intersystems
1123 Chapala Street
Santa Barbara, CA 93101
Tel: (805)963-6983
Fax: (805)962-8202
http://www.tenon.com/

------------------------------------------------------------ ----------------

T20. How can I determine if a variable is defined?

It is often useful to determine if a PV-Wave variable is defined. The is
easily done using the n_elements function which returns 0 if the given
variable is undefined. This is especially useful for setting defaults for
keyword parameters. Here are a couple examples:
if n_elements(start) eq 0 then start=0
if n_elements(dir) eq 0 then cd, current=dir
------------------------------------------------------------ ----------------

T21. Why should KEYWORD_SET not be used to check if a variable is defined?

> From a comp.lang.idl-pvwave post by William Thompson:

The IDL function KEYWORD_SET() is only designed to be used with logical
variables, i.e. those which can be either True (usually signalled with the
value 1) or False (0). It has the property that if a variable is undefined,
then it returns False, so people often make the mistake of using it to test
whether a variable is defined or not.

To test whether a variable is defined or not, use N_ELEMENTS() instead. This
will return 0 if a variable is undefined, or some positive number otherwise.
Only use KEYWORD_SET for truly Boolean (True/False) variables.
------------------------------------------------------------ ----------------

T22. What is the undocumented routine TVRDC?

> From a comp.lang.idl-pvwave post by William Thompson:

The reason that TVRDC is undocumented is because it's not needed any more.
It doesn't do anything that CURSOR doesn't do. TVRDC is only retained for
compatibility with older programs.

In the old days, before X-windows, CURSOR was used to read coordinates off
of line graphics terminals, and TVRDC was used to read coordinates off of
image display devices. With the advent of IDL 2.0 [and PV-Wave 2.0 - MGS],
the distinctions between different kinds of graphics devices were mostly
removed, and both of these functions were merged into CURSOR.
------------------------------------------------------------ ----------------

APPENDIX

------------------------------------------------------------ ----------------

A01. Disclaimer:

I do not work for VNI and I am in no way answerable to them. Questions and
answers in this document are culled from the user community with some input
from VNI for clarity. No warranty, express or implied exists regarding this
document. Permission to copy all or part of this work is granted, provided
that the copies are not made or distributed for resale.
------------------------------------------------------------ ----------------

A02. Obtaining the latest PV-Wave FAQ

The current PV-Wave FAQ may be accessed at fermi.jhuapl.edu [128.244.147.18]
in directory www/s1r/idl/idl_faq

HTML version: pvwave_faq.html (compressed: pvwave_faq.html.Z)
Plain Text: pvwave_faq.txt (compressed: pvwave_faq.txt.Z)

The URL (Uniform Resource Locator) for this file is:
ftp://fermi.jhuapl.edu/www/s1r/idl/idl_faq/pvwave_faq.html

How to interpret the URL:

Using a WWW (World Wide Web) Browser, for example mosaic:
mosaic ftp://fermi.jhuapl.edu/www/s1r/idl/idl_faq/pvwave_faq.html
Save the file using the Save as ... option.

Using anonymous ftp:
ftp fermi.jhuapl.edu
Login: anonymous
Password: enter your email address
cd www/s1r/idl/idl_faq
get file
bye

The IDL FAQ is located at
ftp://fermi.jhuapl.edu/www/s1r/idl/idl_faq/idl_faq.html

Additions and Corrections

Send additions and corrections to:

Mike Schienle
schienle@igate1.hac.com

Mike Schienle created the PV-Wave FAQ based on the previously existing IDL
FAQ as of 1995 May 12. As of 1994 Oct 27 Ray Sterner has been maintaining
the IDL FAQ. Mike Schienle was handling the IDL FAQ previously, and Patrick
Ryan before him.
------------------------------------------------------------ ----------------

A03. Many thanks to the following for their contributions

black@breeze.rsre.mod.uk (John Black)
claflin@claes.space.lockheed.com (Scott Claflin)
edelsohn@npac.syr.edu (David Edelsohn)
fireman@iuegtc.DNET.NASA.GOV (Gwyn Fireman)
gurman@umbra.gsfc.nasa.gov (Joseph B. Gurman)
jdlb@kukui.IFA.Hawaii.Edu (JF Pitot de La Beaujardiere)
kashyap@oddjob.uchicago.edu (Vinay Kashyap)
mayor@vaxine.larc.nasa.gov (Shane Mayor)
oet@maz.sma.ch (Thomas Oettli)
rmmoss@Texaco.COM (Robert M. Moss)
sterne@dublin.llnl.gov (Philip Sterne)
thompson@serts.gsfc.nasa.gov (William Thompson)
valenti@soleil.Berkeley.EDU (Jeff Valenti)
sterner@tesla.jhuapl.edu (Ray Sterner)
joel@stars.gsfc.nasa.gov (Joel Parker)
landers@boulder.vni.com (David Landers)
dan@rsinc.com (Dan Carr)
denisef@rsinc.com (Denise Fields)


Previous PV-Wave FAQ maintainers:
None.

Previous IDL FAQ maintainers:
Ray Sterner: 10/28/94 to present
Mike Schienle: 12/01/93 to 10/27/94
Patrick Ryan: Created the IDL FAQ

------------------------------------------------------------ ----------------

A04. PV-Wave FAQ Versions History

This version of the PV-Wave FAQ was derived from the IDL FAQ. There will be
some effort to keep the two FAQ's similar and to cover topics in both FAQs
which are relevant to both languages.
------------------------------------------------------------ ----------------

The End

------------------------------------------------------------ ----------------

---- end PV-Wave FAQ ----

Mike Schienle Hughes Santa Barbara Research Center
Home: mgs@seldon.terminus.com Work: rep2857@sbsun0010.sbrc.hac.com
Contract Employee - Will visualize data for large amounts of money
[Message index]
 
Read Message
Previous Topic: Re: range of Z in surface ...
Next Topic: Q: CGM device, ncar encoding

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 23:31:39 PDT 2025

Total time taken to generate the page: 1.51010 seconds