Skip to content

Commit d2451d6

Browse files
committed
find undocumented files and update the docs to include most, see #246
1 parent abac2f1 commit d2451d6

File tree

13 files changed

+132
-33
lines changed

13 files changed

+132
-33
lines changed

GSASII/GSASIIdataGUI.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3340,11 +3340,9 @@ class SumDialog(wx.Dialog):
33403340
'''Used to sum images or powder patterns. Allows user to supply
33413341
scale factor(s) when summing data.
33423342
3343-
TODO: clean up the scrolling & resize on this dialog
3344-
Can we use the copy down button from CIF?
3345-
TODO: move it to GSASIIctrlGUI?
3346-
BHT: this class should not be in the middle of the (already too complex)
3347-
GSASIImain class.
3343+
TODO: clean up the scrolling & resize on this dialog. Can we use the copy down button from CIF?
3344+
TODO: move it to GSASIIctrlGUI? (BHT) this class should not be in
3345+
the middle of the (already too complex) GSASIImain class.
33483346
'''
33493347
def __init__(self,parent,title,text,dataType,data,dataList,Limits=None):
33503348
wx.Dialog.__init__(self,parent,-1,title,size=(400,250),

GSASII/GSASIIimage.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,18 @@
4646

4747
def peneCorr(tth,dep,dist):
4848
''' Compute empirical position correction due to detector absorption
49+
4950
:param float/array tth: angle between detector normal & scattered ray vector
5051
:param float dep: coefficient
5152
:param float dist: sample to detector surface in mm
52-
:returns: float/array distance: correction for penetration'''
53+
:returns: float/array distance: correction for penetration
54+
'''
5355

5456
return dep*(1.-npcosd(tth))*dist**2/1000. #best one
5557

5658
def GetTthP(x,y,parmDict):
5759
''' Compute angle between detector normal & sample scattering ray vector
60+
5861
:param float/array x: detector x-position in mm
5962
:param float/array y: detector y-position in mm
6063
:param dict parmDict: dictionary of detector orientation parameters in fitting routine

GSASII/GSASIIphsGUI2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# -*- coding: utf-8 -*-
22
#GSASII - phase data display routines
33
'''
4-
5-
Routines for Phase dataframes follow. Only Update routines are here
4+
Routines for Phase dataframes follow. Only a few Update routines are here
65
all others are in GSASIIphsGUI.py
76
'''
87
import os

GSASII/GSASIIrmcGUI.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
# -*- coding: utf-8 -*-
2-
"""
3-
Created on Sun Jul 6 14:27:24 2025
4-
5-
@author: vondreele
6-
"""
7-
81
# -*- coding: utf-8 -*-
92
#GSASII - phase data display routines
103
'''
114
12-
Routines for Phase/RMC follow. Only Update routines are here
13-
all others are in GSASIIphsGUI.py
5+
Routines for Phase/RMC follow. Only the UpdateRMC routine is here.
6+
All others are in GSASIIphsGUI.py
147
'''
158
import os
169
import wx

GSASII/PlotXNFF.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#PlotXNFF.py
33
'''
44
*PlotXNFF: Check x-ray & neutron form factor computation*
5-
=========================================
5+
===========================================================
66
77
Use this to check form factors used in x-ray & neutron scattering
88

GSASII/imports/G2img_pixirad_1ID_16bit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# -*- coding: utf-8 -*-
22
'''
3-
*Module G2img_1ID_32bit_TIFsum.py: 1ID normalized 16bit Pixirad TIF for rapid access measurement*
4-
--------------------------------------------------
5-
6-
Adaptation of G2img_1ID_32bit_TIFsum.py revision 4902 for use with the 1ID SAXS pixirad.
3+
*Module G2img_pixirad_1ID_16bit.py: 16-bit Pixirad TIF*
4+
----------------------------------------------------------
75
6+
Adaptation of G2img_1ID_32bit_TIFsum.py for use with the 1ID SAXS pixirad.
7+
Used at 1-ID with normalized 16bit Pixirad TIF for rapid access measurement
88
'''
99

1010
from __future__ import division, print_function

docs/find_undoc.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import git
77

88
# get list of documented files (misses out on data files -- with no functions or classes)
9-
import glob
9+
#import glob
1010
loc = os.path.dirname(os.path.realpath(__file__)) # where is the documentation?
1111
G2loc = os.path.join(loc,'..')
1212

@@ -16,17 +16,25 @@
1616
for fil in glob.glob(os.path.join(loc,'source/*.rst')):
1717
for line in open(fil,'r').readlines():
1818
if line.strip().startswith('.. automodule::'):
19-
documented.append(line.strip().split('::')[1].strip())
19+
name = line.strip().split('::')[1].strip()
20+
for prefix in ('GSASII.','tests.','imports.','exports.','install.'):
21+
if name.startswith(prefix):
22+
name = name.replace(prefix,'')
23+
documented.append(name)
2024

2125
undoc = []
2226
G2repo = git.Repo(G2loc)
2327
for entry in G2repo.commit().tree.traverse():
2428
fil = entry.path
2529
if not fil.endswith('.py'): continue
2630
if os.path.dirname(fil) not in (
27-
'GSASII','GSASII/imports','GSASII/exports','GSASII/install'):
31+
'GSASII','GSASII/imports','GSASII/exports',
32+
#'GSASII/install',
33+
'tests'):
2834
continue
29-
if os.path.splitext(os.path.split(fil)[1])[0] in documented:
35+
sfil = os.path.splitext(os.path.split(fil)[1])[0]
36+
if sfil.startswith('__'): continue
37+
if sfil in documented:
3038
#print(fil+' doc')
3139
continue
3240
else:

docs/source/GSASIIGUI.rst

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ data editing panel.
1515
GSASIIdataGUI Classes & Routines
1616
---------------------------------------
1717

18+
.. automodule:: GSASII.G2
19+
:members:
20+
1821
.. automodule:: GSASII.GSASIIdataGUI
1922
:members:
2023

@@ -47,23 +50,36 @@ GSASIIseqGUI Classes & Routines
4750
:members:
4851

4952
---------------------------
50-
*GSASIIphsGUI: Phase GUI*
53+
*Phase GUI files*
5154
---------------------------
5255

53-
Module to create the GUI for display of phase information
56+
Routines create the GUI for display of phase information
5457
in the data display window when a phase is selected.
5558
Phase information is stored in one or more
5659
:ref:`Phase Tree Item <Phase_table>` objects.
5760
Note that there are functions
5861
that respond to some tabs in the phase GUI in other modules
59-
(such as GSASIIddata).
62+
(such as GSASIIddata). This is large enough that it has been split
63+
into three files.
6064

6165
GSASIIphsGUI Classes & Routines
6266
---------------------------------------
6367

6468
.. automodule:: GSASII.GSASIIphsGUI
6569
:members:
6670

71+
GSASIIphsGUI2 Classes & Routines
72+
---------------------------------------
73+
74+
.. automodule:: GSASII.GSASIIphsGUI2
75+
:members:
76+
77+
GSASIIrmcGUI Classes & Routines
78+
---------------------------------------
79+
80+
.. automodule:: GSASII.GSASIIrmcGUI
81+
:members:
82+
6783
--------------------------------------------
6884
*GSASIIddataGUI: Phase Diffraction Data GUI*
6985
--------------------------------------------
@@ -215,3 +231,11 @@ Absorb Classes & Routines
215231

216232
.. automodule:: GSASII.Absorb
217233
:members:
234+
235+
236+
-------------------------------------------------
237+
*PlotXNFF: Show Form Factors*
238+
-------------------------------------------------
239+
240+
.. automodule:: GSASII.PlotXNFF
241+
:members:

docs/source/GSASIIutil.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,39 @@ John Badger, J. Appl. Cryst. (2019) 52, 937-944.
148148
*tutorialIndex: index to GSAS-II tutorials*
149149
--------------------------------------------
150150

151+
The file `tutorialIndex.py` provides information on what tutorials
152+
are currently available in GSAS-II. The information on this is placed
153+
in this file and all indices to tutorials are generated from this.
154+
151155
tutorialIndex Contents
152156
------------------------------------
153157

154158
.. automodule:: GSASII.tutorialIndex
155159
:members:
156160

161+
--------------------------------------------
162+
*k_vector_search: k-vector utilities*
163+
--------------------------------------------
164+
165+
This contains routines used to perform k-vector (magnetic scattering
166+
lattice expansion) determination.
167+
168+
k_vector_search Contents
169+
------------------------------------
170+
171+
.. automodule:: GSASII.k_vector_search
172+
:members:
173+
174+
--------------------------------------------
175+
*pathHacking utilities*
176+
--------------------------------------------
177+
178+
When GSAS-II is installed via Git (gsas2main for example, as opposed
179+
to pixi), the location of GSAS-II is "outside" the Python file
180+
structure. It then becomes necessary to set the Python `sys.path`
181+
variable to find GSAS-II files. This practice is discouraged and
182+
commands to do this are "exiled" to file `pathHacking.py`.
183+
184+
.. automodule:: GSASII.pathHacking
185+
:members:
186+

docs/source/imports.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,15 @@ A short routine to read in a phase from an xyz Cartesian coordinate file
341341
.. automodule:: GSASII.imports.G2phase_xyz
342342
:members:
343343

344+
*Module G2phase_RRUFF: read from RRUFF database*
345+
-------------------------------------------------------
346+
347+
A short routine to read in a phase from the RRUFF database
348+
in the native format it uses.
349+
350+
.. automodule:: GSASII.imports.G2phase_RRUFF
351+
:members:
352+
344353
======================================
345354
Powder Data Importer Routines
346355
======================================
@@ -444,6 +453,16 @@ column-oriented variable. The only allowed extensions for this are
444453
.. automodule:: GSASII.imports.G2pwd_rigaku
445454
:members:
446455

456+
*Module G2pwd_MIDAS: Read integration results from MIDAS*
457+
----------------------------------------------------------------
458+
459+
The MIDAS package can be used on to read and integrate images,
460+
particularly at APS Sector 1. This importer reads the Zarr container
461+
files created by MIDAS.
462+
463+
.. automodule:: GSASII.imports.G2pwd_MIDAS
464+
:members:
465+
447466

448467
======================================
449468
Single Crystal Data Importer Routines
@@ -610,6 +629,14 @@ images, all are read.
610629
.. automodule:: GSASII.imports.G2img_SFRM
611630
:members:
612631

632+
*Module G2img_pixirad_1ID_16bit: Pixirad detector*
633+
----------------------------------------------------------------
634+
635+
Reads images from the pixirad detector in use as APS Sector 1.
636+
637+
.. automodule:: GSASII.imports.G2img_pixirad_1ID_16bit
638+
:members:
639+
613640

614641
======================================================
615642
Pair Distribution Function (PDF) Importer Routines
@@ -659,3 +686,8 @@ file.
659686
.. automodule:: GSASII.imports.G2rfd_Panalytical
660687
:members:
661688

689+
*Module G2rdf_rigaku: reflectometry data from a Rigaku file*
690+
----------------------------------------------------------------
691+
692+
.. automodule:: GSASII.imports.G2rfd_rigaku
693+
:members:

0 commit comments

Comments
 (0)