Skip to content

Commit b23ee04

Browse files
committedApr 1, 2021
Let assume the file format wont change in the future.
1 parent d46e46f commit b23ee04

5 files changed

+5
-5
lines changed
 

‎pynch/ame_mass_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class AMEMassFile(Parse):
88
def __init__(self, year: int):
99
"""Setup up the values."""
1010
super(AMEMassFile, self).__init__()
11-
if year != 2020:
11+
if year < 2020:
1212
self.START_A = 16
1313
self.END_A = 19
1414
self.START_Z = 11

‎pynch/ame_reaction_1_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class AMEReactionFileOne(Parse):
88
def __init__(self, year: int):
99
"""Setup the values that locate the variable."""
1010
super(AMEReactionFileOne, self).__init__()
11-
if year != 2020:
11+
if year < 2020:
1212
self.START_R1_A = 1
1313
self.END_R1_A = 4
1414
self.START_R1_Z = 8

‎pynch/ame_reaction_2_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class AMEReactionFileTwo(Parse):
88
def __init__(self, year: int):
99
"""Setup the values that locate the variables."""
1010
super(AMEReactionFileTwo, self).__init__()
11-
if year != 2020:
11+
if year < 2020:
1212
self.START_R2_A = 1
1313
self.END_R2_A = 4
1414
self.START_R2_Z = 8

‎pynch/nubase_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class NubaseFile(Parse):
1414
def __init__(self, year: int):
1515
"""Setup the values that locate the variable."""
1616
super(NubaseFile, self).__init__()
17-
if year != 2020:
17+
if year < 2020:
1818
self.START_A = 0
1919
self.END_A = 3
2020
self.START_Z = 4

‎pynch/parse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _read_as_int(self, line: str, start: int, end: int, default: int = None) ->
3636
return int(data) if data else default
3737

3838
def _read_as_float(self, line: str, start: int, end: int, default: float = None) -> typing.Union[float, None]:
39-
"""Slice the string and return as an float, or None if the slice is empty."""
39+
"""Slice the string and return as a float, or None if the slice is empty or just a '*' character."""
4040
data = line[start:end].strip()
4141
return float(data) if data and data != "*" else default
4242

0 commit comments

Comments
 (0)
Please sign in to comment.