Giter Club home page Giter Club logo

oasys1's People

Contributors

acopar avatar ales-erjavec avatar astaric avatar blazzupan avatar crtg avatar janezd avatar jurreb avatar jzbontar avatar lanzagar avatar lucarebuffi avatar marinkaz avatar markotoplak avatar mfrlin avatar mpolajnar avatar mstajdohar avatar mstrazar avatar nikicc avatar srio avatar thocevar avatar tjanez avatar tomazc avatar tschoonj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

oasys1's Issues

Improve OS management

We need to find a better way to manage OS specific logic (if/else statement around OS) on the project to reduce complexity and improve maintainability.

suggestion to restructure location of some OASYS widgets

I suggest a reorganization of the Oasys common widgets. Now we have

  • Oasys Tools contains 1) Python Script, 2) Surface File Reader, 3) HDF5 File reader
  • Syned Tools contain (among others) 1) Height Profile SImulator, 2) DABAM Height Profile, 3) Surface FIle Merger

These utils are common Surface Metrology applications to be used with at least SRW and SHADOW

I think it is more reasonable to create a new entry at the top level (Oasys) called for example Oasys-Surfaces or Oasys-Metrology that will group:

  1. Surface file Reader, 2) Height Profile SImulator, 3) DABAM Height Profile and 4) Surface FIle Merge

To be cleaner, I would place all the common objects (no widgets) to deal with that data in srxraylib/metrology (where we have now dabam, and it is a dependency from oasys1) and create a new add-on oasys-surfaces or oasys-metrology.

orange conversion status

@lucarebuffi @srio It seems Oasys is in the process of adopting the Orange3 library split (orange-canvas-core and orange-widget-base). However the current master seems in an inconsistent state:

from orangewidget import widget

class OWWidget(widget.OWWidget):

orangewidget.widget does not have a OWWidget. Do we have a stable branch that I can use? Or the latest stable tag/commit?

PyQt version

Hello Luca,

is there any particular reason to force PyQt>=5.12? (you changed it on June 6th:
from 'PyQt5>=5.11.3',
to 'PyQt5>=5.12', )

This PyQt5=5.12 version does not work for windows and neither for our debian8 installation at ESRF.

When we update SRW from the add-ons, we get errors and we have to go back manually to PyQt5.11.3. This PyQt5=5.11.3 is the one that works fine for me.

Is possible to revert to PyQt5>=5.11.3

Thanks, M

OASYS not opening

Hi,
I was trying open oasys in windows today (python version 3.8.5) but its not working anymore. It was working fine just a few days ago.

This is the error message I get after I try to start it with "python -m oasys.canvas":

(base) C:\Users\johirul.islam>python -m oasys.canvas
Traceback (most recent call last):
File "C:\Users\johirul.islam\Miniconda3\lib\runpy.py", line 194, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\johirul.islam\Miniconda3\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\johirul.islam\Miniconda3\lib\site-packages\oasys\canvas_main
.py", line 490, in
sys.exit(main())
File "C:\Users\johirul.islam\Miniconda3\lib\site-packages\oasys\canvas_main
.py", line 452, in main
raise e
File "C:\Users\johirul.islam\Miniconda3\lib\site-packages\oasys\canvas_main
.py", line 279, in main
canvas_window = OASYSMainWindow(parent=None, no_update=no_update)
File "C:\Users\johirul.islam\Miniconda3\lib\site-packages\oasys\canvas\mainwindow.py", line 500, in init
if not no_update: self.__set_pypi_internal_libraries(load_pypi_internal_libraries())
File "C:\Users\johirul.islam\Miniconda3\lib\site-packages\oasys\canvas\mainwindow.py", line 576, in __set_pypi_internal_libraries
if internal_libraries.is_updatable(item): self.__internal_library_to_update.append(item)
File "C:\Users\johirul.islam\Miniconda3\lib\site-packages\oasys\application\internal_libraries.py", line 95, in is_updatable
if MAX_VERSION[dist.project_name] is None: return True
KeyError: 'SciPy'

no plots in OASYS 1,3 with matplot 3.6.0

In ubuntu, oasys1.3 gives errors in all plots using matplotlib 3.6.0

There are no problems with matplotlib 3.5.3

This is not affecting oasys 1.2: apparently python 3.7 does not update to matplotlib 3.6.0

The error comes from plots with silx. I will check that tomorrow and, if necessary, send an issue to silx.

A command line matplotlib plot does work.

For the moment I think is important to limit in oasys1 matplotlib<=3.5.3 (or <3.6.0)

This is the error using wofry/generic wavefront 1D:

TypeError                                     Traceback (most recent call last):
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/orangecontrib/wofry/widgets/wavefront_propagation/ow_generic_wavefront_1D.py", line 382, in generate
    self.plot_results()
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/orangecontrib/wofry/widgets/gui/ow_wofry_widget.py", line 108, in plot_results
    self.do_plot_results(progressBarValue)
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/orangecontrib/wofry/widgets/wavefront_propagation/ow_generic_wavefront_1D.py", line 406, in do_plot_results
    self.plot_data1D(x=1e6*self.wavefront1D.get_abscissas(),
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/orangecontrib/wofry/widgets/gui/ow_wofry_widget.py", line 125, in plot_data1D
    self.plot_canvas[plot_canvas_index] = oasysgui.plotWindow(parent=None,
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/oasys/widgets/gui.py", line 311, in plotWindow
    plot_window = PlotWindow(parent=parent, backend=backend,
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/silx/gui/plot/PlotWindow.py", line 114, in __init__
    super(PlotWindow, self).__init__(parent=parent, backend=backend)
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/silx/gui/plot/PlotWidget.py", line 392, in __init__
    self._backend = self.__getBackendClass(backend)(self, self)
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/oasys/widgets/gui.py", line 289, in __init__
    super().__init__(plot, parent)
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/silx/gui/plot/backends/BackendMatplotlib.py", line 1334, in __init__
    FigureCanvasQTAgg.__init__(self, self.fig)
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/matplotlib/backends/backend_qt.py", line 209, in __init__
    super().__init__(figure=figure)
  File "/home/esrf/srio/miniconda3-py38/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 1656, in __init__
    super().__init__()  # Typically the GUI widget init (if any).
TypeError: __init__() missing 1 required positional argument: 'plot'



SRW import fails in OASYS windows installation

Hello, I have and issue that appeared suddenly, when launching OASYS1.2 in windows 10, it fails to import SRW with the following message:

Error importing 'orangecontrib.srw.menu.ow_srw_tools_menu'
Traceback (most recent call last):
File "C:...\Miniconda3\lib\site-packages\oasys\canvas\discovery.py", line 36, in omenus_from_package
menu_module = discovery.asmodule(name)
File "C:...\Miniconda3\lib\site-packages\orangecanvas\registry\discovery.py", line 505, in asmodule
return import(module, fromlist=[""])
File "C:...\AppData\Roaming\Python\Python37\site-packages\orangecontrib\srw\menu\ow_srw_tools_menu.py", line 7, in
from wofrysrw.propagator.propagators2D.srw_fresnel_native import SRW_APPLICATION
File "C:...\AppData\Roaming\Python\Python37\site-packages\wofrysrw\propagator\propagators2D\srw_fresnel_native.py", line 7, in
from wofrysrw.beamline.srw_beamline import Where
File "C:...\AppData\Roaming\Python\Python37\site-packages\wofrysrw\beamline\srw_beamline.py", line 5, in
from wofrysrw.beamline.optical_elements.srw_optical_element import SRWOpticalElementDisplacement
File "C:...\AppData\Roaming\Python\Python37\site-packages\wofrysrw\beamline\optical_elements\srw_optical_element.py", line 7, in
from wofrysrw.propagator.wavefront2D.srw_wavefront import WavefrontPropagationParameters, WavefrontPropagationOptionalParameters
File "C:...\AppData\Roaming\Python\Python37\site-packages\wofrysrw\propagator\wavefront2D\srw_wavefront.py", line 1, in
from oasys_srw.srwlib import srwl, SRWLWfr, SRWLRadMesh, SRWLStokes, array as srw_array
File "C:...\AppData\Roaming\Python\Python37\site-packages\oasys_srw\srwlib.py", line 6, in
import srwlpy as srwl
ImportError: DLL load failed: The specified module could not be found.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Failed to import SRW
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
SRW is not available

I have the same problem in two different PCs (Win10), and the same happened to another OASYS windows user.

Thank you in advance for your attention.

Kind regards, J

Python input issue

Hey Luca,

I am some code which requires the user to input couple of values in the OASYS Python script environment.

If I do something like:

my_input=input("input anything: ")
print(my_input)

I get:

Running script:
input anything: --------------------------------------------------------------------------------
EOFError Traceback (most recent call last):
File "/Applications/Oasys1.2.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in
File "", line 1, in
EOFError: EOF when reading a line

I tried the same in my Idle3 and PyCharm, it works.

Any clues?

Ciao

Matteo

oasys install addons with "pip install --user" in windows

It looks that Oasys installs the addons with admin=False:

image

This causes some trouble finding some packages.

Because the windows installation is by default in \users<user>\miniconda3, we believe that the installation should be done using "admin=True" to send the code to the miniconda3 directory (owned by the user) and not to another user directory.

Juan & Manolo

"Render surface shape" instrument for SHADOW widgets

There are some issues regarding the "Render surface shape" instrument available in SHADOW widgets for curved elements:

  1. The "Render surface shape" becomes inactive when "Surface shape parameter" setting switches from "calculated" to "user defined"
  2. When surface shape is given by conic coefficients, launching of ray tracing resets some of the coefficients (see attached ZIP with .ows file)
  3. In some cases (e.g. refractor interfaces in "lens_elliptical.ows" from "OTHER_EXAMPLES" folder in tutorials), the "Render surface shape" instrument plots just empty axes (probably a scaling issue)

render_shape.zip

OASYS does not start anymore (December 2023)

In all supported OSs, on December 20th 2023 morning, OASYS suddenly failed to start. In Linux and Windows, an error message was visible with the last two lines as follow:

if MAX_VERSION[dist.project_name] is None: return True

KeyError: 'SciPy'

This is due to a modification made to/by the Python Package Index, where all the OASYS libraries are stored.
OASYS must be reinstalled:

Linux: open a terminal, type ~/miniconda3/bin/python -m pip install oasys1 –upgrade

Windows: open a Miniconda3 prompt (Start Menu->Anaconda3->Anaconda Prompt (miniconda3)), type python -m pip install oasys1 –upgrade

Mac: download the app from our website and replace your current one
or
open a terminal and type: /Applications/Oasys1.3.app/Contents/MacOS/PythonApp -m pip install oasys1 --upgrade

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.