Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
robinthibaut committed Mar 7, 2021
1 parent dea1aac commit ad78070
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 23 deletions.
10 changes: 5 additions & 5 deletions pysgems/algorithms/Variogram_model.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<variogram_model nugget="0.06" structures_count="1" >
<structure_1 contribution="0.3" type="Spherical" >
<ranges max="54000" medium="0" min="0" />
<angles x="0" y="0" z="0" />
</structure_1>
<variogram_model nugget="0.06" structures_count="1">
<structure_1 contribution="0.3" type="Spherical">
<ranges max="54000" medium="0" min="0"/>
<angles x="0" y="0" z="0"/>
</structure_1>
</variogram_model>
20 changes: 19 additions & 1 deletion pysgems/algorithms/kriging.xml
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
<parameters> <algorithm name="kriging_mean" /> <Variogram nugget="0" structures_count="1" > <structure_1 contribution="1" type="Spherical" > <ranges max="100" medium="50" min="20" /> <angles x="0" y="0" z="0" /> </structure_1> </Variogram> <Grid_Name value="computation_grid" region="" /> <Property_Name value="test" /> <Kriging_Type type="Ordinary Kriging (OK)" > <parameters /> </Kriging_Type> <Hard_Data grid="sgems" region="" property="ag" /> <Min_Conditioning_Data value="7" /> <Max_Conditioning_Data value="12" /> <Search_Ellipsoid value="120 70 20 0 0 0" /> <AdvancedSearch use_advanced_search="0"></AdvancedSearch> </parameters>
<parameters>
<algorithm name="kriging_mean"/>
<Variogram nugget="0" structures_count="1">
<structure_1 contribution="1" type="Spherical">
<ranges max="100" medium="50" min="20"/>
<angles x="0" y="0" z="0"/>
</structure_1>
</Variogram>
<Grid_Name value="computation_grid" region=""/>
<Property_Name value="test"/>
<Kriging_Type type="Ordinary Kriging (OK)">
<parameters/>
</Kriging_Type>
<Hard_Data grid="sgems" region="" property="ag"/>
<Min_Conditioning_Data value="7"/>
<Max_Conditioning_Data value="12"/>
<Search_Ellipsoid value="120 70 20 0 0 0"/>
<AdvancedSearch use_advanced_search="0"></AdvancedSearch>
</parameters>
26 changes: 25 additions & 1 deletion pysgems/algorithms/sgsim.xml
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
<parameters> <algorithm name="sgsim" /> <Grid_Name value="hk" /> <Property_Name value="hk" /> <Nb_Realizations value="1" /> <Seed value="534708" /> <Kriging_Type value="Simple Kriging (SK)" /> <Trend value="0 0 0 0 0 0 0 0 0" /> <Local_Mean_Property value="0" /> <Assign_Hard_Data value="1" /> <Hard_Data grid="hd" property="hard" /> <Max_Conditioning_Data value="15" /> <Search_Ellipsoid value="50 50 50 0 0 0" /> <Use_Target_Histogram value="0" /> <nonParamCdf ref_on_file="1" ref_on_grid="0" break_ties="0" filename="0" grid="th" property="thv"> <LTI_type function="Power" extreme="-0.1" omega="3" /> <UTI_type function="Power" extreme="0.1" omega="0.333" /> </nonParamCdf> <Variogram nugget="0" structures_count="1"> <structure_1 contribution="1" type="Spherical"> <ranges max="100" medium="50" min="25" /> <angles x="0" y="0" z="0" /> </structure_1> </Variogram></parameters>
<parameters>
<algorithm name="sgsim"/>
<Grid_Name value="hk"/>
<Property_Name value="hk"/>
<Nb_Realizations value="1"/>
<Seed value="534708"/>
<Kriging_Type value="Simple Kriging (SK)"/>
<Trend value="0 0 0 0 0 0 0 0 0"/>
<Local_Mean_Property value="0"/>
<Assign_Hard_Data value="1"/>
<Hard_Data grid="hd" property="hard"/>
<Max_Conditioning_Data value="15"/>
<Search_Ellipsoid value="50 50 50 0 0 0"/>
<Use_Target_Histogram value="0"/>
<nonParamCdf ref_on_file="1" ref_on_grid="0" break_ties="0" filename="0" grid="th" property="thv">
<LTI_type function="Power" extreme="-0.1" omega="3"/>
<UTI_type function="Power" extreme="0.1" omega="0.333"/>
</nonParamCdf>
<Variogram nugget="0" structures_count="1">
<structure_1 contribution="1" type="Spherical">
<ranges max="100" medium="50" min="25"/>
<angles x="0" y="0" z="0"/>
</structure_1>
</Variogram>
</parameters>
24 changes: 12 additions & 12 deletions pysgems/dis/sgdis.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import time
from os.path import join as jp

import pandas as pd
import numpy as np
import pandas as pd
from loguru import logger

from pysgems.base.packbase import Package
Expand Down Expand Up @@ -68,17 +68,17 @@ def get_node(r: int, c: int, h: int) -> int:

class Discretize(Package):
def __init__(
self,
project,
dx: float = 1,
dy: float = 1,
dz: float = 0,
xo: float = None,
yo: float = None,
zo: float = None,
x_lim: float = None,
y_lim: float = None,
z_lim: float = None,
self,
project,
dx: float = 1,
dy: float = 1,
dz: float = 0,
xo: float = None,
yo: float = None,
zo: float = None,
x_lim: float = None,
y_lim: float = None,
z_lim: float = None,
):
"""
Constructs the grid geometry. The user can not control directly the number of rows and columns
Expand Down
4 changes: 2 additions & 2 deletions pysgems/io/sgio.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import struct
from os.path import join as jp

from loguru import logger
import numpy as np
import pandas as pd
from loguru import logger

from pysgems.base.packbase import Package

Expand Down Expand Up @@ -198,6 +198,6 @@ def export_01(self, features: list = None):
ps_name = jp(self.res_dir, pp) # Path of binary file
write_point_set(ps_name, subframe) # Write binary file
if (pp not in self.parent.object_file_names
): # Adding features name to load them within sgems
): # Adding features name to load them within sgems
self.parent.object_file_names.append(pp)
logger.info(f"Feature {pp} exported to binary file")
2 changes: 1 addition & 1 deletion pysgems/plot/sgplots.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (c) 2020. Robin Thibaut, Ghent University
import warnings
from os.path import join as jp

import matplotlib.pyplot as plt
import numpy as np
import warnings
from loguru import logger

from pysgems.base.packbase import Package
Expand Down
2 changes: 1 addition & 1 deletion pysgems/sgems/sg.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self,
check_env: bool = True,
**kwargs):

logger.add(jp(res_dir, f"{project_name}.log"))
logger.add(jp(project_wd, f"{project_name}.log"), rotation="100 MB")
logger.info(f"Project {project_name} initiated")

if check_env:
Expand Down

0 comments on commit ad78070

Please sign in to comment.