Changes between Version 1 and Version 2 of PolarizationMaps


Ignore:
Timestamp:
05/01/18 15:46:59 (7 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • PolarizationMaps

    v1 v2  
     1Goal is to integrate various functions along lines of sight which is constrained to be in the y-z plane. 
     2
     3$\int f(B_\perp(s), B_x(s)) ds$
     4
     5$B_\perp(s) = B_y(s) \cos(\theta) + B_z(s) \sin(\theta)$
     6
     7
     8Each pixel will be given by the integral of the function along the path
     9
     10$s = x_i, y_i+s \sin(\theta), z_i+s \cos(\theta)$
     11
     12where $\delta y = \cos(\theta) \delta x$ and $\delta z =\sin(\theta) \delta x$
     13
     14
     15For 3D we just need to create the expressions in visit, create the expressions and the lineouts, and then integrate the resulting query
     16
     17
     18For 2.5D, we need to transform the integral along $s$ into an integral in the $xy$ plane.
     19
     20
     21
     22
     23
     24
     25Assume jet is oriented along $y$ and that we are integrating along the direction $(0, sin(\theta), cos(\theta))$
     26
     27where $\theta$ is the angle of inclination.
     28
     29We are interested in calculating the integral of $B_p^2$, $B_x^2$, and $B_xB_p$ where $B_p = cos(\theta)By + sin(\theta)Bz$
     30
     31If $\theta = 0$ this is just $\int B_y^2 dz$, $\int B_x^2 dz$, and $\int B_x B_y dz$
     32
     33If $\theta /= 0$ then we have to tilt the integral and calculate $B_p$ using the expression above.
     34
     35
     36
     37
     38
     39
    140{{{
    241
     
    2160#  *** params ***
    2261angjet=0.0
    23 s=math.tan(angjet)
     62tt=math.tan(angjet)
     63cc=math.cos(angjet)
     64ss=math.sin(angjet)
    2465DefineScalarExpression("angjet", str(angjet))
    2566xcells=16 #from data
     
    4384
    4485if mode == MODE3D #Create expressions in advance
    45      DefineScalarExpression("Bproj", "Bz*cos(angjet)+Bx*sin(angjet)")
    46      DefineScalarExpression("I", "fact*(By*By+Bproj*Bproj)")
    47      DefineScalarExpression("Q", "fact*(By*By-Bproj*Bproj)")
    48      DefineScalarExpression("U", "2.*fact*Bproj*By")
     86     DefineScalarExpression("Bproj", "By*cos(angjet)+Bz*sin(angjet)")
     87     DefineScalarExpression("I", "fact*(Bx^2+Bproj^2)")
     88     DefineScalarExpression("Q", "fact*(Bx^2-Bproj^2)")
     89     DefineScalarExpression("U", "2.*fact*Bproj*Bx")
     90else if mode == MODE25D
     91     DefineScalarExpression("xp", "1.0")
     92     DefineScalarExpression("Bzz", "Bz*xp/x")
     93     DefineScalarExpression("Bxx", Bz*sqrt(x^2-xp^2)/x")
     94     DefineScalarExpression("Bproj", "By*cos(angjet)+Bzz*sin(angjet)")
     95     DefineScalarExpression("dzdx", "x/sqrt(x^2-xp^2)")   
     96     DefineScalarExpression("I","2*fact*( Bxx^2+Bproj^2) * dzdx")
     97     DefineScalarExpression("Q","2*fact*( (Bxx^2-Bproj^2)*dxdz")
     98     DefineScalarExpression("U","2*2.*fact*Bxx*Bproj")   
    4999
    50100#get data extents
     
    92142
    93143#compute (integral in z)
    94 yshift=.5*s*(zlim[1]-zlim[0])
     144yshift=.5*tt*(zlim[1]-zlim[0])
    95145
    96146x=xlim[0]
     
    99149
    100150   if mode == MODE25D: #update expressions for integral calculations
    101         DefineScalarExpression("I","2*fact*( (Bz*sqrt(x^2-"+str(x)+"^2)/x)^2+By^2) * x/sqrt(x^2-"+str(x)+"^2)")
    102         DefineScalarExpression("Q","2*fact*( (Bz*sqrt(x^2-"+str(x)+"^2)/x)^2-By^2) * x/sqrt(x^2-"+str(x)+"^2)")           
    103         DefineScalarExpression("U","2*2.*fact*By*Bz")   
     151        DefineScalarExpression("xp",str(x))
    104152 
    105153   y=ylim[0]