Refaire la figure LES avec threshold et colorbar noir et blanc

In [1]:
import numpy as np
import apss_lib 
%matplotlib inline
2019-09-04 15:32:08.965705
In [2]:
import matplotlib.pyplot as mpl
def addhirise(damin,damax):
    mpl.plot([10,10],[damin,damax],"m--")
    mpl.plot([15,15],[damin,damax],"m--")
    mpl.plot([68,68],[damin,damax],"m--")
    mpl.plot([85,85],[damin,damax],"m--")

Images HiRISE

  • sol 10
  • sol 15 -- 27 new tracks in 5 sols
  • sol 68 -- 22 tracks in 53 sols
  • sol 85 -- 0 tracks in 17 sols

sol 9 6dec sol 14 11dec sol 68 4fev sol 84 21fev

In [3]:
apss_lib.multisol(code="HWS",solini=0,solsol=90,ttinter=[[8,17]]) #; addhirise(0,30)
apss_lib.multisol(code="HWS",solini=0,solsol=90,compute="std",ttinter=[[8,17]]) #; addhirise(1,3.5)
apss_lib.multisol(code="HWS",solini=0,solsol=90,compute="max",ttinter=[[8,17]]) #; addhirise(10,30)
apss_lib.multisol(code="HWS",solini=0,solsol=90,compute="mean",ttinter=[[8,17]]) #; addhirise(3,11)
/home/aspiga/soft/conda/miniconda2/envs/py2/lib/python2.7/site-packages/numpy/core/_methods.py:140: RuntimeWarning: Degrees of freedom <= 0 for slice
  keepdims=keepdims)
/home/aspiga/soft/conda/miniconda2/envs/py2/lib/python2.7/site-packages/numpy/core/_methods.py:110: RuntimeWarning: invalid value encountered in true_divide
  arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
/home/aspiga/soft/conda/miniconda2/envs/py2/lib/python2.7/site-packages/numpy/core/_methods.py:132: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
/home/aspiga/soft/conda/miniconda2/envs/py2/lib/python2.7/site-packages/numpy/core/fromnumeric.py:3118: RuntimeWarning: Mean of empty slice.
  out=out, **kwargs)
/home/aspiga/soft/conda/miniconda2/envs/py2/lib/python2.7/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
Out[3]:
(array(5.08184435), array(89.50933485))
In [4]:
apss_lib.multisol(code="HWS",solini=0,solsol=200,ttinter=[[8,17]]) #; addhirise(0,30)
apss_lib.multisol(code="HWS",solini=0,solsol=200,compute="std",ttinter=[[8,17]]) #; addhirise(1,3.5)
apss_lib.multisol(code="HWS",solini=0,solsol=200,compute="max",ttinter=[[8,17]]) #; addhirise(10,30)
apss_lib.multisol(code="HWS",solini=0,solsol=200,compute="mean",ttinter=[[8,17]]) #; addhirise(3,11)
Out[4]:
(array(7.65851213), array(199.52091493))
In [5]:
#apss_lib.multisol(solini=0,solsol=90,code="HWS",freq=0.1,win=3700,ttinter=[[8,17]]) ; addhirise(0,14)
In [6]:
## corrected variability
nx = 16 #32 #24 #16
ny = 4 #6
lim = 0.99 # to select regular (complete) sols

import numpy as np
import ppplot
ppplot.changefont(16)

stab = ["above_0p3","above_0p5","above_1p0","above_2p0"]
#stab = ["above_0p3"]

for sss in stab:

  sol, ratio, ndd, extdrop = np.loadtxt("/home/aspiga/cloud/InSight/WORKFLOW_drops/output/txt_sol_to_sol/solDD_"+sss+".txt",unpack=True,skiprows=1)
  fig = ppplot.figuref(x=nx,y=ny)
  pl = ppplot.plot1d(fig=fig)
  pl.xmin = 0
  pl.xmax = 90
  pl.nxticks = 10
  pl.ymin = 0
  pl.ymax = np.max(ndd/ratio)+1
  pl.nyticks = np.min([pl.ymax - pl.ymin + 1, 10])
  pl.fmt = '%.0f'
  pl.xlabel = "InSight sol"
  pl.ylabel = r'# pressure drops' #per hour'
  pl.linestyle = ""
  pl.marker = "s"
  pl.title = "pressure drops " + sss.replace("p",".").replace("_"," ") + " Pa"

  ##########################
  ## regular points first
  w = np.where(ratio >= lim)
  pl.f = ndd[w]/ratio[w]
  pl.x = sol[w]
  pl.color = "b"
  pl.make()

  ##########################
  ## reconstructed points second
  w = np.where( (0.5 < ratio) * (ratio <= lim) )
  pl.f = np.floor(ndd[w]/ratio[w])
  pl.x = sol[w]
  pl.color = "c"
  pl.make()


  
  #pl.linestyle = '--'
  #pl.marker = ""
  #pl.color = "m"
  #pl.f = [pl.ymin,pl.ymax] ; pl.x = [10,10] ; pl.make()
  #pl.f = [pl.ymin,pl.ymax] ; pl.x = [15,15] ; pl.make()
  #pl.f = [pl.ymin,pl.ymax] ; pl.x = [68,68] ; pl.make()
  #pl.f = [pl.ymin,pl.ymax] ; pl.x = [85,85] ; pl.make()
In [7]:
## corrected variability
nx = 16 #32 #24 #16
ny = 4 #6
lim = 0.99 # to select regular (complete) sols

import numpy as np
import ppplot
ppplot.changefont(16)

stab = ["above_0p3","above_0p5","above_1p0","above_2p0"]
#stab = ["above_0p3"]

for sss in stab:

  sol, ratio, ndd, extdrop = np.loadtxt("/home/aspiga/cloud/InSight/WORKFLOW_drops/output/txt_sol_to_sol/solDD_"+sss+".txt",unpack=True,skiprows=1)
  fig = ppplot.figuref(x=nx,y=ny)
  pl = ppplot.plot1d(fig=fig)
  pl.xmin = 0
  pl.xmax = 200
  pl.nxticks = 10
  pl.ymin = 0
  pl.ymax = np.max(ndd/ratio)+1
  pl.nyticks = np.min([pl.ymax - pl.ymin + 1, 10])
  pl.fmt = '%.0f'
  pl.xlabel = "InSight sol"
  pl.ylabel = r'# pressure drops' #per hour'
  pl.linestyle = ""
  pl.marker = "s"
  pl.title = "pressure drops " + sss.replace("p",".").replace("_"," ") + " Pa"

  ##########################
  ## regular points first
  w = np.where(ratio >= lim)
  pl.f = ndd[w]/ratio[w]
  pl.x = sol[w]
  pl.color = "b"
  pl.make()

  ##########################
  ## reconstructed points second
  w = np.where( (0.5 < ratio) * (ratio <= lim) )
  pl.f = np.floor(ndd[w]/ratio[w])
  pl.x = sol[w]
  pl.color = "c"
  pl.make()


  
  #pl.linestyle = '--'
  #pl.marker = ""
  #pl.color = "m"
  #pl.f = [pl.ymin,pl.ymax] ; pl.x = [10,10] ; pl.make()
  #pl.f = [pl.ymin,pl.ymax] ; pl.x = [15,15] ; pl.make()
  #pl.f = [pl.ymin,pl.ymax] ; pl.x = [68,68] ; pl.make()
  #pl.f = [pl.ymin,pl.ymax] ; pl.x = [85,85] ; pl.make()
In [10]:
data = np.genfromtxt("/home/aspiga/data/InSight/nsyt_tau_report.txt",dtype=None,names=True,skip_footer=1)

ppplot.changefont(16)
fig = ppplot.figuref(x=nx,y=ny)
pl = ppplot.plot1d(fig=fig)
pl.f = data["TAU"]
pl.x = data["SolLMST24"]
pl.linestyle = ''
pl.marker = '.'
pl.xmin = 0
pl.xmax = 90
pl.nxticks = 10
pl.ymin, pl.ymax, pl.nyticks = 0.6,2.0,12
#pl.ylabel = r'Pressure (Pa) minus $P_{min}=%i$ Pa' % (np.min(pp))
pl.ylabel = r'IDC opacity (tau)'
pl.xlabel = 'InSight sol'
pl.fmt = "%.1f"
pl.color = "b"
pl.marker = "o"
pl.linestyle = "-"
pl.make()

#pl.linestyle = '--'
#pl.marker = ""
#pl.color = "m"
#pl.f = [pl.ymin,pl.ymax] ; pl.x = [10,10] ; pl.make()
#pl.f = [pl.ymin,pl.ymax] ; pl.x = [15,15] ; pl.make()
#pl.f = [pl.ymin,pl.ymax] ; pl.x = [68,68] ; pl.make()
#pl.f = [pl.ymin,pl.ymax] ; pl.x = [85,85] ; pl.make()
/home/aspiga/soft/conda/miniconda2/envs/py2/lib/python2.7/site-packages/ipykernel_launcher.py:1: VisibleDeprecationWarning: Reading unicode strings without specifying the encoding argument is deprecated. Set the encoding, use None for the system default.
  """Entry point for launching an IPython kernel.
In [9]:
apss_lib.multisol(code="WD",solini=0,solsol=90,ttinter=[[8,17]],compute="mean")
apss_lib.multisol(code="WD",solini=0,solsol=90,ttinter=[[8,17]],compute="std")
Out[9]:
(array(71.05488616), array(89.50933485))