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/twodspec/apextract/apcenter.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/twodspec/apextract/apcenter.x')
-rw-r--r-- | noao/twodspec/apextract/apcenter.x | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/noao/twodspec/apextract/apcenter.x b/noao/twodspec/apextract/apcenter.x new file mode 100644 index 00000000..88f089d1 --- /dev/null +++ b/noao/twodspec/apextract/apcenter.x @@ -0,0 +1,26 @@ +include <pkg/center1d.h> + +# AP_CENTER -- Locate the center of an emission profile. This is done +# using the CENTER1D algorithm. The procedure gets the centering +# parameters using CL queries. If the center is not found because of the +# RADIUS or THRESHOLD centering criteria then INDEF is returned. + +real procedure ap_center (x, data, npts) + +real x # Initial guess +real data[npts] # Data +int npts # Number of data points + +real width # Centering width +real radius # Centering radius +real threshold # Detection threshold + +real apgetr(), center1d() + +begin + width = apgetr ("width") + radius = apgetr ("radius") + threshold = apgetr ("threshold") + + return (center1d (x, data, npts, width, EMISSION, radius, threshold)) +end |