GithubHelp home page GithubHelp logo

emanuelhuber / rgpr Goto Github PK

View Code? Open in Web Editor NEW
155.0 20.0 46.0 161.61 MB

Ground-penetrating radar (GPR) data processing and visualisation: a free and open-source software package (R language)

Home Page: http://emanuelhuber.github.io/RGPR/

R 100.00%
gpr r ground-penetrating-radar geophysics signal-processing gpr-data software package processing signal process open-source dsp

rgpr's People

Contributors

emanuelhuber avatar guifh avatar jlasky avatar pmlefeuvre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rgpr's Issues

Is the dielectric value in dzx files used?

I see how the dzx/dzt files are parsed, especially the global properties, at this line. It doesn't look like the dielectric value is used in RGPR, but I figured I should ask just in case I am missing it. If it is not used, is there a reason why? Perhaps it is assumed the user will do something with the dielectric value before or after the data has been processed by RGPR. Any help would be appreciated.

package ‘rgpr’ is not available for this version of R (4.0.x)

Hi,
I have just found out that the master version of rgpr is not available on R v4.04. The link below hints that parts of the compiled code is tied to R 3.6.x and not R 4.0.x. The dev version can be installed with:

library(devtools)
dev_mode(on=T)
install_github("emanuelhuber/RGPR")

On my newly 11.2.2 OSX the dev version first failed to install the library e1071 and sf, which got fixed by updating my xcode and gdal (due to my recent upgrade):
xcode-select --install
brew update gdal

Cheers,
PiM

Master version warnings

> install.packages('rgpr')
Warning in install.packages :
  package ‘rgpr’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

Dev version: error library e1071

> library(devtools)
Loading required package: usethis
> dev_mode(on=T)
Dev mode: ON
d> install_github("emanuelhuber/RGPR")
Downloading GitHub repo emanuelhuber/RGPR@HEAD
Installing 41 packages: tidyselect, generics, cpp11, dplyr, isoband, gtable, DEoptimR, proxy, e1071, geometries, rapidjsonr, dotCall64, data.table, tidyr, ggplot2, robustbase, backports, units, DBI, classInt, sfheaders, jsonify, maps, spam, awsMethods, misc3d, plotly, robfilter, RConics, checkmate, XML, sf, geojsonsf, MBA, fields, adimpro, plot3D, mmand, Cairo, signal, rgeos
Installing packages into ‘/Users/pmlefeuv/R-dev’
(as ‘lib’ is unspecified)

  There are binary versions available but the source versions are later:
      binary source needs_compilation
e1071  1.7-5  1.7-6              TRUE
sf     0.9-7  0.9-8              TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes
[...]
installing the source packages ‘e1071’, ‘sf’
[...]
* installing *source* package ‘e1071’ ...
** package ‘e1071’ successfully unpacked and MD5 sums checked
** using staged installation
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
checking for g++... g++
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.
ERROR: configuration failed for package ‘e1071’
* removing ‘/Users/pmlefeuv/R-dev/e1071’
Error: Failed to install 'RGPR' from GitHub:
  (converted from warning) installation of package ‘e1071’ had non-zero exit status

2nd attempt: gdal error

[...]
* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: clang
configure: CXX: clang++ -mmacosx-version-min=10.13 -std=gnu++11
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘sf’
* removing ‘/Users/pmlefeuv/R-dev/sf’
Error: Failed to install 'RGPR' from GitHub:
  (converted from warning) installation of package ‘sf’ had non-zero exit status

Plateform OSX 11.2.2 and
R version 4.0.4 (2021-02-15) -- "Lost Library Book"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)

interger or integer

Possible coding error in readIDS.R

lines 78 through 88 refer to "interger" rather than "integer" which is throwing an error when run.

Read/import GPR data in DT1 format

Hi there, what is the main steps to read my own GPR data in DT1 format?
I have using the function "readGPR()" to import GPR data into R, but I cann't clearly understand what I should do.
Can you please provides me the main steps to importing and reading my data?
Also, it is says: Error in readGPR(line1.DT1) : could not find function "readGPR" when I am typing (readGPR(line1.dt1)
Thank you.

rgdal and cairo error

ERROR: dependencies ‘rgdal’, ‘Cairo’ are not available for package ‘RGPR’

  • removing ‘/usr/local/lib/R/site-library/RGPR’
    Installation failed: Command failed (1)

migration without coordinates

To apply the Kirchhoff migration, you need to set coordinates to your GPR data. Here is how you can do that:

#------------------------------------------------------#

read GPR data

x <- readGPR("myfile.rd3")

#------------------------------------------------------#

define the coordinates

xCoords <- pos(x)
yCoords <- rep(0, ncol(x)) # set to zero
zCoords <- rep(0, ncol(x)) # set to zero

#------------------------------------------------------#

set the coordinates

coord(x) <- cbind(xCoords, yCoords, zCoords) # that creates a nx3 matrix

#------------------------------------------------------#

run the Kirchhoff migration

...

Topography and time to depth conversion

Hi @emanuelhuber ,

thanks for such needed package.
I have a question regarding coordinates addition and time to depth conversion.
1- It is possible to use another velocity, other than 0.1 m/ns, to convert to depth? if yes, how? if not, will this tool be available soon?
2- I have some GPR lines with GPS measurements each ~5m. I understand that I have to add this coordinates using readFID and then interpPos. I managed to do this steps but I can not plot the data with its corresponding topography, the following message appears:

plot(DCGh3, addTopo = TRUE)
Trace vertical position set to zero!
time to depth conversion with constant velocity (0.1 m/ns)
Error in v^2 : non-numeric argument for binary operator

Any thoughts on how to fix it?

Thanks! #

Reading Sensors & Software GPZ files

So pleased to see an open-source alternative to GPR data processing. I was just curious if you have thought about adding the ability to read Sensors and Software files with a .GPZ extension? I'm familiar with their .hd and .DT1 files, but wasn't sure if it would be possible to read the newer GPZ files.

Changing axes from time to distance

Is there an official way to change the axes from time to distance? The input format is GSSI. Each of my dzt files has an accompanying dzx file, which contains information like this:

<?xml version="1.0" encoding="UTF-8"?>
<DZX xmlns="www.geophysical.com/DZX/1.02">
<GlobalProperties>
   <verticalUnit>in</verticalUnit>
   <horizontalUnit>in</horizontalUnit>
   <dielectric>6.500000</dielectric>
</GlobalProperties>
<DataCollection>
   <system>SS_MINI</system>
   <antennaType>HiRes</antennaType>
   <WheelSize>NORMAL</WheelSize>
   <softwareVersion>1 4 4 0</softwareVersion>
   <collectionMode>2D</collectionMode>
   <sLastUpdateDate>MAR_7_2023</sLastUpdateDate>
   <sLastUpdateTime>10:42:12</sLastUpdateTime>
   <BaseGain>13.500000</BaseGain>
   <BaseGainAdj>0.100000</BaseGainAdj>
   <TrOffset>36757</TrOffset>
   <dielectricMethod>0</dielectricMethod>
   <Ctable>3</Ctable>
   <Xtable>2</Xtable>
</DataCollection>
</DZX>

It says the vertical and horizontal units are in, but I think the time units in the default plot are correct. I can't find an API in RGPR that helps with unit conversion.

Typo: ascci2num should be ascii2num

hd$sweep_marker_1 <- ascci2num(dsn, 6)

I write mostly in python so I'm not 100% sure if I'm reading this correctly, but I believe that there is an error in the function call ascci2num which appears on lines 38 and 90 in the readIDS.R code.

It is referenced elsewhere as ascii2num

Function firstBreakToTime0() not clear

In the website about the time correction is reported that:

Here we define
t0=tfb−a/c0(1)

where a is the distance between the transmitter and receiver and c0 is the wave velocity in the media between the transmitter and receiver (in our case, air)

but then the function firstBreakToTime0() is called using the data x :

t0 <- firstBreakToTime0(tfb, x)

So now the question. Is x passed as argument the distance a between Tx and Rx? Or is x the scan data read using the function readGPR() ?

I tried both and I found out that:
putting the distance between Tx and Rx (in my case 0.08 m), I get:

Fehler in firstBreakToTime0(tfb, 0.08) :
versuche einen Slot "antsep" von einem Objekt der einfachen Klasse ("numeric") ohne Slots anzufordern

putting the scan data read by readGPR() I get an useful t0 but to me it doesn't make the explanation above any sense

Thanks!

Problem installing RGPR

Hi guys,

I need to install the tool on my ubuntu 18.10 system. But I get the following error:

> devtools::install_github("emanuelhuber/RGPR")
Downloading GitHub repo emanuelhuber/RGPR@master
Skipping 1 packages not available: XML
Installing 41 packages: sp, rgdal, rgeos, signal, colorspace, Cairo, rgl, mmand, e1071, plot3D, adimpro, raster, fields, MBA, geojsonsf, sf, XML, checkmate, RConics, robfilter, httpuv, xtable, sourcetools, fastmap, shiny, miniUI, webshot, dotCall64, rapidjsonr, DEoptimR, manipulateWidget, misc3d, awsMethods, spam, maps, jsonify, sfheaders, classInt, DBI, units, robustbase
Installing packages into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Fehler: Failed to install 'RGPR' from GitHub:
  (converted from Warning) package ‘XML’ is not available (for R version 3.6.3)

What did I do wrong?

Import GPR data link is broken

On the Readme.md file the Import GPR data link is broken

See tutorial [Import GPR data](http://emanuelhuber.github.io/RGPR/00_RGPR_import_data/).

Thanks!

TC

Error on bits2volt function: using argument "nbits" while it says it was supposed to be "nBytes"

Hello Emanuel!

First of all, thank you so much for putting this library together. I am pretty sure that all the community appreciates it. A round of applause to you and contributors. 👏 👏 👏

It is my first time trying this library though. I have been using python for reading GSSI files, but I believe that few of the functions available here might be very useful to me. So I decided to give it a try. However, I experienced a couple of very interesting issues. I installed the library using devtools as suggested. First issue I found was a problem similar to what was reported HERE, but restarting R fixed it. I do not believe it is an issue related to your library.

The other issue happened after installation when I was trying to open a GSSI DZT file. R produced the following error:

Error in bits2volt(Vmax = Vmax, nbits = x$hd$BITS) : unused argument (nbits = x$hd$BITS)

I found it kinda interesting so I did some digging. It seems that that instead of nbits the function should use nBytes. But what is weird the most is that in the global.R file you have in the repo, it does say 'nbits' (which is also stated on the function Description). On the other hand, when I do '?bits2volt' in my machine it list this specific argument as 'nBytes'.

It might be an issue with GitHub. The easiest solution I found was to I download the zip and follow THIS stack overflow answer, which ends up being:

unzip("path to zip")
file.rename("RGPR-master", "RGPR")
shell("R CMD build RGPR")
install.packages("RGPR_0.0.7.tar.gz", repos = NULL)

It worked for me. This might be a one time thing. But just in case you want to look into or if anyone else encounters the same problems, I am leaving this here!

Cheers!

Plot contrast settings

Is there a way to change the contrast of the data points? It is difficult to see some of the lines in the plot using the RGPR library, but I don't have the same issue with commercial software. I'm not sure if there are other factors at play or what I could be doing differently. Here is an example of the RGPR output:

image

`timeCorOffset()`

  1. Replace "You must first define the antenna separation" by "You must first define the velocity model":

    if(is.null(x@vel) || length(x@vel)==0){
      stop("You must first define the antenna separation",
            "with `vel(x)<-...`!")
    }
  2. Set antsep to zero because the traces were "virtually recorded without offset".

Antenna separation GSSI Structure Scan XT device

Anyway I have some real data files from a GSSI Structure Scan XT device
(here attached). To me the antenna separation should be about 80 mm in that
device.
But importing datas I get 0:

 str(x1)
 Formal class 'GPR' [package "RGPR"] with 29 slots
   ..@ version     : chr "0.2"
   ..@ data        : num [1:510, 1:903] 0.00041 0.000358 0.00031 0.000349
 0.000295 ...
   ..@ traces      : int [1:903] 1 2 3 4 5 6 7 8 9 10 ...
   ..@ depth       : num [1:510] 0 0.00803 0.01607 0.0241 0.03214 ...
   ..@ pos         : num [1:903] 0 0.00125 0.0025 0.00375 0.005 ...
   ..@ time0       : num [1:903] 0 0 0 0 0 0 0 0 0 0 ...
   ..@ time        : num [1:903] 1.43e+09 1.43e+09 1.43e+09 1.43e+09
 1.43e+09 ...
   ..@ fid         : chr [1:903] "" "" "" "" ...
   ..@ ann         : chr(0)
   ..@ coord       : logi[0 , 0 ]
   ..@ rec         : logi[0 , 0 ]
   ..@ trans       : logi[0 , 0 ]
   ..@ coordref    : num(0)
   ..@ freq        : num 0
   ..@ dz          : num 0.00803
   ..@ dx          : num 0.00125
   ..@ antsep      : num 0
   ..@ name        : chr "FILE__008"
   ..@ description : chr ""
   ..@ filepath    : chr "rawGPR/FILE__008.DZT"
   ..@ depthunit   : chr "ns"
   ..@ posunit     : chr "cm"
   ..@ surveymode  : chr "reflection"
   ..@ date        : chr "2015-03-05"
   ..@ crs         : chr(0)
   ..@ proc        : chr(0)
   ..@ vel         :List of 1
   .. ..$ : num 0.12
   ..@ delineations: list()
   ..@ hd          :List of 24
   .. ..$ TAG       : int 2047
   .. ..$ OFFSETDATA: num 131072
   .. ..$ NSAMP     : int 512
   .. ..$ BITS      : int 32
   .. ..$ ZERO      : int 3
   .. ..$ SPS       : num 250
   .. ..$ SPM       : num 800
   .. ..$ MPM       : num 5
   .. ..$ POSITION  : num -0.411
   .. ..$ RANGE     : num 4.11
   .. ..$ NPASS     : int 0
   .. ..$ DATE      : chr "2015-03-05"
   .. ..$ TIME      : chr "27:01:00"
   .. ..$ OFFSETTEXT: int 512
   .. ..$ NTEXT     : int 0
   .. ..$ PROC      : int 128
   .. ..$ NPROC     : int 13
   .. ..$ NCHAN     : int 1
   .. ..$ EPSR      : num 6
   .. ..$ TOP       : num 0.0246
   .. ..$ DEPTH     : num 0.246
   .. ..$ ANT       : chr "none"
   .. ..$ VSBYTE    : int 28672
   .. ..$ MRKS      : int [1:903] 0 0 0 0 0 0 0 0 0 0 ..
```.
could be that not every device is going to write that parameter into the
file?
Which measure unit has that parameter? Meter [m] or millimeter [mm]. In
other words: should I put there 0.08 or 80 if the antenna separation 80 mm
is?

Thank you very much.
Davide

Can't read .dt1 files

I'm having issues reading some Sensors and Software dt1 files. They were extracted from the newer GPZ format (just a renamed zip file). The profiles look fine in pulseEKKO so the data is ok. The HD file looks normal, as far as I can tell. RGPR, GPRpy and RADAN (version 6 so quite old) will open the file with no problem but the plots are nonsense. I've attached an example line for investigation.
liney47.zip

Taking the firstBreak() function inspect

Dear Emanuel,

I was taking a look to the function:firstBreak()
and found something "strange".

Let's say I have the following signal (1D plot) from my device:

Test_plot

As you can see the signal is going to cross the +/- 0.005 mV lines (just image them parallel to the time axis ;) ) in the time window from 0 to 1 ns.

Running the function firstBreak() as following:

firstBreak(x1, w = 1.5, method = "threshold", thr = 0.005 )

I would expect that, since thr = 0.005, the output of this function should be something like (for the trace on the picture):
t1 ~= 0.3 ns (for +0.005 mV)
t2 ~= 0.6 ns (for -0.005 mV)

But I get only a vector with all Zeros (for all traces)....

Rising the value of thr up to 0.5:

firstBreak(x1, w = 1.5, method = "threshold", thr = 0.5 )

I get a vector like [0.423, 0.441, 0.448 ..] anyway... not Zero.

That's really strange to me, since, as the 1D plot shows, the signal is never crossing the +/-0.5mV lines....

Why rising the threshold I get useful values from the function?

Many many thanks

Error While Fitting Hyperbola

Dear Mr. Emanuel Huber,
While fitting hyperbola using your RGPR codes, I received the below error:

hyp <- hyperbolaFit(xy)
Warning message:
In sqrt(1/coef1[2]) : NaNs produced

I would appreciate if you could help to debug this.
Thank you very much!

Best wish,
hhhhappyyyy

Possible misunderstanding in the tutorial

Hi Emanuel,

according to the output of the function str(), you should get the parameter dz, which is the sampling rate of the radar

> str(A)
Formal class 'GPR' [package "RGPR"] with 29 slots
  
  ..@ dz          : num 0.00893   # Sampling rate

But in the migration section dz is the vertical resolution and its unit is "m"

Topographic Kirchhoff migration.
Vertical resolution of the migrated data, we set dz = 0.01m.

Is it just a coincidence and dz means two different things? Or they are the same thing and dz is the sampling rate even in the second case?

Possible misunderstranding in the tutorial

Thank for your reply. That's clear the question.

But I found another possible misunderstanding regarding the function dewow()
In the wiki it is reported that:

Dewow

Remove the low-frequency components (the so-called “wow”) of the GPR record using:

a running median filter (type = "runnmed")
a running mean filter (type = "runmean")
a Gaussian filter (type = "Gaussian")

For the two first cases, the argument w is the length of the filter in time units.

But looking at the help

?dewow

I get:

w [numeric(1)] If type = runmed, MAD or runmean, window length of the filter in trace unit; If type = Gaussian, standard deviation in trace unit. If w = NULL, w is estimated as five times the wavelength corresponding to the maximum frequency of x (estimated with spec)

Now it is not clear to me what w should be.

Let's say I have in my function w = 5 (time unit [ns]).
Does it mean that the window length of the filter goes from 0 ns to 5 ns all over the traces?
Or does it mean, that the window length of the filter for every n trace [n-5, n-4, n-3, ...0, n+1, n+2,.., n+5] goes from 0 ns till the end of the vertical time windows?

Regards

Originally posted by @wilhem in #33 (comment)

Request for Support: Adding Support for Easy Radar USA's .gpr Format

Dear Mr. Emanuel,

I hope this message finds you well. I am writing to request your assistance in implementing support for the .gpr format radar files generated by Easy Radar USA, a company specializing in radar solutions.

Our team is currently working on a project that involves analyzing radar data, and we have recently started using Easy Radar USA's equipment. However, we have encountered a challenge as our existing tools and software do not have built-in support for the .gpr format.

Best regards,

fengzireng
2023214173934.zip

Header definition problem in readIDS.r

Thanks for the quick attension to the interger typo bug I noted.

Seems to be another issue in the actual routine however as I am now getting a header error.

x <- readGPR(dsn = "LID10001.dt", verbose = TRUE)
'R' not yet implemented!
Error in DDhd1[i] <- readBin(dsn, what = integer(), n = 1, size = 2) :
replacement has length zero.

I have attached the IDS file I am reading in as my guess is there is a formatting difference between the IDS file and what the routine is expecting.

Regards

Neil

LID10001.dt.zip

Object 'fdo' not found

Trying to estimate the fresnel zone I get the following error:

spec2D(x4):fdo
Fehler: Objekt 'fdo' nicht gefunden
spec(x4):fdo
Fehler: Objekt 'fdo' nicht gefunden

The issue arises even using the method spec2D() instead of spec().
Any idea, how to fix it?
Thanks

Error While Reading .DZT File

Dear Mr. Emanuel Huber,

While reading the .dzt file using your RGPR codes, I received the below error:

Error in UseMethod("xmlValue") :
no applicable method for 'xmlValue' applied to an object of class "list"

I would appreciate if you could help to debug this.

Thank you very much!

Possible bug in the function spec()

Dear guys,

I recognize something that to me doesn't make any sense. Perhaps the function spec() needs to be checked again.

The problem is the following:
I load a dataset using:

A1 <- readGPR( dsn = filename, verbose = TRUE )

and then I apply the DCshift removal, dewow, and time zero correction. So I'm now at this step:

A4 <- time0Cor( A3, method = "linear" )

doing:

spec(A4)

I get the following spectrum:

Plot_1

As you can see the spectrum starts from 0 Hz, which is correct. The peak frequency is about 1500-2000 MHz, which is also correct.

Now let's do another step:

A5 <- timeCorOffset(A4)

which shifts all the traces to the zero.

Doing again the same command as before:

spec(A5)

I get the following spectrum:

Plot_2

Please note that in the second plot the frequency was shifted to zero! Now is the peak around 0 Hz, which doesn't make any sense. A time zero correction should move the time axis to 0, but the frequency should stay the same and not be changed through the time zero correction.
To me there should be a difference plotting:

plot(A4)
plot(A5)

but not plotting:


spec(A4)
spec(A5)

Am I wrong? Or the function spec() should be rechecked?

I can't import data

I am trying to import MALA GPR data (*.rd3 format) through

library(RGPR)
x <- readGPR(dsn = "erickprueba250mhz10.rd3")

but I got

Error in matrix(NA, nrow = npt, ncol = ntr) :
invalid 'ncol' value (too large or NA)
In addition: Warning message:
In strsplit(headRAD[i], ":") : input string 1 is invalid in this locale

I dont know what is wrong with that. I am sending the files, if you can help me with that.

erickprueba250mhz10.zip

Marcel

White line in the plot

Hi everybody,

I'm trying to understand what the white line on the plot means.

[url=https://imgbb.com/][img]https://i.ibb.co/5xFvhMD/Bildschirmfoto.png[/img][/url]

I put a red arrow at about 3 ns on the left side of the plot.
There is any explanation about the meaning of the white line? I couldn't find anything on github.

Another question: it seems that the speed of light is going to be calculated every time I plot something. How it is calculated?

Many thanks

code cleanup recommendation

At the top of fitHyperbola, you do a check on the dimensions of x. (when y= NULL). May I suggest instead using the function grDevices::xy.coords instead? It's a bit cleaner.

Can't read .rd7 files.

Whenever I try to read .rd7 files, I get this error.

Error in if (ntr * npt != fileLength) { : argument is of length zero In addition: Warning message: In scan(dsn, what = character(), strip.white = TRUE, quiet = TRUE, : embedded nul(s) found in input

RGPR has been really helpful for some older .rd3 files, kudos to you for that Emanuel.

However, as of now, some rd3 files give this error.

Error in if (ntr * npt != fileLength) { : argument is of length zero
In addition: Warning message:
In scan(dsn, what = character(), strip.white = TRUE, quiet = TRUE, :
embedded nul(s) found in input

Horizontal resolution

Hello, I'm having difficulty setting the display of files, especially the horizontal resolution. The file opens well but it is stretched over the entire length of the window whereas I would like the scan density, for example 4 scans/cm or 8 scans/cm (indicated in the GSSI's DZX files for an XT for example) to be respected. I don't know if RGPR is capable of displaying a file of several meters (30m)? I would like the display to be 6 meters long and if the file is larger then it will need to be scrolled with the mouse or click on a scroll bar. I have been stuck on this issue for a long time and I have not found any information. Thank in advance..

Error in initialize(value, ...) : object 'velocity' not found

I am trying to read in .dt1 files from Sensors and Software that worked fine just a week or so ago, and I am getting the error message in the title. I have tried several different files, in RStudio, Colab, and Visual Studio code and got the same issue.
Here is the line of code that is throwing up the error

rawGPRData <- readGPR(dsn = gprPath)

I also tried it with the sample frenke data and had the same issue.

Hope to know more about the algorithm behind the hyperbola fitting

Dear Mr. Emanuel Huber,

Thanks so much for creating this! It helps me a lot.

I desperately want to know the math / algorithm behind the hyperbola fitting. Cuz I've been doing research on hyperbolic fitting. Is it the hough transform, neural networks or algorithm based on orthogonal distance? Could you please explain me the details of how this function( hyperbolaFit() ) is implemented? Or could you please tell me what books or literature referred to this function?

Hoping to hear from you soon!
Best wishes!

Sincerely,
hhhhappyyyy

Slice Interpolation Issue

I'm having an issue interpolating horizontal GPR slices where no matter what value I use for 'h' I get identical results. I admit that I don't know R and have no idea how mba.surf() uses 'h', but I think this line in the GPRcube class may be the problem:

h = 6

getArgs() in traceShift()

Looks like there might be an issue with the function getArgs() in traceShift(). This error message only occurs when the traceShift() function is wrapped in another function. Everything is fine when I run the function alone. I couldn't figure out what is the exact problem...

Error in FUN(X[[i]], ...) : object 't0' not found
FUN(X[[i]], ...) 
FUN(X[[i]], ...) 
lapply(X = X, FUN = FUN, ...) 
sapply(arg[3:narg], eval) 
getArgs() 
traceShift(A2, ts = (-t0), method = "cubic", crop = FALSE) 

GPRsurvey::reverse()

TODO:
reverse data according to

  • their names: XLINE / YLINE / XYLINE
  • id (reverse(x, id = c(2, 5, 9))
  • arg. "zigzag" (equivalent to reverse(x, id = c(seq(1, length.out = length(x), by = 2))
  • orientation of the data

plot `SGY` error

Today I used the same approach and found that drawing the image reported an error

input

library(RGPR)
search()
x <- readGPR(dsn = "~/Recordings/3.sgy")

print(x)
plot(x)

output

Don't hesitate to contact me if you have any question:
[email protected]

Attaching package: ‘RGPR’

The following object is masked from ‘package:graphics’:

    clip

Antenna frequency set to 0 MHz. Set it with 'antfreq(x) <- ... '
Antenna separation set to 0 m. Set it with 'antsep(x) <- ... '
*** Class GPR ***
 name        = 3
 filepath    = ~/Recordings/3.sgy
 description = 
 survey date = 2023-01-25
 reflection, 0 MHz, Window length = 49.64 ns, dz = 0.085 ns
 4559 traces, 4558 m
 ****************
Error in base::rowSums(x, na.rm = na.rm, dims = dims, ...) : 
  'x' must be an array of at least two dimensions

However, when I use plotFast it draws the image successfully!

I was able to use plot plotting normally on the day 2023-9-24, I didn't do anything during this period, I don't know what happened, please tell me what to do, thanks!
3.zip

RD3 data not properly imported

First, thanks for the package!

I am trying to import Mala data (.rd3), but have found that the resulting data (650 stacks) are just the same stack repeated over and over again. I've tried looking at the underlying code via: getMethod("readGPR", signature = c(fPath="character")) and RGPR:::readRD3. I get stuck debugging on lines 17 and 18: nTr <- .getHD(hRAD, "LAST TRACE") and nPt <- .getHD(hRAD, "SAMPLES"). I don't know enough about the details of R (or the S4 method) to know what the dot in front of the function getHD() means, or how to access its behavior. If you have suggestions I might be able to figure out how to do pull request and suggest a change to the code.

Cheers!

coords()<-

Bug in

coords(mySurvey) <- TOPOList

There is no check that the number of coordinates in TOPOList[[1]] is equal to the number of traces in mySurvey[[1]] !!! In other words:

if( nrow(TOPOList[[1]]) != ncol(mySurvey[[1]]) ) stop("error!")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.