File: ig_notation.x

package info (click to toggle)
iraf-st4gem 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 30,316 kB
  • sloc: fortran: 4,161; ansic: 2,564; pascal: 1,092; lisp: 1,046; yacc: 969; makefile: 89; python: 18; sh: 7
file content (77 lines) | stat: -rw-r--r-- 1,421 bytes parent folder | download | duplicates (2)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
include "igi.h"

#  8/20/91 Removed ^Ls. ZGL
#  1/27/93 Fix INDEF tests.

procedure ig_notation (igs)

pointer	igs		# igi structure

real	xlexp, xhexp, ylexp, yhexp

real	get_real()

errchk	get_real

begin
	iferr (xlexp = get_real(igs))
	    return
	if (IS_INDEFR (xlexp)) {
	    xhexp = INDEFR
	    ylexp = INDEFR
	    yhexp = INDEFR
	} else {
	    iferr (xhexp = get_real(igs))
		return
	    if (IS_INDEFR (xhexp)) {
		ylexp = INDEFR
		yhexp = INDEFR
	    } else {
		iferr (ylexp = get_real(igs))
		    return
		if (IS_INDEFR (ylexp))
		    yhexp = INDEFR
		else
		    iferr (yhexp = get_real(igs))
			return
	    }
	}

	call ii_notation (igs, xlexp, xhexp, ylexp, yhexp)

	if (DEBUG_OUTPUT(igs) == YES) {
	    call eprintf ("Exponential notation limits:\t%.1e\t%.1e\t%.1e\t%.1e ")
		call pargr (xlexp)
		call pargr (xhexp)
		call pargr (ylexp)
		call pargr (yhexp)
	}
end


procedure ii_notation (igs, xlexp, xhexp, ylexp, yhexp)

pointer	igs		# igi structure
real	xlexp, xhexp, ylexp, yhexp

pointer	igps		# Plot parameters structure

begin
	igps = PLOT_PARMS(igs)

	if (IS_INDEFR (xlexp) || IS_INDEFR (xhexp)) {
	    MG_XLEXP(igps) = 1.0e-4
	    MG_XHEXP(igps) = 1.0e5
	} else {
	    MG_XLEXP(igps) = xlexp
	    MG_XHEXP(igps) = xhexp
	}

	if (IS_INDEFR (ylexp) || IS_INDEFR (yhexp)) {
	    MG_YLEXP(igps) = 1.0e-4
	    MG_YHEXP(igps) = 1.0e5
	} else {
	    MG_YLEXP(igps) = ylexp
	    MG_YHEXP(igps) = yhexp
	}
end