andreatramacere / jetset

JetSeT a framework for self-consistent modeling and fitting of astrophysical relativistic jets
BSD 3-Clause "New" or "Revised" License
30 stars 15 forks source link

Using JetSet, first steps #50

Closed mmanganaro closed 2 years ago

mmanganaro commented 3 years ago

Dear Andrea, I have installed JetSet from anaconda on my Linux machine (Ubuntu 18 and python 3.8) and tested it successfully following the installation guide. I am now going trough the tutorials and I get stuck in the "QuickStart_1" notebook because of the following error:

ImportError Traceback (most recent call last)

in ----> 1 from jetset.jet_model import Jet 2 my_jet=Jet(name='my_jet',electron_distribution='lppl',) ~/Software/jetset-stable/jetset/jet_model.py in 15 import warnings 16 ---> 17 from .jet_spectral_components import JetSpecComponent, SpecCompList 18 19 on_rtd = os.environ.get('READTHEDOCS', None) == 'True' ~/Software/jetset-stable/jetset/jet_spectral_components.py in 24 from .mock import jetkernel as BlazarSED 25 else: ---> 26 from jetkernel import jetkernel as BlazarSED 27 28 from . import spectral_shapes ~/Software/jetset-stable/jetkernel/jetkernel.py in 11 # Import the low-level C/C++ module 12 if __package__ or "." in __name__: ---> 13 from . import _jetkernel 14 else: 15 import _jetkernel ImportError: cannot import name '_jetkernel' from 'jetkernel' (/home/marina/Software/jetset-stable/jetkernel/__init__.py) *************************************************************************************************************************************** Do you maybe have a suggestion? Thanks a lot in advance! Marina
andreatramacere commented 3 years ago

Hi Marina, could you please tell me which version are you using? Thanks, Andrea

andreatramacere commented 3 years ago

Dear Marina, Are you sure that you are not running the notebook from the same directory where you installed the code? In case you need support, I can organize a quick zoom meeting. Let me know, Cheers Andrea

mmanganaro commented 3 years ago

Hello Andrea, thanks for your quick reply: I looked into the folder /dist and find this file: jetset-1.1.2.post1-py3.8-linux-x86_64.egg So I suppose I have this version: jetset-1.1.2 The notebook is inside the folder /notebooks in the installation directory. Sure a zoom meeting would be great if you have time, I send you a private message! Cheers Marina

mfuphi commented 3 years ago

Hi, I have a similar problem where: After installing the JetSet software I ran the test command $ bash $ pytest --disable-warnings --pyargs jetset.tests.test_users::test_short

and got the following message

Log-Polynomial fitting of the IC component ---> fit range: [23, 29] ---> LogCubic fit ---> LogCubic fit failed pedantic is not one of the parameters [par_0 par_1 par_2 par_3] ---> try LogParabola

I get the same message even with different blazar SED data. I've deleted and reinstalled the software several times now, but same error message. How can I fix this problem?

andreatramacere commented 3 years ago

Hi, did you install from source or binaries? If from source, are you sure you are not running in the same installation dir? Can you check that your python path Is not pointing to the installation dir? Which version are you using?

andreatramacere commented 3 years ago

@mfuphi, there Is a chance that you have a version of iminuit not compatibile with the version of jetset. You can try to downgrade iminuit to version<2.0, or you can install the per release of the new version of jetset. In the latter case I can give you instrucrions about

mfuphi commented 3 years ago

I'm using version 1.1.2. First I tried installing from the binaries but ran into this message: ` UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

Your installed version is: 2.31 `

So I installed it from the source folder "jetset-master.zip". My python is pointing to the JetSe environment, see below (jetset) mfuphi@mfuphi-Lenovo-ideapad-330-15IKB:~$ which python /home/mfuphi/anaconda3/envs/jetset/bin/python

andreatramacere commented 3 years ago

@mfuphi, try to install form source from the develop branch, this Is the latest version. For the documentario use: https://andreatramacere.github.io/jetsetdoc/html/index.html Let me know

mfuphi commented 3 years ago

Hi @andreatramacere, thank you. It turns out my version of iminuit was incompatible, thank you for pointing this out. I installed the correct one and it worked. I just double-checked the rest of the dependencies to make sure they are all there and that they are correct versions. My code is working again, thank you!

andreatramacere commented 3 years ago

@mfuphi, I'am glad It worked! I suggest you to install, in a separate environment the new version. This is the pre release of version 1.2.0. There are several new features. only the documentation for the temporal evolution needs to be updated. Let know if you need help to install it. Source code and binaries are in the realeses section of the GitHub repo, release 1.2.0rc8. instructions to install are in the wikipage of the git repo. Documentation is here: https://andreatramacere.github.io/jetsetdoc/html/index.html

mfuphi commented 3 years ago

Thank you, @andreatramacere, I will add the new version.