Name | nrgpy JSON |
Version |
2.3.9
JSON |
| download |
home_page | None |
Summary | library for handling NRG Systems data files |
upload_time | 2024-09-27 19:50:33 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | Copyright (c) 2023 NRG Systems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
nrg
nrg systems
symphonie
symphonieplus
symphonieplus3
symphoniepro
logr
data
wind
solar
remote sensor
rsd
lidar
spidar
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# ![NRGPy](https://www.gravatar.com/avatar/6282094b092c756acc9f7552b164edfe?s=24) nrgpy
![pypi](https://img.shields.io/pypi/v/nrgpy)
**nrgpy** is the Python package for processing NRG Data Files
| | |
| ------------------ | ------------------------------------------ |
| Website and source | <https://github.com/nrgpy/nrgpy> |
| Documentation | <https://nrgpy.github.io/nrgpy/index.html> |
| IEA Task 43 Parser | <https://github.com/nrgpy/nrg-parser> |
| Support | <support@nrgsystems.com> |
It provides tools for:
- Converting binary ".rld" and ".rwd" files to text format
- using locally installed SymphoniePRO Desktop Software and Symphonie Data Retriever
- using NRG Cloud API (compatible with Linux!) *(SymphoniePRO only at this time)
- Reading Symphonie text exports, LOGR dat, and Spidar zip/csv files into Pandas dataframes
- Timestamp adjustment (of text files)
- Simple quality checks on data
***
## Contributing
See our [Contributing guidelines](./CONTRIBUTING.md) for how to be a part of this project.
## Installation
pip install nrgpy
## Log and token files
Log files and NRG Cloud token files will be generated when using the app. These files can be found
in your '''home''' directory:
### Windows
```C:\Users\{username}\.nrgpy\```
### Linux/Mac
```/home/{username}/.nrgpy/```
## Examples
For more examples see the Documentation: <https://nrgpy.github.io/nrgpy/index.html>
### RLD files
#### Convert a folder of RLD files to Text with SymphoniePRO Desktop Software
```python
import nrgpy
date_filter = '2018-10' # filter on any text in the filenames
text_folder_name = 'text_outputs/'
converter = nrgpy.local_rld(rld_dir='', out_dir=text_folder_name, file_filter=date_filter)
converter.convert()
```
#### Convert a folder of RLD files to Text with NRG Cloud Convert API
```python
import nrgpy
file_filter = "000110"
rld_directory = "rlds"
client_id = "https://cloud.nrgsystems.com/data-manager/api-setup"
client_secret = ""
converter = nrgpy.cloud_convert(
file_filter=file_filter,
rld_dir=rld_directory,
client_id=client_id,
client_secret=client_secret,
start_date="2019-11-01",
end_date="2019-11-30",
)
converter.process()
```
#### Convert a single RLD file to Text with NRG Cloud API
```python
import nrgpy
filename = "path/to/rld"
txt_dir = "path/to/txt/"
client_id = "https://cloud.nrgsystems.com/data-manager/api-setup"
client_secret = ""
converter = nrgpy.CloudConvert(
filename=filename,
client_id=client_id,
client_secret=client_secret,
)
```
#### Read files
```python
file_filter = "000110"
import nrgpy
reader = nrgpy.SymProTextRead()
reader.concat_txt(
txt_dir=text_folder_name,
file_filter=file_filter,
start_date="2019-11-01",
end_date="2019-11-30",
)
```
### RWD files
#### Convert a folder of RWD files to Text with Symphonie Data Retriever
```python
import nrgpy
file_filter = '0434201902' # for Feb 2019 files from site 0434
rwd_directory = 'C:/Users/[user]/rwd/'
out_directory = 'C:/Users/[user]/txt/'
converter = nrgpy.local_rwd(file_filter=file_filter, rwd_dir=rwd_directory, out_dir=out_directory)
converter.convert()
```
#### Convert a folder of RWD files to Text with Symphonie Data Retriever _on Linux_
```python
import nrgpy
rwd_directory = '/home/user/datafiles/rwd'
out_directory = '/home/user/datafiles/txt'
wine_directory = '/home/user/prefix32/drive_c/' # path to wine's "C:\" drive
converter = nrgpy.local_rwd(
file_filter=file_filter,
rwd_dir=rwd_directory,
out_dir=out_directory,
wine_folder=wine_directory,
use_site_file=False # set to True to use site files
)
converter.convert()
```
You can also convert a single file with SDR, and save it in the same directory:
```python
import nrgpy
filename = '/path/to/file'
converter = nrgpy.local_rwd(filename=filename)
```
#### Read TXT files exported from RWD files
```python
import nrgpy
dt = 'rwd'
txt_file = '/path/to/file.txt'
reader = nrgpy.read_text_data(data_type=dt, filename=txt_file)
```
or concatenate a whole lot of files:
```python
dt = 'rwd'
txt_dir = '/path/to/text/files'
file_filter = 'text_in_filenames_you_want'
reader = nrgpy.read_text_data(data_type=dt, txt_dir=txt_dir, file_filter=file_filter)
reader.concat()
```
### Spidar files
Spidar Vertical Profiler remote sensors generate archived csv data files in a Zip format.
These can be read directly into the spidar_txt_read method. See the docstring in
spidar_txt.py for more information.
Eg.
``` python
In [1]: import nrgpy
In [2]: fname = "/spidar/1922AG7777_CAG70-SPPP-LPPP_NRG1_AVGWND_2019-07-07_1.zip"
In [3]: reader = nrgpy.SpidarRead(filename=fname)
In [4]: reader.heights
Out[4]: [40, 60, 80, 90, 100, 120, 130, 160, 180, 200]
In [5]: reader.data
Out[5]:
pressure[mmHg] temperature[C] ... dir_200_std[Deg] wind_measure_200_quality[%]
Timestamp ...
2019-07-06 23:40:00 749.66 24.13 ... 28.77 68
2019-07-06 23:50:00 749.63 24.08 ... 14.31 0
2019-07-07 00:00:00 749.64 23.99 ... 20.59 0
...
```
Raw data
{
"_id": null,
"home_page": null,
"name": "nrgpy",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "David Carlson <davec.vt@gmail.com>",
"keywords": "nrg, nrg systems, symphonie, symphonieplus, symphonieplus3, symphoniepro, logr, data, wind, solar, remote sensor, rsd, lidar, spidar",
"author": null,
"author_email": "David Carlson <drc@nrgsystems.com>, Natalie Babij <natalie@chickadeemail.com>, NRG Technical Services <support@nrgsystems.com>",
"download_url": null,
"platform": null,
"description": "# ![NRGPy](https://www.gravatar.com/avatar/6282094b092c756acc9f7552b164edfe?s=24) nrgpy\n\n![pypi](https://img.shields.io/pypi/v/nrgpy)\n\n**nrgpy** is the Python package for processing NRG Data Files\n\n| | |\n| ------------------ | ------------------------------------------ |\n| Website and source | <https://github.com/nrgpy/nrgpy> |\n| Documentation | <https://nrgpy.github.io/nrgpy/index.html> |\n| IEA Task 43 Parser | <https://github.com/nrgpy/nrg-parser> |\n| Support | <support@nrgsystems.com> |\n\nIt provides tools for:\n\n- Converting binary \".rld\" and \".rwd\" files to text format\n - using locally installed SymphoniePRO Desktop Software and Symphonie Data Retriever\n - using NRG Cloud API (compatible with Linux!) *(SymphoniePRO only at this time)\n- Reading Symphonie text exports, LOGR dat, and Spidar zip/csv files into Pandas dataframes\n- Timestamp adjustment (of text files)\n- Simple quality checks on data\n\n***\n\n## Contributing\n\nSee our [Contributing guidelines](./CONTRIBUTING.md) for how to be a part of this project.\n\n## Installation\n\n pip install nrgpy\n\n## Log and token files\n\nLog files and NRG Cloud token files will be generated when using the app. These files can be found\nin your '''home''' directory:\n\n### Windows\n\n```C:\\Users\\{username}\\.nrgpy\\```\n\n### Linux/Mac\n\n```/home/{username}/.nrgpy/```\n\n## Examples\n\nFor more examples see the Documentation: <https://nrgpy.github.io/nrgpy/index.html>\n\n### RLD files\n\n#### Convert a folder of RLD files to Text with SymphoniePRO Desktop Software\n\n```python\nimport nrgpy\ndate_filter = '2018-10' # filter on any text in the filenames\ntext_folder_name = 'text_outputs/'\nconverter = nrgpy.local_rld(rld_dir='', out_dir=text_folder_name, file_filter=date_filter)\nconverter.convert()\n```\n\n#### Convert a folder of RLD files to Text with NRG Cloud Convert API\n\n```python\nimport nrgpy\nfile_filter = \"000110\"\nrld_directory = \"rlds\"\nclient_id = \"https://cloud.nrgsystems.com/data-manager/api-setup\"\nclient_secret = \"\"\nconverter = nrgpy.cloud_convert(\n file_filter=file_filter, \n rld_dir=rld_directory, \n client_id=client_id,\n client_secret=client_secret,\n start_date=\"2019-11-01\",\n end_date=\"2019-11-30\",\n)\nconverter.process()\n```\n\n#### Convert a single RLD file to Text with NRG Cloud API\n\n```python\nimport nrgpy\nfilename = \"path/to/rld\"\ntxt_dir = \"path/to/txt/\"\nclient_id = \"https://cloud.nrgsystems.com/data-manager/api-setup\"\nclient_secret = \"\"\nconverter = nrgpy.CloudConvert(\n filename=filename, \n client_id=client_id,\n client_secret=client_secret,\n)\n```\n\n#### Read files\n\n```python\nfile_filter = \"000110\"\nimport nrgpy\n\nreader = nrgpy.SymProTextRead()\nreader.concat_txt(\n txt_dir=text_folder_name, \n file_filter=file_filter, \n start_date=\"2019-11-01\",\n end_date=\"2019-11-30\",\n)\n```\n\n### RWD files\n\n#### Convert a folder of RWD files to Text with Symphonie Data Retriever\n\n```python\nimport nrgpy\n\nfile_filter = '0434201902' # for Feb 2019 files from site 0434\nrwd_directory = 'C:/Users/[user]/rwd/'\nout_directory = 'C:/Users/[user]/txt/'\n\nconverter = nrgpy.local_rwd(file_filter=file_filter, rwd_dir=rwd_directory, out_dir=out_directory)\nconverter.convert()\n```\n\n#### Convert a folder of RWD files to Text with Symphonie Data Retriever _on Linux_\n\n```python\nimport nrgpy\n\nrwd_directory = '/home/user/datafiles/rwd'\nout_directory = '/home/user/datafiles/txt'\nwine_directory = '/home/user/prefix32/drive_c/' # path to wine's \"C:\\\" drive\n\n\nconverter = nrgpy.local_rwd(\n file_filter=file_filter, \n rwd_dir=rwd_directory, \n out_dir=out_directory,\n wine_folder=wine_directory,\n use_site_file=False # set to True to use site files\n )\nconverter.convert()\n```\n\nYou can also convert a single file with SDR, and save it in the same directory:\n\n```python\nimport nrgpy\n\nfilename = '/path/to/file'\nconverter = nrgpy.local_rwd(filename=filename)\n```\n\n#### Read TXT files exported from RWD files\n\n```python\nimport nrgpy\n\ndt = 'rwd'\ntxt_file = '/path/to/file.txt'\nreader = nrgpy.read_text_data(data_type=dt, filename=txt_file)\n```\n\nor concatenate a whole lot of files:\n\n```python\ndt = 'rwd'\ntxt_dir = '/path/to/text/files'\nfile_filter = 'text_in_filenames_you_want'\nreader = nrgpy.read_text_data(data_type=dt, txt_dir=txt_dir, file_filter=file_filter)\nreader.concat()\n```\n\n### Spidar files\n\nSpidar Vertical Profiler remote sensors generate archived csv data files in a Zip format.\n\nThese can be read directly into the spidar_txt_read method. See the docstring in\nspidar_txt.py for more information.\n\nEg.\n\n``` python\nIn [1]: import nrgpy\n\nIn [2]: fname = \"/spidar/1922AG7777_CAG70-SPPP-LPPP_NRG1_AVGWND_2019-07-07_1.zip\" \n\nIn [3]: reader = nrgpy.SpidarRead(filename=fname) \n\nIn [4]: reader.heights \nOut[4]: [40, 60, 80, 90, 100, 120, 130, 160, 180, 200]\n\nIn [5]: reader.data \nOut[5]: \n pressure[mmHg] temperature[C] ... dir_200_std[Deg] wind_measure_200_quality[%]\nTimestamp ... \n2019-07-06 23:40:00 749.66 24.13 ... 28.77 68\n2019-07-06 23:50:00 749.63 24.08 ... 14.31 0\n2019-07-07 00:00:00 749.64 23.99 ... 20.59 0\n...\n```\n",
"bugtrack_url": null,
"license": "Copyright (c) 2023 NRG Systems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "library for handling NRG Systems data files",
"version": "2.3.9",
"project_urls": {
"Documentation": "https://nrgpy.github.io/nrgpy/index.html",
"Repository": "https://github.com/nrgpy/nrgpy"
},
"split_keywords": [
"nrg",
" nrg systems",
" symphonie",
" symphonieplus",
" symphonieplus3",
" symphoniepro",
" logr",
" data",
" wind",
" solar",
" remote sensor",
" rsd",
" lidar",
" spidar"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fe62305cdcf110cd4d429f62e52ef5e6d42f0171dd87f6bdd6f7420b0132e9e7",
"md5": "3a83fc4f2005659b958523d67c1a3d86",
"sha256": "4eb27e859159a9c03c764b1be434bc4be2c93bc4aadd519a60d528ff34cd28f0"
},
"downloads": -1,
"filename": "nrgpy-2.3.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3a83fc4f2005659b958523d67c1a3d86",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 73871,
"upload_time": "2024-09-27T19:50:33",
"upload_time_iso_8601": "2024-09-27T19:50:33.503885Z",
"url": "https://files.pythonhosted.org/packages/fe/62/305cdcf110cd4d429f62e52ef5e6d42f0171dd87f6bdd6f7420b0132e9e7/nrgpy-2.3.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-27 19:50:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nrgpy",
"github_project": "nrgpy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nrgpy"
}