Skip to main content

DMSP converter

Project description

This is a simple converter for the source files of the DMSP detector SSJ/4.

This package provides 3 modules for use:

  1. from_gz
  2. make_dataset
  3. transform_dataset

The features of these modules are described below.

  1. The unzip(filepath, mode='to_file') function of the from_gz module unpacks the gz-archive. The first parameter of the function takes the path to the file. The second parameter must specify the unpacking mode.

Two unpacking modes are available: "to_file" (default) and "to_ram".

When the "to_file" mode is selected, the function creates a new binary file in the archive directory with the archive name, removing its extension.

When the "to_ram" mode is selected, the function returns the contents of the archive - a set of bytes.

  1. The make_xr_dataset(filepath) function of the make_dataset module parses binary data, forming a set of source data from a binary DMSP file.

The input parameter for the function is the path to the archive file with the "gz" extension.

The function returns a set of source data that requires conversion to physical quantities. The type of the returned value is xarray.core.dataset.Dataset (i.e. the xarray library is used).

  1. The make_transform_dataset(filepath) function of the transform_dataset module parses binary data, forming a set of transformed data from a binary DMSP file.

The input parameter for the function is the path to the archive file with the "gz" extension.

The function returns a set of data converted to physical quantities. The type of the returned value is xarray.core.dataset.Dataset (i.e. the xarray library is used).

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

pydmsp-0.1.6.tar.gz (11.8 kB view hashes)

Uploaded Source

Built Distribution

pydmsp-0.1.6-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page