source: trunk/config_example.py

Last change on this file was 5269, checked in by toby, 5 months ago

add config var for pdffit2 and show err message

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