Skip to content

Commit

Permalink
core: Changed temp in kelvin to temp in celcius
Browse files Browse the repository at this point in the history
  • Loading branch information
Somerandomguy10111 committed May 28, 2024
1 parent 57de886 commit abdaaf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xrdpattern/core/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def crystallite_size(self) -> float:

@property
def temp_in_celcius(self) -> float:
return self.powder.temp_in_kelvin
return self.powder.temp_in_celcius

@property
def crystal_structure(self) -> CrystalStructure:
Expand Down Expand Up @@ -155,7 +155,7 @@ def as_list(self) -> list[float]:
class PowderProperties:
crystal_structure: CrystalStructure
crystallite_size: float = 500
temp_in_kelvin : int = 293
temp_in_celcius : int = 20


class LabelTensor(Tensor):
Expand Down
2 changes: 1 addition & 1 deletion xrdpattern/parsing/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_float(key: str) -> Optional[float]:
secondary_wavelength=get_float('ALPHA2'),
secondary_to_primary=get_float('ALPHA_RATIO')
)
experiment.powder.temp_in_kelvin = get_float('TEMP_CELCIUS') + 273.15
experiment.powder.temp_in_celcius = get_float('TEMP_CELCIUS')

return experiment

Expand Down

0 comments on commit abdaaf9

Please sign in to comment.