{
  "id": 357601,
  "title": "Riroriro Python Package to Simulate Gravitational Waveforms.",
  "url": "/competitions/g2net-detecting-continuous-gravitational-waves/discussion/357601",
  "author_name": "Marília Prata",
  "post_date": "2022-10-04T23:01:49.467000",
  "votes": 7,
  "comment_count": 4,
  "views": 0,
  "content": "<h1>Riroriro: Simulating gravitational waves and evaluating their detectability in Python</h1>\n<p>Authors: Wouter G. J. van Zeist, Héloïse F. Stevance, J. J. Eldridge</p>\n<p><a href=\"https://doi.org/10.48550/arXiv.2103.06943\" target=\"_blank\">https://doi.org/10.48550/arXiv.2103.06943</a></p>\n<p>\"Riroriro is a Python package to simulate the gravitational waveforms of binary mergers of black holes and/or neutron stars, and calculate several properties of these mergers and waveforms, specifically relating to their observability by gravitational wave detectors.\"</p>\n<p>\"The gravitational waveform simulation of Riroriro is based upon the methods of Buskirk and Babiuc-Hamilton (2019), a paper which describes a computational implementation of an earlier theoretical gravitational waveform model by Huerta et al. (2017), using post-Newtonian expansions and an approximation called the implicit rotating source to simplify the Einstein field equations and simulate gravitational waves. Riroriro's calculation of signal-to-noise ratios (SNR) of gravitational wave events is based on the methods of Barrett et al. (2018), with the simpler gravitational wave model Findchirp (Allen et al. (2012)) being used for comparison and calibration in these calculations.\"</p>\n<p><a href=\"https://arxiv.org/abs/2103.06943\" target=\"_blank\">https://arxiv.org/abs/2103.06943</a></p>\n<h1>Riroriro Python Modules</h1>\n<p>\"Riroriro is a set of Python modules containing functions to simulate the gravitational waveforms of mergers of black holes and/or neutron stars, and calculate several properties of these mergers and waveforms, specifically relating to their observability by gravitational wave detectors. Riroriro combines areas covered by previous gravitational wave models (such as gravitational wave simulation, SNR calculation, horizon distance calculation) into a single package with broader scope and versatility in Python, a programming language that is ubiquitous in astronomy. Aside from being a research tool, Riroriro is also designed to be easy to use and modify, and it can also be used as an educational tool for students learning about gravitational waves.\"</p>\n<p>\"The modules “inspiralfuns”, “mergerfirstfuns”, “matchingfuns”, “mergersecondfuns” and “gwexporter”, in that order, can be used to simulate the strain amplitude and frequency of a merger gravitational waveform. The module “snrcalculatorfuns” can compare such a simulated waveform to a detector noise spectrum to calculate a signal-to-noise ratio (SNR) for that signal for that detector. The module “horizondistfuns” calculates the horizon distance of a merger given its waveform, and the module “detectabilityfuns” evaluates the detectability of a merger given its SNR.\"</p>\n<p>More information on the pip installation can be found here: <a href=\"https://pypi.org/project/riroriro/\" target=\"_blank\">https://pypi.org/project/riroriro/</a></p>\n<p>Tutorials for Riroriro can be found here: <a href=\"https://github.com/wvanzeist/riroriro_tutorials\" target=\"_blank\">https://github.com/wvanzeist/riroriro_tutorials</a></p>\n<p>Full documentation of each of the functions of Riroriro can be found here: <a href=\"https://wvanzeist.github.io/\" target=\"_blank\">https://wvanzeist.github.io/</a></p>\n<p><a href=\"https://github.com/wvanzeist/riroriro\" target=\"_blank\">https://github.com/wvanzeist/riroriro</a></p>\n<h1>I hope to learn how to join the hdf5 files to Hiroriro.</h1>\n<p>I've already published \"my Riroriro\" Notebook however, I couldn't add noise to the signal since the original code/Competition works with npy files.  Anyway, I'll try to learn how to use PyFstat suggested by the Hosts.</p>",
  "messages": [
    {
      "id": 1972025,
      "postDate": "2022-10-04T23:01:49.467Z",
      "content": "<h1>Riroriro: Simulating gravitational waves and evaluating their detectability in Python</h1>\n<p>Authors: Wouter G. J. van Zeist, Héloïse F. Stevance, J. J. Eldridge</p>\n<p><a href=\"https://doi.org/10.48550/arXiv.2103.06943\" target=\"_blank\">https://doi.org/10.48550/arXiv.2103.06943</a></p>\n<p>\"Riroriro is a Python package to simulate the gravitational waveforms of binary mergers of black holes and/or neutron stars, and calculate several properties of these mergers and waveforms, specifically relating to their observability by gravitational wave detectors.\"</p>\n<p>\"The gravitational waveform simulation of Riroriro is based upon the methods of Buskirk and Babiuc-Hamilton (2019), a paper which describes a computational implementation of an earlier theoretical gravitational waveform model by Huerta et al. (2017), using post-Newtonian expansions and an approximation called the implicit rotating source to simplify the Einstein field equations and simulate gravitational waves. Riroriro's calculation of signal-to-noise ratios (SNR) of gravitational wave events is based on the methods of Barrett et al. (2018), with the simpler gravitational wave model Findchirp (Allen et al. (2012)) being used for comparison and calibration in these calculations.\"</p>\n<p><a href=\"https://arxiv.org/abs/2103.06943\" target=\"_blank\">https://arxiv.org/abs/2103.06943</a></p>\n<h1>Riroriro Python Modules</h1>\n<p>\"Riroriro is a set of Python modules containing functions to simulate the gravitational waveforms of mergers of black holes and/or neutron stars, and calculate several properties of these mergers and waveforms, specifically relating to their observability by gravitational wave detectors. Riroriro combines areas covered by previous gravitational wave models (such as gravitational wave simulation, SNR calculation, horizon distance calculation) into a single package with broader scope and versatility in Python, a programming language that is ubiquitous in astronomy. Aside from being a research tool, Riroriro is also designed to be easy to use and modify, and it can also be used as an educational tool for students learning about gravitational waves.\"</p>\n<p>\"The modules “inspiralfuns”, “mergerfirstfuns”, “matchingfuns”, “mergersecondfuns” and “gwexporter”, in that order, can be used to simulate the strain amplitude and frequency of a merger gravitational waveform. The module “snrcalculatorfuns” can compare such a simulated waveform to a detector noise spectrum to calculate a signal-to-noise ratio (SNR) for that signal for that detector. The module “horizondistfuns” calculates the horizon distance of a merger given its waveform, and the module “detectabilityfuns” evaluates the detectability of a merger given its SNR.\"</p>\n<p>More information on the pip installation can be found here: <a href=\"https://pypi.org/project/riroriro/\" target=\"_blank\">https://pypi.org/project/riroriro/</a></p>\n<p>Tutorials for Riroriro can be found here: <a href=\"https://github.com/wvanzeist/riroriro_tutorials\" target=\"_blank\">https://github.com/wvanzeist/riroriro_tutorials</a></p>\n<p>Full documentation of each of the functions of Riroriro can be found here: <a href=\"https://wvanzeist.github.io/\" target=\"_blank\">https://wvanzeist.github.io/</a></p>\n<p><a href=\"https://github.com/wvanzeist/riroriro\" target=\"_blank\">https://github.com/wvanzeist/riroriro</a></p>\n<h1>I hope to learn how to join the hdf5 files to Hiroriro.</h1>\n<p>I've already published \"my Riroriro\" Notebook however, I couldn't add noise to the signal since the original code/Competition works with npy files.  Anyway, I'll try to learn how to use PyFstat suggested by the Hosts.</p>",
      "rawMarkdown": "#Riroriro: Simulating gravitational waves and evaluating their detectability in Python\nAuthors: Wouter G. J. van Zeist, Héloïse F. Stevance, J. J. Eldridge\n\nhttps://doi.org/10.48550/arXiv.2103.06943\n\n\"Riroriro is a Python package to simulate the gravitational waveforms of binary mergers of black holes and/or neutron stars, and calculate several properties of these mergers and waveforms, specifically relating to their observability by gravitational wave detectors.\"\n\n\"The gravitational waveform simulation of Riroriro is based upon the methods of Buskirk and Babiuc-Hamilton (2019), a paper which describes a computational implementation of an earlier theoretical gravitational waveform model by Huerta et al. (2017), using post-Newtonian expansions and an approximation called the implicit rotating source to simplify the Einstein field equations and simulate gravitational waves. Riroriro's calculation of signal-to-noise ratios (SNR) of gravitational wave events is based on the methods of Barrett et al. (2018), with the simpler gravitational wave model Findchirp (Allen et al. (2012)) being used for comparison and calibration in these calculations.\"\n\nhttps://arxiv.org/abs/2103.06943\n\n#Riroriro Python Modules\n\n\"Riroriro is a set of Python modules containing functions to simulate the gravitational waveforms of mergers of black holes and/or neutron stars, and calculate several properties of these mergers and waveforms, specifically relating to their observability by gravitational wave detectors. Riroriro combines areas covered by previous gravitational wave models (such as gravitational wave simulation, SNR calculation, horizon distance calculation) into a single package with broader scope and versatility in Python, a programming language that is ubiquitous in astronomy. Aside from being a research tool, Riroriro is also designed to be easy to use and modify, and it can also be used as an educational tool for students learning about gravitational waves.\"\n\n\"The modules “inspiralfuns”, “mergerfirstfuns”, “matchingfuns”, “mergersecondfuns” and “gwexporter”, in that order, can be used to simulate the strain amplitude and frequency of a merger gravitational waveform. The module “snrcalculatorfuns” can compare such a simulated waveform to a detector noise spectrum to calculate a signal-to-noise ratio (SNR) for that signal for that detector. The module “horizondistfuns” calculates the horizon distance of a merger given its waveform, and the module “detectabilityfuns” evaluates the detectability of a merger given its SNR.\"\n\nMore information on the pip installation can be found here: https://pypi.org/project/riroriro/\n\nTutorials for Riroriro can be found here: https://github.com/wvanzeist/riroriro_tutorials\n\nFull documentation of each of the functions of Riroriro can be found here: https://wvanzeist.github.io/\n\nhttps://github.com/wvanzeist/riroriro\n\n#I hope to learn how to join the hdf5 files to Hiroriro.\n\nI've already published \"my Riroriro\" Notebook however, I couldn't add noise to the signal since the original code/Competition works with npy files.  Anyway, I'll try to learn how to use PyFstat suggested by the Hosts.",
      "votes": 7
    },
    {
      "id": 1993637,
      "postDate": "2022-10-18T14:37:51.863Z",
      "content": "<p>but does it work on windows? <br>\nBecause you can only \"pip install lalsuite\" in linux. But im finding nothing about this working or not working on windows…</p>",
      "rawMarkdown": "but does it work on windows? \nBecause you can only \"pip install lalsuite\" in linux. But im finding nothing about this working or not working on windows...\n\n",
      "votes": 1,
      "replies": [
        {
          "id": 1994042,
          "postDate": "2022-10-18T18:09:29.490Z",
          "content": "<p>It worked for me on Kaggle environment. Title of my Notebook: G Waves Riroriro <br>\nI copied that Notebook (from Geir Drange) and added all the markdown cells afeter making searchs: </p>\n<p>Code cells by Geir and Markdown cells by myself.   </p>\n<p>!pip install riroriro</p>\n<p>import numpy as np<br>\nimport riroriro.inspiralfuns as ins<br>\nimport riroriro.mergerfirstfuns as me1<br>\nimport riroriro.matchingfuns as mat<br>\nimport riroriro.mergersecondfuns as me2<br>\nimport librosa<br>\nimport librosa.display<br>\nimport math<br>\nimport matplotlib.pyplot as plt</p>\n<p>Tutorials are on this topic above:</p>\n<p>More information on the pip installation can be found here: <a href=\"https://pypi.org/project/riroriro/\" target=\"_blank\">https://pypi.org/project/riroriro/</a></p>\n<p>Tutorials for Riroriro can be found here: <a href=\"https://github.com/wvanzeist/riroriro_tutorials\" target=\"_blank\">https://github.com/wvanzeist/riroriro_tutorials</a></p>\n<p>Full documentation of each of the functions of Riroriro can be found here: <a href=\"https://wvanzeist.github.io/\" target=\"_blank\">https://wvanzeist.github.io/</a></p>\n<p>Check on Geir's code  too<br>\n<a href=\"https://www.kaggle.com/code/mistag/reverse-engineering-create-clean-gw-signals\" target=\"_blank\">https://www.kaggle.com/code/mistag/reverse-engineering-create-clean-gw-signals</a></p>",
          "rawMarkdown": "It worked for me on Kaggle environment. Title of my Notebook: G Waves Riroriro \nI copied that Notebook (from Geir Drange) and added all the markdown cells afeter making searchs: \n\nCode cells by Geir and Markdown cells by myself.   \n\n!pip install riroriro\n\nimport numpy as np\nimport riroriro.inspiralfuns as ins\nimport riroriro.mergerfirstfuns as me1\nimport riroriro.matchingfuns as mat\nimport riroriro.mergersecondfuns as me2\nimport librosa\nimport librosa.display\nimport math\nimport matplotlib.pyplot as plt\n\nTutorials are on this topic above:\n\nMore information on the pip installation can be found here: https://pypi.org/project/riroriro/\n\nTutorials for Riroriro can be found here: https://github.com/wvanzeist/riroriro_tutorials\n\nFull documentation of each of the functions of Riroriro can be found here: https://wvanzeist.github.io/\n\nCheck on Geir's code  too\nhttps://www.kaggle.com/code/mistag/reverse-engineering-create-clean-gw-signals"
        }
      ]
    },
    {
      "id": 1993183,
      "postDate": "2022-10-18T06:59:05.623Z",
      "content": "<p>is rirariro exclusive to linux like lalsuite? </p>",
      "rawMarkdown": "is rirariro exclusive to linux like lalsuite? \n",
      "votes": 1,
      "replies": [
        {
          "id": 1993463,
          "postDate": "2022-10-18T11:58:23.780Z",
          "content": "<p>Hi Jack Flavell,</p>\n<p>That's what I found on Riroriro about Linux</p>\n<p>\"Ensure you can run Python from the command line\"</p>\n<p>\"Note: Due to the way most Linux distributions are handling the Python 3 migration, Linux users using the system Python without creating a virtual environment first should replace the python command in this tutorial with python3 and the python -m pip command with python3 -m pip --user. Do not run any of the commands in this tutorial with sudo: if you get a permissions error, come back to the section on creating virtual environments, set one up, and then continue with the tutorial as written.\"</p>\n<p>\"If you installed Python from source, with an installer from python.org, or via Homebrew you should already have pip. If you’re on Linux and installed using your OS package manager, you may have to install pip separately, see Installing pip/setuptools/wheel with Linux Package Managers.</p>\n<p>If pip isn’t already installed, then first try to bootstrap it from the standard library:</p>\n<p>Unix/macOS<br>\npython3 -m ensurepip --default-pip</p>\n<p>If that still doesn’t allow you to run python -m pip:</p>\n<p>Securely Download get-pip.py 1</p>\n<p>Run python get-pip.py. 2 This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already.</p>\n<p><a href=\"https://packaging.python.org/en/latest/tutorials/installing-packages/#requirements-for-installing-packages\" target=\"_blank\">https://packaging.python.org/en/latest/tutorials/installing-packages/#requirements-for-installing-packages</a></p>",
          "rawMarkdown": "Hi Jack Flavell,\n\nThat's what I found on Riroriro about Linux\n\n\"Ensure you can run Python from the command line\"\n\n\"Note: Due to the way most Linux distributions are handling the Python 3 migration, Linux users using the system Python without creating a virtual environment first should replace the python command in this tutorial with python3 and the python -m pip command with python3 -m pip --user. Do not run any of the commands in this tutorial with sudo: if you get a permissions error, come back to the section on creating virtual environments, set one up, and then continue with the tutorial as written.\"\n\n\"If you installed Python from source, with an installer from python.org, or via Homebrew you should already have pip. If you’re on Linux and installed using your OS package manager, you may have to install pip separately, see Installing pip/setuptools/wheel with Linux Package Managers.\n\nIf pip isn’t already installed, then first try to bootstrap it from the standard library:\n\nUnix/macOS\npython3 -m ensurepip --default-pip\n\nIf that still doesn’t allow you to run python -m pip:\n\nSecurely Download get-pip.py 1\n\nRun python get-pip.py. 2 This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already.\n\nhttps://packaging.python.org/en/latest/tutorials/installing-packages/#requirements-for-installing-packages"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1993637,
      "author_name": "jack flavell",
      "author_url": "",
      "post_date": "2022-10-18T14:37:51.863000",
      "content": "<p>but does it work on windows? <br>\nBecause you can only \"pip install lalsuite\" in linux. But im finding nothing about this working or not working on windows…</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1994042,
          "author_name": "Marília Prata",
          "author_url": "",
          "post_date": "2022-10-18T18:09:29.490000",
          "content": "<p>It worked for me on Kaggle environment. Title of my Notebook: G Waves Riroriro <br>\nI copied that Notebook (from Geir Drange) and added all the markdown cells afeter making searchs: </p>\n<p>Code cells by Geir and Markdown cells by myself.   </p>\n<p>!pip install riroriro</p>\n<p>import numpy as np<br>\nimport riroriro.inspiralfuns as ins<br>\nimport riroriro.mergerfirstfuns as me1<br>\nimport riroriro.matchingfuns as mat<br>\nimport riroriro.mergersecondfuns as me2<br>\nimport librosa<br>\nimport librosa.display<br>\nimport math<br>\nimport matplotlib.pyplot as plt</p>\n<p>Tutorials are on this topic above:</p>\n<p>More information on the pip installation can be found here: <a href=\"https://pypi.org/project/riroriro/\" target=\"_blank\">https://pypi.org/project/riroriro/</a></p>\n<p>Tutorials for Riroriro can be found here: <a href=\"https://github.com/wvanzeist/riroriro_tutorials\" target=\"_blank\">https://github.com/wvanzeist/riroriro_tutorials</a></p>\n<p>Full documentation of each of the functions of Riroriro can be found here: <a href=\"https://wvanzeist.github.io/\" target=\"_blank\">https://wvanzeist.github.io/</a></p>\n<p>Check on Geir's code  too<br>\n<a href=\"https://www.kaggle.com/code/mistag/reverse-engineering-create-clean-gw-signals\" target=\"_blank\">https://www.kaggle.com/code/mistag/reverse-engineering-create-clean-gw-signals</a></p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1993183,
      "author_name": "jack flavell",
      "author_url": "",
      "post_date": "2022-10-18T06:59:05.623000",
      "content": "<p>is rirariro exclusive to linux like lalsuite? </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1993463,
          "author_name": "Marília Prata",
          "author_url": "",
          "post_date": "2022-10-18T11:58:23.780000",
          "content": "<p>Hi Jack Flavell,</p>\n<p>That's what I found on Riroriro about Linux</p>\n<p>\"Ensure you can run Python from the command line\"</p>\n<p>\"Note: Due to the way most Linux distributions are handling the Python 3 migration, Linux users using the system Python without creating a virtual environment first should replace the python command in this tutorial with python3 and the python -m pip command with python3 -m pip --user. Do not run any of the commands in this tutorial with sudo: if you get a permissions error, come back to the section on creating virtual environments, set one up, and then continue with the tutorial as written.\"</p>\n<p>\"If you installed Python from source, with an installer from python.org, or via Homebrew you should already have pip. If you’re on Linux and installed using your OS package manager, you may have to install pip separately, see Installing pip/setuptools/wheel with Linux Package Managers.</p>\n<p>If pip isn’t already installed, then first try to bootstrap it from the standard library:</p>\n<p>Unix/macOS<br>\npython3 -m ensurepip --default-pip</p>\n<p>If that still doesn’t allow you to run python -m pip:</p>\n<p>Securely Download get-pip.py 1</p>\n<p>Run python get-pip.py. 2 This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already.</p>\n<p><a href=\"https://packaging.python.org/en/latest/tutorials/installing-packages/#requirements-for-installing-packages\" target=\"_blank\">https://packaging.python.org/en/latest/tutorials/installing-packages/#requirements-for-installing-packages</a></p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1972025": "#Riroriro: Simulating gravitational waves and evaluating their detectability in Python\nAuthors: Wouter G. J. van Zeist, Héloïse F. Stevance, J. J. Eldridge\n\nhttps://doi.org/10.48550/arXiv.2103.06943\n\n\"Riroriro is a Python package to simulate the gravitational waveforms of binary mergers of black holes and/or neutron stars, and calculate several properties of these mergers and waveforms, specifically relating to their observability by gravitational wave detectors.\"\n\n\"The gravitational waveform simulation of Riroriro is based upon the methods of Buskirk and Babiuc-Hamilton (2019), a paper which describes a computational implementation of an earlier theoretical gravitational waveform model by Huerta et al. (2017), using post-Newtonian expansions and an approximation called the implicit rotating source to simplify the Einstein field equations and simulate gravitational waves. Riroriro's calculation of signal-to-noise ratios (SNR) of gravitational wave events is based on the methods of Barrett et al. (2018), with the simpler gravitational wave model Findchirp (Allen et al. (2012)) being used for comparison and calibration in these calculations.\"\n\nhttps://arxiv.org/abs/2103.06943\n\n#Riroriro Python Modules\n\n\"Riroriro is a set of Python modules containing functions to simulate the gravitational waveforms of mergers of black holes and/or neutron stars, and calculate several properties of these mergers and waveforms, specifically relating to their observability by gravitational wave detectors. Riroriro combines areas covered by previous gravitational wave models (such as gravitational wave simulation, SNR calculation, horizon distance calculation) into a single package with broader scope and versatility in Python, a programming language that is ubiquitous in astronomy. Aside from being a research tool, Riroriro is also designed to be easy to use and modify, and it can also be used as an educational tool for students learning about gravitational waves.\"\n\n\"The modules “inspiralfuns”, “mergerfirstfuns”, “matchingfuns”, “mergersecondfuns” and “gwexporter”, in that order, can be used to simulate the strain amplitude and frequency of a merger gravitational waveform. The module “snrcalculatorfuns” can compare such a simulated waveform to a detector noise spectrum to calculate a signal-to-noise ratio (SNR) for that signal for that detector. The module “horizondistfuns” calculates the horizon distance of a merger given its waveform, and the module “detectabilityfuns” evaluates the detectability of a merger given its SNR.\"\n\nMore information on the pip installation can be found here: https://pypi.org/project/riroriro/\n\nTutorials for Riroriro can be found here: https://github.com/wvanzeist/riroriro_tutorials\n\nFull documentation of each of the functions of Riroriro can be found here: https://wvanzeist.github.io/\n\nhttps://github.com/wvanzeist/riroriro\n\n#I hope to learn how to join the hdf5 files to Hiroriro.\n\nI've already published \"my Riroriro\" Notebook however, I couldn't add noise to the signal since the original code/Competition works with npy files.  Anyway, I'll try to learn how to use PyFstat suggested by the Hosts.",
    "1993637": "but does it work on windows? \nBecause you can only \"pip install lalsuite\" in linux. But im finding nothing about this working or not working on windows...\n\n",
    "1993183": "is rirariro exclusive to linux like lalsuite? \n"
  }
}