> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/qtech/datscan-and-data-loggers/datscan-analyser/set-up.md).

# Set up sites, filters and the database

Set the import, export and backup folders, the filter, the database, and the sites.

The configuration sets the default file locations, data filters and information about the site locations of the Data Loggers that you will extract data from. When DatScan Analyser is run for the first time it will automatically display the configuration screen. Clicking the **Config** button opens the system configuration dialog windows. All configuration settings are saved and are persistent between sessions. Complete the configuration section before proceeding to import and analyse data.

{% hint style="info" %}
**Applies to:** DatScan Analyser, user guide v1.4.
{% endhint %}

## Set the folders

| Field      | What it's for                                                                                                                                                                                                                                                                                                              |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Import** | This specifies where the application will find the CSV data files downloaded from the EP3 Data Manager. The location can be modified at the time of importing. Note: This field can be ignored for automated data collection using the Cellular Data Loggers.                                                              |
| **Export** | This specifies where the application will put the output CSV data files when the data is exported from the database. The location can be modified at the time of exporting.                                                                                                                                                |
| **Backup** | This specifies where the application will place the backup copies of the CSV data files once they have been imported. This is an automatic process and therefore this location cannot be modified at the time of importing. Note: This field can be ignored for automated data collection using the Cellular Data Loggers. |

Click the magnifying glass icon to browse to folder locations. If the folder pathname does not exist, you will be prompted to create the folder.

## Choose the filter

Depending on the type of sensor used with the Data Logger and the position of the Data Logger in relation to the area it is sensing you may find that when a person passes under the sensor, they are registered more than once. The filter attempts to remove this additional information before the data is analysed.

![The Filter Configuration settings, with the Zero State Filter selected and a parameter of 2 seconds](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2FZJnh2VKSNQbqthTOUy1y%2Fanalyser-filter-configuration.png?alt=media)

| Filter                | Default    | Use it for                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Zero State Filter** | 2 seconds  | This filter is based on data from the Cellular Logger or EP3 Data Manager providing timestamps for both 1 and 0 events. (i.e. when the PIR detected movement and when it stopped detecting movement). The filter works by ensuring that any new detection of movement is at least 2 seconds apart from when the last movement was detected. E.g. the PIR has been in the zero state for at least 2 seconds. |
| **Spire Filter**      | 60 seconds | This filter is not used with data obtained from a Cellular Logger or EP3 Data Manager. This filter works best for older software that only logs the timestamps for Entry events (which occur when the PIR first detects the movement). This filter works by checking both forwards and backwards in the data, if too many triggers occur within a 60 second period then they are eliminated.                |

There is no all-encompassing filter because environmental factors have to be taken into account such as location, positioning, throughput etc. Optimal settings are usually derived experimentally. One method is to manually record the times of people going past your Data Logger and then compare the results to the generated reports. The same report can then be regenerated multiple times using different filter options until you find the optimum settings. In general, the default filter values work well if you are looking for trends as opposed to exact usage figures.

## Choose the database

* **MS Access Database:** Select this if Microsoft Access is installed on the workstation and reporting functions are to be carried out only on the one workstation. The default file is stored in: `C:\Program Files (x86)\QTech\DatScan Analyser\DatScan.mdb`. In order to access the file, you must be an administrator of the machine or have folder permissions. However, the file can be moved from the default location to another folder on the machine or a shared mapped network (with a drive letter). Then in the config dialogue click the browse button (magnifying glass) and navigate to the file on your network drive and select it.
* **MS SQL Server Database:** Select this to connect to a corporate MS SQL Server Database or to connect to a SQL database on the workstation if MS SQL Server or SQL Server Express is installed. For remote connections specify the server name in the form: `<computer name>\<sql server instance name>`. For installations on the same pc specify the server in the form: `.\<sql server instance name>`. Provide a SQL server assigned username and password for access control.

## Set up your sites

The Analyser can assign data from loggers to specified sites and according to departmental categories. Each Site is allocated a short reference acronym, a brief description of the site and a category so that similar sites can be grouped. Click **Sites** on the main dashboard to view and edit site configurations.

![The Site Configuration window, with a list of site codes, names and categories, and the fields for the selected site](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2F4ULqLli5tTDY2sIp6SfY%2Fanalyser-site-configuration.png?alt=media)

| Field                      | Rules                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Site Code**              | The Site Code is a unique identifier for the site. Cellular Data Logger: This field is automatically created by the DATAHost base station when data is retrieved by the Cellular Data Logger. If multiple sensors are connected to a single Cellular Data Logger then they will be numbered alongside the site name. E.g. QD01, QD02 etc. EP3 Data Logger: For data to be imported successfully, the Site Code must match the Logger Short Name specified in the EP3 logger list. The Site Code is a unique identifier, and it cannot be edited after it is created. This field can be a maximum of 4 uppercase characters long and must start with an alphabetic letter. If the site code is not defined it will be created during the import process from log files. |
| **Site Name**              | The Site Name should be used as the description of the site in a readable form. This text will be added to the heading of any reports/graphs. The field can be up to 50 characters long. A site name should be added to every site code listed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Category**               | Category is provided solely for the purpose of grouping. The field can be up to 50 characters long.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Location** and **Notes** | Location and Notes are optional fields, stored in the database but are for your own information (i.e. they are not used by this application for any purpose). Location can be 50 characters long and Notes can be up to 150 characters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

The site Update screen is found by clicking **Add** icon on Site Configuration screen. To sort by a column, click the mouse over the appropriate column heading. Clicking on the same heading will toggle between ascending and descending. The sorted order of the list is maintained between sessions and also between this dialog and the reporting dialog.

### Matching names in DatScan Analyser and the EP3

There are differences in the naming conventions in the EP3 documentation.

| DatScan Analyser | EP3 logger list   |
| ---------------- | ----------------- |
| Category         | Site Name         |
| Site Name        | Logger Name       |
| Site Code        | Logger Short Name |
| Location         | Address           |
| Not Applicable   | Logger Type       |

Note: Customer Number is assigned by QTech Data Systems and must not be changed. See [Set up the SD card and logger list](https://help.qtech.co.nz/qtech/datscan-and-data-loggers/ep3-data-manager/sd-card-and-logger-list.md).
