Skip to content

Commit

Permalink
Merge pull request #308 from lturc/Hallterm_v5
Browse files Browse the repository at this point in the history
Added v5 reducers for the Hall field + keyword for field line colour in plot_colormap
  • Loading branch information
alhom authored Feb 24, 2025
2 parents 0bd21b6 + c21f556 commit d7171d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyPlots/plot_colormap.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def plot_colormap(filename=None,
symmetric=False,
pass_vars=None, pass_times=None, pass_full=False,
fluxfile=None, fluxdir=None, flux_levels=None,
fluxthick=1.0, fluxlines=1,
fluxthick=1.0, fluxlines=1,fluxlinecolor='k',
fsaved=None,
nomask=False,
Earth=None,
Expand Down Expand Up @@ -176,6 +176,7 @@ def plot_colormap(filename=None,
:kword fluxdir: Directory in which fluxfunction files can be found
:kword fluxthick: Scale fluxfunction line thickness
:kword fluxlines: Relative density of fluxfunction contours
:kword fluxlinecolor: Set flux line color (default black)
:kword fsaved: Overplot locations of fSaved. If keyword is set to a string, that will be the colour used.
:kword nomask: Do not mask plotting based on proton density
Expand Down Expand Up @@ -220,7 +221,6 @@ def exprMA_cust(exprmaps, requestvariables=False):
MA = custombulkspeed/va
return MA
plot_colormap(filename=fileLocation, vmin=1 vmax=40, expression=exprMA_cust,lin=True)
'''

# Switch None-keywords to empty lists (this way subsequent calls get correct empty default values
Expand Down Expand Up @@ -1017,7 +1017,7 @@ def exprMA_cust(exprmaps, requestvariables=False):
flux_levels = np.linspace(-10,10,fluxlines*60)
else:
pass #This was given, do nothing
fluxcont = ax1.contour(XmeshCentres,YmeshCentres,flux_function,flux_levels,colors='k',linestyles='solid',linewidths=0.5*fluxthick,zorder=2)
fluxcont = ax1.contour(XmeshCentres,YmeshCentres,flux_function,flux_levels,colors=fluxlinecolor,linestyles='solid',linewidths=0.5*fluxthick,zorder=2)

# add fSaved identifiers
if fsaved:
Expand Down
3 changes: 3 additions & 0 deletions pyVlsv/reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,9 @@ def makelambda(index):
v5reducers["vg_egradpe_parallel"] = DataReducerVariable(["vg_e_gradpe", "vg_b_vol"], ParallelVectorComponent, "V/m", 1, latex=r"$E_{\nabla Pe,\parallel}$",latexunits=r"$\mathrm{V}\,\mathrm{m}^{-1}$")
v5reducers["vg_egradpe_perpendicular"] = DataReducerVariable(["vg_e_gradpe", "vg_b_vol"], PerpendicularVectorComponent, "V/m", 1, latex=r"$E_{\nabla Pe,\perp}$",latexunits=r"$\mathrm{V}\,\mathrm{m}^{-1}$")

v5reducers["vg_hallterm"] = DataReducerVariable(["vg_e_vol", "vg_v", "vg_b_vol"], Hallterm, "V/m", 3, latex=r"$E_\mathrm{Hall}$", latexunits=r"\mathrm{V}\,\mathrm{m}^{-1}$")


v5reducers["vg_pdyn"] = DataReducerVariable(["vg_v", "vg_rhom"], Pdyn, "Pa", 1, latex=r"$P_\mathrm{dyn}$",latexunits=r"$\mathrm{Pa}$")
v5reducers["vg_pdynx"] = DataReducerVariable(["vg_v", "vg_rhom"], Pdynx, "Pa", 1, latex=r"$P_\mathrm{dyn,x}$",latexunits=r"$\mathrm{Pa}$")

Expand Down

0 comments on commit d7171d2

Please sign in to comment.