Ignore:
Timestamp:
Oct 14, 2013, 5:36:36 PM (11 years ago)
Author:
aslmd
Message:

PYTHON. updated analysis tools for dust devils.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/powerlaw/ddhist.py

    r1053 r1070  
    55import scipy.optimize as sciopt
    66
    7 ## SAVED
    8 namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc_f18.ncm2_1.txt" ; drop = False ; typefit=1
    9 namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc_f18.ncm2_1.txt" ; drop = True ; typefit=2
    10 namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc_f18.ncm1_1.txt" ; drop = False ; typefit=1
    11 namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc_f18.ncm1_1.txt" ; drop = True ; typefit=1
    12 namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc.LMD_LES_MARS.160564.ncm2_1.txt" ; drop = False ; typefit=1 #bof. tous les 10 est mieux.
     7### SAVED
     8#namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc_f18.ncm2_1.txt" ; drop = False ; typefit=1
     9#namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc_f18.ncm2_1.txt" ; drop = True ; typefit=2
     10#namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc_f18.ncm1_1.txt" ; drop = False ; typefit=1
     11#namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc_f18.ncm1_1.txt" ; drop = True ; typefit=1
     12#namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc.LMD_LES_MARS.160564.ncm2_1.txt" ; drop = False ; typefit=1 #bof. tous les 10 est mieux.
     13#
     14###########################################################
     15##namefile = "/home/aymeric/Big_Data/LES_dd/psfc_f18.ncm1_1.txt"
     16##namefile = "/home/aymeric/Big_Data/LES_dd/psfc_f18.ncm2_1.txt"
     17##namefile = "/home/aymeric/Big_Data/LES_dd/psfc.LMD_LES_MARS.160564.ncm1_1.txt"
     18##namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc.LMD_LES_MARS.160564.ncm2_1.txt"
     19#namefile = "/home/aymeric/Big_Data/LES_dd/press_ustm_exomars.nc1.txt"
     20#namefile = "/home/aymeric/Big_Data/LES_dd/sav/press_ustm_exomars.ncm2_1.txt"
     21##namefile = "/home/aymeric/Big_Data/LES_dd/psfc_oldinsight100m.ncm1_1.txt"
    1322
    14 ##########################################################
    15 #namefile = "/home/aymeric/Big_Data/LES_dd/psfc_f18.ncm1_1.txt"
    16 #namefile = "/home/aymeric/Big_Data/LES_dd/psfc_f18.ncm2_1.txt"
    17 #namefile = "/home/aymeric/Big_Data/LES_dd/psfc.LMD_LES_MARS.160564.ncm1_1.txt"
    18 #namefile = "/home/aymeric/Big_Data/LES_dd/sav/psfc.LMD_LES_MARS.160564.ncm2_1.txt"
    19 namefile = "/home/aymeric/Big_Data/LES_dd/press_ustm_exomars.nc1.txt"
    20 namefile = "/home/aymeric/Big_Data/LES_dd/sav/press_ustm_exomars.ncm2_1.txt"
    21 #namefile = "/home/aymeric/Big_Data/LES_dd/psfc_oldinsight100m.ncm1_1.txt"
     23
     24
     25
     26case = "188324p"
     27case = "191798"
     28case = "160564p"
     29case = "156487"
     30case = "2007p"
     31case = "13526p"
     32case = "172097"
     33namefile = "/planeto/aslmd/LESdata/"+case+".ncm1_1.txt"
     34
     35
     36
    2237drop = False ; typefit=1
    2338#drop = True ; typefit=1
     
    2540##########################################################
    2641## define bins (we expect fit do not depend too much on this -- to be checked)
    27 ##nbins = 7 ; www = 3.
     42nbins = 7 ; www = 3.
    2843#nbins = 10 ; www = 2.5
    29 nbins = 15 ; www = 2.
     44#nbins = 15 ; www = 2.
    3045##nbins = 20 ; www = 1.75
    3146##nbins = 30 ; www = 1.5
    3247##nbins = 50 ; www = 1.2
     48##########################################################
     49limrest = 4. # restrict limit (multiple of dx)
     50#limrest = 2.
     51#limrest = 3.
     52#limrest = 0.
    3353##########################################################
    3454
     
    5676# restrictions
    5777restrict = (s > 0) # initialization (True everywhere)
     78restrict = restrict*(s >= limrest*dx) # remove lowest sizes (detection limit)
    5879#restrict = restrict*(np.abs(i-j) <= 6.*dx) # condition sur i,j (width,height)
    5980#restrict = restrict*(d > 0.9) # limit on drop for size (casse la power law? seulement si keep smaller devils)
    6081#restrict = restrict*(d > 0.5)
    61 #restrict = restrict*(s >= 3.*dx) # remove lowest sizes (detection limit)
    6282var = var[restrict]
    6383
     
    7696print "min %5.2e // max %5.2e" % (np.min(var),np.max(var))
    7797for iii in range(len(zebins)-1):
    78     print "%5.2e in [%5.2e %5.2e]" % (yeah[0][iii],zebins[iii],zebins[iii+1])
     98    print "%5.2e in [%5.0f %5.0f] %5.0f" % (yeah[0][iii],zebins[iii],zebins[iii+1],np.abs(zebins[iii+1]-zebins[iii]))
    7999
    80100# fitting function to superimpose
Note: See TracChangeset for help on using the changeset viewer.