diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /noao/onedspec/sensfunc/sfapertures.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
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 |