‘mating_data_traces_27june2021.csv’ contains neuronal activity traces assembled alongside continuous and discrete behavioral time series concatenated for the eight main and 14 partial datasets (see methods). Each dataset has a unique ID, indicated in the ‘Dataset' column.

The first 58 columns of the data table contain centered and scaled neuronal activity traces.
 
The data table includes several continuous behavioral features:

- Velocity - velocity of the male tail in the egocentric coordinates (relative to the animal’s body axis). Positive numbers correspond to swimming backwards and negative — correspond to swimming forwards. In most datasets the male shows swimming in both directions.

- Rel.Velocity - velocity of the male tail relative to the hermaphrodite body. This parameter indicates the speed and direction of scanning of the hermaphrodite body.

- Tail.Curvature - tail curvature.

- LtoTips - distance of the male tail to the hermaphrodite head/tail.

- LtoVul - distance of the male tail to the hermaphrodite vulva.

- Spicules - protrusion of the male mating parts (spicules).

- pos_x, pos_y - position of the male tail mapped to the hermaphrodite body (see methods). Negative and positive pos_y correspond to the dorsal and ventral sides respectively.

- x, y, - x and y coordinates of the tail centroid as the male swims on the plate.

Most datasets capture both searching mating behaviors. Some continuous features (i.g. Rel.Velocity, Rel.Speed, LtoTips, LtoVul, pos_x, pos_y) are set to ‘NA’ when the male is not in contact with the hermaphrodite.

Discrete behavioral events and motifs are tabulated in the ’Ethogram' column as follows (main datasets only):

1	No ventral contact, before sperm release
2	No ventral contact, after sperm release
3	Ventral contact, before sperm release
4	Ventral contact, after sperm release
5	Vulva contact, before sperm release
6	Vulva contact, after sperm release
7	Unsuccessful turning, before sperm release
8	Successful turning, before sperm release
9	Successful turning, after sperm release
10	Self contact, before sperm release
11	Self contact, after sperm release

‘mating_data_motif_onsets_27june2021.csv’ contains timestamps for the onsets of discrete behavioral motifs. The motifs are tabulated as follows:

1 Ventral contact with a hermaphrodite
2 Loss of ventral contact
3 Successful turn onset
4 Failed turn onset
5 Vulva contact
6 Sperm release
7 Retraction of spicules
8 Forward swimming (all states)
9 Backward swimming (all states)
10 Forward sliding, relative to the hermaphrodite (courtship)
11 Backward sliding, relative to the hermaphrodite (courtship)
12 Forward swimming (searching)
13 Backward swimming (searching)
14 Forward swimming (courtship)
15 Backward swimming (courtship)