source: trunk/config_example.py @ 4940

Last change on this file since 4940 was 4918, checked in by toby, 4 years ago

add mechanism for posting a notice when G2 versions are updated

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