STARE sidecar creator
Project description
STAREMaster_py is the python implementation of STAREMaster. It is used to create sidecar files for a collection of remote sensing products
Install
With pip
The installer will install the create_sidecar_files.py script and its dependencies.
Create a virtualenv:
mkvirtualevironment staremaster_py
Install from pypi
pip install staremaster
we then can install STAREMaster_py with
pip3 install -e STAREMaster_py/
pyhdf issues
Installing pyhdf from pip does not always seem to be trivially possible. Simple workaround is using conda;
conda create --name staremaster
conda activate staremaster
conda install -c conda-forge pyhdf
Then:
pip3 install -e STAREMaster_py/
Requirements
- pystare
- pyhdf
- numpy
- netCDF4
- argparse
- xarray
- dask['distributed']
- filelock
xarray and dask are hardcoded dependecies, but will become optional in the future
Usage
usage: create_sidecar_files.py [-h] [--folder folder] [--files files [files ...]] [--grid files] [--out_path OUT_PATH]
[--product product] [--cover_res cover_res] [--workers n_workers] [--archive archive]
[--parallel_files]
Creates Sidecar Files
optional arguments:
-h, --help show this help message and exit
--folder folder the folder to create sidecars for
--files files [files ...]
the files to create a sidecar for
--grid files the grid to create a sidecar for (e.g. IMERG)
--out_path OUT_PATH the folder to create sidecars in; default: next to granule
--product product product (e.g. cldmsk_l2_viirs, hdfeos, l2_viirs, mod05, mod09, vj102dnb, vj103dnb, vnp02dnb, vnp03dnb,
ssmi)
--cover_res cover_res
max STARE resolution of the cover. Default: min resolution of iFOVs
--workers n_workers use n_workers (local) dask workers
--archive archive Create sidecars only for granules not listed in the archive file. Record all create sidecars and their
corresponding granules in it.
--parallel_files Process files in parallel rather than looking up SIDs in parallel
e.g.
python3 create_sidecar_files.py --workers 4
--product MOD09 --file ~/MOD09.A2019317.0815.006.2019319020759.hdf
Extension
To add support for additional products, we need the following:
- a module in products/ containing
- a class for the product that implements the reading of the geolocation and the gring
- a method that implements the write_sidecar() function
- an import of the new module in products/__init__.py
- argument parsing and switch for the added product in create_sidecar_files.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
staremaster-0.0.3.tar.gz
(32.6 kB
view hashes)
Built Distribution
Close
Hashes for staremaster-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eff1fb48f4ecb1d6a4d432f940ecc03bf867f682361eba148614e2e46b41767 |
|
MD5 | 0c25f593c46ff132d984074e3b490482 |
|
BLAKE2b-256 | c2289041a89bc4c2716bea54fd9ac45cafd7545cd261fc19b23dad668f662b49 |