well-log-toolkit 0.1.120__py3-none-any.whl → 0.1.121__py3-none-any.whl

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.
@@ -104,7 +104,10 @@ class LasFile:
104
104
  source_name: str = 'external_df',
105
105
  unit_mappings: Optional[dict[str, str]] = None,
106
106
  type_mappings: Optional[dict[str, str]] = None,
107
- label_mappings: Optional[dict[str, dict[int, str]]] = None
107
+ label_mappings: Optional[dict[str, dict[int, str]]] = None,
108
+ color_mappings: Optional[dict[str, dict[int, str]]] = None,
109
+ style_mappings: Optional[dict[str, dict[int, str]]] = None,
110
+ thickness_mappings: Optional[dict[str, dict[int, float]]] = None
108
111
  ) -> 'LasFile':
109
112
  """
110
113
  Create a LasFile object from a DataFrame.
@@ -123,6 +126,12 @@ class LasFile:
123
126
  Mapping of column names to 'continuous' or 'discrete'
124
127
  label_mappings : dict[str, dict[int, str]], optional
125
128
  Label mappings for discrete properties
129
+ color_mappings : dict[str, dict[int, str]], optional
130
+ Color mappings for discrete property values
131
+ style_mappings : dict[str, dict[int, str]], optional
132
+ Style mappings for discrete property values
133
+ thickness_mappings : dict[str, dict[int, float]], optional
134
+ Thickness mappings for discrete property values
126
135
 
127
136
  Returns
128
137
  -------
@@ -148,6 +157,9 @@ class LasFile:
148
157
  unit_mappings = unit_mappings or {}
149
158
  type_mappings = type_mappings or {}
150
159
  label_mappings = label_mappings or {}
160
+ color_mappings = color_mappings or {}
161
+ style_mappings = style_mappings or {}
162
+ thickness_mappings = thickness_mappings or {}
151
163
 
152
164
  # Create instance without parsing file
153
165
  instance = cls(source_name, _from_dataframe=True)
@@ -176,7 +188,7 @@ class LasFile:
176
188
  'multiplier': None
177
189
  }
178
190
 
179
- # Set parameter info (discrete labels)
191
+ # Set parameter info (discrete labels and metadata)
180
192
  if label_mappings:
181
193
  discrete_props = ','.join(sorted(label_mappings.keys()))
182
194
  instance.parameter_info['DISCRETE_PROPS'] = discrete_props
@@ -186,6 +198,27 @@ class LasFile:
186
198
  param_name = f"{prop_name}_{value}"
187
199
  instance.parameter_info[param_name] = label
188
200
 
201
+ # Add color mappings to parameter section
202
+ if color_mappings:
203
+ for prop_name, colors in color_mappings.items():
204
+ for value, color in colors.items():
205
+ param_name = f"{prop_name}_{value}_COLOR"
206
+ instance.parameter_info[param_name] = color
207
+
208
+ # Add style mappings to parameter section
209
+ if style_mappings:
210
+ for prop_name, styles in style_mappings.items():
211
+ for value, style in styles.items():
212
+ param_name = f"{prop_name}_{value}_STYLE"
213
+ instance.parameter_info[param_name] = style
214
+
215
+ # Add thickness mappings to parameter section
216
+ if thickness_mappings:
217
+ for prop_name, thicknesses in thickness_mappings.items():
218
+ for value, thickness in thicknesses.items():
219
+ param_name = f"{prop_name}_{value}_THICKNESS"
220
+ instance.parameter_info[param_name] = str(thickness)
221
+
189
222
  # Set data directly
190
223
  instance._data = df.copy()
191
224
 
well_log_toolkit/well.py CHANGED
@@ -2247,7 +2247,7 @@ class Well:
2247
2247
 
2248
2248
  df = pd.DataFrame(data)
2249
2249
 
2250
- # Create LasFile from DataFrame
2250
+ # Create LasFile from DataFrame with all metadata
2251
2251
  las = LasFile.from_dataframe(
2252
2252
  df=df,
2253
2253
  well_name=self.name,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: well-log-toolkit
3
- Version: 0.1.120
3
+ Version: 0.1.121
4
4
  Summary: Fast LAS file processing with lazy loading and filtering for well log analysis
5
5
  Author-email: Kristian dF Kollsgård <kkollsg@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  well_log_toolkit/__init__.py,sha256=ilJAIIhh68pYfD9I3V53juTEJpoMN8oHpcpEFNpuXAQ,3793
2
2
  well_log_toolkit/exceptions.py,sha256=X_fzC7d4yaBFO9Vx74dEIB6xmI9Agi6_bTU3MPxn6ko,985
3
- well_log_toolkit/las_file.py,sha256=yRCIiVbdoqFzoXKRKfx7Lt11INmwB_bXdpHpwVaNpjk,52156
3
+ well_log_toolkit/las_file.py,sha256=Tj0mRfX1aX2s6uug7BBlY1m_mu3G50EGxHGzD0eEedE,53876
4
4
  well_log_toolkit/manager.py,sha256=Mc_zgC9pgbYq82msiAc0KMVmPFbCX90SZK5JfwGY4H4,102422
5
5
  well_log_toolkit/operations.py,sha256=z8j8fGBOwoJGUQFy-Vawjq9nm3OD_dUt0oaNh8yuG7o,18515
6
6
  well_log_toolkit/property.py,sha256=WOzoNQcmHCQ8moIKsnSyLgVC8s4LBu2x5IBXtFzmMe8,76236
@@ -8,8 +8,8 @@ well_log_toolkit/regression.py,sha256=7D3oI-1XVlFb-mOoHTxTTtUHERFyvQSBAzJzAGVoZn
8
8
  well_log_toolkit/statistics.py,sha256=_huPMbv2H3o9ezunjEM94mJknX5wPK8V4nDv2lIZZRw,16814
9
9
  well_log_toolkit/utils.py,sha256=O2KPq4htIoUlL74V2zKftdqqTjRfezU9M-568zPLme0,6866
10
10
  well_log_toolkit/visualization.py,sha256=xb870FG5FghU2gEkqdn1b2NbWNu07oDmFDN1Cx1HIi0,157280
11
- well_log_toolkit/well.py,sha256=-huYBLw_nEmZm_sEAiPq0_az9WFmZ-TyHmM-Vn_vxQk,99591
12
- well_log_toolkit-0.1.120.dist-info/METADATA,sha256=LxF_4YtWXQyNFXG0dOoZ0-SJaN4OJoF5o2CTiUZOS60,59810
13
- well_log_toolkit-0.1.120.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- well_log_toolkit-0.1.120.dist-info/top_level.txt,sha256=BMOo7OKLcZEnjo0wOLMclwzwTbYKYh31I8RGDOGSBdE,17
15
- well_log_toolkit-0.1.120.dist-info/RECORD,,
11
+ well_log_toolkit/well.py,sha256=xPTdVuhlctjinHaFrmLWImAC5JUchXQs9jTazZzdlnU,99609
12
+ well_log_toolkit-0.1.121.dist-info/METADATA,sha256=qXxUw5-wiWwTDjeulBwpuZ2vCuwW0X5r22cL1XOi3e4,59810
13
+ well_log_toolkit-0.1.121.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ well_log_toolkit-0.1.121.dist-info/top_level.txt,sha256=BMOo7OKLcZEnjo0wOLMclwzwTbYKYh31I8RGDOGSBdE,17
15
+ well_log_toolkit-0.1.121.dist-info/RECORD,,