README for PDM programs

Patrick Wils
June 7, 2002

I have created a program in Perl to use the PDM technique (Stellingwerf 1978ApJ...224..953S) to search for the periods of a variable star. The input is a list of data points (JD and magnitude), and the output is a list of frequencies and the value of the theta-statistic (to get a good period, this should be as close to 0 as possible). Within the Perl script, I call gnuplot to create a periodogram as a gif file and phase diagrams for the best 4 frequencies. The latter are combined as one gif file using ImageMagick. The PDM technique itself is implemented in Perl, however, if you want to do a lot of stars, it might be rather slow. Therefore, I have also put the calculation part in a separate C program (source code pdm.c included). The Perl script decides which one to use, depending on the setting of an environment variable. The script is executed in DOS as follows (I think this can be translated easily to Unix):


REM  Environment settings
REM  Directory containing Period.pm and Period.pl
set PeriodDIR=C:\VS\Programs\Perl\

REM  GNUPlot directory
set PeriodGNU=C:\Tools\Gp371w32\

REM  ImageMagick directory
set PeriodIMM=C:\Tools\ImageMagick\

REM  Output directory
set PeriodOUT=C:\VS\Period\

REM  Perl executable (may be blank if contained in the
PATH)
set PeriodPERL=

REM  Operating system command to remove a file
set PeriodRM=del

REM  Compiled program for PDM analysis
set PeriodPDM=%PeriodDir%pdm.exe

%PeriodPERL%perl -I %PeriodDIR% -s
%PeriodDIR%Period.pl -star=%1 %2

(%1 is the name of the star, this is used for making file names; %2 is the file containing the data, this may be STDIN). I am working on a version to treat a number of stars (e.g. a list of suspected variables) from DS23 in one go. Any comments are appreciated.