source: trunk/config_example.py

Last change on this file was 5647, checked in by toby, 4 months ago

new scripting features & doc updates; new debug feature: reread .gpx (good for testing w/scripting)

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