Jump to content
Ornithology Exchange

Louise de Raad

General Members
  • Content count

    15
  • Joined

  • Last visited

Community Reputation

0

Profile Information

  • Location
    Inverness
  • Country
    United Kingdom
  1. Louise de Raad

    FLightR-only one calibration period

    Depending on why you only have one calibration period (e.g. the tag died half way through, but you still recaptured the bird and retrieved the tag), you have to make some additional changes to the FlightR script: in the run.particle.filter function you may need to change "known.last=TRUE" to "known.last=FALSE" (because you won't know where the tag has died) and when you only have one calibration period, you also have to remove the model aging part in the make.calibration function: Calibration<-make.calibration(Proc.data, Calibration.periods, model.ageing = TRUE) I had the same issue as you did - don't have my note book with me here, but I have the correct script for you if the above doesn't work I can send it to you when I'm back in the office on Monday.
  2. Hiya, the coordinate file that is an output of the FlightR script shows latitude and longitude: when uploading these data to e.g. ArcMap, what geographic coordinate system should I specify (for a handheld GPS the default I usually choose is WGS 1984, but I'm not sure that is accurate for the FlightR output, as some of my known locations seem a bit far North? thanks Louise
  3. Hi, I'm at the stage of interpreting my results (after now having produced the beautiful maps). One thing that slightly troubles me is that, for most birds, the locations in Africa either side of the autumn equinox differ. I am wondering if this is real, or an artefact of the equinox. Most of the locations after the equinox are further S, but a couple are N. There is a similar effect for some birds in spring. I tried to insert some examples (lat-lon plot & map), but seem unable to insert pictures (unless they have a URL?) and I am unsure how to upload files (to my "media library") to attach. What are people's thoughts on such findings? Is this a common artefact of the equinox, or might this be a real shift in location? Thanks for your feedback. Louise
  4. Louise de Raad

    Error with map.FlightR.ggmap function

    Ok - so a colleague of mine found the answer. The error I was getting was: > map.FLightR.ggmap(Result) Error in mapproj::mapproject(x, y, projection = coord$projection, parameters = coord$params, : object 'C_setproj' not found Meaning the error was in the package called "mapproj" in the function mapproject. He looked up the mapproj package on github (https://github.com/cran/mapproj/blob/master/R/mapproj.r) and we removed the package from my library and re-installed it. >remove.packages("mapproj") >install.packages("mapproj") And this solved the problem. Still not sure why the function didn't work, but if anybody gets the same error message, that may just be the solution! Cheers, Louise
  5. I have a number of tags that stopped working (at an unknown location) at some point, before the bird returned and the tag was retrieved. I have changed the Calibration.periods as follows: > Calibration.periods<-data.frame( + calibration.start=as.POSIXct(NA), # start of the second calibration period + calibration.stop=as.POSIXct(c("2013-08-05", NA)), # end of the first calibration period + lon=-4.37, lat=58.38) > print(Calibration.periods) calibration.start calibration.stop lon lat 1 <NA> 2013-08-05 -4.37 58.38 2 <NA> <NA> -4.37 58.38 and removed the model.ageing part from the make.calibration function: > Calibration<-make.calibration(Proc.data, Calibration.periods, model.ageing = FALSE) dusk 191 was excluded from the calibration calibration method used: parametric.slope likelihood correction switched to TRUE dusk 189 was excluded from the calibration calibration method used: parametric.slope dusk 188 was excluded from the calibration calibration method used: parametric.slope estimating correction function... There were 50 or more warnings (use warnings() to see the first 50) This resulted in loads of warnings (see below). Is this normal, do I just proceed? What do they mean? > warnings() Warning messages: 1: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 2: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 3: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 4: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 5: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 6: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 7: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 8: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 9: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 10: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 11: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 12: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 13: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 14: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 15: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 16: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 17: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 18: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 19: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 20: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 21: In log(cur.slope$slope) : NaNs produced 22: In log(All.slopes$Slopes$Slope) : NaNs produced 23: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 24: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 25: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 26: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 27: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 28: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 29: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 30: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 31: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 32: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 33: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 34: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 35: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 36: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 37: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 38: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 39: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 40: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 41: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 42: In is.na(Last.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' 43: In log(cur.slope$slope) : NaNs produced 44: In log(All.slopes$Slopes$Slope) : NaNs produced 45: In log(all.slopes$Slopes$Slope) : NaNs produced 46: In log(Slope) : NaNs produced 47: In log(Slope) : NaNs produced 48: In log(Slope) : NaNs produced 49: In log(Slope) : NaNs produced 50: In is.na(First.LogIrrad) : is.na() applied to non-(list or vector) of type 'NULL' Thanks Louise
  6. Louise de Raad

    LightImage function error

    Hi Eldar, thanks for your tip. Indeed the .lux file was corrupted and had a range of NA values further down. The function worked ok for the other files.
  7. Louise de Raad

    Error with map.FlightR.ggmap function

    Hi Eldar, I saved all the output files, script and workspace to Dropbox and shared the folder with you. I hope you received the link. Thanks, Louise
  8. Louise de Raad

    Error with map.FlightR.ggmap function

    Hi Eldar, This is the result from sessionInfo() – thanks for that, I didn’t know how to do that! How do I “package” my result object to send to you? Thanks for your help, Louise (PS I can’t make new TAGS files at the moment – see other query on the forum about the LightImage function– or I would try on a few other bird - running the script from scratch, this particular bird has only one calibration period, but the same happened with my other result files) > sessionInfo() R version 3.4.2 (2017-09-28) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=English_United Kingdom.1252 [2] LC_CTYPE=English_United Kingdom.1252 [3] LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United Kingdom.1252 attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base other attached packages: [1] ggmap_2.7 ggplot2_2.2.1 maptools_0.9-2 sp_1.2-5 [5] MASS_7.3-47 SGAT_0.1.3 TwGeos_0.0-1 GeoLight_2.0.0 [9] maps_3.2.0 FLightR_0.4.6 BAStag_0.1.3 loaded via a namespace (and not attached): [1] Rcpp_0.12.13 bindr_0.1 compiler_3.4.2 plyr_1.8.4 [5] bitops_1.0-6 tools_3.4.2 digest_0.6.12 dotCall64_0.9-04 [9] tibble_1.3.4 gtable_0.2.0 lattice_0.20-35 pkgconfig_2.0.1 [13] png_0.1-7 rlang_0.1.2 mapproj_1.2-5 spam_2.1-1 [17] proto_1.0.0 bindrcpp_0.2 coda_0.19-1 dplyr_0.7.4 [21] stringr_1.2.0 raster_2.5-8 RgoogleMaps_1.4.1 fields_9.0 [25] glue_1.1.1 R6_2.2.2 jpeg_0.1-8 foreign_0.8-69 [29] reshape2_1.4.2 magrittr_1.5 scales_0.5.0 assertthat_0.2.0 [33] changepoint_2.2.2 colorspace_1.3-2 geosphere_1.5-5 labeling_0.3 [37] stringi_1.1.5 lazyeval_0.2.0 munsell_0.4.3 rjson_0.2.15 [41] zoo_1.8-0
  9. Louise de Raad

    LightImage function error

    I have run the LightImage function as part of the FLightR script many times without any issues, but recently it "stopped working". I have updated various packages, R studio and R versions, but I don't see why I'm now getting the error I do. > d.lux$Light<- log(d.lux$Light) > head(d.lux) Date Light 1 2013-04-20 15:14:01 6.302619 2 2013-04-20 15:19:01 5.159055 3 2013-04-20 15:24:01 5.257495 4 2013-04-20 15:29:01 5.594711 5 2013-04-20 15:34:01 5.181784 6 2013-04-20 15:39:01 4.663439 > lightImage(tagdata = d.lux, + offset = offset, + zlim = c(0, 12), # y axis + dt = 300) # recording interval in seconds (300 if every 5min) Error in if (as.numeric(tmax) < as.numeric(date[length(date)])) tmax <- tmax + : missing value where TRUE/FALSE needed > sessionInfo() R version 3.4.2 (2017-09-28) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=English_United Kingdom.1252 [2] LC_CTYPE=English_United Kingdom.1252 [3] LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United Kingdom.1252 attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base other attached packages: [1] maptools_0.9-2 sp_1.2-5 MASS_7.3-47 SGAT_0.1.3 [5] TwGeos_0.0-1 GeoLight_2.0.0 maps_3.2.0 FLightR_0.4.6 [9] BAStag_0.1.3 loaded via a namespace (and not attached): [1] Rcpp_0.12.13 lattice_0.20-35 changepoint_2.2.2 zoo_1.8-0 [5] spam_2.1-1 coda_0.19-1 raster_2.5-8 tools_3.4.2 [9] foreign_0.8-69 fields_9.0 compiler_3.4.2 dotCall64_0.9-04 > Any thought? Many thanks, Louise
  10. I have recently been getting an error when trying to map the FlightR results. I have re-installed and loaded the latest versions of packages: ggmap, ggplot2, RgoogMaps, maptools and grid (just in case this had anything to do with it). I even installed the latest version of ggmap from GitHub > install_github("dkahle/ggmap") as I read in some forum that the error would be resolved with version 2.7 .. but not so). > map.FLightR.ggmap(Result) Error in mapproj::mapproject(x, y, projection = coord$projection, parameters = coord$params, : object 'C_setproj' not found Any thoughts much appreciated. Louise
  11. Louise de Raad

    FlightR: identifying staging areas and output map

    Does anybody have any ideas, as I'm still stuck!
  12. Have you read in your .lig files as d.lux (rather than d.lig)?
  13. Louise de Raad

    General TwGeos questions

    Hi Devin, I think you are getting different colours because you are specifying a palette in your script. I simply used: offset = 12 threshold=1.5 library(TwGeos) twl <- preprocessLight(d.lux, threshold, offset = offset, lmax=12) without any further specification of palette, so my guess is what I get and have described is probably the default. Anyway, you should be able to figure it out by scrolling forward and backward one and where the red cross lines meet (your current one). Yes, I can't help you much with saying when a line (twilight) needs deleting/excluding and when not. I have taken screen shots and was hoping to ask someone with more experience. Louise
  14. Louise de Raad

    General TwGeos questions

    Hi Devin, I had the same issue you had (what was I supposed to do) and didn't find any good explanation or manual for this online (I ended up going to Texel!). So let me help you out, as Eldar kindly helped me out. Once you run the Twl <- two screens open up. They actually open up on top of one another and unless you drag them away from one each other, you'd never know. You can tell them apart because the "top" one has a title and I'll refer to the underlying one as the "bottom/2nd window". Life is a lot easier if you are working with two screens at this stage. These are the steps: 1. Select subset. The point of the subset is to select the period the tag was actually on the bird. The tag may have sat in a cupboard before deploying it or after retrieval and you want to exclude this duration from your analysis. To do thjis select start period using the left mouse button and end period using the right mouse button. The red line on the top adjusts accordingly. However, I found that because in the BAStag package you define a "start" and "end" date, you don't need to adjust the subset much (maybe only 1 or 2 days). The 2nd window gives a detailed view of the data. Click "a" (accept) when you're done. 2. Find twilights. Very simple. Click anywhere in the night time (the very dark section) in the top window (the one with the title 'find twilights'). Then click anywhere in the night in the bottom/2nd window. You will now see orange points = sunrise, and blue points = sunset, for each day. If the selection above is not complete, repeat the above until happy. Click "a" (accept) when done. 3. Insert twilights. This step is for when you manually want to insert twilights. It wasn't applicable to my data set (don't know when it would be to be honest), so just skip it by accepting > click "a" 4. Edit twilights. This is the main pre-processing step. The goal is to delete any twilights that are not roughly linear going down (sunset) or up (sunrise). In the second, bottom window you see three lines: a black line (current twilight that can be edited), a green line (the previous twilight) and a blue/purple line (next twilight). You can move through the twilights by using the arrow keys (right = forwards, back = left). The red lines indicate the twilight "under investigation". FlightR looks at only 2 hours (24 points) before and after each twilight (i.e. the red cross). If the line (the black one) does not show a more or less regular decrease (sunset) or increase (sunrise) , then you can exclude it from analysis. Click on "d" (delete) to exclude a twilight from analysis. The red cross lines will turn grey. In the top window (with the blue and orange dots), you will see a cross (x) through he dot/twilight under investigation (red cross lines in the second/bottom window). If a twilight is excluded (deleted "d"), the dot in the first, top window will also turn grey. In assessing each twilight, only look at the 2 hrs before and after the twilight (you can zoom in and out with + and - buttons). It is possible to "un-delete" by moving to a dleted twilight and clicking on "d" again. Once you have manually worked your way through the whole data set, visually assessing each twilight, click on "q" (quit) to finalise the editing. Save file to TAGS format with the BAStags2TAGS function, e.g.: TAGS.twilight.raw <- BAStags2TAGS (d.lux, twl, threshold = threshold, filename = 'TAGS_filename.csv') Going through the actual twilights and deciding which ones to exclude or not was not easy and is very subjective. Some have obvious dips (perhaps a leg in the mud), but most twilights went up and down like mad anyway. don't know if anybody else could provide more detail on when to exclude or not, but hopefully the above explains how to do it. Louise
  15. Hi, I am using FlightR on geolocator data from common sandpiper. I have pre-processed my .lux files using TwGeos package and manage to subsequently run the FlightR script without problems. I do have some questions about the results it produces and some bits of the script: Do I understand correctly that a location is calculated by the slope of a twilight and that thus, in contrast to geolight, you obtain a location per sunrise and another location per sunset (rather than getting one location for each sunrise and sunset 'pair')? And that as such, excluding / deleting twilights does not mean the twilights (locations) before and after the deleted twilight are also lost? In Eldar's (2015) paper (page 6 of 15) it states that for all their models, they assumed that the truncation points were a = 45 and b = 1000km. "That is, when birds initiated a movement, they could not fly less than 45km or more than 1500km in a single between-twilight interval." This seems to me that 'b' should have thus been 1500. What is actually being used in the script 1000 or 1500km? I take it that this means that a bird is classified as being in a movement state if it moves >= 45km from one estimated location to the next, but are geolocator data derived locations not more imprecise than that (so that the bird could be classified as in a movement state whereas the "movement" is actually due to inaccurately calculated positions)? Should this threshold therefore not be higher, e.g. >= 300km (see e.g. paper Fudickar et al 2011, but even Eldar's 2016 paper showed a 43.3 +/- 51.5km deviation from the true position) A question about identifying staging areas using this bit of script stationary.migration.summary(Result, prob.cutoff = 0.1, min.stay = 3) min.stay is presumably the number of twilights, but what happens if twilights have been excluded from what could potentially be a staging area? So for example you say min.stay= 3 (which normally could mean a sunrise, sunset and another sunrise (e.g. approximately 24 hours minimum stay) but the sunset was excluded - does it then become sunrise, sunrise, sunset (i.e. approximately 36 hours minimum stay)? Then a couple of questions about the outputs of the script: In the plot of the locations (map.FLightR.ggmap(Result)), it doesn't look like all locations are plotted (I have 521 coordinates in the coords.csv file, but the map seems to only show around 70 points). What locations are plotted? Which coordinates from the coords.csv file are plotted (Medianlat/Medianlons or Meanlat/Meanlons)? In the coords.csv file what is the difference between Medianlat and MedianlatJ (and the same for long)? In the plots of lat and long, what do the dark grey and pale grey limits show (are these first and third percentiles respectively?) Sorry, a lot of questions (I saved them all up!!), I hope you can help me with. Thanks Louise
×