Skip to content

Commit

Permalink
revert from fp->f for now, consistency matters more
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjackson committed Jun 23, 2023
1 parent 8ca0805 commit 55fca93
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions euphonic/readers/castep.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class _FrequencyBlock(NamedTuple):


def _read_frequency_block(
fp: TextIO,
f: TextIO,
n_branches: int,
extra_columns: Optional[List] = None,
terminator: str = ''
Expand All @@ -352,7 +352,7 @@ def _read_frequency_block(
Parameters
----------
fp
f
File object in read mode for the file containing the data
n_branches
Expected number of frequencies (i.e. phonon branches)
Expand Down Expand Up @@ -387,7 +387,7 @@ def _read_frequency_block(
None if extra_columns is None, otherwise a shape
(len(extra_columns), n_modes) float ndarray
"""
qpt_line = fp.readline()
qpt_line = f.readline()
if qpt_line == terminator:
return None

Expand All @@ -402,7 +402,7 @@ def _read_frequency_block(
else:
direction = None

freq_lines = [fp.readline().split()
freq_lines = [f.readline().split()
for i in range(n_branches)]
freq_col = 1
qfreq = np.array([float(line[freq_col]) for line in freq_lines])
Expand Down

0 comments on commit 55fca93

Please sign in to comment.