- Timestamp:
- Apr 27, 2021 10:14:41 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIplot.py ¶
r4871 r4895 1986 1986 if msg: msg += '\n' 1987 1987 msg += " * only when the intensity scale is linear/sqrt (not log)" 1988 if G2frame.Weight:1989 if msg: msg += '\n'1990 msg += " * only when weight plot is set to no weight plot"1991 1988 if msg: 1992 1989 msg = 'Publication export is only available under limited plot settings\n'+msg 1993 1990 G2G.G2MessageBox(G2frame,msg,'Wrong plot settings') 1994 1991 print(msg) 1992 elif G2frame.Weight: 1993 G2frame.Weight = False 1994 PlotPatterns(G2frame,newPlot=newPlot,plotType=plottype,extraKeys=extraKeys) 1995 PublishRietveldPlot(G2frame,Pattern,Plot,Page) 1996 G2frame.Weight = True 1997 PlotPatterns(G2frame,newPlot=newPlot,plotType=plottype,extraKeys=extraKeys) 1998 return 1995 1999 else: 1996 2000 PublishRietveldPlot(G2frame,Pattern,Plot,Page) … … 2256 2260 q = xpos 2257 2261 if q <= 0: 2258 G2frame.G2plotNB.status.SetStatusText(' q= %9.5f'%q)2262 G2frame.G2plotNB.status.SetStatusText('Q = %9.5f'%q) 2259 2263 return 2260 2264 try: … … 2262 2266 xpos = G2lat.Dsp2pos(Parms,2.0*np.pi/q) 2263 2267 except ValueError: #avoid bad value in asin beyond upper limit 2264 G2frame.G2plotNB.status.SetStatusText(' q= %9.5f'%q)2268 G2frame.G2plotNB.status.SetStatusText('Q = %9.5f'%q) 2265 2269 return 2266 2270 if 'T' in Parms['Type'][0]: # TOF … … 2272 2276 q = xpos 2273 2277 if q <= 0: 2274 G2frame.G2plotNB.status.SetStatusText(' q= %9.5f'%q)2278 G2frame.G2plotNB.status.SetStatusText('Q = %9.5f'%q) 2275 2279 return 2276 2280 dsp = 2.*np.pi/q … … 2296 2300 if G2frame.Contour: #PWDR only 2297 2301 if 'T' in Parms['Type'][0]: 2298 G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q =%9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1)2302 G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d=%9.5f Q=%9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1) 2299 2303 else: 2300 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f q= %9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1)2304 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d=%9.5f Q= %9.5f pattern ID =%5d'%(xpos,dsp,q,int(ypos)),1) 2301 2305 else: 2302 2306 if 'T' in Parms['Type'][0]: 2303 2307 if Page.plotStyle['sqrtPlot']: 2304 G2frame.G2plotNB.status.SetStatusText('TOF = %9.3f d =%9.5f q=%9.5f sqrt(Intensity) =%9.2f'%(xpos,dsp,q,ypos),1)2308 G2frame.G2plotNB.status.SetStatusText('TOF = %9.3f d=%9.5f Q=%9.5f sqrt(Intensity) =%9.2f'%(xpos,dsp,q,ypos),1) 2305 2309 else: 2306 G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d =%9.5f q=%9.5f Intensity =%9.2f'%(xpos,dsp,q,ypos),1)2310 G2frame.G2plotNB.status.SetStatusText('TOF =%9.3f d=%9.5f Q=%9.5f Intensity =%9.2f'%(xpos,dsp,q,ypos),1) 2307 2311 else: 2308 2312 if 'PWDR' in plottype: 2309 2313 if Page.plotStyle['sqrtPlot']: 2310 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f q =%9.5f sqrt(Intensity) =%9.2f'%(xpos,dsp,q,ypos),1)2314 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d=%9.5f Q=%9.5f sqrt(Intensity) =%9.2f'%(xpos,dsp,q,ypos),1) 2311 2315 else: 2312 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d =%9.5f q =%9.5f Intensity =%9.2f'%(xpos,dsp,q,ypos),1)2316 G2frame.G2plotNB.status.SetStatusText('2-theta =%9.3f d=%9.5f Q=%9.5f Intensity =%9.2f'%(xpos,dsp,q,ypos),1) 2313 2317 elif plottype == 'SASD': 2314 2318 G2frame.G2plotNB.status.SetStatusText('q =%12.5g Intensity =%12.5g d =%9.1f'%(q,ypos,dsp),1) … … 5944 5948 if xpos: #avoid out of frame mouse position 5945 5949 ypos = event.ydata 5946 G2frame.G2plotNB.status.SetStatusText(' q =%.3f%s %sq/q=%.4f'%(xpos,Angstr+Pwrm1,GkDelta,ypos),1)5950 G2frame.G2plotNB.status.SetStatusText('Q =%.3f%s %sQ/Q =%.4f'%(xpos,Angstr+Pwrm1,GkDelta,ypos),1) 5947 5951 5948 5952 def OnKeyPress(event): -
TabularUnified trunk/help/gsasII.html ¶
r4833 r4895 4387 4387 part of your project are shown on this page. They can be displayed as a stack 4388 4388 of powder patterns, just a single pattern or as a contour image of the peak 4389 intensities. What can be done here will depend on which is displayed. 4390 </P><p class=MsoNormal style='margin-left:1.0in'> 4391 The difference curve position can be moved 4392 vertically by clicking on it and then "dragging" it up or down. 4393 Reflection positions 4394 can also be repositioned vertically by dragging them. 4395 The indicies (hkl values) for reflections can be displayed by 4396 selecting the "Reflection Lists" entry and then if needed the 4397 appropriate phase. Letting 4398 the mouse rest at the position of a reflection in 2-theta, Q, 4399 etc. (the vertical position does not matter). After a short delay a 4400 "tool tip" will be displayed for any reflections close to the lateral 4401 mouse position. 4389 intensities. What can be done here will depend on home many patterns 4390 are shown as well as what mode is selected. 4391 Note that when the tick marks and difference curve positions can be 4392 customized, as <a href="#PWDR_dragticks">discussed below</a>. 4393 </P><p class=MsoNormal style='margin-left:1.0in'> 4394 Similar plots to the one here are displayed when different 4395 subtree items are selected and on those plots it is possible to 4396 view and in some cases edit information associated with the 4397 histogram. As examples: 4398 <UL style='margin-left:1.0in'> 4399 <a name="otherPWDR"></a> 4400 <LI>By selecting 4401 the <a href="#PWDR_Limits">Limits</a> entry, range of data used, 4402 as well as possible excluded regions, can be set. 4403 <LI>Selecting <a href="#PWDR_Reflection_Lists">Reflection Lists</a> 4404 allows display of reflection indicies (hkl values) for a 4405 selected phase. 4406 Letting the mouse rest unmoved at the position of a reflection 4407 in 2-theta, Q, etc. (the vertical position does not matter) will 4408 cause these to be displayed. After a short delay a 4409 "tool tip" will appear with indicies for any reflections close 4410 to the lateral mouse position. 4411 <LI>Selecting <a href="#PWDR_Background">Background</a> allows 4412 a mouse to be used to define 4413 fixed points where a background curve 4414 can be fitted to those points. 4415 <LI>Selecting <a href="#PWDR_Instrument_Parameters">Instrument 4416 Parameters</a>displays plot of peak widths as a function of 2theta 4417 or Q. 4418 <LI>Selecting <a href="#PWDR_Peak_List">Peak List</a> allows 4419 postions of peaks to be defined for use in direct peak fitting. 4420 <LI>Selecting <a href="#PWDR_Unit_Cells_List">Unit Cells List</a> 4421 can show the positions of reflections for an arbitrary set of 4422 unit cell parameters, optionally with space group extinctions 4423 applied. 4402 4424 </P> 4403 4425 4426 </UL> 4404 4427 <h5 style='margin-left:.5in'><span 4405 4428 style='mso-fareast-font-family:"Times New Roman"'> … … 4407 4430 4408 4431 <DL style='margin-left:0.5in'> 4409 <DT>Move mouse4432 <DT>Move mouse 4410 4433 <DD>As the mouse cursor is moved across the plot, the plot status line 4411 4434 will show the cursor position as 2Theta, d-spacing and the 4412 intensity. For a Q-plot, Q is shown instead of 2Theta. 4435 intensity. For a Q-plot, Q is shown instead of 2Theta. 4436 4437 <DT>Press keyboard keys 4438 <DD><a href="#PWDR_keylist">See below</a>. The "s" and "w" modes are commonly used. 4439 4440 <a name="PWDR_dragticks"></a> 4441 <DT>Drag tickmarks 4442 <DD>Click on any tick mark and while holding the left mouse button 4443 down move them to where you want them to 4444 be displayed (press the s key for Sqrt(I) mode to reset to the 4445 defaults). With multiple phases, clicking on the 2nd phase, 4446 etc. changes the vertical spacing between tickmarks. 4447 4448 <DT>Drag the difference curve 4449 <DD>When the "normal" obs-calc plot is shown (as opposed to the 4450 preferred "w" mode plot where (obs-calc)/sigma is displayed, click 4451 on any point in the difference curve and while holding the left mouse button 4452 down move the curve to where you want it to 4453 be displayed (press the s key for Sqrt(I) mode to reset it to the 4454 default). 4455 4456 <DT>Display/edit histogram information 4457 <DD>By selecting different tree items within the current 4458 histogram, it is possible to display and in some cases edit 4459 information associated with the histogram. 4460 <a href="#otherPWDR">See above.</a> 4461 4462 <DT>Create a Publication-ready plot 4463 <DD>Press the green "P" button to generate a customizable version 4464 of the displayed plot that can be exported at high resolution. 4413 4465 </DL> 4414 < P style='margin-left:.5in'>4466 <a name="PWDR_keylist"></a><P style='margin-left:.5in'> 4415 4467 The following key press characters are defined (not for all plot 4416 4468 modes). These actions can also be initiated from the <B>Key Press</B> … … 4419 4471 <I>For line plots:</I></H4> 4420 4472 <DL style='margin-left:0.75in'> 4473 <DT><B> s: Sqrt(I) on/off</b><dd>changes the y-axis to be the 4474 square-root of the intensity. The tick mark and the 4475 difference curve location is reset. 4476 <DT><B> w: toggle diff plot mode</b><dd>for the pattern selected from the 4477 data tree, this will replace the difference (obs-calc) curve with 4478 the differences divided by their standard uncertainty (esd) values 4479 [(obs-calc)/sigma], which shows the significance of the deviations 4480 in the fit of the pattern. <i>(Recommended)</I>. 4421 4481 <DT><B> b: subtract background</b><dd>Subtracts the fitted 4422 4482 background from the powder pattern. Pressing this again turns the … … 4434 4494 x-axis scale. May not be very useful with data over a wide range. 4435 4495 4436 <DT><B> w: toggle diff plot</b><dd>for the pattern selected from the 4437 data tree, this will replace the difference (obs-calc) curve with 4438 the differences divided by their standard uncertainty (esd) values, 4439 which shows the significance of the deviations. 4496 <DT><B> e: set excluded region</b> 4497 <dd>Defines a new excluded region: press the "e" key with the mouse on 4498 one side of the region. Move the mouse to the other side and and 4499 press "e" again. The region markers (magenta dashed lines) can be 4500 dragged to new positions. Available only when 4501 the <a href="#PWDR_Limits">Limits</a> tree entry is selected. 4502 <DT><B> x: show excluded region</b> 4503 <dd>Normally all observed data is plotted. When the "x" key is 4504 pressed, data inside excluded regions are not shown. 4505 <DT><B> .: scaling diagnostic</b> 4506 <dd>When the '.' key is pressed, data are plotted where the intensity 4507 scale shows the equivalent number of counts so that uncertainty on 4508 each point is the sqrt(I). 4509 <DT><B> g: grid lines</b> 4510 <dd>Draws vertical and horizontal grid lines at all axis label 4511 positions. 4512 <DT><B> a: add magnification region</b> 4513 <dd>Adds a magnification region to the plot and sets the magnification 4514 amount to x2. This can be edited (or deleted) in the table that is 4515 shown when the main PWDR tree entry is selected. 4516 4517 4440 4518 </DL> 4441 4519 4442 <P style='margin-left:.5in'> 4443 For line plots with more than one powder pattern:</p> 4520 <H4 style='margin-left:.5in'><I> 4521 For line plots with more than one powder pattern: 4522 </I></H4> 4444 4523 <DL style='margin-left:0.75in'> 4445 4524 <DT><B> c: contour on/off</b><dd>if multiple powder profiles, then a contour plot is shown 4446 4525 of the observed intensities. All data sets must be the same length as the first 4447 4526 one to be included in the contour plot. 4527 <DT><B> S: set color Scheme</b> 4528 <dd>Select the color map used for contour plots 4529 4448 4530 <DT><B> m: toggle single/multiple plot</b><dd>for multiple powder profiles, this will show only the one 4449 selected from the data tree. The offset options are not active.4531 selected from the data tree. The offset options (below) are not active. 4450 4532 <DT><B>f: select data</b><dd>Allows only some powder patterns to be 4451 4533 plotted, rather than all. 4452 <DT><B> +: no selection</b><dd>for multiple powder profiles, only the observed curve is shown.</span></p> 4534 <DT><B> +,=: no selection</b><dd>for multiple powder profiles, only 4535 the observed curve is shown when this mode is turned on ('+' and '=' 4536 do exactly the same thing).</span></p> 4537 <DT><B> /: normalize</b><dd>for multiple powder profiles, all 4538 diffraction datasets are normalized so that the maximum intensity is 1. 4539 </span></p> 4453 4540 </DL> 4454 4541 4455 <P style='margin-left:.5in'>For line plots in waterfall mode (multiple 4456 patterns are shown) these key press items are defined:</p> 4542 <H4 style='margin-left:.5in'><I> 4543 Offset modes for line plots in waterfall mode (multiple patterns only): 4544 </I></H4> 4457 4545 <DL style='margin-left:0.75in'> 4458 4546 <DT><B>l: offset left</b><dd> … … 4465 4553 offset to the right (or decrease the left offset.) 4466 4554 4467 <DT><B> d: offset down</b><dd>for a waterfall plot of multiple 4468 powder profiles, increase the offset down. 4469 4470 <DT><B> u: offset up</b><dd>for a waterfall plot of multiple powder 4555 <DT><B> d,D: offset down</b><dd>for a waterfall plot of multiple 4556 powder profiles, increase the offset down. 4557 (D does the same as d but to a much larger amount) 4558 4559 <DT><B> u,U: offset up</b><dd>for a waterfall plot of multiple powder 4471 4560 profiles, increase the offset up. 4561 (U does the same as u but to a much larger amount) 4472 4562 4473 4563 <DT><B> o: reset offset</b><dd>for a waterfall plot of multiple powder … … 4501 4591 </DL> 4502 4592 4593 <H4 style='margin-left:.5in'><I> 4594 For display of reflections from magnetic unit space groups 4595 </I></H4> 4596 <DL style='margin-left:0.75in'> 4597 <DT><B>j: show next; reset use flag</b><dd> 4598 Show the next magnetic space group in the list, clearing the "Use" 4599 flag for the currently displayed space group. 4600 (available from Index Unit Cells only). 4601 <DT><B>k: show next</b><dd> 4602 Show the next magnetic space group in the list. The "Use" 4603 flag for the currently displayed space group is unchanged. 4604 (available from Index Unit Cells only). 4605 </DL> 4503 4606 <h4 style='margin-left:0.25in'><a name="PWDR_Comments"><u>Comments</u></a></h4> 4504 4607 … … 4575 4678 4576 4679 <p class=MsoNormal style='margin-left:.5in'><span style='mso-fareast-font-family: 4577 "Times New Roman"'>1). A continuous empirical function (‘<span class=SpellE>chebyschev</span>’, 4680 "Times New Roman"'>1). A continuous empirical function (‘chebyschev’, 4681 ‘chebyschev-1’, 4578 4682 ‘cosine’, ‘<span class=SpellE>lin</span> interpolate’, ‘inv interpolate’ & 4579 4683 ‘log interpolate’). The latter three select fixed points with spacing that is 4580 4684 equal, inversely equal or equal on a log scale of the x-coordinate. The set of 4581 4685 magnitudes at each point then comprise the background variables. All are 4582 refined when refine is selected.<o:p></o:p></span></p> 4686 refined when refine is selected. 4687 Note that ‘chebyschev-1' is a better choice than ‘chebyschev’. 4688 <o:p></o:p></span></p> 4583 4689 4584 4690 <p class=MsoNormal style='margin-left:.5in;tab-stops:0in'><span … … 4624 4730 <p class=MsoNormal style='margin-left:.5in'><span style='mso-fareast-font-family: 4625 4731 "Times New Roman"'>where <span class=GramE>A,R</span> & U are the possible 4626 variables and can be individually selected as desired; Q = 2</span><span 4627 style='font-family:Symbol;mso-fareast-font-family:"Times New Roman"'>p</span><span 4628 style='mso-fareast-font-family:"Times New Roman"'>/d.<o:p></o:p></span></p> 4732 variables and can be individually selected as desired; Q = 2π/d.</p> 4629 4733 4630 4734 <p class=MsoNormal style='margin-left:.5in'><span style='mso-fareast-font-family: … … 7560 7664 using Sphinx. </span></p> 7561 7665 7562 <P> </P> 7666 <A name="fullrmc"> 7667 <h3><strong>Access to fullrmc</strong></h3> 7668 </a> 7669 <p class=MsoNormal> 7670 The fullrmc program is a large-box pair distribution function modeling 7671 library developed by Bachir Aoun ["Fullrmc, a Rigid Body Reverse Monte 7672 Carlo Modeling Package Enabled with Machine Learning and Artificial 7673 Intelligence", B. Aoun, <I>Jour. Comp. Chem.</I> <B>(2016)</B>, 37, 7674 1102-1111. 7675 DOI: <a href="https://doi.org/10.1002/jcc.24304">10.1002/jcc.24304</a>]. 7676 7677 Extensive information about fullrmc is found, including a number of 7678 explanatory videos, along with the source code on GitHub: 7679 <A href="https://bachiraoun.github.io/fullrmc/"> 7680 https://bachiraoun.github.io/fullrmc/</A>. 7681 7682 Use of fullrmc requires a set of Python packages that can be installed along 7683 with the packages needed for GSAS-II, but Windows and MacOS users will 7684 likely find it easier to install a pre-compiled version of fullrmc by 7685 downloading it <A 7686 href="https://drive.google.com/drive/folders/10hxmQviKoMaW9R4MxsaiDyPSretxr_P7"> 7687 from here</A>. 7688 7689 To locate a version of Python containing fullrmc, the following 7690 locations are checked (in the order specified): 7691 <OL> 7692 <LI>The GSAS-II <a href=#Preferences>configuration variable</a> 7693 <tt>fullrmc_exec</tt> can point to a Python image. 7694 <LI>The Python interpreter running GSAS-II is checked if fullrmc can 7695 be imported 7696 <LI>The location where GSAS-II is installed, the location where 7697 Python is installed, the location where the GSAS-II binaries are 7698 found, the current default location and all directories in the 7699 system path are all checked for a file named 7700 <tt>"fullrmc*macOS*i386-64bit"</tt> (MacOS), <tt>"fullrmc*.exe"</tt> (Windows) or 7701 <tt>"fullrmc*"</tt> (Linux). 7702 </OL> 7703 </p> 7704 7563 7705 7564 7706 <hr size=2 width="100%" align=center> 7565 7707 <hr size=2 width="100%" align=center> 7566 7708 7567 <!-- hhmts start -->Last modified: Sun Feb 28 12:09:25 CST 2021 <!-- hhmts end -->7709 <!-- hhmts start -->Last modified: Tue Apr 27 22:09:18 CDT 2021 <!-- hhmts end --> 7568 7710 7569 7711 </div>
Note: See TracChangeset
for help on using the changeset viewer.