GithubHelp home page GithubHelp logo

ita-solar / helita Goto Github PK

View Code? Open in Web Editor NEW
9.0 6.0 17.0 3.33 MB

A Python library for solar physics from the Institute of Theoretical Astrophysics, University of Oslo

License: BSD 3-Clause "New" or "Revised" License

Python 93.00% C 4.31% Cython 2.69%

helita's Introduction

helita's People

Contributors

edvhar avatar fluxtransport avatar jumasy avatar m1kol4j avatar mynorjrv avatar nabobalis avatar pirez avatar sevans711 avatar temcomp avatar tiagopereira avatar viggoh avatar wargnierq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

helita's Issues

Issue with velocities

When considering get_var('ux',mf_species=1m;f_level=1), it is not consistent with get_var('px',mf_species=1m;f_level=1)/get_var('r',mf_species=1m;f_level=1). Sometimes I got an issue related to cstagger (in bifrost.py)

rh15d_vis

I get this error when I try running visualisation.ipynb : cannot import name 'rh15d_vis' from 'helita.sim'

Incorrect order of (nhydr,nt) in "make_hdf5_atmos" in "helita/sim/rh15d.py

It seems that the order of dimensions is different in nH and nh_var variables:
nH: (nhydr,nt,), nh_var: (nt,nhydr,).
The error is raised while copying information from one array to another.
Code line "nh_var[nt[0]:nt[1], :nhydr] = nH

One more issue arises with z_var and z variables. It seems that z has dimensions (nt,nx,ny,nz), while z_var is shortened to (nt,nz). Copying from one variable to another also generates error.
Code line "z_var[nt[0]:nt[1]] = z"

No module named scipy.integrate.quadrature

I was trying to use Helita in a Jupyter notebook, and import statement have failed with the following error:

---> 10 from scipy.integrate.quadrature import cumtrapz
     11 from scipy.interpolate import interp1d
     12 from astropy import units as u

ModuleNotFoundError: No module named 'scipy.integrate.quadrature'

I've checked the SciPy documentation, and quadrature is not a module but a function, and to fix that the following change is required in sources:

--- a/helita/vis/rh15d_vis.py
+++ b/helita/vis/rh15d_vis.py
-from scipy.integrate.quadrature import cumtrapz
+from scipy.integrate import quadrature
+from scipy.integrate import cumtrapz

I can create a pull-request, if you want.

By the way, quadrature doesn't seem to be used at all, so this line might even be deleted. Also, the cumtrapz function seems to be renamed to cumulative_trapezoid in latest versions if SciPy.

I've also put here another issue with Jupyter notebooks from RH15D repository, but then I realized that it will be better to post it there.

No such file or directory: helita/io/anapyio.c

Hello. I was following this installation instructions, but unfortunately couldn't install Helita neither using pip nor via setup.py. I get this error:

...
clang: helita/io/anapyio.c
clang: helita/io/src/libf0.c
clang: helita/io/src/anacompress.c
clang: helita/io/src/anadecompress.c
clang: error: no such file or directory: 'helita/io/anapyio.c'
clang: error: no input files

And indeed, there is no helita/io/anapyio.c in the repository. Am I perhaps missing something?

My environment is on Mac OS:

$ sw_vers -productVersion
10.15.7

$ python --version
Python 3.8.7

$ pip --version
pip 20.3.3 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ gfortran --version
GNU Fortran (Homebrew GCC 10.2.0_2) 10.2.0

Problem building wheels. Numpy.distutils issue?

I'm struggling to install this on my Windows 11 computer with miniconda (my friend on Mac installed it just fine).

I've got Python 3.11.9 installed (to address the depreciated numpy.distutils issue). I also just installed Microsoft Visual Studio for this, but the error may be related to that?
It seems to work fine until it gets to "Building Wheels for Collected packages: helita". It exists the subprocess with the below error:

    Building wheels for collected packages: helita
      Building wheel for helita (pyproject.toml) ... error
      error: subprocess-exited-with-error
    
      × Building wheel for helita (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [194 lines of output]
          <string>:8: Deprecation
    Warning:

    'numpy.distutils' is deprecated since NumPy 1.23.0, as a result
    of the deprecation of `distutils` itself. It will be removed for
    Python >= 3.12. For older Python versions it will remain present.
    It is recommended to use `setuptools < 60.0` for those Python versions.
    For more details, see:
      https://numpy.org/devdocs/reference/distutils_status_migration.html

After that I get a few dozen warnings or errors like:

    WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'

    INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils

  WARN: CCompilerOpt.feature_test[1563] : testing failed
        INFO: CCompilerOpt.feature_test[1547] : testing feature 'POPCNT' with flags ()
        WARN: CCompilerOpt.dist_test[630] : CCompilerOpt._dist_test_spawn[764] : Command (C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\vikn0392\AppData\Local\miniconda3\envs\myenv\include -IC:\Users\vikn0392\AppData\Local\miniconda3\envs\myenv\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\8.1\\include\\\um -IC:\Program Files (x86)\Windows Kits\8.1\\include\\\shared -IC:\Program Files (x86)\Windows Kits\8.1\\include\\\winrt -IC:\Program Files (x86)\Windows Kits\8.1\\include\\\cppwinrt /TcC:\Users\vikn0392\AppData\Local\Temp\pip-build-env-jvbvidyg\overlay\Lib\site-packages\numpy\distutils\checks\cpu_popcnt.c /FoC:\Users\vikn0392\AppData\Local\Temp\tmp4w9skjle\Users\vikn0392\AppData\Local\Temp\pip-build-env-jvbvidyg\overlay\Lib\site-packages\numpy\distutils\checks\cpu_popcnt.obj /WX) failed with exit status 2 output ->
        cpu_popcnt.c
    C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include\xmmintrin.h(79): fatal error C1083: Cannot open include file: 'malloc.h': No such file or directory


     error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\vikn0392\AppData\Local\Temp\pip-build-env-jvbvidyg\overlay\Lib\site-packages\numpy\core\include -Ihelita\io/src -IC:\Users\vikn0392\AppData\Local\Temp\pip-build-env-jvbvidyg\overlay\Lib\site-packages\numpy\core\include -Ibuild\src.win-amd64-3.11\numpy\distutils\include -IC:\Users\vikn0392\AppData\Local\miniconda3\envs\myenv\include -IC:\Users\vikn0392\AppData\Local\miniconda3\envs\myenv\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows Kits\8.1\\include\\\um -IC:\Program Files (x86)\Windows Kits\8.1\\include\\\shared -IC:\Program Files (x86)\Windows Kits\8.1\\include\\\winrt -IC:\Program Files (x86)\Windows Kits\8.1\\include\\\cppwinrt /Tchelita\io/anapyio.c /Fobuild\temp.win-amd64-cpython-311\Release\helita\io\anapyio.obj" failed with exit status 2

I'm new to python and so I'm not sure if I've included all the information that's relevant. Let me know if I can provide more.
Thanks

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.