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/smw/smwmultispec.x | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 noao/onedspec/smw/smwmultispec.x (limited to 'noao/onedspec/smw/smwmultispec.x') diff --git a/noao/onedspec/smw/smwmultispec.x b/noao/onedspec/smw/smwmultispec.x new file mode 100644 index 00000000..18e2dbd0 --- /dev/null +++ b/noao/onedspec/smw/smwmultispec.x @@ -0,0 +1,30 @@ +include + + +# SMW_MULTISPEC -- Setup the MULTISPEC SMW parameters. + +procedure smw_multispec (im, smw) + +pointer im #I IMIO pointer +pointer smw #U MWCS pointer input SMW pointer output + +int i, j, k +pointer sp, key, val, mw +errchk smw_open, smw_saxes, smw_sapid + +begin + call smark (sp) + call salloc (key, SZ_FNAME, TY_CHAR) + call salloc (val, SZ_LINE, TY_CHAR) + + call smw_open (smw, NULL, im) + do i = 1, SMW_NSPEC(smw) { + call smw_mw (smw, i, 1, mw, j, k) + call sprintf (Memc[key], SZ_FNAME, "APID%d") + call pargi (j) + ifnoerr (call imgstr (im, Memc[key], Memc[val], SZ_LINE)) + call smw_sapid (smw, i, 1, Memc[val]) + } + + call sfree (sp) +end -- cgit