Skip to content

Commit ce9c0e6

Browse files
authored
Merge pull request #910 from HEXRD/save-tth-width-none
Correctly save a `tThWidth` of `None`
2 parents 177e3be + 5d9b311 commit ce9c0e6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

hexrd/core/material/material.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ def _readHDFxtal(self, fhdf=DFLT_NAME, xtal=DFLT_NAME):
961961
tThWidth = np.array(gid.get('tThWidth'), dtype=np.float64).item()
962962
tThWidth = np.radians(tThWidth)
963963
else:
964-
tThWidth = Material.DFLT_TTH
964+
tThWidth = None
965965

966966
self._tThWidth = tThWidth
967967

@@ -991,9 +991,7 @@ def dump_material(self, file, path=None):
991991
AtomInfo['hkls'] = self.planeData.getHKLs()
992992
AtomInfo['dmin'] = self.unitcell.dmin
993993
AtomInfo['kev'] = self.beamEnergy.getVal("keV")
994-
if self.planeData.tThWidth is None:
995-
AtomInfo['tThWidth'] = np.degrees(Material.DFLT_TTH)
996-
else:
994+
if self.planeData.tThWidth is not None:
997995
AtomInfo['tThWidth'] = np.degrees(self.planeData.tThWidth)
998996

999997
AtomInfo['pressure'] = self.pressure

0 commit comments

Comments
 (0)