geometallurgy 0.4.5__tar.gz → 0.4.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/PKG-INFO +1 -1
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/base.py +33 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/pyproject.toml +1 -1
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/LICENSE +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/README.md +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/__init__.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/block_model.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/config/__init__.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/config/config_read.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/config/flowsheet_example.yaml +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/config/mc_config.yml +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/data/downloader.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/data/register.csv +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/datasets/__init__.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/datasets/datasets.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/datasets/downloader.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/datasets/register.csv +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/datasets/sample_data.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/extras.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/flowsheet/__init__.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/flowsheet/flowsheet.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/flowsheet/loader.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/flowsheet/operation.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/flowsheet/stream.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/interval_sample.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/io.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/plot.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/profile.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/sample.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/__init__.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/amenability.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/block_model_converter.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/components.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/data.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/interp.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/layout.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/moisture.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/pandas.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/parallel.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/partition.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/sampling.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/size.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/timer.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/utils/viz.py +0 -0
- {geometallurgy-0.4.5 → geometallurgy-0.4.6}/elphick/geomet/validate.py.hide +0 -0
|
@@ -235,6 +235,39 @@ class MassComposition(ABC):
|
|
|
235
235
|
|
|
236
236
|
return self
|
|
237
237
|
|
|
238
|
+
def set_moisture(self, moisture: Union[pd.Series, float, int], mass_to_adjust: Literal['wet', 'dry'] = 'wet') -> MC:
|
|
239
|
+
"""Set the moisture to the specified value
|
|
240
|
+
|
|
241
|
+
A convenience method for an mc object that modifies the concrete mass to deliver the specified moisture.
|
|
242
|
+
|
|
243
|
+
Args:
|
|
244
|
+
moisture: The moisture value to set. Can be a constant or series.
|
|
245
|
+
mass_to_adjust: The mass to adjust, either 'wet' or 'dry'.
|
|
246
|
+
|
|
247
|
+
Returns:
|
|
248
|
+
|
|
249
|
+
"""
|
|
250
|
+
|
|
251
|
+
if not self.moisture_in_scope:
|
|
252
|
+
raise AssertionError("This method is not applicable unless moisture_in_scope property is True.")
|
|
253
|
+
|
|
254
|
+
if isinstance(moisture, float) or isinstance(moisture, int):
|
|
255
|
+
# create a series with the same index as the mass data
|
|
256
|
+
moisture = pd.Series(float(moisture), index=self._mass_data.index)
|
|
257
|
+
elif not isinstance(moisture, pd.Series):
|
|
258
|
+
raise TypeError(f"moisture must be a float or a pd.Series, not {type(moisture)}")
|
|
259
|
+
|
|
260
|
+
if mass_to_adjust == 'wet':
|
|
261
|
+
self._mass_data[self.mass_wet_var] = solve_mass_moisture(mass_dry=self._mass_data[self.mass_dry_var],
|
|
262
|
+
moisture=moisture)
|
|
263
|
+
elif mass_to_adjust == 'dry':
|
|
264
|
+
self._mass_data[self.mass_dry_var] = solve_mass_moisture(mass_wet=self._mass_data[self.mass_wet_var],
|
|
265
|
+
moisture=moisture)
|
|
266
|
+
else:
|
|
267
|
+
raise ValueError(f"mass_to_adjust must be 'wet' or 'dry', not {mass_to_adjust}")
|
|
268
|
+
|
|
269
|
+
return self
|
|
270
|
+
|
|
238
271
|
def plot_parallel(self, color: Optional[str] = None,
|
|
239
272
|
vars_include: Optional[list[str]] = None,
|
|
240
273
|
vars_exclude: Optional[list[str]] = None,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "geometallurgy"
|
|
3
3
|
packages = [{ include = "elphick/geomet" }]
|
|
4
|
-
version = "0.4.
|
|
4
|
+
version = "0.4.6"
|
|
5
5
|
description = "Tools for the geometallurgist"
|
|
6
6
|
authors = ["Greg <11791585+elphick@users.noreply.github.com>"]
|
|
7
7
|
repository = "https://github.com/elphick/geometallurgy"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|