[Date Prev][Date Next][Date Index]
RE: Diffraction Program and Data Standards
- Subject: RE: Diffraction Program and Data Standards
- From: mooney@oxygen.aps1.anl.gov (Tim Mooney)
- Date: Fri, 10 Jun 94 17:17:39 CDT
Mark Rivers writes:
> I would be very interested in getting the specifications for the diffraction
> routines which you plan to write in C, and to code them in IDL. I think the
> effort required to code/maintain in IDL is so much less than C that I will try
> to do as much as possible in IDL. The graphics basically come for free, while
> they will be difficult in C, since one will have to use graphics libraries
> which may not be portable. If the graphics are not built into the diffraction
> program one needs to worry about data access (via a file).
PLPLOT is quite an easy data-plotting library to use, is free, and has
been ported to many machines (I don't have a list handy, but it
includes the Amiga, so it must include everything else).
BTW, is it convenient to plot data quickly as it comes in (e.g.,
point-by-point, or a few points at a time) with IDL, or do you have to
redraw the whole plot to add a point?
> The IDL syntax is very user friendly. A scan command can be implemented like
>
> IDL> scan, 'two-theta', start=40, stop=50, step=.01, time=0.1
>
> Keyword parameters are much easier to remember than positional ones, and the
> keywords do not need to be entered in any particular order. Scan parameters
> can default to their previous values, with the user prompted for
> missing/non-defaulted values.
tcl is not a slouch in these terms
> It is certainly worth considering prototyping in IDL before coding in C. IDL
> is much more portable than C if one is writing programs with graphics.
> Graphics libraries (with widgets) which run on Unix, VMS, DOS and Mac are hard
> to find!
I think tcl/tk wrapped around C code is neck and neck with IDL wrapped
around C code: tcl/tk probably has the edge in widget support, while
IDL has the edge in plotting support.
One thing that might be easier to implement in tcl/tk is an editable,
saveable command history derived from both command-line input and
GUI-driven input (e.g., menu selections). (I think the code word for
this capability has become 'IGOR', after the Mac data-analysis program
that implements it well). IGOR was one of the driving influences behind
the DND/UNI proposal, and I hope to see or put this capability in
Super's and Spec's budding young GUI interfaces.
One other thing tcl/tk does well is move all the way from
(A) embedded language within largely unmodified monolithic application
to
(B) interpreted application calling custom C routines.
IDL does (B) very well, but I don't believe it helps you migrate from
(A) to (B) in deliberate steps; you have to leap.
Tim