Skip to content

Commit

Permalink
Fixed Data
Browse files Browse the repository at this point in the history
  • Loading branch information
nick5435 committed Apr 27, 2017
1 parent 88b3935 commit 295808d
Show file tree
Hide file tree
Showing 18 changed files with 2,448 additions and 48,740 deletions.
2,772 changes: 1,290 additions & 1,482 deletions ThermoPyle/ThermoPyle.c

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions ThermoPyle/ThermoPyle.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ class ThermoFluid:
self.make_units()
self.clean()
self.make_meta()
@classmethod

def make_units(self) -> None:
"""(Re)make the units list"""
self.units = {}
for var in self.data.columns:
self.units[var] = get(str(var), UNITS, "UnknownVar")

@classmethod

def make_meta(self) -> None:
"""
(Re)make the metadata object
Expand All @@ -155,7 +155,7 @@ class ThermoFluid:
"units": self.units
})

@classmethod

def refresh(self) -> None:
"""
Refreshes the object, remakes meta, cleans data, remakes units.
Expand All @@ -165,7 +165,7 @@ class ThermoFluid:
self.clean()
self.make_meta()

@classmethod

def add_column(self, variables: Union[List[Text], Text]) -> None:
"""
Adds a column to the dataframe
Expand Down Expand Up @@ -199,7 +199,7 @@ class ThermoFluid:
self.make_units()
self.make_meta()
@classmethod
def clean(self) -> None:
"""Re-cleans data"""
if "P" in self.vars:
Expand All @@ -213,7 +213,7 @@ class ThermoFluid:
if "U" in self.vars:
self.data = self.data[self.data["U"] >= 0.0]
@classmethod
def write_data(self, path: str="./data/", filename: str="", mode: str="default") -> None:
"""
Does what it says on the tin. Makes a CSV and JSON files and saves them to path given.
Expand Down Expand Up @@ -302,14 +302,14 @@ class CSVFluid:
self.numPoints = self.meta["numPoints"]
self.units = self.meta["units"]
@classmethod
def make_units(self) -> None:
"""(Re)make the units list"""
self.units = {}
for var in self.data.columns:
self.units[var] = get(str(var), UNITS, "UnknownVar")
@classmethod
def make_meta(self) -> None:
"""
(Re)make the metadata object
Expand All @@ -327,7 +327,7 @@ class CSVFluid:
"colorMap": self.colorMap,
"units": self.units})
@classmethod
def add_column(self, variables: Union[List[Text], Text]) -> None:
"""
Adds a column to the dataframe
Expand Down Expand Up @@ -357,7 +357,7 @@ class CSVFluid:
self.make_units()
self.make_meta()
@classmethod
def refresh(self) -> None:
"""
Refreshes the object, remakes meta, cleans data, remakes units.
Expand All @@ -367,7 +367,7 @@ class CSVFluid:
self.clean()
self.make_meta()
@classmethod
def changeOrder(self, order: List[Text]) -> None:
"""
Changes order of the columns:
Expand Down Expand Up @@ -397,7 +397,7 @@ class CSVFluid:
"""
return deepcopy(self)
@classmethod
def write_data(self, path: str="./data/", filename: str="", mode: str="default") -> None:
"""
Does what it says on the tin. Makes a CSV and JSON files and saves them to path given.
Expand Down Expand Up @@ -442,7 +442,7 @@ class CSVFluid:
with open(path + middle_string + ".json", mode="w+", encoding="utf-8") as f:
json.dump(dict(self.meta), f)
@classmethod
def add_column(self, variables: Union[List[Text], Text]) -> None:
"""
Adds a column to the dataframe
Expand Down
47,090 changes: 0 additions & 47,090 deletions finalData/Water_T-217_P-217_U__withVolume.csv

This file was deleted.

1 change: 0 additions & 1 deletion finalData/Water_T-217_P-217_U__withVolume.json

This file was deleted.

3 changes: 0 additions & 3 deletions finalData/Water_T-217_P-217_U_with_Volume_and_ders.csv

This file was deleted.

1 change: 0 additions & 1 deletion finalData/Water_T-217_P-217_U_with_Volume_and_ders.json

This file was deleted.

3 changes: 0 additions & 3 deletions finalData/Water_T-217_P-217_U_with_derivatives.csv

This file was deleted.

1 change: 0 additions & 1 deletion finalData/Water_T-217_P-217_U_with_derivatives.json

This file was deleted.

3 changes: 3 additions & 0 deletions finalData/Water_T-217_P-217_U_with_derivatives_and_volume.csv
Git LFS file not shown

0 comments on commit 295808d

Please sign in to comment.