Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pygridsio

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pygridsio

This is a utility package to read in .zmap and .asc grids to numpy or xarrays

  • 0.1.8
  • PyPI
  • Socket score

Maintainers
1

pygridsio

Introduction

This is a python submodule containing IO functionality for reading and writing .asc and .zmap grids.

Usage

from pygridsio.pygridsio import *

To read a grid file into the custom grid class:

grid = read_grid(filename)

To read a grid file into an xarray, with dimensions x, y, grid:

grid = read_grid_to_xarray(filename)

Or if you want to read multiple grids into an xarray provide a list of filenames:

grids = read_grids_to_xarray([file1, file2])

You can optionally provide labels fo the multiple grid:

grids = read_grids_to_xarray([file1, file2], labels=["grid1","grid2"])

Installation

Pip

pip install pygridsio

Anaconda virtual environment

Create/update anaconda environment

The file environment.yml can be used to create a working python environment with the needed packages. For this open an Anaconda Prompt and:

conda env create -f environment.yml

Or to update the existing anaconda environment (with an updated version of theenvironment.ymlfile :

conda env update -n pygridsio -f environment.yml

Export (updated) anaconda environment

The environment.yml file needs to be updated when new packages are added:

conda env export --from-history -n pygridsio > environment.yml

Use anaconda environment in PyCharm

To connect the anaconda environment to Pycharm you can go to File , Settings, Project, Python Interpreter, add interpreter, add local interpreter, conda environment and then select the environment you created using the above steps.

Verify Installation

You can verify the installation of the different python packages by running the tests stored in tests. In pycharm: Right click on the folder marked tests and click on Run python tests in test

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc