aboutsummaryrefslogtreecommitdiff
path: root/noao/onedspec/sensfunc/sfapertures.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/onedspec/sensfunc/sfapertures.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/onedspec/sensfunc/sfapertures.x')
-rw-r--r--noao/onedspec/sensfunc/sfapertures.x27
1 files changed, 27 insertions, 0 deletions
diff --git a/noao/onedspec/sensfunc/sfapertures.x b/noao/onedspec/sensfunc/sfapertures.x
new file mode 100644
index 00000000..7eb2b6f8
--- /dev/null
+++ b/noao/onedspec/sensfunc/sfapertures.x
@@ -0,0 +1,27 @@
+include "sensfunc.h"
+
+# SF_APERTURES -- Determine the apertures in use.
+
+procedure sf_apertures (stds, nstds, apertures, napertures)
+
+pointer stds[nstds] # Standard star data
+int nstds # Number of standard stars
+pointer apertures # Pointer to apertures (returned)
+int napertures # Number of apertures (returned)
+
+int i, j, aperture
+
+errchk malloc, realloc
+
+begin
+ call malloc (apertures, nstds, TY_INT)
+ napertures = 0
+ do i = 1, nstds {
+ aperture = STD_BEAM(stds[i])
+ for (j=1; (j<=napertures)&&(aperture!=Memi[apertures+j-1]); j=j+1)
+ ;
+ napertures = max (napertures, j)
+ Memi[apertures+j-1] = aperture
+ }
+ call realloc (apertures, napertures, TY_INT)
+end