gwaves


Namegwaves JSON
Version 0.0.3.1 PyPI version JSON
download
home_pagehttps://github.com/perseu912/gwaves
SummaryLibrary for getting music in high quality from YouTube
upload_time2023-05-26 03:29:24
maintainer
docs_urlNone
authorReinan Br
requires_python
licenseMIT License
keywords kit tools dev works
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align='center'>
 <h1>gwaves</h1>
<p>A python lib for works with gravitational waves data</p>
<img alt="CodeFactor Grade" src="https://img.shields.io/codefactor/grade/github/reinanbr/gwaves?logo=codefactor"><img alt="Code Climate maintainability" src="https://img.shields.io/codeclimate/maintainability-percentage/reinanbr/dreams"><img alt="GitHub Pipenv locked Python version" src="https://img.shields.io/github/pipenv/locked/python-version/reinanbr/gwaves">
<br/>
<a href='https://pypi.org/project/dreams/'><img src='https://img.shields.io/pypi/v/gwaves'></a><img alt="PyPI - License" src="https://img.shields.io/pypi/l/gwaves?color=b"><a href="https://doi.org/10.5281/zenodo.7966690"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.7966690.svg" alt="DOI"></a>

<hr>



</div>

## installing:

```sh
pip3 install gwaves -U
```

## importing
```py
import gwaves as gw
```
## geting the all data:
```py
gw_data = gw.Gwaves_Data()

gw_data.data_gw

```
result:
```sh
                                                                                                                             (base) 
    Unnamed: 0             Name Version           Release  ...          Pastro          Final Mass (M☉)                     Date                                               Link
0            0  GW200322_091133      v1  GWTC-3-confident  ...  0.077572  0.08       53.0  53  +38  -26  2020-03-22T09:12:10.300  https://www.gw-openscience.org/eventapi/html/G...
1            1  GW200316_215756      v1  GWTC-3-confident  ...   0.99  ≥  0.99   20.2  20.2  +7.4  -1.9  2020-03-16T21:58:33.100  https://www.gw-openscience.org/eventapi/html/G...
2            2  GW200311_115853      v1  GWTC-3-confident  ...   0.99  ≥  0.99   59.0  59.0  +4.8  -3.9  2020-03-11T11:59:30.300  https://www.gw-openscience.org/eventapi/html/G...
3            3  GW200308_173609      v1  GWTC-3-confident  ...    0.8566  0.86  47.4  47.4  +11.1  -7.7  2020-03-08T17:36:46.700  https://www.gw-openscience.org/eventapi/html/G...
4            4  GW200306_093714      v1  GWTC-3-confident  ...   0.24004  0.24  41.7  41.7  +12.3  -6.9  2020-03-06T09:37:51.100  https://www.gw-openscience.org/eventapi/html/G...
..         ...              ...     ...               ...  ...             ...                      ...                      ...                                                ...
88          88         GW170608      v3  GWTC-1-confident  ...       1.0  1.00   17.8  17.8  +3.4  -0.7  2017-06-08T02:01:53.500  https://www.gw-openscience.org/eventapi/html/G...
89          89         GW170104      v2  GWTC-1-confident  ...       1.0  1.00   48.9  48.9  +5.1  -4.0  2017-01-04T10:12:35.600  https://www.gw-openscience.org/eventapi/html/G...
90          90         GW151226      v2  GWTC-1-confident  ...       1.0  1.00   20.5  20.5  +6.4  -1.5  2015-12-26T03:39:29.600  https://www.gw-openscience.org/eventapi/html/G...
91          91         GW151012      v3  GWTC-1-confident  ...       1.0  1.00  35.6  35.6  +10.8  -3.8  2015-10-12T09:55:19.400  https://www.gw-openscience.org/eventapi/html/G...
92          92         GW150914      v3  GWTC-1-confident  ...       1.0  1.00   63.1  63.1  +3.4  -3.0  2015-09-14T09:51:21.400  https://www.gw-openscience.org/eventapi/html/G...

[93 rows x 19 columns]
```

## getting the last gravitational wave detected:
```py
last_gw_name = gw_data.data_gw['Name'][0]
last_gw = gw_data.get_gwave(last_gw_name)

last_gw
```
result:
```sh
{'strain': array([-1.20377769e-18, -1.23316083e-18, -1.19155622e-18, ...,
        -7.84331557e-19, -7.46261544e-19, -7.87365720e-19]),
 'freq': 16000,
 'name': 'GW200322_091133',
 'date': '2020-03-22T09:12:10.300',
 'size': 4030830,
 'detector': 'L1'}
```
## plotting:
```py
import matplotlib.pyplot as plt
plt.style.use('seaborn')

strain = last_gw['strain']

ax, fig = plt.subplots(figsize=(20,12))

plt.title(last_gw_name)
plt.plot(strain)
```
result:
<br/>

<img src='https://raw.githubusercontent.com/reinanbr/gwaves/main/img/plot_1.png'>
<br/>

### plotting the more detector's from same signal:
the detector's used in the data:
```py
gw_data.detectors
```
resut:
```sh
['L1', 'H1', 'V1']
```
getting the strain's
```py
strain_L1 = strain

strain_H1 = gw_data.get_gwave(last_gw_name,detector='H1')['strain']

strain_V1 = gw_data.get_gwave(last_gw_name,detector='V1')['strain']
```
plotting:
```py
ax,fig = plt.subplots(figsize=(32,14))

t = np.linspace(0,32,len(strain_L1))

plt.plot(t,strain_L1,label='L1',c='blue')

plt.plot(t,strain_V1,label='V1',c='green')

plt.plot(t,strain_H1,label='H1',c='red')

plt.legend()
```
result:
<br/>

<img src='https://raw.githubusercontent.com/reinanbr/gwaves/main/img/plot2.png'>

<br/>


### plotting the psd (Power Signal Density):

```py
ax,fig = plt.subplots(figsize=(32,14))

gw_data.plot_psd_from_gwname(last_gw_name,detector="L1")

gw_data.plot_psd_from_gwname(last_gw_name,detector="V1")

gw_data.plot_psd_from_gwname(last_gw_name,detector="H1")
```

result:
<br/>
<img src='https://raw.githubusercontent.com/reinanbr/gwaves/main/img/plot3.png'>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/perseu912/gwaves",
    "name": "gwaves",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "kit tools dev works",
    "author": "Reinan Br",
    "author_email": "slimchatuba@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "<div align='center'>\n <h1>gwaves</h1>\n<p>A python lib for works with gravitational waves data</p>\n<img alt=\"CodeFactor Grade\" src=\"https://img.shields.io/codefactor/grade/github/reinanbr/gwaves?logo=codefactor\"><img alt=\"Code Climate maintainability\" src=\"https://img.shields.io/codeclimate/maintainability-percentage/reinanbr/dreams\"><img alt=\"GitHub Pipenv locked Python version\" src=\"https://img.shields.io/github/pipenv/locked/python-version/reinanbr/gwaves\">\n<br/>\n<a href='https://pypi.org/project/dreams/'><img src='https://img.shields.io/pypi/v/gwaves'></a><img alt=\"PyPI - License\" src=\"https://img.shields.io/pypi/l/gwaves?color=b\"><a href=\"https://doi.org/10.5281/zenodo.7966690\"><img src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.7966690.svg\" alt=\"DOI\"></a>\n\n<hr>\n\n\n\n</div>\n\n## installing:\n\n```sh\npip3 install gwaves -U\n```\n\n## importing\n```py\nimport gwaves as gw\n```\n## geting the all data:\n```py\ngw_data = gw.Gwaves_Data()\n\ngw_data.data_gw\n\n```\nresult:\n```sh\n                                                                                                                             (base) \n    Unnamed: 0             Name Version           Release  ...          Pastro          Final Mass (M\u2609)                     Date                                               Link\n0            0  GW200322_091133      v1  GWTC-3-confident  ...  0.077572  0.08       53.0  53  +38  -26  2020-03-22T09:12:10.300  https://www.gw-openscience.org/eventapi/html/G...\n1            1  GW200316_215756      v1  GWTC-3-confident  ...   0.99  \u2265  0.99   20.2  20.2  +7.4  -1.9  2020-03-16T21:58:33.100  https://www.gw-openscience.org/eventapi/html/G...\n2            2  GW200311_115853      v1  GWTC-3-confident  ...   0.99  \u2265  0.99   59.0  59.0  +4.8  -3.9  2020-03-11T11:59:30.300  https://www.gw-openscience.org/eventapi/html/G...\n3            3  GW200308_173609      v1  GWTC-3-confident  ...    0.8566  0.86  47.4  47.4  +11.1  -7.7  2020-03-08T17:36:46.700  https://www.gw-openscience.org/eventapi/html/G...\n4            4  GW200306_093714      v1  GWTC-3-confident  ...   0.24004  0.24  41.7  41.7  +12.3  -6.9  2020-03-06T09:37:51.100  https://www.gw-openscience.org/eventapi/html/G...\n..         ...              ...     ...               ...  ...             ...                      ...                      ...                                                ...\n88          88         GW170608      v3  GWTC-1-confident  ...       1.0  1.00   17.8  17.8  +3.4  -0.7  2017-06-08T02:01:53.500  https://www.gw-openscience.org/eventapi/html/G...\n89          89         GW170104      v2  GWTC-1-confident  ...       1.0  1.00   48.9  48.9  +5.1  -4.0  2017-01-04T10:12:35.600  https://www.gw-openscience.org/eventapi/html/G...\n90          90         GW151226      v2  GWTC-1-confident  ...       1.0  1.00   20.5  20.5  +6.4  -1.5  2015-12-26T03:39:29.600  https://www.gw-openscience.org/eventapi/html/G...\n91          91         GW151012      v3  GWTC-1-confident  ...       1.0  1.00  35.6  35.6  +10.8  -3.8  2015-10-12T09:55:19.400  https://www.gw-openscience.org/eventapi/html/G...\n92          92         GW150914      v3  GWTC-1-confident  ...       1.0  1.00   63.1  63.1  +3.4  -3.0  2015-09-14T09:51:21.400  https://www.gw-openscience.org/eventapi/html/G...\n\n[93 rows x 19 columns]\n```\n\n## getting the last gravitational wave detected:\n```py\nlast_gw_name = gw_data.data_gw['Name'][0]\nlast_gw = gw_data.get_gwave(last_gw_name)\n\nlast_gw\n```\nresult:\n```sh\n{'strain': array([-1.20377769e-18, -1.23316083e-18, -1.19155622e-18, ...,\n        -7.84331557e-19, -7.46261544e-19, -7.87365720e-19]),\n 'freq': 16000,\n 'name': 'GW200322_091133',\n 'date': '2020-03-22T09:12:10.300',\n 'size': 4030830,\n 'detector': 'L1'}\n```\n## plotting:\n```py\nimport matplotlib.pyplot as plt\nplt.style.use('seaborn')\n\nstrain = last_gw['strain']\n\nax, fig = plt.subplots(figsize=(20,12))\n\nplt.title(last_gw_name)\nplt.plot(strain)\n```\nresult:\n<br/>\n\n<img src='https://raw.githubusercontent.com/reinanbr/gwaves/main/img/plot_1.png'>\n<br/>\n\n### plotting the more detector's from same signal:\nthe detector's used in the data:\n```py\ngw_data.detectors\n```\nresut:\n```sh\n['L1', 'H1', 'V1']\n```\ngetting the strain's\n```py\nstrain_L1 = strain\n\nstrain_H1 = gw_data.get_gwave(last_gw_name,detector='H1')['strain']\n\nstrain_V1 = gw_data.get_gwave(last_gw_name,detector='V1')['strain']\n```\nplotting:\n```py\nax,fig = plt.subplots(figsize=(32,14))\n\nt = np.linspace(0,32,len(strain_L1))\n\nplt.plot(t,strain_L1,label='L1',c='blue')\n\nplt.plot(t,strain_V1,label='V1',c='green')\n\nplt.plot(t,strain_H1,label='H1',c='red')\n\nplt.legend()\n```\nresult:\n<br/>\n\n<img src='https://raw.githubusercontent.com/reinanbr/gwaves/main/img/plot2.png'>\n\n<br/>\n\n\n### plotting the psd (Power Signal Density):\n\n```py\nax,fig = plt.subplots(figsize=(32,14))\n\ngw_data.plot_psd_from_gwname(last_gw_name,detector=\"L1\")\n\ngw_data.plot_psd_from_gwname(last_gw_name,detector=\"V1\")\n\ngw_data.plot_psd_from_gwname(last_gw_name,detector=\"H1\")\n```\n\nresult:\n<br/>\n<img src='https://raw.githubusercontent.com/reinanbr/gwaves/main/img/plot3.png'>\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Library for getting music in high quality from YouTube",
    "version": "0.0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/perseu912/gwaves"
    },
    "split_keywords": [
        "kit",
        "tools",
        "dev",
        "works"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73420d8510ebb9f19f71334b64252651aea7ed324d0500cb12ae49cf044bc2e3",
                "md5": "c8d4ed68925b682597eac930fcfc14f7",
                "sha256": "f3d84a0c617ba744030d569d8340c916afbe3c252d125dafcdc4e499c062c7c5"
            },
            "downloads": -1,
            "filename": "gwaves-0.0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c8d4ed68925b682597eac930fcfc14f7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6318,
            "upload_time": "2023-05-26T03:29:24",
            "upload_time_iso_8601": "2023-05-26T03:29:24.630902Z",
            "url": "https://files.pythonhosted.org/packages/73/42/0d8510ebb9f19f71334b64252651aea7ed324d0500cb12ae49cf044bc2e3/gwaves-0.0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-26 03:29:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "perseu912",
    "github_project": "gwaves",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "gwaves"
}
        
Elapsed time: 0.07438s