Changeset 3102
- Timestamp:
- Sep 28, 2017 11:17:17 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIscriptable.py
r3098 r3102 10 10 """ 11 11 *GSASIIscriptable: Scripting Tools* 12 ----------------------------------- 12 ====================================== 13 13 14 14 Routines for reading, writing, modifying and creating GSAS-II project (.gpx) files. … … 29 29 ===================== 30 30 31 There are three classes of refinement parameters:32 33 * Histogram . Turned on and off through :func:`G2PwdrData.set_refinements`34 and :func:`G2PwdrData.clear_refinements`35 * Phase .Turned on and off through :func:`G2Phase.set_refinements`31 There are three types of refinement parameters: 32 33 * Histogram: These can be turned on and off through 34 :meth:`G2PwdrData.set_refinements` and :func:`G2PwdrData.clear_refinements` 35 * Phase: Turned on and off through :func:`G2Phase.set_refinements` 36 36 and :func:`G2Phase.clear_refinements` 37 * Histogram-and-phase (HAP) .Turned on and off through37 * Histogram-and-phase (HAP): Turned on and off through 38 38 :func:`G2Phase.set_HAP_refinements` and :func:`G2Phase.clear_HAP_refinements` 39 39 40 These parameters can be combined and set by :meth:`G2Project.do_refinements` 41 or :meth:`G2Project.set_refinement`. 40 42 41 43 ============================ … … 67 69 some_histogram.clear_refinements(params['clear']) 68 70 69 .. tabularcolumns:: |l| p|p|70 71 ===================== ==================== ==================== 71 .. tabularcolumns:: |l|l|p{3.5in}| 72 73 ===================== ==================== ================================================= 72 74 key subkey explanation 73 ===================== ==================== ==================== 75 ===================== ==================== ================================================= 74 76 Limits The 2-theta range of values to consider. Can 75 77 be either a dictionary of 'low' and/or 'high', … … 102 104 \ Polariz. Polarization parameter 103 105 \ Lam Lambda, the incident wavelength 104 ===================== ==================== ==================== 105 106 ===================== ==================== ================================================= 106 107 107 108 .. _Phase_parameters_table: … … 124 125 some_histogram.set_refinements(params) 125 126 126 .. tabularcolumns:: |l|p |127 128 ===================== ==================== 127 .. tabularcolumns:: |l|p{4.5in}| 128 129 ===================== ============================================ 129 130 key explanation 130 ===================== ==================== 131 ===================== ============================================ 131 132 Cell Whether or not to refine the unit cell. 132 133 Atoms Dictionary of atoms and refinement flags. … … 138 139 and 'U' for Debye-Waller factor 139 140 LeBail Enables LeBail intensity extraction. 140 ===================== ==================== 141 ===================== ============================================ 141 142 142 143 .. _HAP_parameters_table: … … 160 161 some_phase.set_HAP_refinements(params) 161 162 162 .. tabularcolumns:: |l| p|p|163 164 ===================== ==================== =====================163 .. tabularcolumns:: |l|l|p{3.5in}| 164 165 ===================== ==================== ================================================= 165 166 key subkey explanation 166 ===================== ==================== =====================167 ===================== ==================== ================================================= 167 168 Babinet Should be a **list** of the following 168 169 subkeys. If not, assumes both … … 189 190 Use Boolean, True to refine 190 191 Scale Phase fraction; Boolean, True to refine 191 ===================== ===================== ==================== 192 ===================== ==================== ================================================= 193 192 194 193 195 ============================ … … 212 214 213 215 import GSASIIpath 214 GSASIIpath.SetBinaryPath( False) # would rather have this in __name__ == '__main__' stanza216 GSASIIpath.SetBinaryPath(True) # for now, this is needed before some of these modules can be imported 215 217 import GSASIIobj as G2obj 216 218 import GSASIIpwd as G2pwd … … 223 225 PwdrDataReaders = [] 224 226 PhaseReaders = [] 225 226 227 227 228 def LoadG2fil(): … … 858 859 >>> phase = proj.phase('name of phase') 859 860 860 New data can also be loaded via : func:`~G2Project.add_phase` and861 : func:`~G2Project.add_powder_histogram`.861 New data can also be loaded via :meth:`~G2Project.add_phase` and 862 :meth:`~G2Project.add_powder_histogram`. 862 863 863 864 >>> hist = proj.add_powder_histogram('some_data_file.chi', … … 866 867 867 868 Parameters for Rietveld refinement can be turned on and off as well. 868 See : func:`~G2Project.set_refinement`, :func:`~G2Project.refine`,869 : func:`~G2Project.iter_refinements`, :func:`~G2Project.do_refinements`.869 See :meth:`~G2Project.set_refinement`, :meth:`~G2Project.refine`, 870 :meth:`~G2Project.iter_refinements`, :meth:`~G2Project.do_refinements`. 870 871 """ 871 872 def __init__(self, gpxfile=None, author=None, filename=None): … … 1034 1035 .. seealso:: 1035 1036 1036 : func:`~G2Project.histogram`1037 : func:`~G2Project.phase`"""1037 :meth:`G2Project.histogram` 1038 :meth:`G2Project.phase`""" 1038 1039 hist = self.histogram(histogram) 1039 1040 phase = self.phase(phase) … … 1089 1090 1090 1091 .. seealso:: 1091 : func:`~GSASIIscriptable.G2Project.histograms`1092 : func:`~GSASIIscriptable.G2Project.phase`1093 : func:`~GSASIIscriptable.G2Project.phases`1092 :meth:`G2Project.histograms` 1093 :meth:`G2Project.phase` 1094 :meth:`G2Project.phases` 1094 1095 """ 1095 1096 if isinstance(histname, G2PwdrData): … … 1113 1114 1114 1115 .. seealso:: 1115 : func:`~GSASIIscriptable.G2Project.histograms`1116 : func:`~GSASIIscriptable.G2Project.phase`1117 : func:`~GSASIIscriptable.G2Project.phases`1116 :meth:`G2Project.histograms` 1117 :meth:`G2Project.phase` 1118 :meth:`G2Project.phases` 1118 1119 """ 1119 1120 output = [] … … 1133 1134 1134 1135 .. seealso:: 1135 : func:`~GSASIIscriptable.G2Project.histograms`1136 : func:`~GSASIIscriptable.G2Project.phase`1137 : func:`~GSASIIscriptable.G2Project.phases`1136 :meth:`G2Project.histograms` 1137 :meth:`G2Project.phase` 1138 :meth:`G2Project.phases` 1138 1139 """ 1139 1140 phases = self.data['Phases'] … … 1158 1159 1159 1160 .. seealso:: 1160 : func:`~GSASIIscriptable.G2Project.histogram`1161 : func:`~GSASIIscriptable.G2Project.histograms`1162 : func:`~GSASIIscriptable.G2Project.phase`1161 :meth:`G2Project.histogram` 1162 :meth:`G2Project.histograms` 1163 :meth:`G2Project.phase` 1163 1164 """ 1164 1165 for obj in self.names: … … 1255 1256 1256 1257 .. seealso:: 1257 : func:`~G2PwdrData.set_refinements`1258 : func:`~G2PwdrData.clear_refinements`1259 : func:`~G2Phase.set_refinements`1260 : func:`~G2Phase.clear_refinements`1261 : func:`~G2Phase.set_HAP_refinements`1262 : func:`~G2Phase.clear_HAP_refinements`"""1258 :meth:`G2PwdrData.set_refinements` 1259 :meth:`G2PwdrData.clear_refinements` 1260 :meth:`G2Phase.set_refinements` 1261 :meth:`G2Phase.clear_refinements` 1262 :meth:`G2Phase.set_HAP_refinements` 1263 :meth:`G2Phase.clear_HAP_refinements`""" 1263 1264 1264 1265 if histogram == 'all': … … 1349 1350 string variable specifiers, or arguments for :meth:`make_var_obj` 1350 1351 :param str type: A string constraint type specifier. See 1351 :class:` ~GSASIIscriptable.G2Project.add_constraint_raw`1352 :class:`G2Project.add_constraint_raw` 1352 1353 1353 1354 """ … … 1765 1766 1766 1767 .. seealso:: 1767 : func:`~GSASIIscriptable.G2Phase.atom`1768 :meth:`G2Phase.atom` 1768 1769 :class:`G2AtomRecord` 1769 1770 """ … … 1800 1801 1801 1802 .. seealso:: 1802 : func:`~G2Phase.get_cell_and_esd`1803 :meth:`G2Phase.get_cell_and_esd` 1803 1804 1804 1805 """ … … 1816 1817 1817 1818 .. seealso:: 1818 : func:`~G2Phase.get_cell`1819 :meth:`G2Phase.get_cell` 1819 1820 1820 1821 """ … … 2170 2171 2171 2172 def dump(args): 2172 """The dump subcommand""" 2173 """The dump subcommand. This is intended to be called by the :func:`main` routine. 2174 This is typically called by invoking this script with a subcommand:: 2175 2176 python GSASIIscriptable.py dump <file.gpx> 2177 """ 2173 2178 if not args.histograms and not args.phases: 2174 2179 args.raw = True … … 2295 2300 * :func:`seqrefine` 2296 2301 * :func:`export` 2297 * :func:`browse` 2302 * browse (:func:`IPyBrowse`) 2303 2304 These commands are typically called by invoking this script with a subcommand, 2305 for example:: 2306 2307 python GSASIIscriptable.py dump <file.gpx> 2308 2298 2309 2299 2310 .. seealso:: … … 2303 2314 :func:`seqrefine` 2304 2315 :func:`export` 2305 :func:` browse`2316 :func:`IPyBrowse` 2306 2317 ''' 2307 2318 parser = argparse.ArgumentParser() -
trunk/GSASIIspc.py
r3097 r3102 24 24 import GSASIIpath 25 25 GSASIIpath.SetVersionNumber("$Revision$") 26 import pyspg27 26 28 27 npsind = lambda x: np.sin(x*np.pi/180.) … … 70 69 SGSymbol = SGSymbol.replace(':',' ') #get rid of ':' in R space group symbols from some cif files 71 70 SGSymbol = SGSymbol.split(':')[0] #remove :1/2 setting symbol from some cif files 71 import pyspg 72 72 SGInfo = pyspg.sgforpy(SGSymbol) 73 73 SGData['SpGrp'] = SGSymbol.strip().lower().capitalize() … … 1750 1750 Cen = np.array([cen for cen in SGData['SGCen']],order='F') 1751 1751 1752 import pyspg 1752 1753 Nuniq,Uniq,iabsnt,mulp = pyspg.genhklpy(hklf,len(Ops),OpM,OpT,SGData['SGInv'],len(Cen),Cen) 1753 1754 h,k,l,f = Uniq -
trunk/docs/source/GSASIIscripts.rst
r3000 r3102 1 *GSAS-II Scripts*2 =================3 4 1 .. automodule:: GSASIIscriptable 5 2 :members: 3 4 *GSAS-II Misc Scripts* 5 ====================== 6 6 7 7 .. automodule:: testDeriv -
trunk/help/gsasII.html
r2833 r3102 6464 6464 6465 6465 <h4 style='margin-left:0.25in'><a name=Data></a><u><span style='mso-fareast-font-family: 6466 "Times New Roman"'>Data sets<span class=MsoHyperlink><span style='color:#5B9BD5;6466 "Times New Roman"'>Data<span class=MsoHyperlink><span style='color:#5B9BD5; 6467 6467 mso-themecolor:accent1'><o:p></o:p></span></span></span></u></h4> 6468 6468 … … 7274 7274 <hr size=2 width="100%" align=center> 7275 7275 7276 <!-- hhmts start -->Last modified: Fri May 12 18:18:37CDT 2017 <!-- hhmts end -->7276 <!-- hhmts start -->Last modified: Thu Sep 28 11:14:02 CDT 2017 <!-- hhmts end --> 7277 7277 7278 7278 </div>
Note: See TracChangeset
for help on using the changeset viewer.