Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting of 'txt' file saved by 'Save Spectrum/Fit' #312

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install Dependencies
run: |
# These packages are installed in the base environment but may be older
# versions. Explicitly upgrade them because they often create
# installation problems if out of date.
python -m pip install --upgrade pip setuptools numpy
# python -m pip install --upgrade pip setuptools numpy

pip install black
- name: Run black
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
# These packages are installed in the base environment but may be older
# versions. Explicitly upgrade them because they often create
# installation problems if out of date.
python -m pip install --upgrade pip setuptools numpy
# python -m pip install --upgrade pip setuptools numpy

pip install flake8
- name: Run flake8
Expand Down
2 changes: 1 addition & 1 deletion pyxrf/model/fit_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ def output_summed_data_fit(self, save_fit=True, directory=None):
if (xx is None) or (self.y0 is None) or (self.fit_y is None):
msg = "Not enough data to save spectrum/fit data. Total spectrum fitting was not run."
raise RuntimeError(msg)
data = np.array([self.x0, self.y0, self.fit_y])
data = np.array([xx, self.y0, self.fit_y])
else:
logger.info("Saving spectrum based on loaded or estimated parameters.")
if (xx is None) or (self.y0 is None) or (self.param_model.total_y is None):
Expand Down
Loading