BACKGROUND
biological use of radar originated in the 1940s when early users attributed echoes of unknown origin  that they observed on radar screens, to birds  <cit> .
in the years since, zoologists have used radar to study the behaviour of many types of mobile organisms including birds, bats and insects  <cit> .
today, researchers study the movements of organisms using a wide variety of types of radar from small marine units  <cit>  surplus military equipment  <cit>  fixed beam "entomological radars"  <cit>  to broad-scale weather surveillance radar  arrays  <cit> .
radar is an especially useful tool where direct observations of biological phenomena are challenging, such as at night or in fog.
in spite of the relatively long period of time that radar has been available for use in biological studies, there are still major barriers to its more general use.
one of these is the lack of an automated, cost-efficient tool that enables users to obtain digital radar data of known quality for a given project.
for example, some use non-automated means for data collection such as video-taping and marking acetate sheets with putative tracks; such approaches are time consuming and prone to errors of omission and interpretation.
furthermore, non-automated approaches mean that it is not straight-forward to estimate error and bias  and so do not produce results that are comparable across studies.
a range of 'in-house' solutions to automated data collection exist but are not readily available for use perhaps for cost or proprietary reasons.
in general, there is a lack of ability within the research community to compare and validate various systems and studies, which in our view has hampered the broader development of radar zoology.
implementation
here we present an open-source software program - "radr" - that addresses this problem.
program radr is capable of reading, extracting biological information and saving data from a digitized radar signal.
archival data formats allow for future inclusion of arbitrary additional information while preserving forward and backward compatibility.
we present an overview of the current state of program radr and some additional material that outlines technical details about how to set up a small marine radar in what would be typical use for the radr software .
for an in-depth overview of many of the details of radar terminology and function, its range of applications, and the strengths and pitfalls of the technology for zoological work the reader should consult larkin  <cit> ; for details of radar signal processing and tracking, readers should consult any of the more accessible radar texts .
our ultimate aim is to increase the accessibility of radar technology to researchers, the consulting community and citizen scientists, in order to improve our ability to calibrate and compare results across studies  <cit>  and to stimulate hardware and software developments in the field.
RESULTS
general layout and orientation of radr
program radr provides a convenient platform for visualizing and recording radar data, developing and testing new algorithms, and evaluating and comparing radar hardware.
it is intended as a research tool, and is not designed to be used for critical functions such as navigation, air traffic control or bird strike avoidance.
it provides a baseline standard that offers an opportunity to increase the reproducibility and comparison across studies of ecological phenomena using radar.
program radr was developed for marine radars operating in surveillance mode , and has been primarily tested using two types of small marine radars .
however, it has been designed to be flexible and extensible, and so we anticipate it will be useful for a wide variety of other radar types, including different brands, antenna types and orientations, and wavelengths.
the program is written in c and r  <cit> , an open source, statistical programming language that provides rich extension capabilities and a broad spectrum of statistical tools for post-processing data.
program radr runs under both windows  and linux systems and is not vendor-specific except when interacting with proprietary radar digitizing cards of which two brands are currently supported.
the core of the radr program is a 'processing manager' that consists of a user interface loosely based around the familiar media-player paradigm, that allows the user to start and stop processing, choose sources and sinks for data and output, and display data and the output from basic target finding  and tracking  algorithms.
the basic data object in radr is the "scan", which is a matrix of integers representing the power received by the radar at a set of uniformly-spaced sample times within each pulse of a sequence evenly-spaced through the radar's rotation .
additional data, called "meta-data", denote conditions under which the scan was obtained, such as the time of the first pulse, the physical location of the radar  and the radar's pulse length.
much of the work of radr consists of processing the scan matrix, to remove noise and clutter and extract putative targets.
this processing is done in stages, and at check-points between stages  user functions written in r can be called to use or modify the intermediate data.
functionality in the program is delivered by a set of modules  that implement functions called at some of the hooks.
for example, a 'hook' is present at the point where all of the meta-data for a scan has been acquired from the data source.
a plugin may then add additional meta-data for which it is responsible, e.g.
the angle of the beam above the horizon.
for a particular radar set-up, this information might be constant, or it might vary from scan to scan.
subsequent processing stages will use the data and metadata which might have been modified by a plugin at an earlier hook.
the plugin architecture allows users to write extensions to the program in "r", without having to resort to low-level programming in "c".
we believe that allowing users to customize the program using the same programming language that many of them will subsequently use for statistical analysis of the data it gathers, significantly lowers the barrier to use of radar technology.
a current list of plugins can be found at http://www.radr-project.org.
much of the r code is verbosely documented in the source distribution .
at present, plugins can be grouped as follows: 1) acquiring data from a radar or archive file,2) adding or manipulating meta-data 3) processing, describing and saving the input data, 4) creating tracks and exporting data, 5) displaying information about the targets, and 6) other utilities.
here we specify the approach used within radr to accomplish each of the tasks above; details are evolving and are documented at http://www.radr-project.org.
in the future we plan to migrate the project to either sourceforge.net or r-forge.r-project.org, and to take greater advantage of the r project's well-developed package management and distribution tools.
acquiring the radar signal
there are many considerations in choosing a radar and antenna and setting it up.
these are generic to all studies, but are critical to obtaining useful data.
we outline the major steps involved and some basic radar terminology in additional file  <dig>  once the user has a suitable radar system, they require a means to obtain basic information from the radar, including converting the analog signal containing information on targets to a digital signal for processing.
the problem is non-trivial, largely due to the huge bandwidths involved , and so specialized radar digitizing cards are used.
radr has primarily been developed using the rutter technologies  sigma s <dig> radar digitizing card.
a plugin allows the user to interface with this card, and to control, via rutter's proprietary software, the sampling rate and maximum range of the card.
at present, pulse length and pulse repetition frequency  are set by the radar and inferred using tables provided by the user.
.
a similar plugin has been written to acquire data from the russell technologies  "xir3000c card).
it is worth noting that plugins can be written for other digitizing cards, but that they will almost certainly require some "c" code, as vendor interface libraries will typically use data-types and calling conventions beyond those available in "r".
a template plugin is provided which documents the requirements for a new digitizing card plugin, as well as providing the high-level r code skeleton .
for the advanced user, there is detailed documentation on how to convert an archive of unprocessed radar data into one of radr's own data formats, so that a user can use radr to post-process data collected by a different system.
processing the radar signal and extracting putative biological targets
once a scan of radar data has been acquired, radr's top-level processing manager calls internal "c" functions to process it.
processing works as follows.
the radar digitizing card or other source has provided a scan of data.
as discussed above, this consists of a matrix of integers.
each column in the matrix represents a time-series of power received by the radar antenna in a short time-window after the radar has transmitted a single pulse of microwave energy.
individual numbers in the column represent the amount of microwave energy reflected back from within volumes of space at increasing distance from the radar, as well as noise from various sources both within and outside the radar system.
the columns form a sequence spaced uniformly around the radar's plane of rotation .
each row in the scan matrix corresponds to the energy received from a given "range cell", with individual numbers representing the energy received while the radar was pointing at a particular azimuth .
for each pulse of energy transmitted by the radar , the return echo is digitized into a specified number of "samples" at a specified rate.
each sample thus represents the intensity of the return echo from a single pulse, for a given range cell.
the possible number of samples and the resolution of the return echo intensity obtained depends on the digitizing card.
for the  <dig> bit card which has been used for most work with radr, a sample is an integer in the range  <dig> to  <dig>  , the available digitization rates are between  <dig> and  <dig> million samples per second, and roughly  <dig> million samples per scan can be obtained.
the user has some choice over how many pulses are digitized and how many samples are obtained per pulse, subject to the product not exceeding  <dig> million.
roughly speaking, the digitizing rate affects the ability to discriminate targets in the same direction from the radar but at different distances, as well as the precision of estimates of target distance; the number of pulses affects how many echoes will be received from a target in each scan, as well as the precision of estimates of target azimuth; and the samples per pulse, when divided by digitizing rate, controls the maximum range from which target echoes can potentially be received.
each scan can be subsequently displayed, stored or processed, depending on the user configuration.
the user can save all of the samples from each scan  but such files are massive .
this can be reduced significantly in situations where only a fixed portion of each scan is of interest to the user , or when the user is able to set a noise threshold such that sample values below it are discarded .
in these cases, a standard lossless compression algorithm can be  applied to reduce the size of recorded files,
normally however, radr is configured to extract and save a subset of information from each scan - the parts that contain putative biological targets .
these smaller archives  provide an archival record of the observations that can be subsequently viewed and analysed .
blipmovies typically reach a maximum size of ~ <dig> mb for each hour of recording .
at present, radr extracts putative biological targets from the digitized signal in a simplistic way.
for a user-specified number of scans the program computes a temporal mean and mean deviation of the strength of the radar echo from user-defined windows of samples and pulses across the entire scan.
this is the background.
the program then computes, for each subsequent sample, an intensity z-score for that sample .
samples that exceed some user-defined threshold in the z-score are considered 'hot' and are grouped with adjacent 'hot' samples into 'patches.
patches that satisfy user-defined filtering criteria  are considered blips, and retained.
these can be of any size above the user-defined minima described above.
the learned pattern of background can optionally be updated with data from each scan, using a scheme that amounts to exponentially weighting data from previous scans at a user-specified decay rate.
a diagrammatic representation of the process is presented in figure  <dig>
the target finding algorithm was developed to loosely mimic how human radar operators appeared to detect targets, and raw data is saved for each blip so that physically realistic target detection models can be applied to them.
the method does not work well in situations where there are rapidly changing patterns of 'background' such as reflections from surface water  and during periods of rain.
in these situations, the algorithm detects many 'non-biological' blips, some of which can be filtered on-the-fly using user-defined criteria.
more sophisticated 'blip-finding' algorithms exist  that can make much better use of the information contained within the returned signal; we plan to develop these in future versions of the software.
at present, blips are stored and manipulated in the digitized units obtained from the associated radar scan converter .
these sample values can be converted to estimates of the returned power for that sample by determining  and substituting the appropriate values or estimates into the radar range equation  <cit> .
this functionality is card-specific, and is being developed as a separate plugin.
users would normally save blips to a permanent archive  which is a file-backed structure that behaves like an r language "list" object.
blipmovies can be re-run, further modified  and processed.
typical processing steps include outputting files of blips  or combining blips into tracks.
all processed files can be saved to text files, for processing outside of radr, or re-recorded as  blip movies.
another plugin provides important information to the program and to the archived movie regarding the basic characteristics of the antenna and scanner including the type of antenna , the beam height and width, the angle of the beam center off the horizontal, the angle of the scanner off the horizontal, and the geographic co-ordinates of the scanner.
through another plugin, the user can apply different processing and filtering rules for different portions of the scanned volume, and can entirely discard data from specified sectors.
track compilation and exporting
a single target flying through the radar beam can be detected on multiple scans of the rotating beam, creating a series of blips.
these blips can be linked together to form tracks , so that the velocity and direction of targets can be estimated.
currently, radr provides two track-building models: one based on a simplistic nearest neighbour  algorithm and the other based on a multiframe correspondence  algorithm  <cit> .
tracks can be fit in real time or to archived data.
the nn model is primarily used as the basis for the more sophisticated mfc model.
it builds tracks by minimizing the distances between existing tracks and possible new blips , subject to some constraints.
it first computes the distance from every new blip in a scan to the last blip in every active track.
for all such pairs, a speed, turning angle, and relative change in blip area or intensity  are computed, and pairs for which these values do not fall within user-specified ranges are discarded.
among remaining "feasible" pairs, blips are assigned to tracks in such a way as to minimize the total "extension distance"; i.e.
generally by matching tracks to their nearest feasible blips, and settling conflicts according to the minimum extension criterion.
for example, if a new blip is the closest feasible blip to two different tracks, it is matched to the closer of the two tracks, with a "coin toss" for ties.
blips which are left unmatched in one scan may be extended into tracks in a subsequent scan, provided this occurs before their user-defined "expiry" time.
the model uses an algorithm from the stanford graphbase package of knuth  <cit> .
the mfc method is more robust than the nn method.
it employs a non-iterative greedy algorithm for multiframe point correspondence as outlined by shafique and shah  <cit> .
it begins with two scans, matching blips between them using the nn algorithm and then assigning a velocity to the set of matched blips.
when third and subsequent scans are processed, the algorithm considers all possible matches between blips in the first two scans, and those in the third.
a "gain" function returns the "quality" of match between each new blip and an existing track .
the default gain function is a weighted sum  of two components: the proximity of the new blip to the next location predicted for the track by assuming constant target velocity; and the homogeneity of target velocity  when the new blip is added to the track.
tracks are extended with  new blips in such a way as to maximize the total "gain".
when subsequent scans are processed, the procedure is repeated.
all possible track segments connecting the blips in the previous k- <dig> scans and the blips in the new scan are considered, optimizing between proximity to predicted position and consistency in velocity .
tracks may be broken and attached to a new blip, in which case the blips from the broken-off track tails participate in a second track-building phase with any other unmatched points.
in effect, tracks can be retroactively corrected back k scans to better match newly acquired blips.
the procedure is flexible in that the gain function can be modified or specified by the user to change the nature of the track building.
in informal tests, the algorithm works well  when there is limited 'noise' , where tracks are long, and more-or-less linear, and when the density of targets is lower.
we have not directly quantified errors in track-building at this time, since we are actively undertaking calibration experiments that will allow us to incorporate additional information from blips into the blip finding, blip filtering and track building algorithms, all of which we expect to improve track-building performance.
other, possibly superior, methods for track building exist  that could be implemented in the future by us or the interested user.
summary data for each blip and tracks can be exported to text files or raw r-format data files for processing outside radr.
at present, exported data includes basic blip parameters  and summaries of blip characteristics  that may be useful for blip and track classification.
when exporting data on tracks, each blip is associated with a unique track number.
complete information on blips  are retained in the blipmovies, and can be extracted by the user via additional plugins.
.
a simple 'batch' mode allows the processing of multiple files in a single job, controlled by a script rather than the by the graphical user interface.
displaying the targets
biological targets  are displayed in a "plan-position indicator"  plot window which the user can pan, zoom and rotate.
the ppi displays a scan by plotting a spot at the nominal range and azimuth of each sample, with the spot's color depending on the sample value.
a pointer can optionally display the current characteristics of any blip or track on display.
the user can also provide a background image such as an aerial photograph of the area being sampled that can be translated, rotated, and scaled within radr to align with radar data.
the user can mimic the appearance of a phosphor screen by allowing blips to persist and fade over multiple scans .
figure  <dig> provides a screenshot of an example session with an underlay, several targets, and trails from those targets displayed.
other utilities
plugins exist for a number of other purposes, allowing users to create demonstration 'clips' of movies in animated gif format, to add comments to blipmovie archives at specific points, and to generate random blips with known patterns and characteristics that could serve various purposes, such as algorithm testing.
extensibility
program radr is extensible by the user by writing "hook" functions in r, as discussed earlier.
for example, each time the tracker plugin declares a track "complete" , a user function, written in r, could be called with the coordinates of the blips on the completed track.
this could then be used to apply a user-defined hidden-variables model for improving the estimates of target locations along the track, or to add the track to a 3-dimensional scene.
software testing
software has primarily been tested in an ad-hoc way, under field situations  and similarly, through post-processing of data.
as such, some parts of the code are known to be more robust than others.
program radr is in active development, and new features are added regularly.
we maintain a 'stable' release and development versions of radr available for download at http://www.radr-project.org.
using radr
details of how to use radr in a field setting are provided at http://www.radr-project.org.
these will change from time to time as new features are introduced, and bugs are corrected.
the basic steps include: 1) installing radr and the supporting version of r on the local computer; 2) configuring radr so that it is aware of the current setup  selection of parameters for the detection of blips  and 4) recording.
in our use, we are liberal with the amount of data collected .
although it is possible  we do not usually attempt to process tracks in real time, leaving those steps for post-processing.
once data are acquired, radr is used to further filter and create tracks.
filtering and track-building parameters are situation and radar dependent; individual users will need to calibrate their systems and view their archives to determine settings that meet their needs.
special consideration needs to be made for the classification of targets; radars with short wavelengths  readily detect birds, bats and insects and these types of targets are not easily separable  without additional information  <cit> .
radr can facilitate target classification by providing the user with metrics such as target speed, height and direction.
if a proper calibration protocol has been carried out  then radr can be configured to provide information on the radar cross sections of targets  or volume reflectivity.
CONCLUSIONS
we have developed and extensively tested radr in field situations over the past five years.
the software provides an open solution to the problem of acquiring and preparing for analysis radar data for use in biological studies.
we hope that the provision of a widely applicable, freely-available open source tool will enable researchers working with radar data to improve and standardize the acquisition, storage and analysis of these data greatly enabling comparisons across multiple times and studies and further developments in the field.
we further welcome other researchers to collaborate with us on the future development of the software.
availability and requirements
project name: project radr
project home page: http://www.radr-project.org
operating system: full functionality on windows xp systems.
on linux systems, all functionality except the ability to read live data from radar digitizing cards because the proprietary cards supported so far lack linux drivers
programming language: r, c, c++
other requirements: r  <dig> .
<dig>  digitizing card interface library and possibly server program from one of the two currently supported hardware vendors.
license: gnu gpl version  <dig> or later.
any restrictions to use by non-academics: none
authors' contributions
pt developed the initial ideas, provided the overall conceptual framework for the project and is the main writer.
jb wrote all of the code and formulated most of the internal conceptual organization for the program.
cm and mp undertook extensive field testing, wrote sections of the manuscript, and provided key feedback on aspects of program and project implementation.
dw provided extensive technical advice and modifications to hardware.
all authors read and approved the final manuscript.
supplementary material
additional file 1
a basic primer for implementing a radar study.
an outline of some basic information needed to implement a radar study
click here for file
acknowledgements
charles francis  provided the initial impetus for the project, facilitated funding, and provided technical and logistical support.
john black  provided very important early encouragement and ideas.
two anonymous reviewers provided detailed comments that greatly improved the manuscript.
financial support was provided by environment canada and natural resources canada through grants to pt.
cm was supported by an nserc graduate fellowship.

 biological use of radar originated in the 1940s when early users attributed echoes of unknown origin that they observed on radar screens, to birds. in the years since, zoologists have used radar to study the behaviour of many types of mobile organisms including birds, bats and insects. today, researchers study the movements of organisms using a wide variety of types of radar from small marine units surplus military equipment fixed beam "entomological radars" to broad-scale weather surveillance radar arrays. radar is an especially useful tool where direct observations of biological phenomena are challenging, such as at night or in fog. in spite of the relatively long period of time that radar has been available for use in biological studies, there are still major barriers to its more general use. one of these is the lack of an automated, cost-efficient tool that enables users to obtain digital radar data of known quality for a given project. for example, some use non-automated means for data collection such as video-taping and marking acetate sheets with putative tracks; such approaches are time consuming and prone to errors of omission and interpretation. furthermore, non-automated approaches mean that it is not straight-forward to estimate error and bias and so do not produce results that are comparable across studies. a range of'in-house' solutions to automated data collection exist but are not readily available for use perhaps for cost or proprietary reasons. in general, there is a lack of ability within the research community to compare and validate various systems and studies, which in our view has hampered the broader development of radar zoology. implementation here we present an open-source software program - "radr" - that addresses this problem. program radr is capable of reading, extracting biological information and saving data from a digitized radar signal. archival data formats allow for future inclusion of arbitrary additional information while preserving forward and backward compatibility. we present an overview of the current state of program radr and some additional material that outlines technical details about how to set up a small marine radar in what would be typical use for the radr software. for an in-depth overview of many of the details of radar terminology and function, its range of applications, and the strengths and pitfalls of the technology for zoological work the reader should consult larkin; for details of radar signal processing and tracking, readers should consult any of the more accessible radar texts. our ultimate aim is to increase the accessibility of radar technology to researchers, the consulting community and citizen scientists, in order to improve our ability to calibrate and compare results across studies and to stimulate hardware and software developments in the field.  general layout and orientation of radr program radr provides a convenient platform for visualizing and recording radar data, developing and testing new algorithms, and evaluating and comparing radar hardware. it is intended as a research tool, and is not designed to be used for critical functions such as navigation, air traffic control or bird strike avoidance. it provides a baseline standard that offers an opportunity to increase the reproducibility and comparison across studies of ecological phenomena using radar. program radr was developed for marine radars operating in surveillance mode, and has been primarily tested using two types of small marine radars. however, it has been designed to be flexible and extensible, and so we anticipate it will be useful for a wide variety of other radar types, including different brands, antenna types and orientations, and wavelengths. the program is written in c and r, an open source, statistical programming language that provides rich extension capabilities and a broad spectrum of statistical tools for post-processing data. program radr runs under both windows and linux systems and is not vendor-specific except when interacting with proprietary radar digitizing cards of which two brands are currently supported. the core of the radr program is a'processing manager' that consists of a user interface loosely based around the familiar media-player paradigm, that allows the user to start and stop processing, choose sources and sinks for data and output, and display data and the output from basic target finding and tracking algorithms. the basic data object in radr is the "scan", which is a matrix of integers representing the power received by the radar at a set of uniformly-spaced sample times within each pulse of a sequence evenly-spaced through the radar's rotation. additional data, called "meta-data", denote conditions under which the scan was obtained, such as the time of the first pulse, the physical location of the radar and the radar's pulse length. much of the work of radr consists of processing the scan matrix, to remove noise and clutter and extract putative targets. this processing is done in stages, and at check-points between stages user functions written in r can be called to use or modify the intermediate data. functionality in the program is delivered by a set of modules that implement functions called at some of the hooks. for example, a'hook' is present at the point where all of the meta-data for a scan has been acquired from the data source. a plugin may then add additional meta-data for which it is responsible, e.g. the angle of the beam above the horizon. for a particular radar set-up, this information might be constant, or it might vary from scan to scan. subsequent processing stages will use the data and metadata which might have been modified by a plugin at an earlier hook. the plugin architecture allows users to write extensions to the program in "r", without having to resort to low-level programming in "c". we believe that allowing users to customize the program using the same programming language that many of them will subsequently use for statistical analysis of the data it gathers, significantly lowers the barrier to use of radar technology. a current list of plugins can be found at http://www.radr-project.org. much of the r code is verbosely documented in the source distribution. at present, plugins can be grouped as follows: 1) acquiring data from a radar or archive file,2) adding or manipulating meta-data 3) processing, describing and saving the input data, 4) creating tracks and exporting data, 5) displaying information about the targets, and 6) other utilities. here we specify the approach used within radr to accomplish each of the tasks above; details are evolving and are documented at http://www.radr-project.org. in the future we plan to migrate the project to either sourceforge.net or r-forge.r-project.org, and to take greater advantage of the r project's well-developed package management and distribution tools. acquiring the radar signal there are many considerations in choosing a radar and antenna and setting it up. these are generic to all studies, but are critical to obtaining useful data. we outline the major steps involved and some basic radar terminology in additional file once the user has a suitable radar system, they require a means to obtain basic information from the radar, including converting the analog signal containing information on targets to a digital signal for processing. the problem is non-trivial, largely due to the huge bandwidths involved, and so specialized radar digitizing cards are used. radr has primarily been developed using the rutter technologies sigma s radar digitizing card. a plugin allows the user to interface with this card, and to control, via rutter's proprietary software, the sampling rate and maximum range of the card. at present, pulse length and pulse repetition frequency are set by the radar and inferred using tables provided by the user.. a similar plugin has been written to acquire data from the russell technologies "xir3000c card). it is worth noting that plugins can be written for other digitizing cards, but that they will almost certainly require some "c" code, as vendor interface libraries will typically use data-types and calling conventions beyond those available in "r". a template plugin is provided which documents the requirements for a new digitizing card plugin, as well as providing the high-level r code skeleton. for the advanced user, there is detailed documentation on how to convert an archive of unprocessed radar data into one of radr's own data formats, so that a user can use radr to post-process data collected by a different system. processing the radar signal and extracting putative biological targets once a scan of radar data has been acquired, radr's top-level processing manager calls internal "c" functions to process it. processing works as follows. the radar digitizing card or other source has provided a scan of data. as discussed above, this consists of a matrix of integers. each column in the matrix represents a time-series of power received by the radar antenna in a short time-window after the radar has transmitted a single pulse of microwave energy. individual numbers in the column represent the amount of microwave energy reflected back from within volumes of space at increasing distance from the radar, as well as noise from various sources both within and outside the radar system. the columns form a sequence spaced uniformly around the radar's plane of rotation. each row in the scan matrix corresponds to the energy received from a given "range cell", with individual numbers representing the energy received while the radar was pointing at a particular azimuth. for each pulse of energy transmitted by the radar, the return echo is digitized into a specified number of "samples" at a specified rate. each sample thus represents the intensity of the return echo from a single pulse, for a given range cell. the possible number of samples and the resolution of the return echo intensity obtained depends on the digitizing card. for the bit card which has been used for most work with radr, a sample is an integer in the range to, the available digitization rates are between and million samples per second, and roughly million samples per scan can be obtained. the user has some choice over how many pulses are digitized and how many samples are obtained per pulse, subject to the product not exceeding million. roughly speaking, the digitizing rate affects the ability to discriminate targets in the same direction from the radar but at different distances, as well as the precision of estimates of target distance; the number of pulses affects how many echoes will be received from a target in each scan, as well as the precision of estimates of target azimuth; and the samples per pulse, when divided by digitizing rate, controls the maximum range from which target echoes can potentially be received. each scan can be subsequently displayed, stored or processed, depending on the user configuration. the user can save all of the samples from each scan but such files are massive. this can be reduced significantly in situations where only a fixed portion of each scan is of interest to the user, or when the user is able to set a noise threshold such that sample values below it are discarded. in these cases, a standard lossless compression algorithm can be applied to reduce the size of recorded files, normally however, radr is configured to extract and save a subset of information from each scan - the parts that contain putative biological targets. these smaller archives provide an archival record of the observations that can be subsequently viewed and analysed. blipmovies typically reach a maximum size of ~ mb for each hour of recording. at present, radr extracts putative biological targets from the digitized signal in a simplistic way. for a user-specified number of scans the program computes a temporal mean and mean deviation of the strength of the radar echo from user-defined windows of samples and pulses across the entire scan. this is the background. the program then computes, for each subsequent sample, an intensity z-score for that sample. samples that exceed some user-defined threshold in the z-score are considered'hot' and are grouped with adjacent'hot' samples into'patches. patches that satisfy user-defined filtering criteria are considered blips, and retained. these can be of any size above the user-defined minima described above. the learned pattern of background can optionally be updated with data from each scan, using a scheme that amounts to exponentially weighting data from previous scans at a user-specified decay rate. a diagrammatic representation of the process is presented in figure the target finding algorithm was developed to loosely mimic how human radar operators appeared to detect targets, and raw data is saved for each blip so that physically realistic target detection models can be applied to them. the method does not work well in situations where there are rapidly changing patterns of'background' such as reflections from surface water and during periods of rain. in these situations, the algorithm detects many'non-biological' blips, some of which can be filtered on-the-fly using user-defined criteria. more sophisticated'blip-finding' algorithms exist that can make much better use of the information contained within the returned signal; we plan to develop these in future versions of the software. at present, blips are stored and manipulated in the digitized units obtained from the associated radar scan converter. these sample values can be converted to estimates of the returned power for that sample by determining and substituting the appropriate values or estimates into the radar range equation. this functionality is card-specific, and is being developed as a separate plugin. users would normally save blips to a permanent archive which is a file-backed structure that behaves like an r language "list" object. blipmovies can be re-run, further modified and processed. typical processing steps include outputting files of blips or combining blips into tracks. all processed files can be saved to text files, for processing outside of radr, or re-recorded as blip movies. another plugin provides important information to the program and to the archived movie regarding the basic characteristics of the antenna and scanner including the type of antenna, the beam height and width, the angle of the beam center off the horizontal, the angle of the scanner off the horizontal, and the geographic co-ordinates of the scanner. through another plugin, the user can apply different processing and filtering rules for different portions of the scanned volume, and can entirely discard data from specified sectors. track compilation and exporting a single target flying through the radar beam can be detected on multiple scans of the rotating beam, creating a series of blips. these blips can be linked together to form tracks, so that the velocity and direction of targets can be estimated. currently, radr provides two track-building models: one based on a simplistic nearest neighbour algorithm and the other based on a multiframe correspondence algorithm. tracks can be fit in real time or to archived data. the nn model is primarily used as the basis for the more sophisticated mfc model. it builds tracks by minimizing the distances between existing tracks and possible new blips, subject to some constraints. it first computes the distance from every new blip in a scan to the last blip in every active track. for all such pairs, a speed, turning angle, and relative change in blip area or intensity are computed, and pairs for which these values do not fall within user-specified ranges are discarded. among remaining "feasible" pairs, blips are assigned to tracks in such a way as to minimize the total "extension distance"; i.e. generally by matching tracks to their nearest feasible blips, and settling conflicts according to the minimum extension criterion. for example, if a new blip is the closest feasible blip to two different tracks, it is matched to the closer of the two tracks, with a "coin toss" for ties. blips which are left unmatched in one scan may be extended into tracks in a subsequent scan, provided this occurs before their user-defined "expiry" time. the model uses an algorithm from the stanford graphbase package of knuth. the mfc method is more robust than the nn method. it employs a non-iterative greedy algorithm for multiframe point correspondence as outlined by shafique and shah. it begins with two scans, matching blips between them using the nn algorithm and then assigning a velocity to the set of matched blips. when third and subsequent scans are processed, the algorithm considers all possible matches between blips in the first two scans, and those in the third. a "gain" function returns the "quality" of match between each new blip and an existing track. the default gain function is a weighted sum of two components: the proximity of the new blip to the next location predicted for the track by assuming constant target velocity; and the homogeneity of target velocity when the new blip is added to the track. tracks are extended with new blips in such a way as to maximize the total "gain". when subsequent scans are processed, the procedure is repeated. all possible track segments connecting the blips in the previous k- scans and the blips in the new scan are considered, optimizing between proximity to predicted position and consistency in velocity. tracks may be broken and attached to a new blip, in which case the blips from the broken-off track tails participate in a second track-building phase with any other unmatched points. in effect, tracks can be retroactively corrected back k scans to better match newly acquired blips. the procedure is flexible in that the gain function can be modified or specified by the user to change the nature of the track building. in informal tests, the algorithm works well when there is limited'noise', where tracks are long, and more-or-less linear, and when the density of targets is lower. we have not directly quantified errors in track-building at this time, since we are actively undertaking calibration experiments that will allow us to incorporate additional information from blips into the blip finding, blip filtering and track building algorithms, all of which we expect to improve track-building performance. other, possibly superior, methods for track building exist that could be implemented in the future by us or the interested user. summary data for each blip and tracks can be exported to text files or raw r-format data files for processing outside radr. at present, exported data includes basic blip parameters and summaries of blip characteristics that may be useful for blip and track classification. when exporting data on tracks, each blip is associated with a unique track number. complete information on blips are retained in the blipmovies, and can be extracted by the user via additional plugins.. a simple'batch' mode allows the processing of multiple files in a single job, controlled by a script rather than the by the graphical user interface. displaying the targets biological targets are displayed in a "plan-position indicator" plot window which the user can pan, zoom and rotate. the ppi displays a scan by plotting a spot at the nominal range and azimuth of each sample, with the spot's color depending on the sample value. a pointer can optionally display the current characteristics of any blip or track on display. the user can also provide a background image such as an aerial photograph of the area being sampled that can be translated, rotated, and scaled within radr to align with radar data. the user can mimic the appearance of a phosphor screen by allowing blips to persist and fade over multiple scans. figure provides a screenshot of an example session with an underlay, several targets, and trails from those targets displayed. other utilities plugins exist for a number of other purposes, allowing users to create demonstration'clips' of movies in animated gif format, to add comments to blipmovie archives at specific points, and to generate random blips with known patterns and characteristics that could serve various purposes, such as algorithm testing. extensibility program radr is extensible by the user by writing "hook" functions in r, as discussed earlier. for example, each time the tracker plugin declares a track "complete", a user function, written in r, could be called with the coordinates of the blips on the completed track. this could then be used to apply a user-defined hidden-variables model for improving the estimates of target locations along the track, or to add the track to a 3-dimensional scene. software testing software has primarily been tested in an ad-hoc way, under field situations and similarly, through post-processing of data. as such, some parts of the code are known to be more robust than others. program radr is in active development, and new features are added regularly. we maintain a'stable' release and development versions of radr available for download at http://www.radr-project.org. using radr details of how to use radr in a field setting are provided at http://www.radr-project.org. these will change from time to time as new features are introduced, and bugs are corrected. the basic steps include: 1) installing radr and the supporting version of r on the local computer; 2) configuring radr so that it is aware of the current setup selection of parameters for the detection of blips and 4) recording. in our use, we are liberal with the amount of data collected. although it is possible we do not usually attempt to process tracks in real time, leaving those steps for post-processing. once data are acquired, radr is used to further filter and create tracks. filtering and track-building parameters are situation and radar dependent; individual users will need to calibrate their systems and view their archives to determine settings that meet their needs. special consideration needs to be made for the classification of targets; radars with short wavelengths readily detect birds, bats and insects and these types of targets are not easily separable without additional information. radr can facilitate target classification by providing the user with metrics such as target speed, height and direction. if a proper calibration protocol has been carried out then radr can be configured to provide information on the radar cross sections of targets or volume reflectivity.  we have developed and extensively tested radr in field situations over the past five years. the software provides an open solution to the problem of acquiring and preparing for analysis radar data for use in biological studies. we hope that the provision of a widely applicable, freely-available open source tool will enable researchers working with radar data to improve and standardize the acquisition, storage and analysis of these data greatly enabling comparisons across multiple times and studies and further developments in the field. we further welcome other researchers to collaborate with us on the future development of the software. availability and requirements project name: project radr project home page: http://www.radr-project.org operating system: full functionality on windows xp systems. on linux systems, all functionality except the ability to read live data from radar digitizing cards because the proprietary cards supported so far lack linux drivers programming language: r, c, c++ other requirements: r. digitizing card interface library and possibly server program from one of the two currently supported hardware vendors. license: gnu gpl version or later. any restrictions to use by non-academics: none authors' contributions pt developed the initial ideas, provided the overall conceptual framework for the project and is the main writer. jb wrote all of the code and formulated most of the internal conceptual organization for the program. cm and mp undertook extensive field testing, wrote sections of the manuscript, and provided key feedback on aspects of program and project implementation. dw provided extensive technical advice and modifications to hardware. all authors read and approved the final manuscript. supplementary material additional file 1 a basic primer for implementing a radar study. an outline of some basic information needed to implement a radar study click here for file acknowledgements charles francis provided the initial impetus for the project, facilitated funding, and provided technical and logistical support. john black provided very important early encouragement and ideas. two anonymous reviewers provided detailed comments that greatly improved the manuscript. financial support was provided by environment canada and natural resources canada through grants to pt. cm was supported by an nserc graduate fellowship.
program radr was developed to solve this problem. program radr is an open source software tool for the acquisition, storage and analysis of data from marine radars operating in surveillance mode. program radr provides a convenient, open source platform for the acquisition and analysis of radar data of biological targets. output data formats are designed to allow for future inclusion of additional data items without requiring change to c code.
 radar has been used for decades to study movement of insects, birds and bats. in spite of this, there are few readily available software tools for the acquisition, storage and processing of such data. program radr was developed to solve this problem.  program radr is an open source software tool for the acquisition, storage and analysis of data from marine radars operating in surveillance mode. radr takes time series data with a two-dimensional spatial component as input from some source and extracts and retains information of biological relevance. low-level data processing is implemented in "c" code, but user-defined functions written in the "r" statistical programming language can be called at pre-defined steps in the calculations. output data formats are designed to allow for future inclusion of additional data items without requiring change to c code. two brands of radar digitizing card are currently supported as data sources. we also provide an overview of the basic considerations of setting up and running a biological radar study.  program radr provides a convenient, open source platform for the acquisition and analysis of radar data of biological targets. 