Jump to content


Photo

Error message with lightImage and preprocessLight

FLightR and TwGeos

  • Please log in to reply
4 replies to this topic

#1 egow

egow
  • Society Members
  • 3 posts
  • United States

Posted 15 August 2017 - 08:53 AM

I'm trying to calibrate from a light image from a Bas tag. I get an error when I call: lightImage(d.lux, offset = offset) and twl<-preprocessLight(d.lux, threshold, offset, lmax = 64, map=TRUE)

 

This is the error I get: 

 

Error in if (as.numeric(tmin) > as.numeric(date[1])) tmin <- tmin - 24 *  : 

  missing value where TRUE/FALSE needed
 
I'm not sure why I'm getting this error. I have about 23 .lig files that give me this error. The others seem to work. When I look at the .lig files I don't see any differences between the ones that are working and the ones that are not. 
 
Anyway to fix this? I'm not able to process the geol data without this working. 
 
Thanks in advance. 


#2 Louise de Raad

Louise de Raad
  • General Members
  • 13 posts
  • Inverness,
  • United Kingdom

Posted 16 August 2017 - 04:24 AM

Have you read in your .lig files as d.lux (rather than d.lig)?



#3 egow

egow
  • Society Members
  • 3 posts
  • United States

Posted 16 August 2017 - 08:29 AM

Yes, I've tried both ways and still the same error.



#4 Mendez

Mendez
  • General Members
  • 10 posts
  • Newark, Delaware,
  • United States

Posted 30 August 2017 - 11:36 AM

Hi Egow,

 

I believe I received the same error whenever I was trying to process my .lig files. I think the error occurs because the preprocesslight function is looking for tagdata that only has a column for Date and Light, but the .lig files give you four columns. I was able to remedy the situation by using:

Lig<-readLig("file.lig")
Bird<-Lig[,c(-1,-3)]

This way the .lig file that you are using for the preprocess light function only has the Date and Light column that is required. 

 

I'm not sure if you are having the same problem that i was having but this worked for me.

 

Hope this helps,

Devin



#5 Simeon

Simeon
  • General Members
  • 5 posts
  • Sempach, Switzerland,
  • Switzerland

Posted 19 September 2017 - 12:27 AM

Hi,

 

It could indeed be that there are too many columns but most likely the columns have the same name. They need to be "Date" and "Light" (with capital 1st letter).

 

Another issue could be, that the time format is not right. Best to see check str(Lig) and head(Lig) to see whether it all makes sense.

 

ALSO, there is a package that is based on BAStag but has some further developments and bug fixes (e.g. TwGeos - github.com/slisovski/TwGeos).

 

Cheers,

Simeon






0 user(s) are reading this topic

0 members(s), 0 guests(s) and 0 anonymous member(s)