-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from SuperDARN/pydmap_fix
Pydmap Read
- Loading branch information
Showing
33 changed files
with
2,103 additions
and
5,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,3 +118,4 @@ dmypy.json | |
*.o | ||
*~ | ||
*.log | ||
*.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Include the README | ||
include *.md | ||
|
||
# Include the licesnse file | ||
include LICENSE | ||
|
||
# Include data files (metadata for pydarn package) | ||
include pydarn/logging_config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# pydarn | ||
[](https://www.gnu.org/licenses/gpl-3.0) [](https://www.python.org/downloads/release/python-360/) [](http://badge.fury.io/gh/boennemann%2Fbadges) | ||
|
||
SuperDARN data visualization library. | ||
|
||
## Getting Started | ||
|
||
The following instructions will allow you to install and give some examples on how to use pydarn. | ||
|
||
### Prerequisites | ||
|
||
**python 3.6+** | ||
|
||
| Ubuntu | OpenSuse | Fedora | | ||
| ----------- | -------------- | ------------- | | ||
| libyaml-dev | python3-PyYAML | libyaml-devel | | ||
|
||
You can check your python version with | ||
`$ python --version` or | ||
`$ python3 --version` | ||
### Installing | ||
|
||
1. Clone git repository: | ||
`git clone https://github.com/SuperDARN/pydarn.git` | ||
|
||
2. Installing pydarn | ||
1. **Recommended**: Installing a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtualenv/), this option allows the library to install needed version of libraries without affecting system libraries. | ||
* First install the environment: | ||
`$ python3 -m pip install --user virtualenv` | ||
`$ python3 -m virtualenv <environment name>` | ||
`$ source <environment name>/bin/activate` | ||
* Navigate to where you cloned pydarn: | ||
`$ python3 setup.py install` | ||
2. Install in the system (root privileges required): | ||
`$ sudo python3 setup.py install` | ||
|
||
### Examples | ||
|
||
#### Reading DMAP file | ||
The following example shows how to read in a FITACF file, one of the SuperDARN's DMAP file types. | ||
|
||
```python | ||
import pydarn | ||
dmap_file = "./20180410.C0.sas.fitacf" | ||
dmap_reader = pydarn.DmapRead(dmap_file) | ||
dmap_data = dmap_reader.read_records() | ||
|
||
# dmap_data[record number][paramter name].value | ||
print(dmap_data[0]['bmnum'].value) | ||
``` | ||
|
||
#### Turn on debugging | ||
|
||
```python | ||
import pydarn | ||
import logging | ||
|
||
pydarn_logger = logging.getLogger('pydarn').setLevel(logging.DEBUG) | ||
|
||
dmap_file = "./20180410.C0.sas.fitacf" | ||
damp_reader = pydarn.DmapRead(dmap_file) | ||
dmap_data = dmap_reader.read_records() | ||
|
||
print(dmap_data[0]['origin.time'].value) | ||
``` | ||
Run the code and two log files will be produced: | ||
* pydarn.log - DEBUG level info | ||
* pydarn_error.log - ERROR level info | ||
|
||
### Release History | ||
|
||
* 0.0.1 | ||
* Add: Pydmap DmapRead implemented. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .pydmap_exceptions import EmptyFileError | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.