https://github.com/cft-hy/ptplot

PTPlot is a tool for exploring the gravitational wave power spectrum from first-order phase transitions, and evaluating the likelihood of detecting a signal with the LISA mission.

https://github.com/cft-hy/ptplot

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

cosmology gravitational-waves phase-transitions
Last synced: 9 months ago · JSON representation

Repository

PTPlot is a tool for exploring the gravitational wave power spectrum from first-order phase transitions, and evaluating the likelihood of detecting a signal with the LISA mission.

Basic Info
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Topics
cosmology gravitational-waves phase-transitions
Created over 1 year ago · Last pushed 12 months ago
Metadata Files
Readme License

README.md

PTPlot

PTPlot is a plotting tool for visualising the gravitational wave power spectrum from first-order phase transitions.

Prerequisites

  • django
  • dulwich [pure python git implementation]
  • matplotlib
  • scipy

Getting started

  1. Set up "ptplot" as a django project by running:

    django-admin startproject ptplot_site
    

    This will create a new folder called ptplot_site. It is useful to create a symbolic link to your main ptplot folder (i.e. ptplot/ within this repo) here:

    ln -s <path to this repo>/ptplot ptplot_site/ptplot
    

    Alternatively, update the path in step 3.

  2. Add "ptplot" to your INSTALLEDAPPS (in `ptplotsite/ptplot_site/settings.py`) like this:

    INSTALLED_APPS = [
        ...
        'ptplot',
    ]
    
  3. Include the ptplot URLconf in your project urls.py (i.e. ptplot_site/ptplot_site/urls.py) like this:

    path('ptplot/', include('ptplot.urls')),
    

    You will first need to import the include function:

    from django.conf.urls import include
    
  4. Run python manage.py makemigrations ptplot and python manage.py migrate.

  5. Finally, run python manage.py runserver --nothreading and visit http://127.0.0.1:8000/ptplot/ to test the thing.

Benchmark points

These are created in the database by running python manage.py populate which calls ptplot/management/commands/populate.py. Edit that file to add benchmark points.

Threading issues when running locally

Since commit 5f861e5 we have removed all threading from the PTPlot code. When deploying the production server we use gunicorn to serve requests using the default 'sync' worker type (https://docs.gunicorn.org/en/latest/design.html#sync-workers) (see below for more details about deploying). This helps to prevent issues with non-thread-safe code. When running locally using the manage.py runserver command (see https://docs.djangoproject.com/en/4.2/ref/django-admin/) we recommend adding the argument --nothreading to avoid the use of threads. Errors when using threading seem mostly to originate in matplotlib's mathtext library (https://matplotlib.org/stable/tutorials/text/mathtext.html), so an alternative workaround would be to change how text is rendered in plots.

Deploying

For best performance, run using gunicorn behind a buffering proxy (e.g. nginx). Ensure that gunicorn has enough worker threads to handle separate plotting computations for 2-3 plots per page.

Elastic Beanstalk

If deploying to Elastic Beanstalk, use the following in .ebextensions/django.config:

packages:
  yum:
    texlive: []
    texlive-dvipng-bin: []

option_settings:
  aws:elasticbeanstalk:container:python:
    WSGIPath: ebdjango/wsgi.py
  aws:elasticbeanstalk:container:python:staticfiles:
    /static/: "ptplot/static/"

Owner

  • Name: Computational Field Theory
  • Login: CFT-HY
  • Kind: organization

GitHub Events

Total
  • Issues event: 1
  • Watch event: 4
  • Member event: 2
  • Push event: 11
  • Pull request review event: 2
  • Pull request event: 4
  • Fork event: 1
  • Create event: 13
Last Year
  • Issues event: 1
  • Watch event: 4
  • Member event: 2
  • Push event: 11
  • Pull request review event: 2
  • Pull request event: 4
  • Fork event: 1
  • Create event: 13

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 1
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • AgenttiX (1)
Pull Request Authors
  • davidjamesweir (2)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Dependencies

setup.py pypi
  • django *
  • matplotlib *