📄 zern_dx_matrix.pro
字号:
; $Id: zern_dx_matrix.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.
function zern_dx_matrix, jmax, DOUBLE=is_double
;+
; NAME:
; ZERN_DX_MATRIX
;
; PURPOSE:
; Returns Zernike polynomial derivative matrix: de/de(x). If Dx is the
; result, and A is a vector of coefficients of Zernike components of
; a function f=a(1)Z(1)+...+a(jmax)Z(jmax),
; A' = Dx A is the vector of first jmax Zernike components of de(f)/de(x).
;
; CATEGORY:
; Optics.
;
; CALLING SEQUENCE:
;
; Result = ZERN_DX_MATRIX(Jmax)
;
; INPUTS:
; Jmax: integer number. Max value of Zernike polynomial indexes.
;
; KEYWORD PARAMETERS:
; DOUBLE : set if Result must be a double matrix.
;
; OUTPUTS:
; Jmax X Jmax matrix representing de/de(x) operator
;
; MODIFICATION HISTORY:
; Written by: A. Riccardi; May, 1995.
;-
if keyword_set(is_double) then begin
dx = dblarr(jmax,jmax)
two = 2.d
one = 1.d
endif else begin
dx = fltarr(jmax,jmax)
two = 2.
one = 1.
endelse
for j1=1,jmax do begin
zern_degree, j1, n1, m1
for j2=1,jmax do begin
zern_degree, j2, n2, m2
if (((m1-m2)^2 eq 1) and (n2 lt n1)) then $
if ((m1*m2 eq 0) and (is_even(j1) or is_even(j2))) then $
dx(j1-1,j2-1)=sqrt(two*(n1+1)*(n2+1)) $
else $
if is_even(j1+j2) then dx(j1-1,j2-1)=sqrt((n1+one)*(n2+1))
endfor
endfor
return, dx
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -