Science Score: 23.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
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
8 of 9 committers (88.9%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.4%) to scientific vocabulary
Keywords from Contributors
Repository
Basic Info
- Host: GitHub
- Owner: HERA-Team
- License: mit
- Language: Python
- Default Branch: main
- Size: 256 KB
Statistics
- Stars: 0
- Watchers: 39
- Forks: 3
- Open Issues: 16
- Releases: 7
Metadata Files
README.md
linsolve
linsolve is a module providing high-level tools for linearizing and solving systems of equations.
Overview
The solvers in linsolve include LinearSolver, LogProductSolver, and LinProductSolver.
LinearSolver solves linear equations of the form 'a*x + b*y + c*z + d'.
LogProductSolver uses logrithms to linearize equations of the form 'x*y*z'.
LinProductSolver uses symbolic Taylor expansion to linearize equations of the
form 'x*y + y*z'.
See linsolve_example.ipynb for a tutorial on how to use these functionalities.
Below we give a brief example on the general usage of LinearSolver.
Assume we have a linear system of equations, with a data vector y containing measurements
and a model vector b containing parameters we would like to solve for. Let's simplify to
the problem of fitting a line to three data points, which amounts to solving for a slope and an offset.
In this case, our linear system of equations can be written as

where b_1 is the slope and b_2 is the offset, and the A matrix contains the mapping
from model vector b to data vector y. In our case, the a_x1 values are the x-values of the data points, and the a_x2 values are equal to unity. Let's assume the data vector measurements are y_1 = 2, y_2 = 4 and y_3 = 7, and their corresponding dependent variable values are a_11 = 0, a_21 = 2 and a_31 = 4.

We will use LinearSolver to solve this system of equations in the following manner.
First we setup a data dictionary, which contains as keys strings of the RHS of our linear model equation,
and as values the y-data measurements:
python
data = {'b_2': 2.0, '2.0*b_1 + b_2': 4.0, '4*b_1 + b_2': 7.0}
Alternatively, we can write the data dictionary more generally by also writing dictionary of constants we don't want to solve for (i.e. the values of the A matrix):
python
data = {'a_11*b_1 + a_12*b_2': 2.0, 'a_21*b_1 + a_22*b_2': 4.0, 'a_31*b_1 + a_32*b_2': 7.0}
consts = {'a_11': 0.0, 'a_21': 2.0, 'a_31': 4.0, 'a_12': 1.0, 'a_22': 1.0, 'a_32': 1.0}
We then feed this into linsolve.LinearSolver (optionally passing the consts dictionary as keyword arguments.)
python
ls = linsolve.LinearSolver(data) # or linsolve.LinearSolver(data, **consts) if we use constants
solution = ls.solve()
The output, solution, is a dictionary with solution of our model vector:
python
{'b_1': 1.2499999999999998, 'b_2': 1.8333333333333324}
Weighting of measurements can be implemented through an optional wgts dictionary that parallels the construction of data. To see a more in-depth example, please consult the linsolve_example.ipynb tutorial.
Package Details
Known Issues and Planned Improvements
For details see the issue log.
Community Guidelines
Contributions to this package to add new file formats or address any of the issues in the issue log are very welcome. Please submit improvements as pull requests against the repo after verifying that the existing tests pass and any new code is well covered by unit tests.
Bug reports or feature requests are also very welcome, please add them to the issue log after verifying that the issue does not already exist. Comments on existing issues are also welcome.
Installation
Preferred method of installation is pip install .
(or pip install git+https://github.com/HERA-Team/linsolve). This will install all
dependencies. See below for manual management of dependencies.
Dependencies
If you use conda and would like to ensure that dependencies are installed with conda
rather than pip, you should execute::
$ conda install "numpy>=1.14" scipy
Development
If you are developing linsolve, it is recommended to create a fresh environment by::
$ git clone https://github.com/HERA-Team/linsolve.git
$ cd linsolve
$ conda create -n linsolve python=3
$ conda activate linsolve
$ conda env update -n linsolve -f environment.yml
$ pip install -e .
This will install extra dependencies required for testing/development as well as the standard ones.
To run tests, just run nosetests in the top-level directory.
Owner
- Name: Hydrogen Epoch of Reionization Array (HERA)
- Login: HERA-Team
- Kind: organization
- Location: international
- Website: http://reionization.org
- Repositories: 68
- Profile: https://github.com/HERA-Team
Collection of software used for the HERA radio telescope
GitHub Events
Total
- Delete event: 4
- Push event: 5
- Pull request review event: 2
- Pull request event: 6
- Create event: 4
Last Year
- Delete event: 4
- Push event: 5
- Pull request review event: 2
- Pull request event: 6
- Create event: 4
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Aaron Parsons | a****s@b****u | 55 |
| Josh Dillon | j****n@b****u | 46 |
| Josh Dillon | j****n@m****u | 21 |
| Steven Murray | s****y@c****u | 13 |
| Josh Dillon | j****n@b****u | 12 |
| Aaron Parsons | a****s@a****u | 4 |
| Nicholas Kern | n****n@b****u | 4 |
| Steven Murray | s****y@a****u | 4 |
| dependabot[bot] | 4****] | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 20
- Total pull requests: 34
- Average time to close issues: 3 months
- Average time to close pull requests: 21 days
- Total issue authors: 5
- Total pull request authors: 5
- Average comments per issue: 0.65
- Average comments per pull request: 2.32
- Merged pull requests: 28
- Bot issues: 0
- Bot pull requests: 6
Past Year
- Issues: 0
- Pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: about 5 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jsdillon (10)
- AaronParsons (6)
- nkern (2)
- pkgw (1)
- plaplant (1)
Pull Request Authors
- dependabot[bot] (13)
- AaronParsons (12)
- steven-murray (9)
- jsdillon (8)
- nkern (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 2,972 last-month
- Total dependent packages: 1
- Total dependent repositories: 1
- Total versions: 6
- Total maintainers: 2
pypi.org: linsolve
high-level tools for linearizing and solving systems of equations
- Documentation: https://linsolve.readthedocs.io/
- License: MIT License Copyright (c) 2017 Hydrogen Epoch of Reionization Array (HERA) 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.
-
Latest release: 1.1.5
published about 2 years ago
Rankings
Maintainers (2)
Dependencies
- actions/checkout v3 composite
- ahmadnassri/action-dependabot-auto-merge v2 composite
- actions/checkout master composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- crazy-max/ghaction-github-labeler v4.1.0 composite
- actions/checkout master composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v3 composite
- codecov/codecov-action v3 composite
- conda-incubator/setup-miniconda v2.2.0 composite
- numpy >=1.23
- scipy *
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout master composite
- actions/setup-python v4 composite
- release-drafter/release-drafter v5.21.1 composite