; batch file called from ~\lightning\idl\iss\scattered_light\single_image\create_single_image_inc_emis_phase.pro ;x-east in the imageplane,y-north,z-toward the spacecraft norm_image=double([0.,0.,1.]) ;help,norm_ring_plane ;if_dark_side=-ring_facing_angle_deg*incidence_rings_deg/abs(ring_facing_angle_deg)/abs(incidence_rings_deg) ;help,if_dark_side norm_ring_north=norm_ring_plane if (norm_ring_north(1) le 0.) then norm_ring_north=-norm_ring_north _z=cos(double(phase_angle_deg)/180.*!pi) _y=(sin(double(incidence_rings_deg)/180.*!pi)-double(norm_ring_north(2))*_z)/double(norm_ring_north(1)) _x=(1.-_y^2-_z^2)^.5 if (1.-_y^2-_z^2 le 0.) then begin print,'INVALID PHASE ANGLE FOR THE GIVEN INCIDENCE AND EMISSION ANGLES' stop endif sol_dot_x=[_x,_y,_z]##transpose(double([1.,0.,0.])) sol_dot_y=[_x,_y,_z]##transpose(double([0.,1.,0.])) ;print,'sol_dot_x,sol_dot_y',sol_dot_x,sol_dot_y ;print, '[_x,_y,_z]',[_x,_y,_z] subsolar_azimuth_deg=180./!pi*acos(sol_dot_y(0)/(sol_dot_x(0)^2+sol_dot_y(0)^2)^.5) if (sol_dot_x(0) ge 0.) then subsolar_azimuth_deg=-subsolar_azimuth_deg