-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from lucabaldini/line_fitting
Line fitting
- Loading branch information
Showing
7 changed files
with
139 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,7 @@ dependencies = [ | |
"scipy", | ||
"tables", | ||
"tqdm", | ||
"uncertainties", | ||
"xraydb" | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ pydata-sphinx-theme | |
scipy | ||
tables | ||
tqdm | ||
uncertainties | ||
xraydb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (C) 2022 luca.baldini@pi.infn.it | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
"""Test suite for plot.py | ||
""" | ||
|
||
from hexsample.plot import plt, PlotCard | ||
|
||
|
||
def test_card(): | ||
"""Test for the plot cards. | ||
""" | ||
card = PlotCard() | ||
card.add_string('Label', 'Content') | ||
card.add_blank() | ||
card.add_quantity('Fixed float', 1.0) | ||
card.add_quantity('Formatted fixed float', 1.0, fmt='.5f') | ||
card.add_quantity('Fixed int', 1) | ||
card.add_quantity('Parameter 1', 1.23456, 0.53627) | ||
card.add_quantity('Fixed float', 1.0, units='cm') | ||
card.add_quantity('Fixed int', 1, units='cm') | ||
card.add_quantity('Parameter 1', 1.23456, 0.53627, units='cm') | ||
card.plot() | ||
card.plot(0.05, 0.95, ha='left') | ||
|
||
|
||
if __name__ == '__main__': | ||
test_card() | ||
plt.show() |