From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- noao/onedspec/irsiids/bplot.cl | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 noao/onedspec/irsiids/bplot.cl (limited to 'noao/onedspec/irsiids/bplot.cl') diff --git a/noao/onedspec/irsiids/bplot.cl b/noao/onedspec/irsiids/bplot.cl new file mode 100644 index 00000000..53ce4cfc --- /dev/null +++ b/noao/onedspec/irsiids/bplot.cl @@ -0,0 +1,35 @@ +# BPLOT -- Batch plotting of spectra with SPLOT + +procedure bplot (images, records) + +string images {prompt="List of images to plot"} +string records = "" {prompt="List of records to plot"} +string graphics = "stdgraph" {prompt="Graphics output device"} +string cursor = "onedspec$gcurval.dat" {prompt="Cursor file(s)\n"} + +struct *ilist, *clist + +begin + int line, ap + file ifile, cfile, cur, image + + ifile = mktemp ("bplot") + cfile = mktemp ("bplot") + + names (images, records, >& ifile) + files (cursor, > cfile) + cur = "" + + ilist = ifile; clist = cfile + while (fscan (ilist, image) != EOF) { + if ((cursor != "") && (fscan (clist, cur) == EOF)) { + clist = cfile + line = fscan (clist, cur) + } + splot (image, graphics=graphics, cursor=cur) + } + clist = ""; ilist = "" + + delete (ifile, verify=no) + delete (cfile, verify=no) +end -- cgit