Commit bb3de61b authored by Alex Nunes's avatar Alex Nunes
Browse files

Minor fix to docs

Changes to be committed:
	modified:   docs/notebooks/receiver_efficiency_index.ipynb.rst
	modified:   py_notebooks/receiver_efficiency_index.ipynb
	modified:   py_notebooks/residence_index.ipynb
parent d5a80757
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -10,8 +10,10 @@ create a context for the detections. Both the amount of unique tags and
number of species are taken into consideration in the calculation.

The receiver efficiency index implement is implemented based on the
paper [paper place holder]. Each receiver’s index is calculated on the
formula of:
paper `Acoustic telemetry array evolution: From species- and
project-specific designs to large-scale, multispecies, cooperative
networks <https://doi.org/10.1016/j.fishres.2018.09.015>`__. Each
receiver’s index is calculated on the formula of:

.. container:: large-math

+1 −1
Original line number Diff line number Diff line
%% Cell type:markdown id: tags:

# Receiver Efficiency Index

The receiver efficiency index is number between ``0`` and ``1`` indicating the amount of relative activity at each receiver compared to the entire set of receivers, regardless of positioning.
The function takes a set detections and a deployment history of the receivers to create a context for the detections. Both the amount of unique tags and number of species are taken into
consideration in the calculation.

The receiver efficiency index implement is implemented based on the paper [paper place holder]. Each receiver's index is calculated on the formula of:
The receiver efficiency index implement is implemented based on the paper [Acoustic telemetry array evolution: From species- and project-specific designs to large-scale, multispecies, cooperative networks](https://doi.org/10.1016/j.fishres.2018.09.015). Each receiver's index is calculated on the formula of:


<br/>

<div class="large-math">

REI = $\frac{T_r}{T_a} \times \frac{S_r}{S_a} \times \frac{DD_r}{DD_a} \times \frac{D_a}{D_r}$

</div>

<hr/>

* REI = Receiver Efficiency Index
* $T_r$ = The number of tags detected on the receievr
* $T_a$ = The number of tags detected across all receivers
* $S_r$ = The number of species detected on the receiver
* $S_a$ = The number of species detected across all receivers
* $DD_a$ = The number of unique days with detections across all receivers
* $DD_r$ = The number of unique days with detections on the receiver
* $D_a$ = The number of days the array was active
* $D_r$ = The number of days the receiver was active


Each REI is then normalized against the sum of all considered stations. The result is a number between ``0`` and ``1`` indicating the relative amount of activity at each receiver.


<span style="color:red">Warning:</span>

    Detection input files must include ``datecollected``, ``fieldnumber``, ``station``, and ``scientificname`` as columns and deployment input files must include ``station_name``, ``deploy_date``, ``last_download``, and ``recovery_date`` as columns.

``REI()`` takes two arguments. The first is a dataframe of detections the detection timstamp, the station identifier, the species, and the tag identifier. The next is a dataframe of deployments for each station. The station name should match the stations in the detections. The deployments need to include a deployment date and recovery date or last download date. Details on the columns metnioned see the preparing data section.

<span style="color:red">Warning:</span>

    This function assumes that no deployments for single station overlap. If deployments do overlap, the overlapping days will be counted twice.

%% Cell type:code id: tags:

``` python
from resonate.receiver_efficiency import REI

detections = pd.read_csv('/path/to/detections.csv')
deployments = pd.read_csv('/path/to/deployments.csv')

station_REIs = REI(detections = detections, deployments = deployments)
```
+0 −0
Original line number Diff line number Diff line