Skip to content

Commit 97879a9

Browse files
Sai Krishnasevyharris
Sai Krishna
authored andcommitted
ChemKED class now successfully readstemperature column from jsr yaml
1 parent 78a41a7 commit 97879a9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: pyked/chemked.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __init__(self, yaml_file=None, dict_input=None, *, skip_validation=False):
130130
for point in self._properties['datapoints']:
131131
csv_file = os.path.join(os.path.split(yaml_file)[0], point['csvfile'])
132132
csv_df= pd.read_csv(csv_file)
133-
self.datapoints.extend(SpeciesProfileDataPoint(point, csv_df))
133+
self.datapoints.append(SpeciesProfileDataPoint(point, csv_df))
134134

135135

136136
self.reference = Reference(
@@ -605,9 +605,9 @@ def process_column(self, properties, csv_df):
605605
Process a column data and return as a list of units.Quantity objects
606606
csv_df is a Pandas DataFrame.
607607
"""
608-
column_name = properties['column-name']
608+
column_name = properties[0]['column-name']
609609
data_list = []
610-
for value in df[column_name]:
610+
for value in csv_df[column_name]:
611611
for p in properties:
612612
units = p.get('units', '')
613613
if units: break

Diff for: pyked/tests/testfile_jsr1.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ datapoints:
4545
- uncertainty-type: absolute
4646
uncertainty: 0.01 bar # made up for testing
4747
reactor-volume:
48-
- 0.000095 m3
48+
- 0.095 litres
4949
residence-time:
5050
- 2 s
5151
inlet-composition:

0 commit comments

Comments
 (0)