Datasets:

Modalities:
Text
Formats:
text
Libraries:
Datasets
Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
text
stringlengths
11
36.3k
0.20 0.0000
0.21 0.0000
0.22 0.0000
0.23 0.0000
0.24 0.0000
0.25 0.0000
0.26 0.0000
0.27 0.0000
0.28 0.0000
0.29 0.0000
0.30 0.0000
0.31 0.0000
0.32 0.0000
0.33 0.0000
0.34 0.0000
0.35 0.0000
0.36 0.0000
0.37 0.0000
0.38 0.0000
0.39 0.0000
0.40 0.0000
0.41 0.0000
0.42 0.0000
0.43 0.0000
0.44 0.0000
0.45 0.0000
0.46 0.0000
0.47 0.0000
0.48 0.0000
0.49 0.0000
0.50 0.0000
0.51 0.0000
0.52 0.0000
0.53 0.0000
0.54 0.0000
0.55 0.0000
0.56 0.0000
0.57 0.0000
0.58 0.0000
0.59 0.0000
0.60 0.0000
0.61 0.0000
0.62 0.0000
0.63 0.0000
0.64 0.0000
0.65 0.0000
0.66 0.0000
0.67 0.0000
0.68 0.0000
0.69 0.0000
0.70 0.0000
0.71 0.0000
0.72 0.0000
0.73 0.0000
0.74 0.0000
0.75 0.0000
0.76 0.0000
0.77 0.0000
0.78 0.0000
0.79 0.0000
0.80 1.6114
0.81 1.6111
0.82 1.6108
0.83 1.6106
0.84 1.6103
0.85 1.6100
0.86 1.6097
0.87 1.6094
0.88 1.6092
0.89 1.6089
0.90 1.6086
0.91 1.6083
0.92 1.6080
0.93 1.6077
0.94 1.6074
0.95 1.6071
0.96 1.6069
0.97 1.6066
0.98 1.6063
0.99 1.6060
1.00 1.6057
1.01 1.6054
1.02 1.6051
1.03 1.6049
1.04 1.6046
1.05 1.6043
1.06 1.6040
1.07 1.6037
1.08 1.6035
1.09 1.6032
1.10 1.6029
1.11 1.6026
1.12 1.6023
1.13 1.6020
1.14 1.6017
1.15 1.6015
1.16 1.6012
1.17 1.6009
1.18 1.6006
1.19 1.6003
End of preview. Expand in Data Studio
YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/datasets-cards)

Dataset Card for Dataset Curve_Picking

Contains data images and labels for training an automatic picker on one channel (group velocity).

Dataset Details

The data images and labels originate from three experiments (Geneva, Costa Rica and Vulcano) :

- The images are 2D arrays showing the group velocity [km/s] (y-axis) spectrogram between station pairs as a function of the period [s] (x-axis).
- The labels are 2 columns [period velocity] .txt files containing the dispersion curves. These curves were either picked manually (Geneva and Costa Rica), or automatically by the pre-trained model and accepted from visual inspection (Vulcano)

Since each experiment was conducted in a different context, the period and velocity ranges are different from one sub-dataset to another. Meaning that the dimension of the 2D arrays varies. This will be dealt with 0-padding to an uniform array size when loading the data. What remains constant for all of the sub-datasets are the period (dT=0.01s) and velocity (dv=0.005km/s) increments.

  1. Geneva (261 instances) : V = [1.5 : 0.005 : 3.5] [km/s] T = [0.2 : 0.01 : 15.0 ] [s] -> 2D arrays of (401x1481)

  2. Costa Rica (1'800 instances) : V = [0.5 : 0.005 : 3.5] [km/s] T = [0.2 : 0.01 : 15.0 ] [s] -> 2D arrays of (601x1481)

  3. Vulcano (4'662 instances) : V = [0.5 : 0.005 : 3.0] [km/s] T = [0.04 : 0.01 : 5.0 ] [s] -> 2D arrays of (501x497)

2 more sub-datasets are in progress with the following :

  1. Aargau (? instances) : V = [0.6 : 0.005 : 3.9] [km/s] T = [0.2 : 0.01 : 7.0 ] [s] -> 2D arrays of (661x681)

  2. Riehen (? instances) : V = [0.6 : 0.005 : 3.5] [km/s] T = [0.2 : 0.01 : 6.0 ] [s] -> 2D arrays of (581x581)

So I suggest the uniform array size to be of : V = [0.5 : 0.005 : 3.9] [km/s] T = [0.04 : 0.01 : 15.0 ] [s] -> 2D arrays of (681x1497)

Download the dataset using HuggingFace python library

Be sure to have installed the huggingface_hub lib, if not, use pip install huggingface_hub.

from huggingface_hub import snapshot_download
snapshot_download(repo_id="MIGRATE/Curve_Picking", repo_type="dataset", local_dir="./os-disper-picker/experiments/dataset")

To Do

The next step is writting the data loader while considering :

  1. The 0-padding to the uniform array size such that each sub-dataset image is located correctly within these new ranges. Nb. Some of the images might contain NaN cells. Shall those be replaced to 0 ?

  2. To avoid storing heavy mask files unnecessarily, it is better to generate them directly from the data labels during training using the function below. The masks should also be the same size as the uniform array.

    # Function to generate mask from dispersion curve label (taken from reader.py of pre-trained model)
    # ! The radius parameter affects the gaussin spread and training performance (= 2 or 5 looked acceptable) !
    def get_label_matrix(self, file_path, size):
        ''' Read a dispersion curve and generate a label prob matrix.
    
        Attributes:
            file_path: File path.
            size ([int, int]): Expected matrix size. ssss
    
        Returns:
            A numpy array with the size of 'size'.
        '''
        
        try:
            disp_curve = np.loadtxt(file_path)
            disp_curve = disp_curve[:size[1], 1]
        except:
            disp_curve = np.zeros(size[1])
        
        matrix = np.zeros(size)
        for i in range(len(disp_curve)):
            vel = disp_curve[i]
            if vel != 0:
                y_index = int((vel - self.config.range_V[0])/self.config.dV)
                for j in range(size[0]):
                    matrix[j, i] = np.exp(-((y_index - j)**2)/(2*self.radius**2))
    
        return matrix
    
Downloads last month
4