Skip to content

Commit

Permalink
Hotfix - Merge pull request #261 from alhom/master
Browse files Browse the repository at this point in the history
Bad import fixed, raw strings added to remove deprecationwarnigns
  • Loading branch information
alhom authored Aug 21, 2024
2 parents 257c78a + a97b820 commit d7ff7ba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pyPlots/plot_vdfdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

from rotation import rotateVectorToVector,rotateVectorToVector_X

from plot_vdf import getNearestCellWithVspace, verifyCellWithVspace, doHistogram, resampleReducer, vSpaceReducer
from plot_vdf import verifyCellWithVspace, doHistogram, resampleReducer, vSpaceReducer

def plot_vdfdiff(filename1=None, filename2=None,
vlsvobj1=None, vlsvobj2=None,
Expand Down Expand Up @@ -383,7 +383,7 @@ def plot_vdfdiff(filename1=None, filename2=None,
cidRequest = (np.int64)(vlsvReader1.get_cellid(np.array([xReq[ii],yReq[ii],zReq[ii]])))
cidNearestVspace = -1
if cidRequest > 0:
cidNearestVspace = getNearestCellWithVspace(vlsvReader1,cidRequest)
cidNearestVspace = vlsvReader1.get_cellid_with_vdf(np.array([xReq[ii],yReq[ii],zReq[ii]]), pop=pop)
else:
print('ERROR: cell not found')
sys.exit()
Expand Down Expand Up @@ -919,14 +919,14 @@ def plot_vdfdiff(filename1=None, filename2=None,
if cb_title_use is None:
if wflux is None:
if reducer == 'average':
cb_title_use=r"$\Delta f(v)\,["+pt.plot.rmstring('m')+"^{-6} \,"+pt.plot.rmstring('s')+"^{3}]$"
cb_title_use=r"$\Delta f(v)\,["+pt.plot.rmstring('m')+r"^{-6} \,"+pt.plot.rmstring('s')+r"^{3}]$"
elif reducer == 'integrate':
cb_title_use=r"$\Delta f(v)\,["+pt.plot.rmstring('m')+"^{-5} \,"+pt.plot.rmstring('s')+"^{2}]$"
cb_title_use=r"$\Delta f(v)\,["+pt.plot.rmstring('m')+r"^{-5} \,"+pt.plot.rmstring('s')+r"^{2}]$"
else:
if reducer == 'average':
cb_title_use=r"flux $\Delta F\,["+pt.plot.rmstring('m')+"^{-2} \,"+pt.plot.rmstring('s')+"^{-1} \,"+pt.plot.rmstring('sr')+"^{-1}]$"
cb_title_use=r"flux $\Delta F\,["+pt.plot.rmstring('m')+r"^{-2} \,"+pt.plot.rmstring('s')+r"^{-1} \,"+pt.plot.rmstring('sr')+r"^{-1}]$"
elif reducer == 'integrate':
cb_title_use=r"flux $\Delta F\,["+pt.plot.rmstring('m')+"^{-1} \,"+pt.plot.rmstring('s')+"^{-2} \,"+pt.plot.rmstring('sr')+"^{-1}]$"
cb_title_use=r"flux $\Delta F\,["+pt.plot.rmstring('m')+r"^{-1} \,"+pt.plot.rmstring('s')+r"^{-2} \,"+pt.plot.rmstring('sr')+r"^{-1}]$"

if cbaxes is not None:
cax = cbaxes
Expand Down

0 comments on commit d7ff7ba

Please sign in to comment.