Software specific to Ronchi Testing.
GOTO RONCHI INDEX
Copyright – P. J.
Smith
But permission is
given to distribute this material in unaltered form as long as it is not sold
for profit.
Modern computing power has made powerful calculations and simulations
available quickly and painlessly.
Some are intuitive to run, so the user can investigate and devote all
effort to understanding the problem at hand.
A search of the web based on Ronchi,
Foucault etc. will soon turn up much material.
Below
is a short list of useful software and other links.
1.
RonchiZ .
My free Windows geometrical simulation.
Includes Intuitive visual grating positioning along both X and Z axes
and Ronchi, Foucault and Wire simulations of any conic. Also allows users to enter irregular surface
shapes, analyse them for Strehl, display test simulations, surface height, surface
slope. Can save and retrieve irregular
surface shapes and test settings.
Extensive help is part of the program
This will arrive in Zipped form.
When unzipped, there are
two sub-directories containing example Test and Surface files, and one
directory containing the main program.
It is important that the program be placed in a
directory called ‘RonchiZ’ directly
attached to C: drive. The other directories will hang off of this,
Also important - the screen size must be set to 1024 X 768.
This is all the result of
programming deficiencies, but it is too late to change now.
Begin by clicking on the middle of
the screen
.
Written by P. J. Smith.
Available for download from http://www.atmsite.org/contrib/Smith/RonchiZ/
2.
RonchiEstimates.
My free Windows program allowing rough visual estimates to be quickly
translated to semi-quantitative wave errors.
Contains detailed help information.
The best way for ATMs to quantify Turned Down Edge.
Written by P. J. Smith. Available for download
from http://www.atmsite.org/contrib/Smith/
3.
Ronchi
for Windows. This simulates the appearance of a
mirror while undergoing the Ronchi Test. Although basically a geometric
simulation, it attempts to show a more realistic view of the Ronchi bands. This is not based on true diffraction
calculations (which are very slow and complex) so is not entirely accurate but
it does bring users much closer to what they will actually see. Material on using the Matching Ronchi test
is included. Written by John
Upton. See Ronchi
for Windows v2.0 Home Page
4.
Ronchi.
A DOS program which simulates Ronchi patterns. Also a good discussion of the Matching Ronchi Test. Written by Mel Bartels – see http://www.efn.org/~mbartels/tm/ronchi.html. Also a program for download. http://www.efn.org/~mbartels/tm/software.html. Source code in C is also available.
5.
InvRon. A program for generating Mobsby
type gratings. Also some discussion on
this technique. I have not used this.
See http://users.telerama.com/~mdholm/atm/invron/invron.html
6.
Ronchi.Bas.
An early DOS Ronchi simulation which appeared in the April 1991 Sky and
Telescope. Source code is available to
anyone interested in their own Monte Carlo simulation. Program is available via http://skyandtelescope.com/resources/software/ (follow to Basic programs April 1991) but I
would suggest anyone looking at programming a Ronchi simulation for the first
time may find the Pascal source code given later an easier starting point
because it avoids the unstructured mess typical of many early basic
programs. It may make the basic program
easier to follow.
7.
Diffract. A windows program that generates true Ronchigrams (also
Foucograms) allowing for diffraction effects.
Although for many applications geometric simulations are sufficient, Diffract is worth running occasionally to
remind oneself what real life Ronchigrams actually look like. Written by Jim Burrows – see http://home.earthlink.net/~burrjaw
8.
Aberrator. A windows program which attempts to relate what is seen at the
eyepiece with a measured mix of aberrations. http://aberrator.astronomy.net
9.
IshearZW. A
simulation program for my 20c Shearing Interferometer. Downloadable from http://www.atmsite.org/contrib/Smith/. This has been included here because a
shearing Interferometer produces patterns very similar to Ronchigrams and its
use to help quantify Turned Edge may be useful because there is no fuzzy edge
as is the case with a Ronchigram.
Unfortunately, the 20 c shearing interferometer is limited in many
ways. A description of it is at 20 c Simple Folded Interferometer. While in some ways a curio, this may be of
some use to those with nothing better. Read the description and make up your
mind. Absolutely no special equipment
is needed.
10. Mobsby
variation. See InvRon program above, also a good
description of the test and the maths behind it at Bob May’s site http://nav.to/bobmay
11. Any
raytracing program can be used to simulate Ronchi bands. Surfaces must be introduced just in front of
the image, defining these as having long thin obscurations. If enough of these are introduced slightly
offset from each other, a grating is simulated. The rays finally must be extended a distance equal to the mirror
distance. The image scale is then set
so the ‘image’ spot diagram covers the entire mirror diameter. I have used this to simulate Ronchi testing
using Zemax to verify that my program RonchiNu gives correct results. I would like to confirm that Mel
Bartel’s, John Upton’s, and the Sky and
Telescope programs also give correct results.
Of course, none of these consider diffraction.
12. Finally, for anyone interested in
doing their own thing, here is a Pascal program giving the essence of the Monte
Carlo Simulations required. It is
presented because, while the S&T Basic program is quite capable, in common
with many early Basic programs, it’s spaghetti logic is much harder to
disentangle than necessary. All
possible variables are local and variables are given meaningful names so the
program is easy to follow. Different
plot routines will be needed with different compilers etc. It is easy to translate this into C.
{SIMPLIFIED PASCAL PROGRAM TO PERFORM RONCHI PLOTS FOR A PARABOLA}
{MANY PORTIONS COULD BE SIMPLIFIED BUT THIS HAS BEEN MODIFIED TO }
{BE MORE UNDERSTANDABLE. THE
GETSPECS AND PLOT PORTIONS WILL}
{NEED MODIFICATION DEPENDING ON THE PROGRAMMING LANGUAGE AND DISPLAY}
{THE USES PORTION WAS FOR AN EARLY VERSION OF TURBO PASCAL AND WILL}
{PROBABLY BE DIFFERENT DEPENDING ON WHAT YOU USE}
{OF MOST INTEREST WILL BE THE CALCULATIONS AND THEIR EXPLANATIONS}
PROGRAM RONCHI_EXAMPLE;
USES
CRT, DOS, WIN, GRAPH3;
CONST
{SET THESE CONSTANTS TO SUIT YOUR SCREEN AND DISPLAY}
RANDOM_PTS = 60000;
{TRY 10000 TO 60000}
ASPECT = 0.42;
{SCREEN ASPECT RATIO}
X_SCREEN = 150;
{X POSITION ON SCREEN}
Y_SCREEN = 100;
{Y POSITION ON SCREEN}
D_SCREEN = 200;
{DIAMETER OF IMAGE ON SCREEN}
VAR
IS_ODD : BOOLEAN;
{RONCHI BANDS SEEN - USED TO CENTRE BRIGHT OR DARK BAND}
D_MIRROR : REAL;
{MIRROR DIAMETER}
R_POLE : REAL;
{PARAXIAL R OF SURFACE}
GRATING_OFFSET : REAL;
{NEG FORWARD}
GRATING_PERIOD : REAL;
{2 x LINEWIDTH}
X : REAL;
{RANDOM POINTS}
Y : REAL;
{ x,y ON MIRROR}
I : LONGINT;
{****************************************************************************}
FUNCTION IS_PASSED(X_AT_GRATING:
REAL):BOOLEAN;
VAR
T : REAL;
BEGIN
IF IS_ODD THEN
BEGIN
T := INT(ABS(X_AT_GRATING/GRATING_PERIOD) + 0.5);
IF T/2 = INT(T/2) THEN
IS_PASSED := TRUE ELSE IS_PASSED := FALSE;
END
ELSE
BEGIN
T := INT(ABS(X_AT_GRATING/GRATING_PERIOD) + 0.5);
IF T/2 = INT(T/2) THEN
IS_PASSED := FALSE ELSE IS_PASSED := TRUE;
END;
END;
{****************************************************************************}
PROCEDURE PLOT_POINT( X, Y :
REAL;
D_MIRROR : REAL;
X_SCREEN, Y_SCREEN : REAL;
D_SCREEN :
INTEGER);
VAR
XPLOT, YPLOT : INTEGER;
BEGIN
XPLOT := TRUNC(2*( X_SCREEN +
X*D_SCREEN/D_MIRROR) );
YPLOT := TRUNC(Y_SCREEN + 2*Y * ASPECT * D_SCREEN/D_MIRROR);
DRAW(XPLOT, YPLOT, XPLOT, YPLOT, 1);
END;
{****************************************************************************}
PROCEDURE GET_SPECS;
VAR
Q : CHAR;
F_GRATING : REAL; {FREQUENCY OF GRATING - eg LINE PAIR PER MM}
BEGIN
REPEAT
WRITE('ODD NUMBER OF BANDS (Y/N) '); READLN(Q);
Q := UPCASE(Q)
UNTIL Q IN ['Y', 'N'];
IF Q = 'Y' THEN IS_ODD := TRUE;
IF Q = 'N' THEN IS_ODD := FALSE;
WRITE('MIRROR DIAM = '); READLN(D_MIRROR);
WRITE('RADIUS OF CURVATURE = '); READLN(R_POLE);
WRITE('GRATING FREQUENCY = '); READLN(F_GRATING);
GRATING_PERIOD := 1/(2*F_GRATING);
WRITE('GRATING DISTANCE (forward negative) = '); READLN(GRATING_OFFSET);
END;
{****************************************************************************}
FUNCTION IS_ON_MIRROR( D_MIRROR : REAL;
X, Y :
REAL ): BOOLEAN;
{THIS TESTS TO SEE IF POINT IS WITHIN RADIUS OF MIRROR}
VAR
S2 : REAL;
R_PT : REAL;
BEGIN
R_PT := SQRT(X*X + Y*Y);
IF (R_PT <= D_MIRROR/2) THEN
IS_ON_MIRROR := TRUE ELSE IS_ON_MIRROR := FALSE;
END;
{****************************************************************************}
FUNCTION X_AT_GRATING( X_MIRROR, Y_MIRROR : REAL;
GRATING_OFFSET : REAL;
R_POLE : REAL ): REAL;
VAR
Z : REAL; {DIST FROM MIRROR}
DELTA_Z : REAL; {DIST FROM GRATING TO ZONAL ROC}
BEGIN
{CALCULATE
ZONAL ROC}
Z := R_POLE + (X_MIRROR*X_MIRROR + Y_MIRROR*Y_MIRROR)/R_POLE;
{DISTANCE FROM
ZONAL ROC TO GRATING}
DELTA_Z := R_POLE + GRATING_OFFSET - Z;
{NOW USE SIMILAR TRIANGLES TO CALCULATE X POSITION}
{OF RAY WHERE IT PASSES THROUGH THE GRATING}
X_AT_GRATING := DELTA_Z*X_MIRROR/Z;
END;
{****************************************************************************}
{****************************************************************************}
{****************************************************************************}
{****************************************************************************}
{****************************************************************************}
BEGIN
CLRSCR;
GET_SPECS;
HIRES;
HIRESCOLOR(WHITE);
GRAPHBACKGROUND(BLACK);
FOR I := 1 TO RANDOM_PTS DO
BEGIN
X := D_MIRROR * (RANDOM(1000)/1000 - 0.5);
Y := D_MIRROR * (RANDOM(1000)/1000 - 0.5);
{THESE ARE X AND Y RAY COORDS ON FACE OF MIRROR}
IF IS_ON_MIRROR(D_MIRROR, X, Y) THEN
IF IS_PASSED( X_AT_GRATING(X, Y,
GRATING_OFFSET, R_POLE) )THEN
PLOT_POINT(X, Y, D_MIRROR, X_SCREEN, Y_SCREEN, D_SCREEN);
END;
READLN;
END.
{****************************************************************************}
{****************************************************************************}
{****************************************************************************}
{****************************************************************************}
GOTO RONCHI INDEX