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

Update plot_evaluation for new x4i #15

Open
brown170 opened this issue Sep 18, 2024 · 0 comments
Open

Update plot_evaluation for new x4i #15

brown170 opened this issue Sep 18, 2024 · 0 comments

Comments

@brown170
Copy link
Contributor

When retrieving EXFOR data using the new version of x4i, it does not go well:

Traceback (most recent call last):
  File "/Users/dbrown/Desktop/fudge/brownies/bin/plot_evaluation.py", line 449, in <module>
    makeCrossSectionPlot(
  File "/Users/dbrown/Desktop/junk/venv/lib/python3.12/site-packages/brownies/BNL/plot_evaluation/__init__.py", line 702, in makeCrossSectionPlot
    generatePlot(observable='crossSection',
  File "/Users/dbrown/Desktop/junk/venv/lib/python3.12/site-packages/brownies/BNL/plot_evaluation/__init__.py", line 284, in generatePlot
    plot2d.makePlot2d(
  File "/Users/dbrown/Desktop/junk/venv/lib/python3.12/site-packages/fudge/vis/matplotlib/plot2d.py", line 752, in makePlot2d
    __makePlot2d(_datasets, xAxisSettings, yAxisSettings, theTitle=theTitle, legendOn=legendOn, legendXY=legendXY,
  File "/Users/dbrown/Desktop/junk/venv/lib/python3.12/site-packages/fudge/vis/matplotlib/plot2d.py", line 644, in __makePlot2d
    raise err
  File "/Users/dbrown/Desktop/junk/venv/lib/python3.12/site-packages/fudge/vis/matplotlib/plot2d.py", line 638, in __makePlot2d
    dataset.convertUnits(xUnit=xAxisSettings.unit, yUnit=yAxisSettings.unit)
  File "/Users/dbrown/Desktop/junk/venv/lib/python3.12/site-packages/fudge/vis/matplotlib/plot2d.py", line 443, in convertUnits
    self.xUnit = convertUnit(self.xUnit, xUnit, self.x, self.xerr, self.legend)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dbrown/Desktop/junk/venv/lib/python3.12/site-packages/fudge/vis/matplotlib/plot2d.py", line 115, in convertUnit
    xErrs[i1] = conversionFactor * x1
                ~~~~~~~~~~~~~~~~~^~~~
TypeError: can't multiply sequence by non-int of type 'float'

Caleb should have the updated file. I tested it and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant