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