Changeset 1070 for trunk/UTIL/PYTHON/powerlaw/ddhist.py
- Timestamp:
- Oct 14, 2013, 5:36:36 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/powerlaw/ddhist.py
r1053 r1070 5 5 import scipy.optimize as sciopt 6 6 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" 13 22 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 26 case = "188324p" 27 case = "191798" 28 case = "160564p" 29 case = "156487" 30 case = "2007p" 31 case = "13526p" 32 case = "172097" 33 namefile = "/planeto/aslmd/LESdata/"+case+".ncm1_1.txt" 34 35 36 22 37 drop = False ; typefit=1 23 38 #drop = True ; typefit=1 … … 25 40 ########################################################## 26 41 ## define bins (we expect fit do not depend too much on this -- to be checked) 27 ##nbins = 7 ; www = 3.42 nbins = 7 ; www = 3. 28 43 #nbins = 10 ; www = 2.5 29 nbins = 15 ; www = 2.44 #nbins = 15 ; www = 2. 30 45 ##nbins = 20 ; www = 1.75 31 46 ##nbins = 30 ; www = 1.5 32 47 ##nbins = 50 ; www = 1.2 48 ########################################################## 49 limrest = 4. # restrict limit (multiple of dx) 50 #limrest = 2. 51 #limrest = 3. 52 #limrest = 0. 33 53 ########################################################## 34 54 … … 56 76 # restrictions 57 77 restrict = (s > 0) # initialization (True everywhere) 78 restrict = restrict*(s >= limrest*dx) # remove lowest sizes (detection limit) 58 79 #restrict = restrict*(np.abs(i-j) <= 6.*dx) # condition sur i,j (width,height) 59 80 #restrict = restrict*(d > 0.9) # limit on drop for size (casse la power law? seulement si keep smaller devils) 60 81 #restrict = restrict*(d > 0.5) 61 #restrict = restrict*(s >= 3.*dx) # remove lowest sizes (detection limit)62 82 var = var[restrict] 63 83 … … 76 96 print "min %5.2e // max %5.2e" % (np.min(var),np.max(var)) 77 97 for 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])) 79 99 80 100 # fitting function to superimpose
Note: See TracChangeset
for help on using the changeset viewer.