source: sasview/src/sas/sasview/local_config.py @ f38ff0b

magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249
Last change on this file since f38ff0b was e572d4b, checked in by butler, 5 years ago

Fix local_config

Replaced hard coded version number with version number read from
init.py. Also broke up long strings to fit in 80 column (lint) and moved
zenodo information to a string at the beginning of the file.

  • Property mode set to 100644
File size: 6.0 KB
Line 
1"""
2Application settings
3"""
4from __future__ import print_function
5
6import time
7import os
8import logging
9
10from sas.sasgui.guiframe.gui_style import GUIFRAME
11import sas.sasview
12
13logger = logging.getLogger(__name__)
14
15# Version of the application
16__appname__ = "SasView"
17__version__ = sas.sasview.__version__
18__DOI__ = "Zenodo, 10.5281/zenodo.1412041"
19__build__ = sas.sasview.__build__
20__download_page__ = 'https://github.com/SasView/sasview/releases'
21__update_URL__ = 'http://www.sasview.org/latestversion.json'
22
23# Debug message flag
24__EVT_DEBUG__ = False
25
26# Flag for automated testing
27__TEST__ = False
28
29# Debug message should be written to a file?
30__EVT_DEBUG_2_FILE__ = False
31__EVT_DEBUG_FILENAME__ = "debug.log"
32
33# About box info
34_do_aboutbox = True
35_do_acknowledge = True
36_do_release = True
37_do_tutorial = True
38_acknowledgement_preamble =\
39'''To ensure the long term support and development of this software please
40remember to:'''
41_acknowledgement_preamble_bullet1 =\
42'''Acknowledge its use in your publications as :'''
43_acknowledgement_preamble_bullet2 =\
44'''Reference SasView as:'''
45_acknowledgement_preamble_bullet3 =\
46'''Reference the model you used if appropriate (see documentation for refs)'''
47_acknowledgement_preamble_bullet4 =\
48'''Send us your reference for our records: developers@sasview.org'''
49_acknowledgement_publications = \
50("This work benefited from the use of the SasView application, originally"
51"developed under NSF Award DMR-0520547. SasView also contains code developed"
52"with funding from the EU Horizon 2020 programme under the SINE2020 project"
53"Grant No 654000.")
54_acknowledgement_citation = \
55'''M. Doucet et al. SasView Version %s, %s''' % (__version__, __DOI__)
56_acknowledgement =  \
57("This work was originally developed as part of the DANSE project funded by"
58"the US NSF under Award DMR-0520547,\n but is currently maintained by a"
59"collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft,"
60"DLS, BAM and the scattering community.\n\n SasView also contains code"
61"developed with funding from the EU Horizon 2020 programme under the SINE2020"
62"project (Grant No 654000).\nA list of individual contributors can be found"
63"at: http://www.sasview.org/contact.html")
64
65_homepage = "http://www.sasview.org"
66_download = __download_page__
67_authors = []
68_paper = "http://sourceforge.net/p/sasview/tickets/"
69_license = "mailto:help@sasview.org"
70
71
72icon_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "images"))
73logger.info("icon path: %s" % icon_path)
74media_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "media"))
75test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "test"))
76
77_nist_logo = os.path.join(icon_path, "nist_logo.png")
78_umd_logo = os.path.join(icon_path, "umd_logo.png")
79_sns_logo = os.path.join(icon_path, "sns_logo.png")
80_ornl_logo = os.path.join(icon_path, "ornl_logo.png")
81_isis_logo = os.path.join(icon_path, "isis_logo.png")
82_ess_logo = os.path.join(icon_path, "ess_logo.png")
83_ill_logo = os.path.join(icon_path, "ill_logo.png")
84_ansto_logo = os.path.join(icon_path, "ansto_logo.png")
85_tudelft_logo = os.path.join(icon_path, "tudelft_logo.png")
86_dls_logo = os.path.join(icon_path, "dls_logo.png")
87_bam_logo = os.path.join(icon_path, "bam_logo.png")
88_nsf_logo = os.path.join(icon_path, "nsf_logo.png")
89_danse_logo = os.path.join(icon_path, "danse_logo.png")
90_inst_logo = os.path.join(icon_path, "utlogo.gif")
91_nist_url = "http://www.nist.gov/"
92_umd_url = "http://www.umd.edu/"
93_sns_url = "http://neutrons.ornl.gov/"
94_ornl_url = "http://neutrons.ornl.gov/"
95_nsf_url = "http://www.nsf.gov"
96_isis_url = "http://www.isis.stfc.ac.uk/"
97_ess_url = "http://ess-scandinavia.eu/"
98_ill_url = "http://www.ill.eu/"
99_ansto_url = "http://www.ansto.gov.au/"
100_tudelft_url = "http://www.tnw.tudelft.nl/en/cooperation/facilities/reactor-instituut-delft/"
101_dls_url = "http://www.diamond.ac.uk/"
102_danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html"
103_inst_url = "http://www.utk.edu"
104_corner_image = os.path.join(icon_path, "angles_flat.png")
105_welcome_image = os.path.join(icon_path, "SVwelcome.png")
106_copyright = ("(c) 2009 - 2019, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO,"
107              "TU Delft, DLS and BAM")
108marketplace_url = "http://marketplace.sasview.org/"
109
110#edit the list of file state your plugin can read
111APPLICATION_WLIST = 'SasView files (*.svs)|*.svs'
112APPLICATION_STATE_EXTENSION = '.svs'
113GUIFRAME_WIDTH = 1150
114GUIFRAME_HEIGHT = 840
115PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv', '.crf']
116PLUGINS_WLIST = ['Fitting files (*.fitv)|*.fitv',
117                 'Invariant files (*.inv)|*.inv',
118                 'P(r) files (*.prv)|*.prv',
119                 'Corfunc files (*.crf)|*.crf']
120PLOPANEL_WIDTH = 415
121PLOPANEL_HEIGTH = 370
122DATAPANEL_WIDTH = 235
123DATAPANEL_HEIGHT = 700
124SPLASH_SCREEN_PATH = os.path.join(icon_path, "SVwelcome_mini.png")
125TUTORIAL_PATH = os.path.join(media_path, "Tutorial.pdf")
126DEFAULT_STYLE = GUIFRAME.MULTIPLE_APPLICATIONS|GUIFRAME.MANAGER_ON\
127                    |GUIFRAME.CALCULATOR_ON|GUIFRAME.TOOLBAR_ON
128SPLASH_SCREEN_WIDTH = 512
129SPLASH_SCREEN_HEIGHT = 366
130SS_MAX_DISPLAY_TIME = 2000
131WELCOME_PANEL_ON = True
132WELCOME_PANEL_SHOW = False
133CLEANUP_PLOT = False
134# OPEN and SAVE project menu
135OPEN_SAVE_PROJECT_MENU = True
136#VIEW MENU
137VIEW_MENU = True
138#EDIT MENU
139EDIT_MENU = True
140
141SetupIconFile_win = os.path.join(icon_path, "ball.ico")
142SetupIconFile_mac = os.path.join(icon_path, "ball.icns")
143DefaultGroupName = "."
144OutputBaseFilename = "setupSasView"
145
146FIXED_PANEL = True
147DATALOADER_SHOW = True
148CLEANUP_PLOT = False
149WELCOME_PANEL_SHOW = False
150#Show or hide toolbar at the start up
151TOOLBAR_SHOW = True
152# set a default perspective
153DEFAULT_PERSPECTIVE = 'None'
154
155# Time out for updating sasview
156UPDATE_TIMEOUT = 2
157
158# Time out for updating sasview
159UPDATE_TIMEOUT = 2
160
161def printEVT(message):
162    if __EVT_DEBUG__:
163        """
164        :TODO - Need method doc string
165        """
166        print("%g%s" % (time.clock(), message))
167
168        if __EVT_DEBUG_2_FILE__:
169            out = open(__EVT_DEBUG_FILENAME__, 'a')
170            out.write("%10g%s\n" % (time.clock(), message))
171            out.close()
Note: See TracBrowser for help on using the repository browser.