No project description provided
Project description
This is a simple converter for the source files of the DMSP detector SSJ/4.
This package provides 3 modules for use:
- from_gz
- make_dataset
- transform_dataset
The features of these modules are described below.
- 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.
The get_filename(filepath)
function of the from_gz module returns the file name from the passed path.
- 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 file must be pre-unpacked manually or using theunzip(filepath, mode)
function of the from_gz module.
The input parameter for the function is the path to the file.
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).
Below is the result of obtaining a set of source data from the file "j4f0787122".
- 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 file must be pre-unpacked manually or using theunzip(filepath, mode)
function of the from_gz module.
The input parameter for the function is the path to the file.
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).
Below is the result of obtaining a set of converted data from the file "j4f0787122".
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.