1 | # -*- coding: utf-8 -*- |
---|
2 | #config.py - Variables used to set optional configuration options |
---|
3 | ########### SVN repository information ################### |
---|
4 | # $Date: 2023-08-14 22:41:31 +0000 (Mon, 14 Aug 2023) $ |
---|
5 | # $Author: vondreele $ |
---|
6 | # $Revision: 5647 $ |
---|
7 | # $URL: trunk/config_example.py $ |
---|
8 | # $Id: config_example.py 5647 2023-08-14 22:41:31Z vondreele $ |
---|
9 | ########### SVN repository information ################### |
---|
10 | ''' |
---|
11 | This file contains optional configuration options for GSAS-II. The variables |
---|
12 | in this file can be copied to file config.py, which is imported if present. |
---|
13 | Access these variables using :func:`GSASIIpath.GetConfigValue`, which returns |
---|
14 | None if the variable is not set. Note that a config.py file need not |
---|
15 | be present, but if in use it will typically be found with the GSAS-II source |
---|
16 | directory (GSASIIpath.Path2GSAS2) or a directory for local GSAS-II |
---|
17 | modifications (~/.G2local/ or /Documents and Settings/<User>/.G2local/). |
---|
18 | Note that the contents of config.py is usually changed |
---|
19 | using GSASIIctrlGUI.SelectConfigSetting. |
---|
20 | |
---|
21 | When defining new config variables for GSAS-II, define them here with a |
---|
22 | default value: use None or a string for strings, or use integers or real |
---|
23 | values. Include a doc string after each variable is defined to explain |
---|
24 | what it does. Use names ending in _location or _directory for items |
---|
25 | that will contain directory names. Use names ending in _exec for executable |
---|
26 | files (.exe on windows). |
---|
27 | |
---|
28 | For example:: |
---|
29 | |
---|
30 | test_int = 0 |
---|
31 | test_float = 0.0 |
---|
32 | test_string = None (or) |
---|
33 | test_string = 'value' |
---|
34 | ''' |
---|
35 | |
---|
36 | debug = False |
---|
37 | '''Set to True to turn on debugging mode. This enables use of IPython on |
---|
38 | exceptions and on calls to :func:`GSASIIpath.IPyBreak` or breakpoint(). |
---|
39 | Calls to :func:`GSASIIpath.pdbBreak` will invoke pdb at that location. |
---|
40 | %% |
---|
41 | If debug is False, calls to :func:`GSASIIpath.IPyBreak`, breakpoint() and |
---|
42 | :func:`GSASIIpath.pdbBreak` are ignored. |
---|
43 | %% |
---|
44 | From inside Spyder, calls to breakpoint() invoke the Spyder debugger, |
---|
45 | independent of the setting of debug. |
---|
46 | %% |
---|
47 | Restart GSAS-II for the setting of debug to take effect. |
---|
48 | ''' |
---|
49 | |
---|
50 | Clip_on = True |
---|
51 | ''' if True then line plots willl be clipped at plot border; |
---|
52 | if False line plots extend nto white space around plot frme |
---|
53 | ''' |
---|
54 | |
---|
55 | Transpose = False |
---|
56 | 'Set to True to cause images to be Transposed when read (for code development)' |
---|
57 | |
---|
58 | Enable_logging = False |
---|
59 | 'Set to True to enable use of command logging (under development.)' |
---|
60 | |
---|
61 | logging_debug = False |
---|
62 | 'Set to True to enable debug for logging (under development.)' |
---|
63 | |
---|
64 | Help_mode = "browser" |
---|
65 | '''Set to "internal" to use a Python-based web viewer to display |
---|
66 | help documentation and tutorials. If set to the default ("browser") |
---|
67 | the default web browser is used. |
---|
68 | ''' |
---|
69 | |
---|
70 | Tutorial_location = None |
---|
71 | '''Change this to place tutorials by in a different spot. If None, this defaults to |
---|
72 | <user>/My Documents/G2tutorials (on windows) or <user>/G2tutorials. If you want to |
---|
73 | use a different location, this can be set here. To install into the location where |
---|
74 | GSAS-II is installed, use this:: |
---|
75 | |
---|
76 | Tutorial_location = GSASIIpath.path2GSAS2 |
---|
77 | |
---|
78 | As another example, to use ~/.G2tutorials do this:: |
---|
79 | |
---|
80 | Tutorial_location = '~/.G2tutorials' |
---|
81 | |
---|
82 | Note that os.path.expanduser is run on Tutorial_location before it is used. |
---|
83 | Also note that GSASIIpath is imported inside config.py; other imports should be |
---|
84 | avoided. |
---|
85 | ''' |
---|
86 | |
---|
87 | Save_paths=False |
---|
88 | '''When set to True, the last-used path for saving of .gpx and for |
---|
89 | importing of input files is saved in the configuration file. |
---|
90 | Note that since this causes the config.py file to be updated whenever files are |
---|
91 | saved/imported, any temporary config settings can be saved to disk at that |
---|
92 | point. |
---|
93 | ''' |
---|
94 | |
---|
95 | Starting_directory=None |
---|
96 | '''Specifies a default location for starting GSAS-II and where .gpx files |
---|
97 | should be read from. Will be updated if Save_paths is True. |
---|
98 | Note that os.path.expanduser is run on this before it is used, so the user's |
---|
99 | home directory can be specified with a '~'. |
---|
100 | ''' |
---|
101 | |
---|
102 | Import_directory=None |
---|
103 | '''Specifies a default location for importing (reading) input files. Will be |
---|
104 | updated if Save_paths is True. |
---|
105 | Note that os.path.expanduser is run on this before it is used, so the user's |
---|
106 | home directory can be specified with a '~'. |
---|
107 | ''' |
---|
108 | |
---|
109 | wxInspector = False |
---|
110 | '''If set to True, the wxInspector widget is displayed when |
---|
111 | GSAS-II is started. |
---|
112 | ''' |
---|
113 | |
---|
114 | Spot_mask_diameter = 1.0 |
---|
115 | '''Specifies the default diameter for creation of spot masks. Default is 1.0 mm |
---|
116 | ''' |
---|
117 | |
---|
118 | Ring_mask_thickness = 0.1 |
---|
119 | '''Specifies the default thickness for creation of ring and arc masks. |
---|
120 | Default is 0.1 degrees 2-theta. |
---|
121 | ''' |
---|
122 | |
---|
123 | Arc_mask_azimuth = 10.0 |
---|
124 | '''Specifies the default azimuthal range for creation of arc masks. |
---|
125 | Default is 10.0 degrees 2-theta. |
---|
126 | ''' |
---|
127 | |
---|
128 | Autoint_PollTime = 30. |
---|
129 | '''Specifies the frequency, in seconds that AutoInt checks for new files. |
---|
130 | Default is 30 seconds |
---|
131 | ''' |
---|
132 | |
---|
133 | Autoscale_ParmNames = ['userComment2',r'extraInputs\1\extraInputs','Ion_Chamber_I0',] |
---|
134 | '''Gives the possible selection of incident monitor names as found in an image metadata file. |
---|
135 | Used in AutoIntegration |
---|
136 | ''' |
---|
137 | DefaultAutoScale = "userComment2" |
---|
138 | '''DefaultAutoScale selects one of the AutoScale_ParmNames. |
---|
139 | Used in AutoIntegration |
---|
140 | ''' |
---|
141 | Main_Size = '(700,450)' |
---|
142 | '''Main window size (width, height) - initially uses wx.DefaultSize but will updated |
---|
143 | and saved as the user changes the window |
---|
144 | ''' |
---|
145 | Main_Pos = '(100,100)' |
---|
146 | '''Main window location - will be updated & saved when user moves |
---|
147 | it. If position is outside screen then it will be repositioned to default |
---|
148 | ''' |
---|
149 | Plot_Size = '(700,600)' |
---|
150 | '''Plot window size (width, height) - initially uses wx.DefaultSize but will updated |
---|
151 | and saved as the user changes the window |
---|
152 | ''' |
---|
153 | Plot_Pos = '(200,200)' |
---|
154 | '''Plot window location - will be updated & saved when user moves it |
---|
155 | these widows. If position is outside screen then it will be repositioned to default |
---|
156 | ''' |
---|
157 | |
---|
158 | Tick_length = 8.0 |
---|
159 | '''Specifies the length of phase tick marks in pixels. Default is 8.''' |
---|
160 | |
---|
161 | Tick_width = 1.0 |
---|
162 | '''Specifies the width of phase tick marks in pixels. |
---|
163 | Fractional values do seem to produce an effect. Default is 1.''' |
---|
164 | |
---|
165 | Contour_color = 'GSPaired' |
---|
166 | ''' Specifies the color map to be used for contour plots (images, pole figures, etc.) |
---|
167 | will be applied for new images and if Saved for a new start of GSAS-II |
---|
168 | ''' |
---|
169 | |
---|
170 | Movie_fps = 10 |
---|
171 | ''' Specifies movie frames-per-second; larger number will make smoother modulation movies but larger files. |
---|
172 | ''' |
---|
173 | |
---|
174 | Movie_time = 5 |
---|
175 | ''' Specifices time in sec for one modulation loop; larger number will give more frames for same fps' |
---|
176 | ''' |
---|
177 | fullIntegrate = True |
---|
178 | ''' If True then full image integration is default; False otherwise |
---|
179 | ''' |
---|
180 | |
---|
181 | Multiprocessing_cores = 0 |
---|
182 | ''' Specifies the number of cores to use when performing multicore computing. A number less |
---|
183 | than zero causes the recommended number of cores [using multiprocessing.cpu_count()/2] |
---|
184 | to be used. Setting this number to 0 or 1 avoids use of the multiprocessing module: all |
---|
185 | computations are performed in-line. |
---|
186 | ''' |
---|
187 | |
---|
188 | Show_timing = False |
---|
189 | '''If True, shows various timing results.''' |
---|
190 | |
---|
191 | Column_Metadata_directory = None |
---|
192 | '''When specified and when images are read, GSAS-II will read metadata from a 1-ID |
---|
193 | style .par and a .EXT_lbls (EXT = image extension) or .lbls file. See :func:`GSASIIfiles.readColMetadata` for |
---|
194 | information on how this is done. |
---|
195 | ''' |
---|
196 | |
---|
197 | Instprm_default = False |
---|
198 | '''when True, GSAS-II instprm file are shown as default; when False, old GSAS stype prm, etc files are default |
---|
199 | ''' |
---|
200 | |
---|
201 | Plot_Colors = 'k r g b m c' |
---|
202 | '''The colors for line plots: use one of 'k'-black, 'r'-red, 'b'-blue, 'g'-green, 'm'-magenta, 'c'-cyan for the |
---|
203 | line colors in order of obs., calc., back., diff., color5 & color6 separated by spaces; 6 items required. |
---|
204 | ''' |
---|
205 | |
---|
206 | PDF_Rmax = 100. |
---|
207 | '''Maximum radius for G(r) calculations: range is from 10-200A; default is 100A |
---|
208 | ''' |
---|
209 | |
---|
210 | previous_GPX_files = [] |
---|
211 | '''A list of previously used .gpx files |
---|
212 | ''' |
---|
213 | |
---|
214 | Image_calibrant = '' |
---|
215 | ''' Specifies a default calibrant material for images. Will be applied for |
---|
216 | newly-read images, but if changed the specified material will be saved. |
---|
217 | ''' |
---|
218 | |
---|
219 | Image_2theta_min = 5.0 |
---|
220 | ''' Specifies a default 2-theta minimum used for calibration and integration |
---|
221 | as the Inner 2-theta value. Will be applied for |
---|
222 | newly-read images, but if changed the new value will be saved. |
---|
223 | ''' |
---|
224 | |
---|
225 | Image_2theta_max = 50.0 |
---|
226 | ''' Specifies a default 2-theta maximum used for calibration and integration |
---|
227 | as the Outer 2-theta value. Will be applied for |
---|
228 | newly-read images, but if changed the new value will be saved. |
---|
229 | ''' |
---|
230 | |
---|
231 | enum_DrawAtoms_default = ['','lines','vdW balls','sticks','balls & sticks','ellipsoids',] |
---|
232 | 'choices for DrawAtoms_default' |
---|
233 | DrawAtoms_default = '' |
---|
234 | '''Allows selection of the default plotting mode for structures |
---|
235 | in Draw Atoms. The only valid values are: |
---|
236 | 'lines', 'vdW balls', 'sticks', 'balls & sticks', 'ellipsoids'. |
---|
237 | %% If a non-valid choice is used (the default) |
---|
238 | 'vdW balls' is used. |
---|
239 | ''' |
---|
240 | |
---|
241 | show_gpxSize = False |
---|
242 | '''When True, the sizes of the sections of the GPX file are listed |
---|
243 | when the GPX file is opened. Default is False. |
---|
244 | ''' |
---|
245 | |
---|
246 | fullrmc_exec = None |
---|
247 | '''Defines the full path to a Python executable that has been configured |
---|
248 | with the fullrmc package. If None (the default), GSAS-II will see if fullrmc |
---|
249 | can be imported into the current Python (which is unlikely to ever work). |
---|
250 | If that does not work, GSAS-II will search for an executable named fullrmc* |
---|
251 | (or fullrmc*.exe on Windows) in the Python ``sys.path`` search path, |
---|
252 | which includes the GSAS-II binary directory. |
---|
253 | ''' |
---|
254 | |
---|
255 | pdffit2_exec = None |
---|
256 | '''Defines the full path to a Python executable that has been configured |
---|
257 | with the PDFfit2 (diffpy) package. If None (the default), GSAS-II will see |
---|
258 | if PDFfit2 can be imported into the current Python. |
---|
259 | ''' |
---|
260 | |
---|
261 | lastUpdateNotice = 0 |
---|
262 | '''Defines the version number for the last update notice that has been |
---|
263 | shown. This should not need to be changed manually. |
---|
264 | ''' |
---|
265 | |
---|
266 | SeparateHistPhaseTreeItem = False |
---|
267 | '''When this is set to True, the parameters for each histogram in each phase |
---|
268 | are placed in a separate 1st-level tree item rather than in the Data tab |
---|
269 | for each phase. Requires GSAS-II be restarted to take effect. Default is False. |
---|
270 | |
---|
271 | This option is under development and is not fully tested. |
---|
272 | ''' |
---|
273 | |
---|
274 | svn_exec = None |
---|
275 | '''Defines the full path to a subversion executable. |
---|
276 | If None (the default), GSAS-II will search for a svn or svn.exe file |
---|
277 | in the current path or in the location where the current Python is located. |
---|
278 | ''' |
---|
279 | |
---|
280 | G2RefinementWindow = False |
---|
281 | '''When True a custom progress window is displayed to track the |
---|
282 | progress of refinements. When False a generic wxpython supplied progress |
---|
283 | dialog is used. |
---|
284 | ''' |
---|