SCRIPT for read MARSIS EDR, RDR and RAW files and export Images, Numpy Dumps and geopackages/shapefiles
@author: Giacomo Nodjoumi - g.nodjoumi@jacobs-university.de
- Pipeline/workflow description
- Differences between CLI script and notebook
- CONDA environment
- Script execution
Table of contents generated with markdown-toc
The script in brief:
- Ask user to provide arguments if not passed. e.g. data path, type of file, etc.
- Read all files available in the provided folder and export all flagged elements
** See example at the end of this readme**
The script can work both passing some/all arguments or none If NO argument is passed, defaults are used and interactively requested the others.
The only difference is that arguments can only be passed to CLI script while notebook ask them interactively
To best use the script a conda environment configuration file is provided: MARSISv2.yml
Installer of anaconda for different operating systems are provided on the official page. Anaconda Installers
To install conda on linux, download this file, with terminal move to the downloaded folder and run:
sudo chmod +x Anaconda3-VERSION-Linux-x86_64.sh
(replace VERSION with the proper filename)sudo ./Anaconda3-VERSION-Linux-x86_64.sh
Using the terminal, craate conda env using provided MARSISv2.yml:
conda env create -f MARSIS_Env.yml
conda activate MARSIS_Env
To execute, simple run the following code python xDR|RAW-Reader.py
It will ask every arguments.
--wdir
path where all files are saved
--ddir
path where are all files to be processed
--drv
choose between GPKG, gpkg, SHP, shp
--drt
insert choice between EDR, edr, RDR, rdr, RAW, raw
--sim
insert choice between Y,y,N,n
--sdum
insert choice between Y,y,N,n
--sgy
insert choice between Y,y,N,n
--dbup
insert choice between Y,y,N,n
Just run `python xDR-RAW-Reader.py
If NO argument is passed, the scripts ask interactively:
- Output Directory: path where all files are saved
- Data directory: path where are all files to be processed
- Driver for gis output: insert choice between GPKG, gpkg, SHP, shp
- Data record type: insert choice between EDR, edr, RDR, rdr, RAW, raw
- Flag for save images of both frequencies: insert choice between Y,y,N,n
- Flag for save numpy dump of both frequencies: insert choice between Y,y,N,n
- Flag for save seg-y of both frequencies: insert choice between Y,y,N,n
- Flag for ingest data into database Y,y,N,n
- Flag for select destination CRS
It creates three different geopackages: - FULL with all orbits - North Pole with orbits from 65°->90° Latitude - South Pole with orbits from -65°->-90° Latitude
As default it creates thre types of images for each frequency:
- Original image
- Normalized image
- Scaled image using sklearn MinMaxScaler
Further image processing is in development
Connection to database and ingestion parameters must be set into utils/DB_utils.py Provided configuration is just an example
It export a seg-y file for both frequency
Example of seg-y imported into opendTect And 2d track, showing dt in a major scale