source: trunk/defaultIparms.py @ 2151

Last change on this file since 2151 was 2151, checked in by vondreele, 6 years ago

add Generic TOF to defaultIparms.py; forces user to set flight path & 2-theta
modify instparm reading to sort out multibank issues
add MultiFloatDialog? to solicit multi values from user

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Author Revision URL Id
File size: 3.8 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#defaultIparms
4########### SVN repository information ###################
5# $Date: 2016-02-16 22:19:48 +0000 (Tue, 16 Feb 2016) $
6# $Author: vondreele $
7# $Revision: 2151 $
8# $URL: trunk/defaultIparms.py $
9# $Id: defaultIparms.py 2151 2016-02-16 22:19:48Z vondreele $
10########### SVN repository information ###################
11'''
12*defaultIparms: Table of instrument parameters*
13-----------------------------------------------
14
15Defines some default instrument parameters.
16Format for each is a list of strings finished with a '\n'.
17Begin with '#GSAS-II...' as the reader routine checks this.
18Each line can be comprised of a block of ';' delimited name:value pairs.
19All instrument parameters must be included; even those = 0.
20Use a GSAS-II instprm file as a source for the entries.
21
22For a new entry:
23
24    Append a useful name to defaultIparms_lbl.
25   
26    Append the list of lines to defaultIparms.
27
28defaultIparm_lbl: defines a list of labels.
29
30defaultIparms: defines a list of multiple strings with values for each set of defaults.
31'''
32#See examples below.
33
34defaultIparm_lbl = []
35defaultIparms = []
36
37defaultIparm_lbl.append('CuKa lab data')
38defaultIparms.append([
39    '#GSAS-II instrument parameter file for lab CuKa data\n',
40    'Type:PXC\n',
41    'Lam1:1.5405;Lam2:1.5443;Zero:0.0;Polariz.:0.7;Azimuth:0.0;I(L2)/I(L1):0.5\n',
42    'U:2.0;V:-2.0;W:5.0;X:0.0;Y:0.0;SH/L:0.002\n',
43])
44
45defaultIparm_lbl.append('APS 30keV 11BM')
46defaultIparms.append([
47    '#GSAS-II instrument parameter file APS 11BM @ 30keV\n', 
48    'Type:PXC\n',
49    'Lam:0.413263;Polariz.:0.99;Azimuth:0.0;Zero:0.0\n',
50    'U:1.163;V:-0.126;W:0.063;X:0.0;Y:0.0;SH/L:0.002\n',
51])
52
53defaultIparm_lbl.append('0.7A synchrotron data')
54defaultIparms.append([
55    '#GSAS-II instrument parameter file 0.7A synchrotron data\n',
56    'Type:PXC\n',
57    'Lam:0.69968;Zero:0.0;Polariz.:0.99;Azimuth:0.0\n',
58    'U:5.9840407759;V:-1.28771353531;W:0.118521878603\n',
59    'X:-0.0977791308891;Y:4.40147397286;SH/L:0.0264356231583\n',
60])
61
62defaultIparm_lbl.append('1.9A ILL D1A CW data')
63defaultIparms.append([
64    '#GSAS-II instrument parameter file\n',
65    'Type:PNC\n',
66    'Lam:1.909;Zero:0.0;Polariz.:0.0;Azimuth:0.0\n',
67    'U:257.182710995;V:-640.525145369;W:569.378664828\n',
68    'X:0.0;Y:0.0;SH/L:0.002\n',
69])
70
71defaultIparm_lbl.append('9m HIPD 151deg bank TOF data')
72defaultIparms.append([
73    '#GSAS-II instrument parameter file for 9m HIPD back scattering bank\n',
74    'Type:PNT\n',
75    'fltPath:10.32567;2-theta:151.0;Azimuth:0.0\n',
76    'Zero:-0.773346536757;difC:5084.82763065;difA:-2.6304177486;difB:0.0\n',
77    'alpha:5.0\n',
78    'beta-0:0.0332763989665;beta-1:0.000964057827372;beta-q:0.0\n',
79    'sig-0:0.0;sig-1:15.1402867268;sig-2:0.0;sig-q:0.0\n',
80    'X:0.0;Y:0.0\n',
81])
82
83defaultIparm_lbl.append('10m TOF 90deg bank')
84defaultIparms.append([
85    '#GSAS-II instrument parameter file for 10m TOF 90deg bank\n',
86    'Type:PNT\n',
87    'fltPath:10;2-theta:90.0;Azimuth:0.0\n',
88    'Zero:0.0;difC:3500.;difA:0.0;difB:0.0\n',
89    'alpha:5.0\n',
90    'beta-0:0.03;beta-1:0.004;beta-q:0.0\n',
91    'sig-0:0.0;sig-1:80.0;sig-2:0.0;sig-q:0.0\n',
92    'X:0.0;Y:0.0\n',
93])
94
95defaultIparm_lbl.append('63m POWGEN 90deg bank')
96defaultIparms.append([
97    '#GSAS-II instrument parameter file for POWGEN\n',
98    'Type:PNT;fltPath:63.169;2-theta:90.0;Azimuth:0.0\n',
99    'Zero:-4.96558487231;difC:22594.7440533;difA:-0.927945556608;difB:1.42511277627\n',
100    'alpha:1.0\n',
101    'beta-0:0.138077840635;beta-1:0.0029606795286;beta-q:0.0\n',
102    'sig-0:24.8202075678;sig-1:-82.07196132;sig-2:269.925504862;sig-q:0.0\n',
103    'X:-1.80259010604;Y:4.47209435997\n',
104])
105
106defaultIparm_lbl.append('Generic TOF')
107defaultIparms.append([
108    '#GSAS-II instrument parameter file for Generic TOF\n',
109    'Type:PNT;fltPath:25.0;2-theta:150.;Azimuth:0.0\n',
110    'Zero:0.;difC:9000.;difA:0.;difB:0.\n',
111    'alpha:1.0\n',
112    'beta-0:0.;beta-1:0.005;beta-q:0.0\n',
113    'sig-0:0.;sig-1:-50.;sig-2:0.;sig-q:0.0\n',
114    'X:0.;Y:0.\n',
115])
Note: See TracBrowser for help on using the repository browser.