Skip to content

Commit

Permalink
Version bump. Added Drillhole structure and accessors for properties …
Browse files Browse the repository at this point in the history
…and surveys
  • Loading branch information
RoyThomsonMonash committed May 16, 2022
1 parent ff73ccb commit c9ba08c
Show file tree
Hide file tree
Showing 7 changed files with 231 additions and 192 deletions.
396 changes: 212 additions & 184 deletions LoopProjectFile/DataCollection.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LoopProjectFile/ExtractedInformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def SetDrillholeLog(root, data, append=False, verbose=False):
else:
eiGroup = resp["value"]

resp = GetStratigraphicInformationGroup(root)
resp = GetDrillholeDescriptionGroup(root)
if resp["errorFlag"]:
siGroup = eiGroup.createGroup("DrillholeInformation")
siGroup.createDimension("index",None)
Expand Down
17 changes: 14 additions & 3 deletions LoopProjectFile/LoopProjectFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ def Set(filename, element, **kwargs):
elif element == "contactsAppend": response = DataCollection.SetContacts(root, append=True, **kwargs)
elif element == "drillholeObservations": response = DataCollection.SetDrillholeObservations(root, **kwargs)
elif element == "drillholeObservationsAppend": response = DataCollection.SetDrillholeObservations(root, append=True, **kwargs)
elif element == "drillholeSurveys": response = DataCollection.SetDrillholeSurveys(root, **kwargs)
elif element == "drillholeSurveysAppend": response = DataCollection.SetDrillholeSurveys(root, append=True, **kwargs)
elif element == "drillholeProperties": response = DataCollection.SetDrillholeProperties(root, **kwargs)
elif element == "drillholePropertiesAppend": response = DataCollection.SetDrillholeProperties(root, append=True, **kwargs)
elif element == "stratigraphicLog": response = ExtractedInformation.SetStratigraphicLog(root, **kwargs)
elif element == "stratigraphicLogAppend": response = ExtractedInformation.SetStratigraphicLog(root, append=True, **kwargs)
elif element == "faultLog": response = ExtractedInformation.SetFaultLog(root, **kwargs)
Expand Down Expand Up @@ -307,6 +311,8 @@ def Get(filename, element, **kwargs):
elif element == "stratigraphicObservations": response = DataCollection.GetStratigraphicObservations(root,**kwargs)
elif element == "contacts": response = DataCollection.GetContacts(root,**kwargs)
elif element == "drillholeObservations": response = DataCollection.GetDrillholeObservations(root,**kwargs)
elif element == "drillholeSurveys": response = DataCollection.GetDrillholeSurveys(root,**kwargs)
elif element == "drillholeProperties": response = DataCollection.GetDrillholeProperties(root,**kwargs)
elif element == "stratigraphicLog": response = ExtractedInformation.GetStratigraphicLog(root,**kwargs)
elif element == "faultLog": response = ExtractedInformation.GetFaultLog(root,**kwargs)
elif element == "foldLog": response = ExtractedInformation.GetFoldLog(root,**kwargs)
Expand Down Expand Up @@ -438,10 +444,15 @@ def CheckFileValid(filename, verbose=False):
drillholeDescriptionType = numpy.dtype([('collarId','<u4'),('holeName','S30'),
('surfaceX','<f8'),('surfaceY','<f8'),('surfaceZ','<f8')])

drillholePropertyType = numpy.dtype([('collarId','<u4'),('propertyName','S30'),('propertyValue','S80')])

drillholeObservationType = numpy.dtype([('collarId','<u4'),
('topX','<f8'),('topY','<f8'),('topZ','<f8'), ('layerId','<u4'),
('baseX','<f8'),('baseY','<f8'),('baseZ','<f8'),
('beddingDip','<f8'),('beddingAzimuth','<f8')])
('fromX','<f8'),('fromY','<f8'),('fromZ','<f8'), ('layerId','<u4'),
('toX','<f8'),('toY','<f8'),('toZ','<f8'),('from','<f8'),('to','<f8'),
('propertyCode','S30'),('property1','S30'),('property2','S30'),('unit','S30')])

drillholeSurveyType = numpy.dtype([('collarId','<u4'),('depth','<f8'),
('angle1','<f8'),('angle2','<f8'),('unit','S30')])

def ConvertDataFrame(df,dtype):
if isinstance(df,pandas.DataFrame):
Expand Down
2 changes: 1 addition & 1 deletion LoopProjectFile/Version.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def LoopVersion():
List of current version [Major,Minor,Sub]version
"""
return [0,0,19]
return [0,0,20]

# Check version of Loop Project File is valid
def CheckVersionValid(rootGroup, verbose=False):
Expand Down
2 changes: 1 addition & 1 deletion LoopProjectFile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
faultEventType, foldEventType, discontinuityEventType, foliationEventType, \
faultObservationType, foldObservationType, foliationObservationType, discontinuityObservationType, \
stratigraphicLayerType, stratigraphicObservationType, contactObservationType, \
eventRelationshipType, drillholeObservationType, drillholeDescriptionType, \
eventRelationshipType, drillholeObservationType, drillholeDescriptionType, drillholeSurveyType, drillholePropertyType, \
ConvertDataFrame, ConvertToDataFrame, EventType, EventRelationshipType, CheckFileIsLoopProjectFile
from .Permutations import Event, perm, ApproxPerm, CalcPermutation, checkBrokenRules, checkBrokenEventRules
from .LoopProjectFileUtils import ToCsv, FromCsv, ElementToCsv, ElementFromCsv, ElementToDataframe, ElementFromDataframe
Expand Down
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "loopprojectfile" %}
{% set version = "0.0.19" %}
{% set version = "0.0.20" %}

package:
name: "{{ name|lower }}"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
setup(
name="LoopProjectFile",
packages=find_packages(),
version="0.0.19",
version="0.0.20",
)

0 comments on commit c9ba08c

Please sign in to comment.