Closed mp-emrld closed 2 years ago
Ali will take a look today
You can try the regex ^(.*?)[(_\[]?([0-9]+)[)\]]?$
i.e. a '?' character after [] in the second group
hint from @MetalnAlloys:
You can try this one ^(.*?)[(_[]?([0-9]+)[)]]?$
@mp-emrld did this get resolved, or does the library still need updating?
@MetalnAlloys, did you work on this at all? If you don't have uncommitted changes, I can attempt to solve this issue. I need to do so in order to tackle this ticket: https://github.com/emerald-geomodelling/Admin/issues/130
@Duke-of-Lizard I have done some work on it. FIgured out two different regex however It would be nice if someone could test it because other than the columns mentioned by @mp-emrld , my knowledge of an xyz file is limited.
Either this ^(.*?)[(_\[]?([0-9]+)[)\]]?$
or ^(.*?)[(_\[]?([0-9]?+)[)\]]?$
would work. Second one works actually very well but fails on a python error i.e. needs some other code changes
* Correction: Second one = `^(.?)[(_[]?([0-9]?)[)]]?$`
I made a commit to fix this: 858a7bd6304f81359d6f23e53f85cf097a3b27ec
https://github.com/emerald-geomodelling/libaarhusxyz/commit/858a7bd6304f81359d6f23e53f85cf097a3b27ec
However, I see some in a comment about how this change may affect parsing of ALC files. Does someone have an example ALC file to do a test with? @redhog or @mp-emrld or @burningsage ?
NOTE: this repo is public and open source, so please contact me directly about example files rather than pasting a link here, please.
The xyz-ascii file with data exported from Aarhus workbench might have EM data in columns named like:
DBDT_Ch1GT1 DBDT_Ch1GT2 DBDT_Ch1GT3 DBDT_Ch1GT4 DBDT_Ch1GT5 DBDT_Ch1GT6 DBDT_Ch1GT7 DBDT_Ch1GT8 DBDT_Ch1GT9 DBDT_Ch1GT10
the regex expression in xyz.py: ´_RE_LAYERCOL = re.compile(r"^(.*?)[([]([0-9]+)[)]]?$")´
dose only find data columns which have the follwing naming pattern:
DBDT_Ch1GT[6]
DBDT_Ch1GT(6)
DBDT_Ch1GT_6
... needs update, should also support
DBDT_Ch1GT6
here
DBDT_Ch1GT
could also berho_i
orresistivity
any other prefixexample data file for testing:
/Volumes/GoogleDrive/Shared drives/PROJECTS/Projects/21041_NO_multiconsult_Grimstad-Sarpsborg_ReInterp/02_Interim/02_AEM-data/02_Pro-and-inv/05_inv-results/d20150717_20220525proc20150717_ManProcForMartin_AVG_export.xyz