function varargout=blanco(L,bta) % [DR,DC]=BLANCO(L,bta) % % Constructs spherical harmonics rotation matrices for use with spherical % harmonics coefficients, using the algorithm of Blanco, Florez & Bermejo (1997). % % INPUT: % % L Maximum degree of the harmonics % alp Euler angle in degrees % bta Euler angle in degrees [default: 90] % gam Euler angle in degrees % % OUTPUT: % % DR Rotation matrix for m>=0 only (lower right quarter) % DC Rotation matrix for m=-l:l (full matrix) % % EXAMPLE: % % Compare the difference; it works for the decomposition where it's just % ninety % % L=round(rand*180) % d1=blanco(L,90); d2=dlmb(L); % for index=1:L+1; difer(d1{index}-d2{index}); end % % See also DLMB, PLM2ROT % % Last modified by fjsimons-at-alum.mit.edu, January 12th, 2003 t0=clock; defval('bta',90) bta=bta*pi/180; if bta<0 warning('Only for positive rotations') end % Eq. (48-52) d{1}(1,1)=1; d{2}(2,2)=cos(bta); d{2}(3,1)=sin(bta/2)^2; d{2}(3,2)=-1/sqrt(2)*sin(bta); d{2}(3,3)=cos(bta/2)^2; % Avoid round-off error if abs(bta-pi/2)