Skip to main content

A CLI tool to convert geomagnetic coordinates in DMSP data files to AACGM coordinates.

Project description

Overview

A tool for converting geomagnetic coordinates in DMSP data files to AACGM coordinates. The aacgmv2 Python library is leveraged for the conversion.

Supported Files

The tool currently supports conversions of the following data files:

Source File Type Contents Example
Cedar Madrigal Database HDF5 1-second resolution for Ion Drift, Magnetometer, and Electron Density dms_20150410_16s1.001.hdf5
Cedar Madrigal Database HDF5 Flux/Energy values dms_20150410_16e.001.hdf5

To add support for additional files, please reach out to offillcarson@gmail.com, or submit a pull request.

Installation

pip install dmsp-to-aacgm

Command-line Usage

dmsp-to-aacgm <input file/directory> [<output directory>] [--reduced]

If the output directory is not specified, or the output directory is the same as the input directory, the input files will be modified. Specifying the --reduced flag will output an h5 file containing only time and aacgm data.

Examples

Command Description
dmsp-to-aacgm dms_20150410_16s1.001.hdf5 Convert a single file
dmsp-to-aacgm dms_20150410_16s1.001.hdf5 aacgm_conversions Convert a single file, output to aacgm_conversions
dmsp-to-aacgm dmsp_data Convert all files in dmsp_data
dmsp-to-aacgm dmsp_data aacgm_conversions Convert all files in dmsp_data, output to aacgm_conversions
dmsp-to-aacgm dms_20150410_16s1.001.hdf5 aacgm_conversions --reduced Create an h5 file containing time and aacgm data only, output to aacgm_conversions

Usage in Python

from dmsp_to_aacgm import get_dataset

# Convert a file
data_set = get_dataset("dms_20150410_16s1.001.hdf5")
data_set.convert()
data_set.close()

# Create a converted file in "aacgm_conversions"
data_set = get_dataset("dms_20150410_16s1.001.hdf5")
data_set.convert(output_path="aacgm_conversions/dms_20150410_16s1.001.hdf5")
data_set.close()

# Create an h5 file containing only time and aacgm data in the "aacgm_conversions" directory
data_set = get_dataset("dms_20150410_16s1.001.hdf5")
data_set.convert(output_path="aacgm_conversions/aacgm_only_file.hdf5", minimal=True)
data_set.close()

Acknowledgements

The software was written by Carson O'Ffill and the project was guided by Simon Wing. We also acknowledge the following grants:

NASA Grants:

  • 80NSSC20K0704
  • 80NSSC22K0515
  • 80NSSC23K0899
  • 80NSSC23K0904

NSF CEDAR Grants:

  • 2431665

This software is distributed for free under an MIT license. If you find it useful, please acknowledge our work in your publications or projects.

Contact Info

Simon Wing: simon.wing@jhuapl.edu

Carson O'Ffill: offillcarson@gmail.com

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

dmsp_to_aacgm-1.3.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dmsp_to_aacgm-1.3.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file dmsp_to_aacgm-1.3.0.tar.gz.

File metadata

  • Download URL: dmsp_to_aacgm-1.3.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for dmsp_to_aacgm-1.3.0.tar.gz
Algorithm Hash digest
SHA256 2b9f2b93e15c799b15d91ab02fc459ae43f1907d84998da8805d00f76882fe2f
MD5 d451cb816ba318940760006ce5bcd69f
BLAKE2b-256 1e1c90ef1187827f5bba224def75594919a1342dea15e0621724cfacaeea854c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dmsp_to_aacgm-1.3.0.tar.gz:

Publisher: publish.yaml on karzunn/dmsp-to-aacgm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dmsp_to_aacgm-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: dmsp_to_aacgm-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for dmsp_to_aacgm-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a09a02dfa4af33901f62bf59c209e614554bf6e7e437ed033afba68c4908bd4
MD5 38c192a8a05545740119b5d7a9bdb31e
BLAKE2b-256 21cda808022e9500011bf3e8aa779a30eacdeb411d089d6c6d87f1d986897801

See more details on using hashes here.

Provenance

The following attestation bundles were made for dmsp_to_aacgm-1.3.0-py3-none-any.whl:

Publisher: publish.yaml on karzunn/dmsp-to-aacgm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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