From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- 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