📄 zern_infos.pro
字号:
; $Id: zern_infos.pro,v 1.1.1.1 2002/03/12 11:53:46 riccardi Exp $
;
; A. Riccardi, Dipartimento di Astronomia di Firenze (Italy).
; e-mail address: riccardi@arcetri.astro.it
; Please, send me a message if you modify this code.
;+
; NAME:
; ZERN_INFOS
;
; Infos = ZERN_INFOS(Nmax)
;
; create a vector of structures for Zernike polynomial informations
; for the first Nmax radial degrees.
; if DOUBLE keyword is set, then double precision is used.
;
; KEYWORDS:
;
; NMIN: integer scalar. Minimum radial degree. If undefined
; nmin = 0 is used.
; DOUBLE: if set double type is used
; VERBOSE: if set use vebose style
;
; Zernike info structure:
;
; {
; j: integer, (polynomial index)
; n: integer, (radial degree)
; m: integer, (azimuthal degree)
; is_even: integer, (true if Zernike index is even)
; is_double: integer, (true if following coeff's are double type)
; coeff: double or float type vector
; } (vector of radial polynomial coefficients
; from the higher order to the lower)
;-
function zern_infos, nmax, DOUBLE=double, NMIN=nmin, VERBOSE=verbose
jmax=zern_index(nmax,nmax)
if (nmax gt 0) then jmax = jmax+1
if (n_elements(nmin) eq 0) then jmin=1
if (keyword_set(double)) then $
infos = replicate( $
{ $
j : 0, $
n : 0, $
m : 0, $
j_even : 0, $
is_double : 1, $
coeff : dblarr(nmax/2+1) $
}, jmax-jmin+1) $
else $
infos = replicate( $
{ $
j : 0, $
n : 0, $
m : 0, $
j_even : 0, $
is_double : 0, $
coeff : fltarr(nmax/2+1) $
}, jmax-jmin+1)
for i=0, jmax-jmin do begin
j = i+jmin
zern_degree, j, n, m
if keyword_set(verbose) then overprint, "Zern. deg.: "+strtrim(j,2)
$ +" Radial deg.: "+strtrim(n,2)
infos(i).j = j
infos(i).n = n
infos(i).m = m
infos(i).j_even = fix(is_even(j))
infos(i).coeff = zern_rcoeff(n, m, double=double)
endfor
return, infos
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -