--- language: - en license: cc-by-4.0 pretty_name: patch-the-planet --- # Dataset Card for Patch the Planet ## Dataset Description This data was produced by ThinkOnward for the [Patch the Planet Challenge](https://thinkonward.com/app/c/challenges/patch-the-planet), using a synthetic seismic dataset generator called [Synthoseis](https://github.com/sede-open/synthoseis). This dataset consists of 500 training volumes and 15 test volumes. You will also be provided with a training data generation code in the starter notebook to build the training data. This code allows experimentation with different-sized missing data volumes in the seismic data. The challenger can increase the percentage of the missing section in each seismic volume to increase the difficulty. The default missing section will be set to 25%. ![image](src_imgs/ptp.png) - **Created by:** Mike McIntire at ThinkOnward - **License:** CC 4.0 ## Uses ### How to generate a dataset This dataset is provided as whole seismic volumes. It is the users responsibility to generate the missing sections of the seismic volumes. Please follow the steps below to generate the missing sections of the seismic volumes. ![image](src_imgs/rigel-c-overview-prod-1.png) Step 1: Load the seismic volume and convert from parquet to numpy array ```python import pandas as pd import numpy as np def parquet2array(parquet_file, original_shape=(300,300,1259)): df = pd.read_parquet(parquet_file) data_only = df.drop(columns=['Row', 'Col']) # Convert the DataFrame back to a 2D numpy array reshaped_array = data_only.values # Reshape the 2D array back into a 3D array array = reshaped_array.reshape(original_shape) return array ``` Step 2: Generate the missing sections of the seismic volume. This code will delete a random section of the seismic volume and return the target region and the mask of the target region. ```python def training_data_generator(seismic: np.ndarray, axis: Literal['i_line', 'x_line', None]=None, percentile: int=25): """Function to delete part of original seismic volume and extract target region Parameters: seismic: np.ndarray 3D matrix with original survey axis: one of 'i_line','x_line' or None. Axis along which part of survey will be deleted. If None (default), random will be chosen percentile: int, size of deleted part relative to axis. Any integer between 1 and 99 (default 20) Returns: seismic: np.ndarray, original survey 3D matrix with deleted region target: np.ndarray, 3D deleted region target_mask: np.ndarray, position of target 3D matrix in seismic 3D matrix. This mask is used to reconstruct original survey -> seismic[target_mask]=target.reshape(-1) """ # check parameters assert isinstance(seismic, np.ndarray) and len(seismic.shape)==3, 'seismic must be 3D numpy.ndarray' assert axis in ['i_line', 'x_line', None], 'axis must be one of: i_line, x_line or None' assert type(percentile) is int and 0