Customizing Sites Configuration for PitPro

PitPro is tightly coupled with the PTAGIS database system. The sites configuration is basically a mirror of the PTAGIS system. Using the standard PitPro configuration it is only possible to use PTAGIS interrogation sites as capture history sites.

It is possible, however, to edit the standard PitPro site configuration allowing custom sites to be used in capture histories. Often times this is a recapture site where PTAGIS recapture data is available. The data can easily be converted into the PitPro observation data format and a custom site added to the PitPro configuration to allow the data to be correctly processed into capture histories.

Adding a New Site to the PitPro Configuration

PitPro can be configured to use an alternate site configuration. The best way to create a custom configuration file is to save the current, internal version and then modify that file to suit your needs. You can save out the current configuration file by selecting Sites=>Show current sites configuration... (i.e. by selecting Show current sites configuration from the Sites menu). This will open a new window displaying the current site configuration which can be saved by selecting File=>Save as... and giving the file a name (like custom_sites_config.txt). Save it somewhere that you can easily find again.

The next step is to modify the site configuration file to add a new interrogation site. In the code example below (Converting Recapture Data for PitPro) we have SALRSF recapture data which we convert to interrogation data. In the example we make up a dummy detector (AAA) and a dummy coil id (A1). The site configuration for that would look like:


code: AAA
{
  range:  1-Apr-10 Present
  {
    R: U : 0 : DETECTOR : A1
  }
}

site: aa
{
  name: ACME Custom Site
  riverk: 522.173
  stage: juvenile adult
  codes: AAA;
}

In the above example, the code is set to AAA. This will need to match up to the second column in the observation file. The coil id is A1 which should match the 4th column in the observation file. The data range needs to cover the expected observation data range. The key word Present means that any date after the range start date (in this case 1-Apr-10) will be covered by this rule.

Both a site and a code configuration must be present to define this custom site. The name parameter under the site configuration will be the name that appears on the Sites tab in PitPro where the juvenile and adult sites are defined. The fact that the stage is defined as "juvenile adult" will mean that this site can be used for either or both. The stage can also be either juvenile or adult or, as in this case, both.

The river km lets PitPro know where to put this site in order and the codes list (in this case one code, AAA) allows PitPro to attach this site to the AAA code. The other codes are explained in the PitPro manual, but the most important for our purposes is the R in the range definition which indicates that fish detected on this coil and site (for the given date range) should be flagged as returned-to-river.

The code snippet above is then copied into the custom site configuration file save in the first step. The code can be placed anywhere in the file. Once the custom site configuration file is saved and updated you need to tell PitPro to use it. You can do this by again going to the Sites menu and this time selecting the Edit sites configuration... menu item. This will bring up a dialog where you can check the Use alternate sites configuration file check box and then use the browse button (labeled with ...) to browse the custom sites configuration. PitPro will now use this configuration file. You should now be able to go the Sites tab and see the new site in the Juvenile sites or Adult sites list boxes.

To use the above configuration the observation data must be in the format that will map to the configuration. The observation site will need to be AAA in this case, and the code should be A1. Following is an example of how to convert recapture data to observation data.

To use the above configuration the observation data must be in the format that will map to the configuration. The observation site will need to be AAA in this case, and the code should be A1. Following is an example of how to convert recapture data to observation data.

Converting Recapture Data for PitPro

Here is an example of recapture data formatted for PitPro. This is the csv data as it delivered directly from PTAGIS.

PTAGIS Recapture Data

"tag id","recapture date","recapture site","recapture river km"
"3D9.1BF22CB83D","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF22CC2F9","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF23E13D2","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF2446DF2","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF24DAA37","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF25F5803","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF25F77C2","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF25FB54D","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF263C025","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF269889E","2010-06-23 12:01:00","SALRSF","522.303.215.110"
"3D9.1BF26ABC00","2010-06-23 12:01:00","SALRSF","522.303.215.110"

Here is the data "converted" to PitPro obs file format. I loaded the above file into Excel and re-arranged the columns. I also put in phony observation site "AAA" and added "A1" as the coil id. These can be anything but whatever is chosen must match up with the custom site definition, as explained above.

When I exported the data from excel in csv format I was careful to specify a custom cell type for the date that included seconds (yyyy-mm-dd hh:mm:ss). In this example the quotes are gone but that is ok since PitPro ignores quotes. I added the standard observation file header line but this is not required, and is also ignored by PitPro.

Recapture Data Re-Formatted as PitPro Obs Data

tag id,observation site,observation date,coil id
3D9.1BF22CB83D,AAA,2010-06-23 12:01:00,A1
3D9.1BF22CC2F9,AAA,2010-06-23 12:01:00,A1
3D9.1BF23E13D2,AAA,2010-06-23 12:01:00,A1
3D9.1BF2446DF2,AAA,2010-06-23 12:01:00,A1
3D9.1BF24DAA37,AAA,2010-06-23 12:01:00,A1
3D9.1BF25F5803,AAA,2010-06-23 12:01:00,A1
3D9.1BF25F77C2,AAA,2010-06-23 12:01:00,A1
3D9.1BF25FB54D,AAA,2010-06-23 12:01:00,A1
3D9.1BF263C025,AAA,2010-06-23 12:01:00,A1
3D9.1BF269889E,AAA,2010-06-23 12:01:00,A1
3D9.1BF26ABC00,AAA,2010-06-23 12:01:00,A1

More Information

For more information, please refer to the PitPro manual.