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/twodspec/apextract/apcopy.x | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 noao/twodspec/apextract/apcopy.x (limited to 'noao/twodspec/apextract/apcopy.x') diff --git a/noao/twodspec/apextract/apcopy.x b/noao/twodspec/apextract/apcopy.x new file mode 100644 index 00000000..e697bf88 --- /dev/null +++ b/noao/twodspec/apextract/apcopy.x @@ -0,0 +1,28 @@ +include "apertures.h" + +# AP_COPY -- Make a copy of an aperture. +# The title is not copied. + +procedure ap_copy (apin, apout) + +pointer apin # Aperture to copy +pointer apout # New copy + +int i + +begin + # Allocate memory, transfer the aperture parameters, and call procedures + # which copy the offset curve and background parameters. + call ap_alloc (apout) + AP_ID(apout) = AP_ID(apin) + AP_BEAM(apout) = AP_BEAM(apin) + AP_AXIS(apout) = AP_AXIS(apin) + do i = 1, 2 { + AP_CEN(apout, i) = AP_CEN(apin, i) + AP_LOW(apout, i) = AP_LOW(apin, i) + AP_HIGH(apout, i) = AP_HIGH(apin, i) + } + call ap_cvset (apin, apout) + call ic_open (AP_IC(apout)) + call ic_copy (AP_IC(apin), AP_IC(apout)) +end -- cgit