Changeset 1181
- Timestamp:
- Jan 2, 2014 2:18:25 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r1176 r1181 2804 2804 also the histograms used in each phase. 2805 2805 2806 :returns: (phaseRIdList, usedHistograms) where 2807 2808 * 2809 ,phaseRIdList,usedHistograms 2806 :returns: (phaseRIdList, usedHistograms) where 2807 2808 * phaseRIdList is a list of random Id values for each phase 2809 * usedHistograms is a dict where the keys are the phase names 2810 and the values for each key are a list of the histogram names 2811 used in each phase. 2810 2812 ''' 2811 2813 phaseRIdList = [] … … 2914 2916 different than the parmDict used in the refinement, which only has 2915 2917 values. 2918 2919 Note that similar things are done in 2920 :meth:`GSASIIIO.ExportBaseclass.loadParmDict` (from the tree) and 2921 :func:`GSASIIstrMain.Refine` and :func:`GSASIIstrMain.SeqRefine` (from 2922 a GPX file). 2916 2923 2917 2924 :returns: (parmDict,varyList) where: … … 2949 2956 else: 2950 2957 parmDict[parm] = [parmDict[parm],'F'] 2958 # for i in parmDict: print i,'\t',parmDict[i] 2959 # fl = open('parmDict.dat','wb') 2960 # import cPickle 2961 # cPickle.dump(parmDict,fl,1) 2962 # fl.close() 2951 2963 return parmDict,varyList 2952 2964 -
trunk/GSASIIobj.py
r1179 r1181 808 808 ====================== ====================== ==================================================== 809 809 810 Parameter Dictionary 811 ------------------------- 812 813 .. _parmDict_table: 814 815 .. index:: 816 single: Parameter dictionary 817 818 The parameter dictionary contains all of the variable parameters for the refinement. 819 The dictionary keys are the name of the parameter (<phase>:<hist>:<name>:<atom>). 820 It is prepared in two ways. When loaded from the tree 821 (in :meth:`GSASII.GSASII.MakeLSParmDict` and 822 :meth:`GSASIIIO.ExportBaseclass.loadParmDict`), 823 the values are lists with two elements: ``[value, refine flag]`` 824 825 When loaded from the GPX file (in 826 :func:`GSASIIstrMain.Refine` and :func:`GSASIIstrMain.SeqRefine`), the value in the 827 dict is the actual parameter value (usually a float, but sometimes a 828 letter or string flag value (such as I or A for iso/anisotropic). 829 830 810 831 *Classes and routines* 811 832 ---------------------- … … 838 859 :param str lbl: the input label 839 860 :param list labellist: the labels that have already been encountered 840 :returns: lbl if not found in labellist or lbl with ``_1-9` (or861 :returns: lbl if not found in labellist or lbl with ``_1-9`` (or 841 862 ``_10-99``, etc.) appended at the end 842 863 ''' … … 921 942 This is called in two places (only) :func:`GSASIIstrIO.GetUsedHistogramsAndPhases` 922 943 (which loads the histograms and phases from a GPX file) and 923 :meth:`GSASII.GSASII.GetUsedHistogramsAndPhases `944 :meth:`GSASII.GSASII.GetUsedHistogramsAndPhasesfromTree` 924 945 (which loads the histograms and phases from the data tree.) 925 946 -
trunk/GSASIIpy3.py
r1177 r1181 73 73 decimals = maxdigits[0] - 1 74 74 fmt = "{" + (":{:d}.{:d}g".format(maxdigits[0],decimals))+"}" 75 print fmt,val 76 return fmt.format(val).strip() 75 try: 76 return fmt.format(val).strip() 77 except ValueError as err: 78 print 'FormatValue Error with val,maxdigits,fmt=',val,maxdigits,fmt 79 return str(val) -
trunk/GSASIIstrIO.py
r1175 r1181 2220 2220 sampDict = {hfx+'Gonio. radius':Sample['Gonio. radius'],hfx+'Omega':Sample['Omega'], 2221 2221 hfx+'Chi':Sample['Chi'],hfx+'Phi':Sample['Phi']} 2222 for key in ('Temperature','Pressure','FreePrm1','FreePrm2','FreePrm3'): 2223 if key in Sample: 2224 sampDict[hfx+key] = Sample[key] 2222 2225 Type = Sample['Type'] 2223 2226 if 'Bragg' in Type: #Bragg-Brentano
Note: See TracChangeset
for help on using the changeset viewer.