Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# FinDer Mask

## Principle

FinDer interpolates the recorded acceleration amplitudes in the area of interest before applying the template matching algorithm for estimating the source parameters. The area of interest for FinDer is restricted via a custom mask: the mask enabled region is constructed as the union of the disks of radius `MASK_STATION_DISTANCE` centered on every enabled stations. In other words, any interpolated point that is located more than `MASK_STATION_DISTANCE` away from every enabled station is not considered for FinDer source estimation.

The setup of the FinDer Mask requires:

- defining a white list and/or black list of the stations to use or discard with finder

- running scfinder once with the mask creation switch activated

- setting the path to the generated mask in the finder configuration file

Warning

The following steps will only work if you use a recent version of the finder docker image (downloaded after July 28 2025). Make sure to update you finder image as needed.

## Setup

1. Log into the docker container to access the configuration files:

       docker exec -u sysop -w /home/sysop/.seiscomp -it finder bash

2. Select the stations to enable or disable in `scfinder.cfg` (all the inventory is enabled by default):

     Use vim to set or edit the streams.whitelist and streams.blacklist parameters.

3. (Optional) Change the default `MASK_STATION_DISTANCE` parameter:

     This parameter is defined in the `finder.config` file (default to 75.0 km) and will be used to generate the mask. You can adapt it according to your network density.

4. Generate the Mask by runing scfinder with the `--calculate-mask` option and the path to the output file:

       scfinder --calculate-mask /home/sysop/.seiscomp/finder_mask.nc --debug --offline

5. Add the path to the new mask file in the `finder.config` configuration file:

     Set the `REGIONAL_MASK` parameter to: `REGIONAL_MASK /home/sysop/.seiscomp/finder_mask.nc`

## Visualization

1. Extract the grid boundaries from the mask file into variables (requires GMT):

       # You may need to adjust the commands depending on the GMT version
       read minlon maxlon < <(gmt grdinfo finder_mask.nc | awk '/x_min:/ {print $3, $5}')
       read minlat maxlat < <(gmt grdinfo finder_mask.nc | awk '/y_min:/ {print $3, $5}')

2. Create a postscript image:

       gmt psbasemap -Bpxa5f5 -Bpya5f5 -JM5.5i -R${minlon}/${maxlon}/${minlat}/${maxlat} -X2 -Y6 -P -K -V > mask.ps
       gmt grdimage finder_mask.nc -JM5.5i -R${minlon}/${maxlon}/${minlat}/${maxlat}  -n+c -V -K -P -O -Q >> mask.ps
       gmt pscoast -JM5.5i  -R${minlon}/${maxlon}/${minlat}/${maxlat} -W0.75p -Df -A10  -Na/0.75p -P -O -V >> mask.ps

3. Copy the postscript file to the host for visualization:

       # From a terminal on host
       docker cp finder:/home/sysop/.seiscomp/mask.ps ./

4. Convert to pdf if needed (requires ghostscript):

       gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=mask.pdf mask.ps