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