Jump to content


Photo

FlightR calibration error


  • Please log in to reply
2 replies to this topic

#1 egow

egow
  • Society Members
  • 3 posts
  • United States

Posted 30 August 2017 - 01:55 PM

I'm working on calibrating some data in FlightR but I keep getting an error with the "make.calibration" object and am not sure how to fix it? 

 

The error is:

 

Error in Twilight.time.mat.Calib.dawn[-25, ] : 

  incorrect number of dimensions
 
 

Here is my code: 

 

start<-as.POSIXct("2015-06-28", tz="GMT")
end<-as.POSIXct("2016-05-29", tz="GMT")
 
Proc.data<-get.tags.data("TAGS_024_2015_SWTH_000-b.csv", start.date=start, end.date=end)
 
Calibration.periods<-data.frame(calibration.start=as.POSIXct(c(NA,"2015-06-28"), tz="GMT"),
                                calibration.stop=as.POSIXct(c("2016-05-29", NA), tz="GMT"),
                                lon=-148.80441, lat=63.6520)
 
print(Calibration.periods)
 
# create a calibration object 
 
Calibration<-make.calibration(Proc.data, Calibration.periods, likelihood.correction = FALSE)

 

 



#2 L Halpin

L Halpin
  • Society Members
  • 11 posts
  • Vancouver, Canada,
  • Canada

Posted 30 August 2017 - 02:48 PM

Try removing "NA" as follows

 

 

 

Calibration.periods<-data.frame(calibration.start = as.POSIXct(c("2015-06-28"), tz="GMT"),
                                calibration.stop = as.POSIXct(c("2016-05-29"), tz="GMT"),
                                lon=-148.80441, lat=63.6520)
 
 
But your dates look wrong. Are you sure you want to add a year's worth of calibration data?


#3 timlay

timlay
  • Society Members
  • 4 posts
  • Canada

Posted 19 December 2017 - 10:34 AM

Can you let me know how you solved this error?

 

I'm getting the same thing while trying to calibrate my data:

 

Calibration.periods<-data.frame(calibration.start=as.POSIXct("2013-07-10"),
                                calibration.stop=as.POSIXct("2014-07-11"),
                                lon=-64.3431, lat=45.8980) #works fine
 
calibration.parameters<-get.calibration.parameters(Calibration.periods, TAGSbank066,
                                                   model.ageing=F, log.light.borders=log(c(2, 63)), 
                                                   log.irrad.borders=c(-1000, 1000)) #receive error: Error in Twilight.time.mat.Calib.dawn[-25, ] : 
  incorrect number of dimensions
 
 
My data is as follows (I used GeoLight2TAGS to get after defining sunrise/sunsets):
head(TAGSbank066)
                  datetime light twilight interp excluded
1 2013-07-05T12:37:59.000Z    64        0  FALSE    FALSE
2 2013-07-05T12:39:59.000Z    64        0  FALSE    FALSE
3 2013-07-05T12:41:59.000Z     3        0  FALSE    FALSE
4 2013-07-05T12:43:59.000Z     3        0  FALSE    FALSE
5 2013-07-05T12:45:59.000Z     5        0  FALSE    FALSE
6 2013-07-05T12:47:59.000Z     7        0  FALSE    FALSE

 






0 user(s) are reading this topic

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