This is a package that allows me to load segy files and select the appropriate bytes for acquisition parameters and convert the data to a h5 file. This h5 file has a seis extension which can be loaded using load_seis (check the examples) and be manipulated easily.
from path_loader import data_path # noqa: F401
from segy_loader import load_segy
load_segy()After saving as a seis file, it can be loaded using segy_loader.io.load_seis which returns a Seis object with multiple functionalities.
from segy_loader.io import load_seis
path = osp.abspath(osp.join(osp.dirname(__file__), "../data/seis/42.seis"))
data = load_seis(path)This only load the seis file, but data allows easy data manipulation and sorting.
Examples are available in the Example folder.
- Install Python 3.11.6
If you don't have
pyenv install 3.11.6
pyenvinstalled, usefirst.curl https://pyenv.run | bash
- Install
Poetryand add it to your system's path.curl -sSL https://install.python-poetry.org | python3 - - Add it to your system's path
You can check if it is installed using
echo 'export PATH="$HOME/Library/Application Support/pypoetry/venv/bin:$PATH"' >> ~/.zshrc
poetry --version - Create a virtual environment
poetry env use python3.11.6
- Activate the virtual environment
source $(poetry env info --path)/bin/activate
- Install requirements
poetry install
- Call
load_segy()python -c "from segy_loader import load_segy;load_segy()"
- Create a virtual environemnt
You can check the environments using
pyenv virtualenv 3.11.6 0_segy_loader_venv
pyenv virtualenvsorpyenv versions - Activate the virtual environment
pyenv activate 0_segy_loader_venv
- Install requirements
python -m pip install -r requirements.txt
- Install
segy_loaderorpython -m pip install -e .python -m pip install git+https://github.com/AmirMardan/segy_loader.git
- Call
load_segy()python -c "from segy_loader import load_segy;load_segy()"