# Supervised Segmentation of NO2 Plumes from Individual Ships Using Troppomi Satellite Data
## 3 Materials and Methods
### Method
#### 3.2.5 Feature Set Construction  
In order to obtain a multivariate description of the _ship sector_ pixels, we encoded the spatial information into a set of generic features. First, we performed a _ship sector_ normalization to make spatial information in the sector comparable between the different sectors. We defined a _normalized sector_ by the standardization of the orientation and the scale of the original _ship sector_. In this way, the position of the plume within the _ship sector_ becomes invariant to the heading (direction) and speed of the ship, as well as to the direction and speed of the wind.  
We standardized the orientation of a _ship sector_ by rotating to 320\({}^{\circ}\) so that the angle of the polar coordinate of the corresponding _wind-shifted ship track_ is the same for all ships (see Figure 6). The particular value of the sector rotation angle was chosen for the convenience of visualization and has no influence on further modeling. Assuming \(S\) is a set of ship sectors in the dataset, formally, the rotation coordinates of a _ship sector_ are defined in the following way:  
\[\forall s\in S,\quad\forall i\in s:\quad lon_{\_}rotated_{\_i,j}=r_{\_i,j} \cdot cos(\alpha_{\_i,j}+\Theta_{\_i}),\quad lat_{\_}rotated_{\_i,j}=r_{\_i,j} \cdot sin(\alpha_{\_i,j}+\Theta_{\_i}), \tag{2}\]  
where \(lon\_}rotated_{\_i}\) and \(lat\_}rotated_{\_i}\) are the polar coordinates of the pixel \(i\) within the rotated _ship sector_, \(r_{\_i,i}\) is the radial distance of the pixel \(i\) from the origin of the _ship sector_\(s\) (in our case, the sector origin corresponds to the position of the ship at the moment of satellite overpass), \(\alpha_{\_i,s}\) is a counterclockwise rotation angle of the pixel \(i\) from the axis \(x\) (\(longitude\)) of the _ship sector_\(s\), \(\Theta_{\_i}=\beta-\alpha_{\_i}\) is a counterclockwise rotation angle that will be applied for the orientation change of each pixel \(i\) of the _ship sectors_, \(\alpha_{\_i}\) is a rotation angle of a _ship sector_\(s\) that corresponds to the counterclockwise rotation angle of the pixel \(i_{\_i,max}\) with the radial distance from the origin \(r_{\_i,max}=max(r_{\_i})\), and \(\beta=320^{\circ}\) is a new rotation angle of each _ship sector_\(s\) after the rotation.  
We standardize the _ship sector's_ scale so that the horizontal and vertical coordinates of the rotated _ship sector_ are rescaled into the range [0, 1] by applying a min-max scaler on the horizontal and vertical coordinates of the pixel:  
\[lon\_}norm=\frac{lon\_}rotated-min(lon\_}rotated){max(lon\_}rotated)-min(lon\_ }rotated), \tag{3}\]  
\[lat\_}norm=\frac{lat\_}rotated-min(lat\_}rotated){max(lat\_}rotated)-min(lat\_} }\]  
The second step of the feature construction procedure is the division of the _normalized sector_ into a set of sub-regions that enable encoding spatial information of the pixels within the _normalized sector_. First, we define _levels_ of the _normalized sector_ by splitting it into six sub-regions on the basis of the radial distance of the pixel from the origin of the sector. Then, we define _sub-sectors_ by splitting the _normalized sector_ into four sub-regions on the basis of the pixel's rotation angle. As a result, the position of each pixel within the _normalized sector_  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Trace track duration & 2 h \\ Wind speed uncertainty & 5 m/s \\ Wind direction uncertainty & 40\({}^{\circ}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Parameters applied for ship sector definition.  
image can be characterized in terms of two values: a _level_ and a _sub-sector_. An illustration of the _normalized sector_ divided into a set of _levels_ and _sub-sectors_ is presented in Figure 7.