pytopsscrape
Python Interface for the TOPS webform (OPLIB opacities)
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.7%) to scientific vocabulary
Keywords
Repository
Python Interface for the TOPS webform (OPLIB opacities)
Basic Info
Statistics
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
pyTOPSScrape
A tool for scraping OPLIB opacities from the TOPS web form and converting them into a format more similar to that used by OPAL
Documentation
This README provides a basic overview; however, more in depth documentation, including detailed descriptions of command line arguments and file formats may be found in the following links
Official Documentation (mirror)
Overview
The TOPS webform provides access to some of the most up to date high temperature radiative opacities. However, entering compositions manually into a webpage can be a chore. Especially when one needs opacities for a variety of rescaled compositions as is often the case when working stellar evolution programs.
pyTOPSScrape aims to address this by providing a simple interface to query the TOPS webform for n tables rescaled from a base composition. Moreover, pyTOPSScrape can transform the parameterization of opacities from mass density and temperature to R and temperature. Additionally, pyTOPSScrape will automatically merge tables from rescaled compositions into a single table mimicking the form of high temperature opacity tables already used by the Dartmouth Stellar Evolution Program (DSEP).
The primary interface for pyTOPSScrape is a bash script included with the package an example use of which follows
bash
generateTOPStables GS98.abun rescalings.dat -d ./rawOutput -o GS98.opac -j 20
Further examples and the data files needed to run them may be found in the examples directory of this repository.
In addition to this bash script pyTOPSScrape provides a programmatic interface made up of primarily the pyTOPSScrape.api.call and pyTOPSScrape.api.TOPS2OPAL functions. These can be called individually if you wish to implement your own custom converter function (In that case you would use call and then some custom function in place of TOPS2OPAL)
Install
Prerequisites
- python >= 3.8
- mechanize >= 0.4.5
- scipy >= 1.5.2
- tqdm >= 4.50.2
- beautifulsoup4 >= 4.8.2
- importlib_resources >= 5.2.0
pip
If you install with pip all the dependencies should be automatically installed.
bash
pip install pyTOPSScrape
Source
bash
git clone https://github.com/tboudreaux/pytopsscrape.git
cd pytopsscrape
python setup.py install
Current Potential Issues
There seem to be small variations in the results I get from the web form for the same inputs between queries. I have yet to track down if this is on my end of on there end but be aware of this. (This also makes some of the tests fail as I am doing a character to character check and not a numeric similarity within threshold check)
Examples
There are examples of the command line interface and the python interface in the examples directory of this repository. It is recommended you look at those before querying your own opacity files. The command line examples are all shell scripts with names that describe that they are examples of while the python interface example is in the form of a Jupyter notebook in the examples/Notebooks directory. If you do not have jupyter installed on your computer you should be able to view the .ipynb file on Github.
Owner
- Name: Emily Boudreaux
- Login: tboudreaux
- Kind: user
- Location: Dartmouth College
- Website: emilyboudreaux.com
- Repositories: 50
- Profile: https://github.com/tboudreaux
I am a Fifth Year Graduate Student at Dartmouth College studying Astrophysics. My research focuses on numerical models of stellar evolution.
Citation (CITATION.cff)
cff-version: 1.1.0 message: "If you use this software, please cite it as below." authors: - family-names: "Boudreaux" given-names: "Thomas" orcid: "https://orcid.org/0000-0002-2600-7513" title: pyTOPSScrape version: 1.0 date-released: 2022-09-19 url: "https://github.com/tboudreaux/pytopsscrape"
GitHub Events
Total
- Push event: 1
- Fork event: 1
Last Year
- Push event: 1
- Fork event: 1
Committers
Last synced: about 3 years ago
All Time
- Total Commits: 112
- Total Committers: 1
- Avg Commits per committer: 112.0
- Development Distribution Score (DDS): 0.0
Top Committers
| Name | Commits | |
|---|---|---|
| Thomas Boudreaux | t****s@b****m | 112 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 9 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
- Total maintainers: 1
pypi.org: pytopsscrape
Python bindings around TOPS webform for OPLIB opacities
- Homepage: https://github.com/tboudreaux/pytopsscrape
- Documentation: https://pytopsscrape.readthedocs.io/
- License: mit
-
Latest release: 0.5.2
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- beautifulsoup4 >=4.9.3
- importlib_resources >=5.2.0
- mechanize >=0.4.5
- numpy >=1.19.2
- scipy >=1.5.2
- tqdm >=4.50.2