source: sasview/fit.py @ f0b9bce

ticket-1094-headless
Last change on this file since f0b9bce was a072198, checked in by Paul Kienzle <pkienzle@…>, 7 years ago

hint on how to set up development logger in sasview/fit.py

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!/usr/bin/env python
2"""
3Bumps model file for running saved sasview fits.
4
5Fit configuration (including fitted variables and ranges) is set up in the
6Sasview GUI and saved as a .svs or .fitv file.  These can then be run
7directly from bumps using::
8
9    path/to/sasview/fit.py path/to/save.svs [--bumps_option ...]
10
11Alternatively, if sasview is installed on your python path, use::
12
13    python -m sas.sascalc.fit.fitstate path/to/save.svs [--bumps_option ...]
14
15In unix/mac you can create a file on your shell path (e.g., ~/bin/sasbumps)
16containing::
17
18    #!/usr/bin/env python
19    from sas.sascalc.fit.fitstate import bumps_cli
20    bumps_cli()
21
22set it as executable with::
23
24    chmod a+x ~/bin/sasbumps
25
26and use::
27
28    sasbumps path/to/save.svs [--bumps_option ...]
29"""
30
31# ============ Set up python environment ==============
32import sys
33import os
34sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
35from run import prepare
36del sys.path[0]
37prepare(rebuild=False)
38
39# =========== Set up logging ===========
40#from sas.logger_config import SetupLogger
41#SetupLogger(__name__).config_development()
42
43# =========== Run BUMPS ===============
44from sas.sascalc.fit.fitstate import bumps_cli
45bumps_cli()
Note: See TracBrowser for help on using the repository browser.