aboutsummaryrefslogtreecommitdiff
path: root/noao/astutil/pdm/pdmbatch.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/astutil/pdm/pdmbatch.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/astutil/pdm/pdmbatch.x')
-rw-r--r--noao/astutil/pdm/pdmbatch.x49
1 files changed, 49 insertions, 0 deletions
diff --git a/noao/astutil/pdm/pdmbatch.x b/noao/astutil/pdm/pdmbatch.x
new file mode 100644
index 00000000..6828b783
--- /dev/null
+++ b/noao/astutil/pdm/pdmbatch.x
@@ -0,0 +1,49 @@
+include <mach.h>
+include <ctype.h>
+include <error.h>
+include "pdm.h"
+
+# PDM_BATCH -- Batch mode calculation.
+
+procedure pdm_batch (pdmp, file, infile, flip)
+
+pointer pdmp # PDM structure pointer
+char file[SZ_FNAME] # file to store information
+char infile[SZ_FNAME] # input data file name
+bool flip # flip y-axis scale
+
+int fd
+double pdm_signif(), signif
+bool verbose
+errchk pdm_alltheta, pdm_signif, pdm_ampep, pdm_phase
+
+begin
+ # Plot the data.
+ call pdm_dplot (pdmp, infile, flip)
+
+ # Call pdm_alltheta to get the theta array; plot to metafile.
+ call pdm_alltheta (pdmp, THETAPPLOT)
+ call pdm_tplot (pdmp, THETAPPLOT, infile)
+
+ # Call pdm_signif to calculate the significance of the theta minimum.
+ signif = pdm_signif (pdmp, PDM_MINR(pdmp))
+
+ # Write this significance out to the file.
+ fd = PDM_LFD(pdmp)
+ call fprintf (fd, "significance at this minimum = %g\n")
+ call pargd (signif)
+ call close (fd)
+
+ # Call pdm_amplitudeepoch to get the amplitude and epoch.
+ call pdm_ampep (pdmp, PDM_MINR(pdmp))
+
+ # Call pdm_phase to get the phase curve.
+ # Plot to metafile.
+
+ call pdm_phase(pdmp, PDM_MINR(pdmp), PDM_EPOCH(pdmp))
+ call pdm_pplot (pdmp, PDM_MINR(pdmp), infile, flip)
+
+ # Call pdm_show to print the parameter information to a file.
+ verbose = TRUE
+ call pdm_show (pdmp, file, verbose)
+end