Changeset 1225
- Timestamp:
- 11/08/2012 01:42:25 PM (4 months ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anomal.tcl
r1219 r1225 15 15 set ::anom_wave [histinfo $histlbl lam1] 16 16 foreach test $::expmap(powderlist) { 17 puts "[histinfo $test lam1] versus $::anom_wave"17 #puts "[histinfo $test lam1] versus $::anom_wave" 18 18 if {[histinfo $test lam1] == $::anom_wave} { 19 19 lappend ::anom_list $test … … 42 42 set ::anom_fp($::anom_atomcount) [lindex $temp 1] 43 43 set ::anom_f2p($::anom_atomcount) [lindex $temp 2] 44 puts "$::anom_lbl($::anom_atomcount) $::anom_fp($::anom_atomcount) $::anom_f2p($::anom_atomcount)"44 #puts "$::anom_lbl($::anom_atomcount) $::anom_fp($::anom_atomcount) $::anom_f2p($::anom_atomcount)" 45 45 } 46 46 } … … 56 56 57 57 grid [frame $anomal.list -bd 2 -relief groove] -row 0 -column 0 -sticky news 58 grid [label $anomal.list.lbl1 -text "The anomalous dispersion terms will be set for the followinghistograms\n with wavelength $::anom_wave angstroms:"] -row 0 -column 058 grid [label $anomal.list.lbl1 -text "The anomalous dispersion terms will be set for x-ray histograms\n with wavelength $::anom_wave angstroms:"] -row 0 -column 0 59 59 grid [label $anomal.list.lbl1a -text "$::anom_list"] -row 1 -column 0 60 60 61 61 grid [frame $anomal.con -bd 2 -relief groove] -row 5 -column 0 -sticky news 62 62 grid [button $anomal.con.save -width 8 -text "Save" -command {anomalous_save}] -column 0 -row 4 -padx 3 63 grid [button $anomal.con.abort -width 8 -text " abort" -command {anomalous_abort}] -column 1 -row 4 -padx 363 grid [button $anomal.con.abort -width 8 -text "Cancel" -command {anomalous_abort}] -column 1 -row 4 -padx 3 64 64 65 65 grid [frame $anomal.warning -bd 2 -relief groove] -row 7 -column 0 -sticky news … … 86 86 proc anomalous_save {args} { 87 87 set histnum $::expgui(curhist) 88 puts $histnum88 #puts $histnum 89 89 set histlbl [lindex $::expmap(powderlist) $histnum] 90 puts $histlbl90 #puts $histlbl 91 91 set x "" 92 92 set atomcount 0 … … 95 95 lappend x "$::anom_lbl($atomcount) $::anom_fp($atomcount) $::anom_f2p($atomcount)" 96 96 } 97 puts $x97 #puts $x 98 98 foreach test $::anom_list { 99 99 histinfo $test anomff set $x -
trunk/chemrest.tcl
r1219 r1225 293 293 # show a box as yellow, if an invalid number is entered 294 294 proc ChemUpdateRow {var index mode} { 295 if $::expcons(DisableChemWeightsTrace) return 295 296 set num $index 296 if $::expcons(DisableChemWeightsTrace) return297 297 set weight [string trim $::ChemWeights($num)] 298 298 set box $::expcons(ChemConstBox) … … 363 363 } 364 364 365 foreach item [trace vinfo ChemWeights] { 366 eval trace vdelete ChemWeights $item 367 } 368 trace variable ChemWeights w ChemUpdateRow 369 365 set ::ChemWeights(0) "" 366 foreach item [trace vinfo ::ChemWeights] { 367 eval trace vdelete ::ChemWeights $item 368 } 369 trace variable ::ChemWeights w ChemUpdateRow 370 371 set ::expcons(ChemSum) "" 372 set ::expcons(ChemSumESD) "" 370 373 foreach item [trace vinfo expcons(ChemSum)] { 371 374 eval trace vdelete expcons(ChemSum) $item -
trunk/doc/expgui.html
r1218 r1225 16 16 EXPGUI<BR> 17 17 A Graphical User Interface for 18 <A Href="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro">18 <A Href="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro"> 19 19 GSAS</A> 20 20 <HR noshade width="75%" size="2" align="center"> … … 24 24 <blockquote> 25 25 For the impatient, see download/installation instructions for: 26 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/InstallWindows">26 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/InstallWindows"> 27 27 Windows</A>, 28 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/InstallOSX">28 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/InstallOSX"> 29 29 Mac (OS X)</A>, or 30 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/InstallLinux">30 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/InstallLinux"> 31 31 Linux</A> 32 32 </blockquote> … … 34 34 <P><P> 35 35 EXPGUI is a graphical interface for the 36 <A Href="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro">GSAS</A>36 <A Href="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro">GSAS</A> 37 37 package, developed at Los Alamos and maintained now at Argonne. 38 38 EXPGUI does two things: … … 96 96 <TH> </TH> 97 97 </TR> 98 <TR><TH BGCOLOR="#F0F0F0" >Tutorials:</TH>99 <TH><A Href="https://subversion.x or.aps.anl.gov/EXPGUI/tutorials/tutorial3/index.html">98 <TR><TH BGCOLOR="#F0F0F0" rowspan=2>Tutorials:</TH> 99 <TH><A Href="https://subversion.xray.aps.anl.gov/EXPGUI/tutorials/tutorial3/index.html"> 100 100 NIST<BR>Neutron data</A></TH> 101 <TH><A Href="https://subversion.xor.aps.anl.gov/EXPGUI/tutorials/tutorial1/index.html">GSAS Manual<BR>Example #1 (TOF)</A></TH> 102 <TH><A Href="https://subversion.xor.aps.anl.gov/EXPGUI/tutorials/tutorial2/index.html">GSAS Manual<BR>Example #2 (Garnet)</A></TH> 101 <TH><A Href="https://subversion.xray.aps.anl.gov/EXPGUI/tutorials/tutorial1/index.html">GSAS Manual<BR>Example #1 (TOF)</A></TH> 102 <TH><A Href="https://subversion.xray.aps.anl.gov/EXPGUI/tutorials/tutorial2/index.html">GSAS Manual<BR>Example #2 (Garnet)</A></TH> 103 </TR> 104 <TR> 105 <TH><A Href="https://subversion.xray.aps.anl.gov/EXPGUI/tutorials/tutorial4/FapatitleExample.htm"> 106 Lab x-ray data<BR>(Fluoroapatite)</A></TH> 107 <TH> </TH> 108 <TH> </TH> 103 109 </TR> 104 110 <TR><TH BGCOLOR="#F0F0F0">Messages:</TH> … … 122 128 Los Alamos National Laboratory Report LAUR 86-748 (2000). 123 129 <A 124 HREF="https://subversion.x or.aps.anl.gov/EXPGUI/gsas/all/GSAS%20Manual.pdf">130 HREF="https://subversion.xray.aps.anl.gov/EXPGUI/gsas/all/GSAS%20Manual.pdf"> 125 131 [link to PDF copy of manual] 126 132 </A> … … 782 788 code and to John Cowgill for the "Export to GRACE" code. 783 789 <P> 784 <A Href="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro">790 <A Href="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro"> 785 791 GSAS</A> 786 792 is written by Allen C. Larson and Robert B. Von Dreele while at -
trunk/doc/expgui3.html
r1166 r1225 33 33 <h3>A.3 Powder panel</h3> 34 34 <DL><DL> 35 The Powder (was histogram) panelis used to edit background35 The Powder panel (previously called the Histogram panel) is used to edit background 36 36 and diffractometer constants for powder histogram(s), as well as 37 37 set damping and refinement flags for these parameters. … … 280 280 <img SRC="3a.gif" align=TEXTTOP alt="EXPGUI Screen snapshot"> 281 281 <blockquote> 282 <br clear=all> 282 283 <h3>A.3.8 Setting Resonant Scattering (Anomolous Dispersion) terms</h3> 284 <DL><DL> 285 <IMG SRC="new.gif" HEIGHT=13 WIDTH=36 alt="New!"> 286 The button on the lower left of the Powder Panel, labeled "Edit 287 (Delta) f' and f''" is used to enter the anomolous dispersion 288 terms for x-rays. 289 These terms are automatically defined for elements near 290 standard x-ray tube wavelengths (Cu Kalpha, etc), but need to be 291 entered for synchrotron datasets when significant. 292 <P> 293 They can be estimated from <A HREF="http://it.iucr.org/C/"> 294 Volume C of the International Tables</A>. Alternately, 295 a Python program, 296 <A HREF="https://subversion.xray.aps.anl.gov/trac/pyFprime/"> 297 pyFPRIME</A>, for estimating 298 these terms at arbitrary wavelengths can be run with a <A 299 href="http://11bm.xray.aps.anl.gov/absorb/absorb.php">web 300 interface</A> or can be downloaded and installed. 301 <img SRC="3g1.png" align=TEXTTOP alt="EXPGUI Screen snapshot"> 302 </DL></DL> 303 283 304 <hr> 284 305 <TABLE BORDER BGCOLOR="#FFFF40" ALIGN=RIGHT> -
trunk/doc/expgui6.html
r1218 r1225 46 46 by grouping parameters so that a single shift (possibly scaled) is 47 47 applied to each parameter in the group. 48 At this time the only constraints that can be set in EXPGUI are on atomic 49 and profile profile (others can be set in EXPEDT). 50 EXPEDT offers many 51 other types of restraints as well. 52 <P> 53 Note that these constraints are only applied to shifts, but not to the 48 At this time the only constraints that can be set in EXPGUI are on 49 <a href="#AtomConstraints"><B>Atom Constraints</B></A> for normal phases, 50 <a href="#MMConstraints"><B>Macromolecular Atom Constraints</B></A> 51 when a macromolecular phase is present, or 52 <a href="#ProfileConstraints"><B>Peak Profile Constraints</B></A>. 53 GSAS offers many other types of restraints, but these must be 54 accessed in EXPEDT. 55 <P> 56 Note that in GSAS these constraints are only applied to shifts, but not to the 54 57 actual values. This means that, for example, 55 58 if two atoms … … 70 73 </DL></DL> 71 74 <a name="AtomConstraints"></a> 72 <H4>A tom Constraints</H4>75 <H4>A.6.1 Atom Constraints</H4> 73 76 <DL><DL> 74 77 The atom constraints editing panel appears below. Note that constraints can … … 141 144 142 145 <a name="MMConstraints"></a> 143 <H4> Macromolecular Constraints</H4>146 <H4>A.6.2 Macromolecular Constraints</H4> 144 147 <DL><DL> 145 148 Constraints for a macromolecular phase can be entered on a … … 154 157 155 158 <a name="ProfileConstraints"></a> 156 <H4> Profile Constraints</H4>159 <H4>A.6.3 Profile Constraints</H4> 157 160 <DL><DL> 158 161 The profile constraints editing panel appears below. Profile constraints -
trunk/doc/expgui6R.html
r1218 r1225 60 60 applied to each parameter in the group. 61 61 <P> 62 The Restraints panel at present can be used to set up restraints on 63 interatomic distances and atomic composition. EXPEDT offers many 64 other types of restraints as well. 62 The Restraints panel can be used to set up restraints on 63 <a href="#DistanceRestraints"><B>Interatomic Distances</B></A> and 64 on <a href="#Chemical Restraints"><B>Atomic Composition</B></A>. Note 65 that the atomic composition constraints can be used to establish 66 quite complex constraints that account for charge balance or even 67 segregation of elements between phases. GSAS offers many other types 68 of restraints, but EXPEDT must be used to access them. 65 69 </DL></DL> 66 70 67 71 <a name="DistanceRestraints"></a> 68 <H4> Distance Restraints</H4>72 <H4>A.7.1 Distance Restraints</H4> 69 73 <DL><DL> 70 74 When the distance restraints tab is first selected, the active … … 130 134 </DL></DL> 131 135 <a name="Chemical Restraints"></a> 132 <H4> Chemical (or Compositional) Restraints</H4>136 <H4>A.7.2 Chemical (or Compositional) Restraints</H4> 133 137 <DL><DL> 134 138 Chemical constraints allow a model to be penalized if it moves away -
trunk/doc/expgui_Unix_readme.html
r973 r1225 29 29 <B>Please note:</B> 30 30 A new mechanism for installing GSAS & EXPGUI is now recommended. See 31 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/InstallLinux">31 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/InstallLinux"> 32 32 this link</a>. If this method is used, EXPGUI or a python script can 33 33 be used to update GSAS & EXPGUI quickly and easily. The information -
trunk/doc/expgui_Win_readme.html
r973 r1225 36 36 <B>Please note:</B> 37 37 A new mechanism for installing GSAS & EXPGUI is now recommended. See 38 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/InstallWindows">38 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/InstallWindows"> 39 39 this link</a>. If this method is used, EXPGUI or a batch file can 40 40 be used to update GSAS & EXPGUI quickly and easily. … … 57 57 <a href="http://www.ncnr.nist.gov/xtal/software/gsas.html">GSAS (General Structure Analysis System)</a> 58 58 and 59 <a href="https://subversion.x or.aps.anl.gov/EXPGUI/trunk/doc/expgui.html">EXPGUI</a>59 <a href="https://subversion.xray.aps.anl.gov/EXPGUI/trunk/doc/expgui.html">EXPGUI</a> 60 60 will do so by downloading a single file that installs the GSAS programs, 61 61 the Tcl/Tk package (with some extensions), the EXPGUI scripts, as well as … … 93 93 gsas+expgui.exe 94 94 from 95 <a href="http://11bm.x or.aps.anl.gov/downloads/gsas/windows/">Argonne</a>96 (http://11bm.x or.aps.anl.gov/downloads/gsas/windows/)95 <a href="http://11bm.xray.aps.anl.gov/downloads/gsas/windows/">Argonne</a> 96 (http://11bm.xray.aps.anl.gov/downloads/gsas/windows/) 97 97 or 98 98 <a href="http://www.ccp14.ac.uk/ccp/ccp14/ftp-mirror/gsas/public/gsas/windows/"> … … 162 162 a lot of testing) 163 163 is found as a .tar or .zip file in 164 <A HREF="http://11bm.x or.aps.anl.gov/downloads/gsas/">165 http://11bm.x or.aps.anl.gov/downloads/gsas/</A>.164 <A HREF="http://11bm.xray.aps.anl.gov/downloads/gsas/"> 165 http://11bm.xray.aps.anl.gov/downloads/gsas/</A>. 166 166 On the newest versions of Windows, support for .zip files is built in, but 167 167 for older versions, you will need an unzip program, such as WinZip or pkZip. … … 176 176 is distributed as 177 177 <DL> 178 <A HREF="http://11bm.x or.aps.anl.gov/downloads/gsas/">179 http://11bm.x or.aps.anl.gov/downloads/gsas/</A>.178 <A HREF="http://11bm.xray.aps.anl.gov/downloads/gsas/"> 179 http://11bm.xray.aps.anl.gov/downloads/gsas/</A>. 180 180 </DL><P> 181 181 and unpack it to subdirectory <tt>...\gsas\expgui\</tt>. -
trunk/doc/expgui_intro.html
r1166 r1225 70 70 Customization notes</A> 71 71 <LI> 72 <A HREF="https://subversion.x or.aps.anl.gov/EXPGUI/tutorials/tutorial3/index.html">72 <A HREF="https://subversion.xray.aps.anl.gov/EXPGUI/tutorials/tutorial3/index.html"> 73 73 A well-annotated CW neutron tutorial (Alumina).</A> 74 74 <B><I>A very good place to start!</I></B> 75 75 <LI> 76 <A HREF="https://subversion.xor.aps.anl.gov/EXPGUI/tutorials/tutorial1/index.html"> 76 <A HREF="https://subversion.xray.aps.anl.gov/EXPGUI/tutorials/tutorial4/FapatitleExample.htm"> 77 A well-annotated Lab data tutorial (Fluoroapatite).</A> 78 <B><I>Also a good place to start!</I></B> 79 <LI> 80 <A HREF="https://subversion.xray.aps.anl.gov/EXPGUI/tutorials/tutorial1/index.html"> 77 81 A TOF Tutorial Example (Nickel)</A> 78 82 <LI> 79 <A HREF="https://subversion.x or.aps.anl.gov/EXPGUI/tutorials/tutorial2/index.html">83 <A HREF="https://subversion.xray.aps.anl.gov/EXPGUI/tutorials/tutorial2/index.html"> 80 84 A CW Neutron Tutorial Example (Garnet)</A> 81 85 </UL> -
trunk/doc/expguic.html
r1166 r1225 273 273 programs used for graphical display of data and results. 274 274 <DL> 275 <DT>Fourier<DD>Provides an interface to set up computation of 276 Fourier maps and compute them using program Fourier. 277 Also see the <A HREF="#DRAWxtl">Export to DRAWxtl</A> interface, 278 which can be used to set up, compute, export and display Fourier 279 maps. Note that a Fourier map can be set up for only one phase 280 at a time. 281 <DT>forsrh<DD>Search Fourier map for peaks 275 282 <DT>forplot<DD>Display Fourier maps (set Fourier options in EXPEDT 276 283 and then compute with FOURIER … … 279 286 <DT>ortep<DD>Draw crystal structure 280 287 <DT>rawplot<DD>Plot powder data 281 <DT>fourier<DD>Generate Fourier map282 <DT>forsrh<DD>Search Fourier map for peaks283 288 <DT>gsas2map<DD>Exports a Fourier map in formats used by other 284 289 programs (for example Fox and DRAWxtl). … … 421 426 program, CIF can be a useful exchange format. This routine provides a 422 427 CIF with the current coordinates from one phase and not much else. 423 <DT>export to DRAWxtl<DD>This writes a .STR file used in the DRAWxtl 424 program and optionally launches DRAWxtl. 428 <a name="DRAWxtl"></a> 429 <DT>export to DRAWxtl<DD> 430 <A HREF="http://www.lwfinger.net/drawxtl/">DRAWxtl</A> 431 is a very useful free program for display of structures and 432 maps. This writes a .STR input file used in the DRAWxtl 433 program and optionally launches DRAWxtl, if installed. 434 While the control options offered by EXPGUI are relatively 435 modest (display of polyhedra, 436 selection for bonds to be drawn, display of Fourier contours), 437 once the DRAWxtl program is launched, the full range of DRAWxtl 438 options can be accessed from that program's GUI. When a Fourier map 439 contour is included, the Fourier parameters are set, the map is 440 computed (program fourier) and is converted to the format needed by 441 DRAWxtl (program gsas2map) automatically. 425 442 <DT>export to SHELX<DD>This writes coordinates for a selected phase in 426 443 the .INS format used by SHELX and several other programs. -
trunk/doc/gsas+expgui.html
r973 r1225 21 21 <B>Please note:</B> 22 22 A new mechanism for installing GSAS & EXPGUI is now recommended. See 23 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/InstallWindows">23 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/InstallWindows"> 24 24 this link</a>. If this method is used, EXPGUI or a batch file can 25 25 be used to update GSAS & EXPGUI quickly and easily. … … 33 33 <a href="http://www.ncnr.nist.gov/xtal/software/gsas.html">GSAS (General Structure Analysis System)</a> 34 34 and 35 <a href="https://subversion.x or.aps.anl.gov/EXPGUI/trunk/doc/expgui.html">EXPGUI</a>35 <a href="https://subversion.xray.aps.anl.gov/EXPGUI/trunk/doc/expgui.html">EXPGUI</a> 36 36 is available. This program uncompresses itself, copies the required files 37 37 (including the Tcl/Tk files used in EXPGUI) … … 42 42 <P> 43 43 The self-installer can be downloaded as file gsas+expgui.exe from 44 <a href="http://11bm.x or.aps.anl.gov/downloads/gsas/windows/">Argonne</a>45 (http://11bm.x or.aps.anl.gov/downloads/gsas/windows/)44 <a href="http://11bm.xray.aps.anl.gov/downloads/gsas/windows/">Argonne</a> 45 (http://11bm.xray.aps.anl.gov/downloads/gsas/windows/) 46 46 or 47 47 <a href="http://www.ccp14.ac.uk/ccp/ccp14/ftp-mirror/gsas/public/gsas/windows/"> -
trunk/doc/gsas2cif.html
r1166 r1225 33 33 <BR> 34 34 to export 35 <A Href="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro">GSAS</A>35 <A Href="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro">GSAS</A> 36 36 results 37 37 <HR noshade width="75%" size="2" align="center"> -
trunk/doc/liveplot.html
r1181 r1225 455 455 can be done in Windows by following these 456 456 <A 457 HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/InstallWindows#shortcut">instructions457 HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/InstallWindows#shortcut">instructions 458 458 to make a short cut</A>, but reference file <tt>.../expgui/liveplot</tt> 459 459 rather than file <tt>.../expgui/expgui</tt>. Similar things can be … … 755 755 <B>Combining LIVEPLOT with CMPR & LOGIC</B> 756 756 If you have the 757 <A HREF="https://subversion.x or.aps.anl.gov/trac/CMPR">CMPR</A>757 <A HREF="https://subversion.xray.aps.anl.gov/trac/CMPR">CMPR</A> 758 758 program installed on your computer, you can use superimpose on the 759 759 GSAS results the peaks for an arbitrary unit cell. … … 787 787 software is located. The 788 788 "Display a cell" option produces a window similar to the 789 <A href="https://subversion.x or.aps.anl.gov/CMPR/trunk/doc/cmprdoc.html#editcell">789 <A href="https://subversion.xray.aps.anl.gov/CMPR/trunk/doc/cmprdoc.html#editcell"> 790 790 Edit Cell feature in CMPR</A> 791 791 where allowed reflection positions are displayed for a set of unit cell -
trunk/doc/osx.html
r973 r1225 27 27 <B>Please note:</B> 28 28 A new mechanism for installing GSAS & EXPGUI is now recommended. See 29 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/InstallOSX">29 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/InstallOSX"> 30 30 this link</a>. If this method is used, EXPGUI or a python script can 31 31 be used to update GSAS & EXPGUI quickly and easily. … … 84 84 for the CPU type of your computer (to find out what you have 85 85 click on the "About This Mac" item in the Apple menu) from 86 <a href="http://11bm.x or.aps.anl.gov/downloads/gsas/macOSX/">87 http://11bm.x or.aps.anl.gov/downloads/gsas/macOSX/</A>86 <a href="http://11bm.xray.aps.anl.gov/downloads/gsas/macOSX/"> 87 http://11bm.xray.aps.anl.gov/downloads/gsas/macOSX/</A> 88 88 <P> 89 89 <DL><UL> -
trunk/doc/revlog.html
r1166 r1225 33 33 <P> 34 34 This page has been superceeded by the Trac registry, see 35 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/timeline">36 https://subversion.x or.aps.anl.gov/trac/EXPGUI/timeline</A>.35 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/timeline"> 36 https://subversion.xray.aps.anl.gov/trac/EXPGUI/timeline</A>. 37 37 <HR><HR> 38 38 Below is information on older revisions logged for changes to the EXPGUI source 39 39 files, sorted by date. 40 40 See the 41 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/report">41 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/report"> 42 42 View Tickets</A> section of the Trac site for active and closed 43 43 projects. There is some older information on the -
trunk/doc/win_old_notes.html
r1166 r1225 1 1 <HTML> 2 2 <HEAD> 3 <TITLE> Windows Installation Notes for EXPGUI</TITLE>3 <TITLE>OLD Windows Installation Notes for EXPGUI</TITLE> 4 4 <meta name="keywords" content="crystallography, Rietveld, diffraction, 5 5 GSAS, EXPGUI, Windows"> … … 26 26 <CENTER><H1> 27 27 <HR noshade width="75%" size="2" align="center"> 28 Windows installation notes for28 Old, out of date, Windows installation notes for 29 29 <A HREF="expgui.html">EXPGUI</A> 30 30 <HR noshade width="75%" size="2" align="center"> … … 57 57 <P> 58 58 <LI>Get 59 <A Href="https://subversion.x or.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro">GSAS</A>59 <A Href="https://subversion.xray.aps.anl.gov/trac/EXPGUI/wiki/GSASIntro">GSAS</A> 60 60 from one of the following sites: 61 61 <DL><P> -
trunk/doc/wishlist.html
r1166 r1225 34 34 Information on desired (and completed) development tasks for EXPGUI 35 35 are now captured as "Tickets" in the 36 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/">36 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/"> 37 37 EXPGUI Trac system</A>. In particular, see the 38 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/timeline">38 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/timeline"> 39 39 timeline of changes</A> and the 40 <A HREF="https://subversion.x or.aps.anl.gov/trac/EXPGUI/report">40 <A HREF="https://subversion.xray.aps.anl.gov/trac/EXPGUI/report"> 41 41 reports on Tickets</A>. Any other information on this page is no 42 42 longer being updated -- though there are still some good ideas for -
trunk/expgui
r1219 r1225 70 70 set expgui(HistSelectList) {} 71 71 # location for web pages, if not found locally 72 set expgui(website) 11bm.xor.aps.anl.gov/expguidoc/72 set expgui(website) subversion.xray.aps.anl.gov/EXPGUI/trunk/doc/ 73 73 # default for archive mode = on 74 74 set expgui(archive) 1 … … 767 767 # utility export routines for the export_*.tcl files: 768 768 # make a box for export 769 proc MakeExportBox {win title webref } {769 proc MakeExportBox {win title webref {bookmark ""}} { 770 770 global expmap expgui 771 771 catch {destroy $win} … … 783 783 } 784 784 # leave a place for format-specific items 785 pack [frame $win.special] -side top 786 pack [frame $win.but] -side top -fill x -expand yes785 pack [frame $win.special] -side top -fill both -expand yes 786 pack [frame $win.but] -side top -fill x -expand no 787 787 pack [button $win.but.1 -text Write -command "destroy $win"] -side left 788 788 SetExportPhase [lindex $expmap(phaselist) 0] $win … … 790 790 -command "set expgui(export_phase) 0;destroy $win"] -side left 791 791 pack [button $win.but.help -text Help -bg yellow \ 792 -command "MakeWWWHelp expgui.html ExportMSI"] \792 -command "MakeWWWHelp expgui.html $bookmark"] \ 793 793 -side right 794 794 } … … 3344 3344 "source [file join $expgui(scriptdir) atomcons.tcl]; MakeRestraintsPane" \ 3345 3345 DisplayRestraintsPane \ 3346 0 expgui6 .html ""}3346 0 expgui6R.html ""} 3347 3347 {rbFrame "Rigid Body" \ 3348 3348 "source [file join $expgui(scriptdir) rigid.tcl]; MakeRBPane" \ … … 4452 4452 CIFselect $expgui(expfile) 4453 4453 } 4454 $expgui(fm).graphs.menu add cascade \ 4455 -menu $expgui(fm).graphs.menu.fourier \ 4456 -label "Fourier" 4457 menu $expgui(fm).graphs.menu.fourier 4458 foreach num {1 2 3 4 5 6 7 8 9} { 4459 $expgui(fm).graphs.menu.fourier add command -label "Setup phase $num" \ 4460 -command "EditFourier $num" 4461 } 4462 $expgui(fm).graphs.menu.fourier add command -label "run fourier prog" \ 4463 -command {runGSASwEXP fourier} 4464 4454 4465 # add the commands in expgui_menulist 4455 4466 foreach menu [array names expgui_menulist ] { -
trunk/export_drawxtl.tcl
r930 r1225 5 5 set label "export to DRAWXTL (.str) file" 6 6 set action export_drawxtl 7 set ::DXTLcolorlist "White Red Green Blue Yellow Cyan Magenta Black Orange Brown Grey Silver White" 8 set ::DXTL(bonds) 0 9 set ::DXTL(coords) 1 10 set ::DXTL(blackarrow) Green 11 set ::DXTL(redarrow) Red 12 foreach a {X Y Z} { 13 set ::DXTL(${a}dispMin) 0.0 14 set ::DXTL(${a}dispMax) 1.0 15 } 16 set ::DXTL(mtype) "" 17 set ::DXTL(mfil) "" 18 set ::DXTL(FourierRange) "" 19 7 20 proc export_drawxtl {} { 8 21 global expmap expgui … … 14 27 return 15 28 } 16 foreach t [trace vinfo expgui(export_phase)] {17 eval trace vdelete expgui(export_phase) $t18 } 19 29 foreach t [trace vinfo ::expgui(export_phase)] { 30 eval trace vdelete ::expgui(export_phase) $t 31 } 32 MakeExportBox .export "Export coordinates to program DRAWXTL" "" 20 33 # "MakeWWWHelp expgui.html export" 21 34 22 # force the window to stay on top23 putontop .export24 35 # trigger a quit on window delete 25 36 wm protocol .export WM_DELETE_WINDOW {set expgui(export_phase) 0; destroy .export } 26 37 set bx .export.special 27 global DXTL28 if {[info global DXTL] == ""} {29 set DXTL(bonds) 030 set DXTL(coords) 131 set DXTL(blackarrow) Green32 set DXTL(redarrow) Red33 }34 38 set row 1 35 39 grid [label $bx.1 -text "Title:"] -column 1 -row $row -sticky e 36 grid [entry $bx.2 -textvariable DXTL(title) -width 40] \40 grid [entry $bx.2 -textvariable ::DXTL(title) -width 40] \ 37 41 -row $row -column 2 -columnspan 5 -sticky w 38 set DXTL(title) [expinfo title]42 set ::DXTL(title) [expinfo title] 39 43 incr row 40 44 grid [checkbutton $bx.3 -text "Include coordinates in .str file" \ 41 -variable DXTL(coords)] \45 -variable ::DXTL(coords)] \ 42 46 -row $row -column 1 -columnspan 5 -sticky w 43 47 incr row 44 set DXTL(arrowbox) $bx.448 set ::DXTL(arrowbox) $bx.4 45 49 grid [checkbutton $bx.4 -text "Display arrows for magnetic atoms" \ 46 -variable DXTL(genarrows) -state disabled] \50 -variable ::DXTL(genarrows) -state disabled] \ 47 51 -row $row -column 1 -columnspan 5 -sticky w 48 52 incr row 49 set colorlist "White Red Green Blue Yellow Cyan Magenta Black Orange Brown Grey Silver White" 50 set DXTL(arrowcolorbox) $bx.4a 51 set DXTL(arrowcolorbox_row) $row 52 grid [frame $bx.4a] -sticky ew -row $DXTL(arrowcolorbox_row) \ 53 set ::DXTL(arrowcolorbox) $bx.4a 54 set ::DXTL(arrowcolorbox_row) $row 55 grid [frame $bx.4a] -sticky ew -row $::DXTL(arrowcolorbox_row) \ 53 56 -column 1 -columnspan 5 54 57 grid [label $bx.4a.h -text "Arrow colors: "] -column 0 -row 1 -sticky w 55 58 grid [label $bx.4a.bll -text " generated by Black operator "] -column 0 -row 2 56 eval tk_optionMenu $bx.4a.bl DXTL(blackarrow) $colorlist59 eval tk_optionMenu $bx.4a.bl ::DXTL(blackarrow) $::DXTLcolorlist 57 60 grid $bx.4a.bl -column 2 -row 2 58 61 grid [label $bx.4a.redl -text " generated by Red operator "] -column 0 -row 3 59 eval tk_optionMenu $bx.4a.red DXTL(redarrow) $colorlist62 eval tk_optionMenu $bx.4a.red ::DXTL(redarrow) $::DXTLcolorlist 60 63 grid $bx.4a.red -column 2 -row 3 61 64 incr row … … 74 77 if {$app != ""} { 75 78 set show normal 76 set DXTL(app) $appname77 set DXTL(launch) 179 set ::DXTL(app) $appname 80 set ::DXTL(launch) 1 78 81 } else { 79 82 set show disabled 80 set DXTL(launch) 083 set ::DXTL(launch) 0 81 84 } 82 85 grid [checkbutton $bx.l -text "Launch DRAWxtl" \ 83 -variable DXTL(launch) -state $show] \86 -variable ::DXTL(launch) -state $show] \ 84 87 -row $row -column 1 -columnspan 5 -sticky w 85 88 incr row … … 90 93 incr row 91 94 grid [label $bx.c.${v}1 -text "${V} min:"] -column 1 -row $row 92 grid [entry $bx.c.${v}2 -textvariable DXTL(${v}min) -width 4] -column 2 -row $row93 grid [scale $bx.c.${v}3 -resolution 0.1 -variable DXTL(${v}min) \95 grid [entry $bx.c.${v}2 -textvariable ::DXTL(${v}min) -width 4] -column 2 -row $row 96 grid [scale $bx.c.${v}3 -resolution 0.1 -variable ::DXTL(${v}min) \ 94 97 -showvalue 0 -orient h -from -2 -to 1] -column 3 -row $row 95 set DXTL(${v}min) -0.198 set ::DXTL(${v}min) -0.1 96 99 grid [label $bx.c.${v}4 -text " max:"] -column 4 -row $row 97 grid [entry $bx.c.${v}5 -textvariable DXTL(${v}max) -width 4] -column 5 -row $row98 grid [scale $bx.c.${v}6 -resolution 0.1 -variable DXTL(${v}max) \100 grid [entry $bx.c.${v}5 -textvariable ::DXTL(${v}max) -width 4] -column 5 -row $row 101 grid [scale $bx.c.${v}6 -resolution 0.1 -variable ::DXTL(${v}max) \ 99 102 -showvalue 0 -orient h -from 0 -to 3] -column 6 -row $row 100 set DXTL(${v}max) 1.1103 set ::DXTL(${v}max) 1.1 101 104 } 102 105 # atom type box 103 106 grid [frame $bx.s -relief groove -bd 4] -row $row -column 0 -columnspan 5 -sticky nsew 107 grid rowconfigure $bx $row -weight 1 104 108 grid [label $bx.s.0 -text "Atom representation" \ 105 109 -anchor w] -row 0 -column 0 -sticky w … … 108 112 -yscrollcommand "$bx.s.scroll set" ] \ 109 113 -column 0 -row [incr row] -sticky nsew 114 grid rowconfigure $bx.s $row -weight 1 110 115 grid columnconfig $bx.s 0 -weight 1 111 frame [set DXTL(lb) $bx.s.canvas.fr]112 $bx.s.canvas create window 0 0 -anchor nw -window $ DXTL(lb)116 frame [set ::DXTL(lb) $bx.s.canvas.fr] 117 $bx.s.canvas create window 0 0 -anchor nw -window $::DXTL(lb) 113 118 grid [scrollbar $bx.s.scroll \ 114 119 -command "$bx.s.canvas yview"] -sticky ns -row $row -column 1 … … 116 121 incr row 117 122 grid [frame $bx.b -relief groove -bd 4] -row $row -column 0 -columnspan 5 -sticky ew 123 grid rowconfigure $bx $row -weight 1 118 124 grid [frame $bx.b.0] -row 0 -column 0 -columnspan 7 -sticky ew 119 125 grid [label $bx.b.0.1 -text "Bond List" \ … … 126 132 -yscrollcommand "$bx.b.scroll set" ] \ 127 133 -column 0 -row [incr row] -sticky nsew 134 grid rowconfigure $bx.b $row -weight 1 128 135 grid columnconfig $bx.b 0 -weight 1 129 frame [set DXTL(Blst) $bx.b.canvas.fr]130 $bx.b.canvas create window 0 0 -anchor nw -window $ DXTL(Blst)136 frame [set ::DXTL(Blst) $bx.b.canvas.fr] 137 $bx.b.canvas create window 0 0 -anchor nw -window $::DXTL(Blst) 131 138 grid [scrollbar $bx.b.scroll \ 132 139 -command "$bx.b.canvas yview"] -sticky ns -row $row -column 1 133 134 trace variable expgui(export_phase) w SetDXTLatoms 135 SetDXTLatoms 140 # Fourier Box 141 incr row 142 grid [frame $bx.f -relief groove -bd 4] -row $row -column 0 -columnspan 5 -sticky nsew 143 grid [frame $bx.f.0] -column 0 -columnspan 3 -row 0 -sticky news 144 grid columnconfig $bx.f.0 0 -weight 1 145 grid [label $bx.f.0.l1 -text "Fourier display" \ 146 -anchor w] -row 0 -column 0 -sticky w 147 set ::DXTL(FourierRange) "Range: unknown" 148 grid [label $bx.f.0.l2 -textvariable ::DXTL(FourierRange) \ 149 -anchor w] -row 0 -column 1 -sticky e 150 grid [frame $bx.f.1] -column 0 -columnspan 3 -row 1 -sticky news 151 grid [frame $bx.f.2] -column 0 -columnspan 3 -row 2 -sticky news 152 grid [canvas $bx.f.canvas -relief sunk -bd 2 \ 153 -scrollregion {0 0 5000 500} -width 250 -height 70 \ 154 -yscrollcommand "$bx.f.scroll set" ] \ 155 -column 0 -row 3 -sticky nsew 156 grid rowconfigure $bx $row -weight 1 157 grid rowconfigure $bx.f 3 -weight 1 158 grid columnconfig $bx.f 0 -weight 1 159 frame [set ::DXTL(fb) $bx.f.canvas.fr] 160 $bx.f.canvas create window 0 0 -anchor nw -window $::DXTL(fb) 161 grid [scrollbar $bx.f.scroll \ 162 -command "$bx.f.canvas yview"] -sticky ns -row 3 -column 2 163 grid [button $bx.f.1.1 -text "Setup\nFourier" \ 164 -command {EditFourier $::expgui(export_phase); SetupFourierButtons} \ 165 ] -column 0 -row 0 166 grid [button [set ::DXTL(FourCompute) $bx.f.1.2] -text "Compute\nFourier" \ 167 -command {DXTLwritegrd $expgui(export_phase)}] -column 1 -row 0 168 grid [label $bx.f.1.3 -text "Select\nMap"] -column 3 -row 0 169 set ::DXTL(fmenu) [tk_optionMenu $bx.f.1.4 ::DXTL(mtype) test] 170 grid $bx.f.1.4 -column 4 -row 0 171 grid [button [set ::DXTL(AddContour) $bx.f.1.5] -text "Add\nContour" \ 172 -command AddContour] -column 5 -row 0 173 grid [frame $bx.f.1.f] -column 0 -columnspan 9 -row 1 174 grid [label $bx.f.1.f.0 -text "display\nlimits"] -column 0 -row 0 175 set col 0 176 foreach a {X Y Z} { 177 incr col 178 grid [label $bx.f.1.f.$col -text $a] -column $col -row 0 179 incr col 180 grid [entry $bx.f.1.f.$col -textvariable ::DXTL(${a}dispMin) \ 181 -width 6] -column $col -row 0 182 incr col 183 grid [entry $bx.f.1.f.$col -textvariable ::DXTL(${a}dispMax) \ 184 -width 6] -column $col -row 0 185 } 186 set ::DXTL(contours) 0 187 trace variable ::expgui(export_phase) w OnNewFourierPhase 188 OnNewFourierPhase 136 189 # this appears to be needed by OSX 137 190 ResizeWin .export 191 # force the window to stay on top 192 putontop .export 193 SetDXTLatoms 138 194 139 195 # Wait for the Write or Quit button to be pressed … … 161 217 # title info from GSAS title & phase title 162 218 puts $fp "REM created by EXPGUI from $expgui(expfile) on [clock format [clock seconds]]" 163 puts $fp "title \"$ DXTL(title)\""164 puts $fp "pack $ DXTL(xmin) $DXTL(xmax) $DXTL(ymin) $DXTL(ymax) $DXTL(zmin) $DXTL(zmax)"219 puts $fp "title \"$::DXTL(title)\"" 220 puts $fp "pack $::DXTL(xmin) $::DXTL(xmax) $::DXTL(ymin) $::DXTL(ymax) $::DXTL(zmin) $::DXTL(zmax)" 165 221 puts $fp "edges 0.02 Black" 166 222 puts $fp "phong 1.0 30." 167 223 foreach type [array names typelist] { 168 if {$ DXTL(display_$type) == "sphere"} {169 puts $fp "sphere $type $ DXTL(radius_$type) $DXTL(color_$type)"170 } elseif {$ DXTL(display_$type) == "polyhedron"} {171 puts $fp "polysz $type $ DXTL(radius_$type) $DXTL(color_$type)"172 } elseif {$ DXTL(display_$type) == "ellipsoid"} {173 puts $fp "ellipcolor $type * $ DXTL(color_$type)"224 if {$::DXTL(display_$type) == "sphere"} { 225 puts $fp "sphere $type $::DXTL(radius_$type) $::DXTL(color_$type)" 226 } elseif {$::DXTL(display_$type) == "polyhedron"} { 227 puts $fp "polysz $type $::DXTL(radius_$type) $::DXTL(color_$type)" 228 } elseif {$::DXTL(display_$type) == "ellipsoid"} { 229 puts $fp "ellipcolor $type * $::DXTL(color_$type)" 174 230 } 175 231 } 176 if {$ DXTL(coords)} {232 if {$::DXTL(coords)} { 177 233 # write out cell parameters 178 234 puts -nonewline $fp "cell" … … 204 260 puts $fp "import gsas [file tail $expgui(expfile)] $phase" 205 261 } 206 for {set i 1} {$i <= $ DXTL(bonds)} {incr i} {207 puts $fp "bond $ DXTL(ba_$i) $DXTL(bb_$i) $DXTL(bw_$i) $DXTL(bmin_$i) $DXTL(bmax_$i) $DXTL(bc_$i)"262 for {set i 1} {$i <= $::DXTL(bonds)} {incr i} { 263 puts $fp "bond $::DXTL(ba_$i) $::DXTL(bb_$i) $::DXTL(bw_$i) $::DXTL(bmin_$i) $::DXTL(bmax_$i) $::DXTL(bc_$i)" 208 264 } 209 265 # list arrows, when requested 210 266 if {[lindex $expmap(phasetype) [expr {$phase - 1}]] != 1 && \ 211 $ DXTL(genarrows)} {267 $::DXTL(genarrows)} { 212 268 DXTLwriteArrows $fp $phase 213 269 } 270 DXTLwriteFourierCommands $fp 214 271 puts $fp "END" 215 272 close $fp 216 if {$ DXTL(launch)} {217 exec $ DXTL(app) $filnam &273 if {$::DXTL(launch)} { 274 exec $::DXTL(app) $filnam & 218 275 } 219 276 } errmsg] { … … 224 281 -message "File [file tail $filnam] was written" 225 282 } 226 catch {unset DXTL}283 #catch {unset DXTL} 227 284 foreach t [trace vinfo expgui(export_phase)] { 228 285 eval trace vdelete expgui(export_phase) $t … … 245 302 # add atoms to atom representation list 246 303 proc SetDXTLatoms {args} { 247 global DXTL expgui expmap 248 set colorlist "White Red Green Blue Yellow Cyan Magenta Black Orange Brown Grey Silver White" 249 eval destroy [winfo children $DXTL(lb)] 250 eval destroy [winfo children $DXTL(Blst)] 251 set DXTL(bonds) 0 304 global expgui expmap 305 eval destroy [winfo children $::DXTL(lb)] 306 eval destroy [winfo children $::DXTL(Blst)] 307 set ::DXTL(bonds) 0 252 308 if {$expgui(export_phase) == 0} {return} 253 309 set phase $expgui(export_phase) … … 259 315 } 260 316 if {[lindex $expmap(phasetype) [expr {$phase - 1}]] == 1} { 261 set DXTL(genarrows) 0262 $ DXTL(arrowbox) configure -state disabled263 grid forget $ DXTL(arrowcolorbox)317 set ::DXTL(genarrows) 0 318 $::DXTL(arrowbox) configure -state disabled 319 grid forget $::DXTL(arrowcolorbox) 264 320 } else { 265 set DXTL(genarrows) 1266 $ DXTL(arrowbox) configure -state normal267 grid $ DXTL(arrowcolorbox) -sticky ew -row $DXTL(arrowcolorbox_row) \321 set ::DXTL(genarrows) 1 322 $::DXTL(arrowbox) configure -state normal 323 grid $::DXTL(arrowcolorbox) -sticky ew -row $::DXTL(arrowcolorbox_row) \ 268 324 -column 1 -columnspan 5 269 325 } 270 326 catch {unset typelist} 271 set DXTL(title) [phaseinfo $phase name]327 set ::DXTL(title) [phaseinfo $phase name] 272 328 foreach atom $expmap(atomlist_$phase) { 273 329 set typelist([atominfo $phase $atom type]) 1 274 330 } 275 set DXTL(typelist) [array names typelist]331 set ::DXTL(typelist) [array names typelist] 276 332 set row 0 277 grid [label $ DXTL(lb).l$row -text "type " -bg yellow\333 grid [label $::DXTL(lb).l$row -text "type " -bg yellow\ 278 334 ] -column 0 -row $row -sticky ew 279 grid [label $ DXTL(lb).d$row -text " representation " -bg yellow335 grid [label $::DXTL(lb).d$row -text " representation " -bg yellow 280 336 ] -column 1 -row $row -sticky ew 281 grid [label $ DXTL(lb).e$row -text " radius " -bg yellow\337 grid [label $::DXTL(lb).e$row -text " radius " -bg yellow\ 282 338 ] -column 2 -row $row -sticky ew 283 grid [label $ DXTL(lb).c$row -text " color " -bg yellow\339 grid [label $::DXTL(lb).c$row -text " color " -bg yellow\ 284 340 ] -column 3 -row $row -sticky ew 285 341 foreach type [array names typelist] { 286 342 incr row 287 grid [label $ DXTL(lb).l$row -text $type] -column 0 -row $row288 tk_optionMenu $ DXTL(lb).d$rowDXTL(display_$type) sphere polyhedron ellipsoid none289 grid $ DXTL(lb).d$row -column 1 -row $row290 grid [entry $ DXTL(lb).e$row -textvariableDXTL(radius_$type) \343 grid [label $::DXTL(lb).l$row -text $type] -column 0 -row $row 344 tk_optionMenu $::DXTL(lb).d$row ::DXTL(display_$type) sphere polyhedron ellipsoid none 345 grid $::DXTL(lb).d$row -column 1 -row $row 346 grid [entry $::DXTL(lb).e$row -textvariable ::DXTL(radius_$type) \ 291 347 -width 5] -column 2 -row $row 292 eval tk_optionMenu $DXTL(lb).c$row DXTL(color_$type) $colorlist 293 grid $DXTL(lb).c$row -column 3 -row $row 294 set DXTL(display_$type) sphere 295 set DXTL(radius_$type) 0.2 296 set DXTL(color_$type) [lindex $colorlist $row] 297 } 348 eval tk_optionMenu $::DXTL(lb).c$row ::DXTL(color_$type) $::DXTLcolorlist 349 grid $::DXTL(lb).c$row -column 3 -row $row 350 set ::DXTL(display_$type) sphere 351 set ::DXTL(radius_$type) 0.2 352 set ::DXTL(color_$type) [lindex $::DXTLcolorlist $row] 353 } 354 # Resize the list 355 update idletasks 356 foreach i {lb Blst fb} { 357 set sizes [grid bbox $::DXTL($i)] 358 [winfo parent $::DXTL($i)] config -scrollregion $sizes \ 359 -width [lindex $sizes 2] 360 } 361 wm geom [winfo toplevel $::DXTL(Blst)] {} 362 } 363 364 # add bonds to bond list 365 proc DXTLaddBond {} { 366 if {$::DXTL(bonds) == 0} { 367 # insert header 368 set row 0 369 grid [label $::DXTL(Blst).a$row -text "from " -bg yellow\ 370 ] -column 1 -row $row -sticky ew 371 grid [label $::DXTL(Blst).b$row -text " to " -bg yellow\ 372 ] -column 2 -row $row -sticky ew 373 grid [label $::DXTL(Blst).c$row -text " width " -bg yellow\ 374 ] -column 3 -row $row -sticky ew 375 grid [label $::DXTL(Blst).d$row -text " min " -bg yellow\ 376 ] -column 4 -row $row -sticky ew 377 grid [label $::DXTL(Blst).e$row -text " max " -bg yellow\ 378 ] -column 5 -row $row -sticky ew 379 grid [label $::DXTL(Blst).f$row -text " color " -bg yellow\ 380 ] -column 6 -row $row -sticky ew 381 } 382 set row [incr ::DXTL(bonds)] 383 eval tk_optionMenu $::DXTL(Blst).ta$row ::DXTL(ba_$row) $::DXTL(typelist) 384 grid $::DXTL(Blst).ta$row -column 1 -row $row 385 eval tk_optionMenu $::DXTL(Blst).tb$row ::DXTL(bb_$row) $::DXTL(typelist) 386 grid $::DXTL(Blst).tb$row -column 2 -row $row 387 grid [entry $::DXTL(Blst).w$row -textvariable ::DXTL(bw_$row) \ 388 -width 5] -column 3 -row $row 389 grid [entry $::DXTL(Blst).mi$row -textvariable ::DXTL(bmin_$row) \ 390 -width 5] -column 4 -row $row 391 grid [entry $::DXTL(Blst).mx$row -textvariable ::DXTL(bmax_$row) \ 392 -width 5] -column 5 -row $row 393 eval tk_optionMenu $::DXTL(Blst).c$row ::DXTL(bc_$row) $::DXTLcolorlist 394 grid $::DXTL(Blst).c$row -column 6 -row $row 395 set ::DXTL(bw_$row) 0.02 396 set ::DXTL(bmin_$row) 1.0 397 set ::DXTL(bmax_$row) 2.0 398 set ::DXTL(bc_$row) [lindex $::DXTLcolorlist $row] 298 399 # Resize the list 299 400 update 300 set sizes [grid bbox $ DXTL(lb)]301 [winfo parent $ DXTL(lb)] config -scrollregion $sizes \401 set sizes [grid bbox $::DXTL(Blst)] 402 [winfo parent $::DXTL(Blst)] config -scrollregion $sizes \ 302 403 -width [lindex $sizes 2] 303 set sizes [grid bbox $DXTL(Blst)] 304 [winfo parent $DXTL(Blst)] config -scrollregion $sizes \ 305 -width [lindex $sizes 2] 306 wm geom [winfo toplevel $DXTL(Blst)] {} 307 } 308 309 # add bonds to bond list 310 proc DXTLaddBond {} { 311 global DXTL 312 set colorlist "White Red Green Blue Yellow Cyan Magenta Black Orange Brown Grey Silver White" 313 314 if {$DXTL(bonds) == 0} { 315 # insert header 316 set row 0 317 grid [label $DXTL(Blst).a$row -text "from " -bg yellow\ 318 ] -column 1 -row $row -sticky ew 319 grid [label $DXTL(Blst).b$row -text " to " -bg yellow\ 320 ] -column 2 -row $row -sticky ew 321 grid [label $DXTL(Blst).c$row -text " width " -bg yellow\ 322 ] -column 3 -row $row -sticky ew 323 grid [label $DXTL(Blst).d$row -text " min " -bg yellow\ 324 ] -column 4 -row $row -sticky ew 325 grid [label $DXTL(Blst).e$row -text " max " -bg yellow\ 326 ] -column 5 -row $row -sticky ew 327 grid [label $DXTL(Blst).f$row -text " color " -bg yellow\ 328 ] -column 6 -row $row -sticky ew 329 } 330 set row [incr DXTL(bonds)] 331 eval tk_optionMenu $DXTL(Blst).ta$row DXTL(ba_$row) $DXTL(typelist) 332 grid $DXTL(Blst).ta$row -column 1 -row $row 333 eval tk_optionMenu $DXTL(Blst).tb$row DXTL(bb_$row) $DXTL(typelist) 334 grid $DXTL(Blst).tb$row -column 2 -row $row 335 grid [entry $DXTL(Blst).w$row -textvariable DXTL(bw_$row) \ 336 -width 5] -column 3 -row $row 337 grid [entry $DXTL(Blst).mi$row -textvariable DXTL(bmin_$row) \ 338 -width 5] -column 4 -row $row 339 grid [entry $DXTL(Blst).mx$row -textvariable DXTL(bmax_$row) \ 340 -width 5] -column 5 -row $row 341 eval tk_optionMenu $DXTL(Blst).c$row DXTL(bc_$row) $colorlist 342 grid $DXTL(Blst).c$row -column 6 -row $row 343 set DXTL(bw_$row) 0.02 344 set DXTL(bmin_$row) 1.0 345 set DXTL(bmax_$row) 2.0 346 set DXTL(bc_$row) [lindex $colorlist $row] 347 # Resize the list 348 update 349 set sizes [grid bbox $DXTL(Blst)] 350 [winfo parent $DXTL(Blst)] config -scrollregion $sizes \ 351 -width [lindex $sizes 2] 404 #set can [winfo parent $::DXTL($i)] 405 #set scroll [winfo parent $can].scroll 406 #[winfo parent $::DXTL($i)] config -scrollregion $sizes 352 407 } 353 408 354 409 proc DXTLwriteArrows {out phase} { 355 global expgui expmap DXTL410 global expgui expmap 356 411 set fp [open geom.in w] 357 412 puts $fp "N" … … 399 454 puts $out "rem spin for atom $name # $k ($spin)" 400 455 if {$spin == "Red"} { 401 puts $out "arrow $pos $vec 1. 0.15 $ DXTL(redarrow)"456 puts $out "arrow $pos $vec 1. 0.15 $::DXTL(redarrow)" 402 457 } else { 403 puts $out "arrow $pos $vec 1. 0.15 $ DXTL(blackarrow)"458 puts $out "arrow $pos $vec 1. 0.15 $::DXTL(blackarrow)" 404 459 } 405 460 } elseif {$i == 6} { … … 412 467 puts $out "mag_trans 1. 0 0 0 1. 0 0 0 1." 413 468 } 469 470 # Computes a Fourier map(s) and converts the maps from binary to ascii 471 # returns a list of Fourier map types 472 proc DXTLwritegrd {phase} { 473 global expgui expmap 474 set lst [listFourier] 475 if {[llength $lst] < 1} { 476 MyMessageBox -parent . -title "No Fourier" \ 477 -message "You have not set up to compute a Fourier map." \ 478 -icon warning 479 return 480 } 481 set typelist {} 482 foreach l $lst { 483 lappend typelist [Fourierinfo $l type] 484 } 485 set hists [FourierHists $phase] 486 # make sure we have default limits 487 getFourierLimits $phase 488 if {[llength $hists] < 1} { 489 MyMessageBox -parent . -title "No Fourier" \ 490 -message "You have not set up to compute a Fourier map for phase $phase." \ 491 -icon warning 492 return 493 } 494 if {$::tcl_platform(platform) == "windows"} { 495 set map [file join $expgui(gsasexe) gsas2map.exe] 496 set fourier [file join $expgui(gsasexe) fourier.exe] 497 } else { 498 set map [file join $expgui(gsasexe) gsas2map] 499 set fourier [file join $expgui(gsasexe) fourier] 500 } 501 if {![file exists $map]} { 502 MyMessageBox -parent . -title "No Map Converter prog" \ 503 -message "Error Fourier map converter program ($map) not found." \ 504 -icon warning 505 return 506 } 507 if {![file exists $fourier]} { 508 MyMessageBox -parent . -title "No Fourier prog" \ 509 -message "Error Fourier program ($fourier) not found." \ 510 -icon warning 511 return 512 } 513 set fp [open f.in w] 514 if {[OutputFourierType]} { 515 puts $fp [lindex $typelist 0] 516 } 517 puts $fp "E" 518 foreach t [lrange $typelist 1 end] { 519 puts $fp "F $t" 520 puts $fp "E" 521 } 522 puts $fp "q" 523 close $fp 524 # delete any old grd files 525 foreach f [glob -nocomplain "[file root $expgui(expfile)]*.grd"] { 526 catch {file delete -force $f} 527 } 528 set deleteerror 0 529 if {[llength [glob -nocomplain "[file root $expgui(expfile)]*.grd"]] >0} { 530 MyMessageBox -parent . -title "Old grd files?" \ 531 -message "Warning: Could not delete old .grd files; it will probably not be possible to overwrite them either. Be aware that map results may be out of date." \ 532 -icon warning 533 set deleteerror 1 534 } 535 # Save the current exp file 536 savearchiveexp 537 # disable the file changed monitor 538 set expgui(expModifiedLast) 0 539 catch { 540 exec $fourier [file root $expgui(expfile)] >& f.out 541 exec $map [file root $expgui(expfile)] < f.in >>& f.out 542 } 543 # reset the file changed monitor 544 #loadexp $expgui(expfile) 545 set expgui(expModifiedLast) [file mtime $expgui(expfile)] 546 547 if {[llength [glob -nocomplain "[file root $expgui(expfile)]*.grd"]] == 0} { 548 set fp [open f.out r] 549 set lines {} 550 while {[gets $fp line] >= 0} { 551 append lines $line "\n" 552 } 553 close $fp 554 MyMessageBox -parent . -title "No grd files" \ 555 -message "Error: no .grd files were created. See log file below\n\n$lines" \ 556 -icon error 557 return {} 558 } else { 559 catch {close $fp} 560 catch {file delete -force f.in f.out} 561 SetupFourierButtons 562 return $typelist 563 } 564 } 565 566 # called when the phase # is set or changed 567 # clean up old Fourier maps 568 proc OnNewFourierPhase {args} { 569 SetDXTLatoms 570 if {[llength $::expmap(phaselist)] > 1} { 571 # there is more than one phase; delete any .grd files to make sure 572 # generate ones for the current phase 573 foreach f [glob -nocomplain "[file root $::expgui(expfile)]*.grd"] { 574 catch {file delete -force $f} 575 } 576 } 577 SetupFourierButtons 578 eval destroy [winfo children $::DXTL(fb)] 579 set ::DXTL(contours) 0 580 } 581 582 # this enables/disables Fourier buttons based on the Fourier setup 583 # and the files that are present 584 proc SetupFourierButtons {} { 585 if {[catch { 586 set phase $::expgui(export_phase) 587 $::DXTL(FourCompute) config -state disabled 588 $::DXTL(AddContour) config -state disabled 589 $::DXTL(fmenu) delete 0 end 590 }]} return 591 set ::DXTL(mtype) "" 592 set ::DXTL(mfil) "" 593 set ::DXTL(FourierRange) "" 594 # if the Fourier is not set up; return here 595 if {[llength [set nF [listFourier]]] < 1} return 596 # check that all phases are set to current phase 597 foreach i $nF { 598 set ph [Fourierinfo $i phase] 599 if {$ph != $phase} return 600 } 601 if {[llength [FourierHists $phase]] < 1} return 602 # make sure we have default limits 603 getFourierLimits $phase 604 $::DXTL(FourCompute) config -state normal 605 # if there are no maps, return now 606 set maps [glob -nocomplain "[file root $::expgui(expfile)]*.grd"] 607 if {[llength $maps] < 1} return 608 set types {} 609 foreach fil $maps { 610 lappend types [lindex [split [file root [file tail $fil]] "_"] end] 611 } 612 set i 0 613 foreach fil $maps lbl $types { 614 $::DXTL(fmenu) add command -label $lbl \ 615 -command "set DXTL(mtype) $lbl; set DXTL(mfil) $fil; GetFourierRange" 616 if {$i == 0} { 617 $::DXTL(fmenu) invoke 0 618 $::DXTL(AddContour) config -state normal 619 } 620 incr i 621 } 622 } 623 624 proc AddContour {} { 625 # set a header 626 if {$::DXTL(contours) == 0} { 627 set row 0 628 grid [label $::DXTL(fb).a$row -text "Type" -bg yellow \ 629 ] -column 1 -row $row -sticky ew 630 grid [label $::DXTL(fb).b$row -text "Contour Level" -bg yellow \ 631 ] -column 2 -row $row -sticky ew 632 grid [label $::DXTL(fb).c$row -text "Color" -bg yellow \ 633 -anchor center] -column 3 -row $row -sticky ew 634 } 635 set row [incr ::DXTL(contours)] 636 eval tk_optionMenu $::DXTL(fb).ta$row ::DXTL(fb_type_$row) {mesh solid} 637 grid $::DXTL(fb).ta$row -column 1 -row $row 638 grid [entry $::DXTL(fb).w$row -width 10 -textvariable ::DXTL(fb_val_$row) \ 639 ] -column 2 -row $row 640 set menu [eval tk_optionMenu $::DXTL(fb).tb$row \ 641 ::DXTL(fb_color_$row) $::DXTLcolorlist] 642 $menu invoke $row 643 grid $::DXTL(fb).tb$row -column 3 -row $row 644 grid [button $::DXTL(fb).del$row -text "Delete"\ 645 -command "DeleteFourierContour $row"] -column 4 -row $row 646 update idletasks 647 set sizes [grid bbox $::DXTL(fb)] 648 [winfo parent $::DXTL(fb)] config -scrollregion $sizes \ 649 -width [lindex $sizes 2] 650 } 651 652 proc DeleteFourierContour {row} { 653 foreach i "$::DXTL(fb).ta$row $::DXTL(fb).w$row $::DXTL(fb).tb$row \ 654 $::DXTL(fb).tb$row $::DXTL(fb).del$row" { 655 catch {destroy $i} 656 } 657 set ::DXTL(fb_val_$i) "" 658 if {$::DXTL(contours) == $row} {incr ::DXTL(contours) -1} 659 } 660 661 proc GetFourierRange {} { 662 set fp [open f.in w] 663 set lst [listFourier] 664 if {[llength $lst] < 1} { 665 MyMessageBox -parent . -title "No Fourier" \ 666 -message "You have not set up to compute a Fourier map." \ 667 -icon warning 668 return 669 } 670 set typelist {} 671 foreach l $lst { 672 lappend typelist [Fourierinfo $l type] 673 } 674 if {[OutputFourierType]} { 675 puts $fp $::DXTL(mtype) 676 } 677 close $fp 678 if {$::tcl_platform(platform) == "windows"} { 679 set map [file join $::expgui(gsasexe) forsrh.exe] 680 } else { 681 set map [file join $::expgui(gsasexe) forsrh] 682 } 683 catch { 684 exec $map [file root $::expgui(expfile)] < f.in >& f.out 685 } 686 foreach {min max} {{} {}} {} 687 catch { 688 set fp [open "f.out" r] 689 while {[gets $fp line] >= 0} { 690 if {[string first "range of map values" $line] != -1} { 691 set off [expr 4 + [string first " is " $line]] 692 foreach {min to max} [string trim [string range $line $off end]] {} 693 break 694 } 695 } 696 } 697 catch { 698 close $fp 699 } 700 if {$min != ""} {set ::DXTL(FourierRange) "Range: $min to $max"} 701 } 702 703 # is output of the current Fourier map type required as input to a program? 704 # answer is yes when more than one map file is present 705 proc OutputFourierType {} { 706 set i 0 707 foreach ext {DEL FCL FOB PTS DPT} { 708 if {[file exists [file root $::expgui(expfile)].$ext]} { 709 incr i 710 } 711 for {set i 2} {$i <= 9} {incr i} { 712 if {[file exists [file root $::expgui(expfile)].${i}FD]} { 713 incr i 714 } 715 } 716 } 717 if {$i > 1} { 718 return 1 719 } 720 return 0 721 } 722 723 proc DXTLwriteFourierCommands {fp} { 724 if {$::DXTL(mfil) == ""} return 725 if {![file exists $::DXTL(mfil)]} { 726 puts "file not found $::DXTL(mfil)" 727 return 728 } 729 set cntlist {} 730 for {set i 1} {$i <= $::DXTL(contours)} {incr i} { 731 set val "" 732 catch {set val $::DXTL(fb_val_$i)} 733 if {[catch {set val [expr 1.*$val]}]} continue 734 lappend cntlist [list $val $::DXTL(fb_type_$i) $::DXTL(fb_color_$i)] } 735 if {[llength $cntlist] <= 0} return 736 puts $fp "mapread grd [file tail $::DXTL(mfil)] 4" 737 foreach item $cntlist { 738 puts $fp "mapcontour $item" 739 } 740 set s {} 741 foreach a {X Y Z} { 742 lappend s $::DXTL(${a}dispMin) 743 lappend s $::DXTL(${a}dispMax) 744 } 745 puts $fp "mapregion $s" 746 } -
trunk/gsascmds.tcl
r1219 r1225 3932 3932 exit 3933 3933 } 3934 3935 # Fourier routines 3936 proc EditFourier {phase} { 3937 #is this a valid phase #? 3938 if {[lsearch $::expmap(phaselist) $phase] == -1} return 3939 # check that all Fourier records are set to the current phase 3940 foreach i [listFourier] { 3941 set ph [Fourierinfo $i phase] 3942 if {$ph != $phase} {Fourierinfo $i phase set $phase} 3943 } 3944 # for now we will not offer access to section, (dmin, dmax not supported) 3945 set typelist {} 3946 foreach i [listFourier] { 3947 lappend typelist [Fourierinfo $i type] 3948 } 3949 set histlist [FourierHists $phase] 3950 set limits [getFourierLimits $phase] 3951 if {[winfo exists .export]} { 3952 set box .export.fourier 3953 } else { 3954 set box .fourier 3955 } 3956 catch {destroy $box} 3957 toplevel $box 3958 wm title $box "Set Fourier Options, phase $phase" 3959 grid [frame $box.1] -row 1 -column 1 -rowspan 10 3960 grid [frame $box.2] -row 1 -column 2 -rowspan 10 3961 grid [frame $box.b] -sticky news -row 11 -column 1 -columnspan 2 3962 grid columnconfigure $box.b 0 -weight 1 3963 grid columnconfigure $box.b 3 -weight 1 3964 grid [button $box.b.1 -text Continue \ 3965 -command "set ::DXTL(quit) 0; destroy $box" \ 3966 ] -row 1 -column 1 3967 grid [button $box.b.2 -text Quit \ 3968 -command "set ::DXTL(quit) 1; destroy $box" \ 3969 ] -row 1 -column 2 3970 3971 # map type selection 3972 set row 0 3973 grid [label $box.1.$row -text "Select map type(s)"] -column 1 -row $row 3974 foreach typ {DELF FCLC FOBS 2FDF 3FDF 4FDF PTSN DPTS} lbl { 3975 "Difference Fourier" "Fcalc Fourier" "Fobs Fourier" 3976 "2*Fo-Fc Fourier" "3*Fo-2*Fc Fourier" "4*Fo-3*Fc Fourier" "Patterson map" "Delta-F Patterson"\ 3977 } { 3978 incr row 3979 grid [ \ 3980 checkbutton $box.1.$row -variable ::DXTL($typ) \ 3981 -text "$lbl ($typ)" \ 3982 ] -column 1 -row $row -sticky w 3983 if {[lsearch $typelist $typ] == -1} { 3984 set ::DXTL($typ) 0 3985 } else { 3986 set ::DXTL($typ) 1 3987 } 3988 } 3989 grid [label $box.2.a1 -text "Histogram(s) to be used:\n(last superceeds)"] -column 1 -row 1 3990 grid [label $box.2.a2 -textvariable ::DXTL(histlist) -width 20] -column 2 -row 1 -columnspan 2 3991 grid [button $box.2.a3 -text Set \ 3992 -command "SetFourierHists $box"] -column 5 -row 1 3993 set ::DXTL(histlist) {} 3994 foreach i $histlist { 3995 if {$::DXTL(histlist) != ""} {append ::DXTL(histlist) ", "} 3996 append ::DXTL(histlist) $i 3997 } 3998 grid [label $box.2.m1 -text min] -column 2 -row 2 3999 grid [label $box.2.m2 -text max] -column 3 -row 2 4000 grid [label $box.2.m3 -text "map step\n(A)"] -column 4 -row 2 4001 set row 3 4002 foreach axis {X Y Z} lim [lrange $limits 1 end] step [lindex $limits 0] { 4003 incr row 4004 grid [label $box.2.0$axis -text "$axis limits"] -column 1 -row $row -sticky e 4005 grid [entry $box.2.min$axis -width 10 -textvariable ::DXTL(min$axis)] -column 2 -row $row 4006 grid [entry $box.2.max$axis -width 10 -textvariable ::DXTL(max$axis)] -column 3 -row $row 4007 grid [entry $box.2.step$axis -width 10 -textvariable ::DXTL(step$axis)] -column 4 -row $row 4008 set ::DXTL(min$axis) [lindex $lim 0] 4009 set ::DXTL(max$axis) [lindex $lim 1] 4010 set ::DXTL(step$axis) [format "%.4f" [expr {$step + 0.0001}]] 4011 } 4012 putontop $box 4013 tkwait window $box 4014 afterputontop 4015 if $::DXTL(quit) return 4016 delFourier 4017 foreach typ {DELF FCLC FOBS 2FDF 3FDF 4FDF PTSN DPTS} { 4018 if {$::DXTL($typ)} { 4019 addFourier $phase $typ 4020 } 4021 } 4022 if {$::DXTL(histlist) != "<none>"} { 4023 FourierHists $phase set [regsub -all "," $::DXTL(histlist) " "] 4024 } 4025 setFourierLimits $phase \ 4026 [list $::DXTL(stepX) $::DXTL(stepY) $::DXTL(stepZ)] \ 4027 [list $::DXTL(minX) $::DXTL(maxX)] \ 4028 [list $::DXTL(minY) $::DXTL(maxY)] \ 4029 [list $::DXTL(minZ) $::DXTL(maxZ)] 4030 incr ::expgui(changed) 4031 } 4032 4033 proc SetFourierHists {top} { 4034 set box $top.hstsel 4035 set ::DXTL(histbox) $box 4036 catch {destroy $box} 4037 toplevel $box 4038 wm title $box "Select Histograms" 4039 grid [frame $box.1 -class HistList] -column 1 -row 1 -sticky news 4040 grid columnconfigure $box 1 -weight 1 4041 grid [frame $box.2] -column 2 -row 1 4042 grid [label $box.2.a -text {Select a histogram from the box 4043 to the left to add it to the 4044 histogram list below 4045 4046 (note that reflection intensities 4047 from the last histograms in list 4048 override earlier ones) 4049 4050 Histogram List:}] \ 4051 -column 1 -row 1 4052 grid [label $box.2.b -textvariable ::DXTL(histlist)] -column 1 -row 2 4053 grid [button $box.2.c -text Clear -command ClearFourierHist] \ 4054 -column 1 -row 3 4055 grid [button $box.3 -text Close -command "destroy $box"] \ 4056 -column 1 -row 3 -columnspan 2 4057 MakeHistBox $box.1 4058 bind $box.1.lbox <ButtonRelease-1> { 4059 set selhist [$::DXTL(histbox).1.lbox curselection] 4060 if {[llength $selhist] != 1} return 4061 AddFourierHist [lindex $::expmap(powderlist) $selhist] 4062 lappend ::DXTL(histlist) 4063 set hist [lindex $::expmap(powderlist) $selhist] 4064 $::DXTL(histbox).2.b config -text $hist 4065 } 4066 sethistlist 4067 putontop $box 4068 tkwait window $box 4069 afterputontop 4070 } 4071 4072 proc AddFourierHist {num} { 4073 if {$::DXTL(histlist) == "<none>"} { 4074 set ::DXTL(histlist) {} 4075 } 4076 if {$::DXTL(histlist) != ""} {append ::DXTL(histlist) ", "} 4077 append ::DXTL(histlist) $num 4078 } 4079 4080 proc ClearFourierHist {} { 4081 set ::DXTL(histlist) "<none>" 4082 } -
trunk/gsasmenu.tcl
r1166 r1225 40 40 } 41 41 graphs { 42 forsrh 42 43 forplot 43 44 polfplot … … 45 46 ortep 46 47 rawplot 47 fourier48 forsrh49 48 gsas2map 50 49 liveplot -
trunk/import_cif.tcl
r935 r1225 98 98 # remove spaces from space group 99 99 regsub -all " " $sgtmp "" sgtmp 100 # check for final H 101 if {[string range $sgtmp end end] == "H"} { 102 set sgtmp [string range $sgtmp 0 end-1] 103 } 100 104 # make a copy where we treat bar 3 as the same as 3 101 105 regsub -- "-3" $sgtmp "3" sgtmp3 -
trunk/readexp.tcl
r1219 r1225 4750 4750 # read a Fourier map entry 4751 4751 # returns five values: 4752 # 0: type of map (DELF,FCLC,FOBS, NFDF,PTSN,DPTS)4752 # 0: type of map (DELF,FCLC,FOBS,*FDF,PTSN,DPTS) 4753 4753 # 1: section (X,Y or Z) 4754 4754 # 2: phase (1-9) … … 4761 4761 } 4762 4762 set vals {} 4763 # 0: type of map (DELF,FCLC,FOBS, NFDF,PTSN,DPTS)4763 # 0: type of map (DELF,FCLC,FOBS,[2-9]FDF,PTSN,DPTS) 4764 4764 lappend vals [string trim [string range [readexp $key] 2 6]] 4765 4765 # 1: section (X,Y or Z) … … 4777 4777 # arguments: 4778 4778 # phase: (1-9) 4779 # type: type of map (DELF,FCLC,FOBS, NFDF,PTSN,DPTS) - default DELF4779 # type: type of map (DELF,FCLC,FOBS,*FDF,PTSN,DPTS) - default DELF 4780 4780 # section: (X,Y or Z) - default Z 4781 4781 # returns the number of the map that is added … … 4800 4800 } 4801 4801 4802 # delete all Fourier map computations 4803 proc delFourier {} { 4804 foreach i {1 2 3 4 5 6 7 8 9} { 4805 set key " FOUR CDAT$i" 4806 delexp $key 4807 } 4808 } 4809 4802 4810 # read/set a Fourier computation value 4803 4811 # use: Fourierinfo num parm … … 4806 4814 # num is the Fourier entry 4807 4815 # parm is one of the following 4808 # type -- type of map (DELF,FCLC,FOBS, NFDF,PTSN,DPTS)4816 # type -- type of map (DELF,FCLC,FOBS,*FDF,PTSN,DPTS) 4809 4817 # section -- last running map direction (X,Y or Z) 4810 4818 # phase -- phase (1-9) … … 4819 4827 switch -glob ${parm}-$action { 4820 4828 type-get { 4821 # type of map (DELF,FCLC,FOBS, NFDF,PTSN,DPTS)4829 # type of map (DELF,FCLC,FOBS,*FDF,PTSN,DPTS) 4822 4830 return [string trim [string range [readexp $key] 2 6]] 4823 4831 } 4824 4832 type-set { 4825 4833 set found 0 4826 foreach val {DELF FCLC FOBS NFDF PTSN DPTS} {4834 foreach val {DELF FCLC FOBS 2FDF 3FDF 4FDF 5FDF 6FDF 7FDF 8FDF 9FDF PTSN DPTS} { 4827 4835 if {$val == $value} { 4828 4836 set found 1 … … 4935 4943 } 4936 4944 set steps {} 4937 foreach v {x y z} { 4938 set range_$v {} 4939 lappend steps [expr {[set cell_$v] / [set step_$v]}] 4940 lappend range_$v [expr {[set min_$v] * 1. / [set step_$v] }] 4941 lappend range_$v [expr {[set max_$v] * 1. / [set step_$v] }] 4942 } 4943 return [list $steps $range_x $range_y $range_z] 4945 if {[catch { 4946 foreach v {x y z} { 4947 set range_$v {} 4948 lappend steps [expr {[set cell_$v] / [set step_$v]}] 4949 lappend range_$v [expr {[set min_$v] * 1. / [set step_$v] }] 4950 lappend range_$v [expr {[set max_$v] * 1. / [set step_$v] }] 4951 } 4952 }]} { 4953 return [list {.2 .2 .2} {0 1} {0 1} {0 1}] 4954 } else { 4955 return [list $steps $range_x $range_y $range_z] 4956 } 4944 4957 } 4945 4958
Note: See TracChangeset
for help on using the changeset viewer.