File: asiinit.x

package info (click to toggle)
iraf 2.18.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,000 kB
  • sloc: ansic: 115,890; fortran: 74,576; lisp: 18,888; yacc: 5,642; sh: 961; lex: 596; makefile: 509; asm: 159; csh: 54; xml: 33; sed: 4
file content (57 lines) | stat: -rw-r--r-- 1,485 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include <math/iminterp.h>
include "im1interpdef.h"

# ASIINIT -- initialize the array sequential interpolant structure

procedure asiinit (asi, interp_type)

pointer	asi		# interpolant descriptor
int	interp_type	# interpolant type

int	nconv

begin
	if (interp_type < 1 || interp_type > II_NTYPES)
	    call error (0,"ASIINIT: Illegal interpolant type.")
	else {
	    call calloc (asi, LEN_ASISTRUCT, TY_STRUCT)
	    ASI_TYPE(asi) = interp_type
	    switch (interp_type) {
	    case II_LSINC:
	        ASI_NSINC(asi) = NSINC
		ASI_NINCR(asi) = NINCR
		if (ASI_NINCR(asi) > 1)
		    ASI_NINCR(asi) = ASI_NINCR(asi) + 1
		ASI_SHIFT(asi) = INDEFR
		ASI_PIXFRAC(asi) = PIXFRAC
		nconv = 2 * ASI_NSINC(asi) + 1
		call calloc (ASI_LTABLE(asi), nconv * ASI_NINCR(asi),
		    TY_REAL)
		call ii_sinctable (Memr[ASI_LTABLE(asi)], nconv, ASI_NINCR(asi),
		    ASI_SHIFT(asi))
	    case II_SINC:
	        ASI_NSINC(asi) = NSINC
		ASI_NINCR(asi) = 0
		ASI_SHIFT(asi) = INDEFR
		ASI_PIXFRAC(asi) = PIXFRAC
	        ASI_LTABLE(asi) = NULL
	    case II_DRIZZLE:
	        ASI_NSINC(asi) = 0
		ASI_NINCR(asi) = 0
		ASI_SHIFT(asi) = INDEFR
		ASI_PIXFRAC(asi) = PIXFRAC
	        ASI_LTABLE(asi) = NULL
	    default:
	        ASI_NSINC(asi) = 0
		ASI_NINCR(asi) = 0
		ASI_SHIFT(asi) = INDEFR
		ASI_PIXFRAC(asi) = PIXFRAC
	        ASI_LTABLE(asi) = NULL
	    }
	    ASI_BADVAL(asi) = BADVAL
	    ASI_COEFF(asi) = NULL
	}

end