Last change
on this file since 4917 was
3028,
checked in by odonnell, 6 years ago
|
example scripts
|
-
Property svn:executable set to
*
|
File size:
843 bytes
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | |
---|
3 | |
---|
4 | import os |
---|
5 | import json |
---|
6 | import sys |
---|
7 | import GSASIIscriptable as G2sc |
---|
8 | |
---|
9 | |
---|
10 | datafile = sys.argv[1] |
---|
11 | database, dataname = os.path.split(datafile) |
---|
12 | if len(sys.argv) > 2: |
---|
13 | projname = sys.argv[2] |
---|
14 | else: |
---|
15 | projname = os.path.join('/home/odonnell/amno2_data_from_box/refinements/', |
---|
16 | dataname.replace('.chi', '.gpx')) |
---|
17 | |
---|
18 | instprms = '/home/odonnell/amno2_data_from_box/refined_box_data_100.instprm' |
---|
19 | phasefile = '/home/odonnell/amno2_data_from_box/smaller-with-oxygen.cif' |
---|
20 | refinementsfile = '/home/odonnell/amno2_data_from_box/alpha-mno2-new.json' |
---|
21 | |
---|
22 | proj = G2sc.G2Project(filename=projname) |
---|
23 | hist = proj.add_powder_histogram(datafile, instprms) |
---|
24 | phase = proj.add_phase(phasefile, histograms=[hist]) |
---|
25 | |
---|
26 | with open(refinementsfile) as rf: |
---|
27 | refs = json.load(rf) |
---|
28 | |
---|
29 | proj.do_refinements(refs['refinements']) |
---|
30 | proj.save() |
---|
Note: See
TracBrowser
for help on using the repository browser.