diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/onedspec/sensfunc/sfapertures.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/onedspec/sensfunc/sfapertures.x')
-rw-r--r-- | noao/onedspec/sensfunc/sfapertures.x | 27 |
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 |