Comments (6)
Dear Mireia, thanks a lot for using jeteset. Before going into the details may I ask you which version you are using?
I suggest you to install the release candidate of the new version: https://github.com/andreatramacere/jetset/releases/tag/1.2.0rc10
You can directly use the installer https://github.com/andreatramacere/jetset-installer, passing to the command line the argument 1.2.0rc10.
The documentation for the pre-release is here: https://andreatramacere.github.io/jetsetdoc/html/index.html
Now, coming to your issue. I should have a look at the code that you use to plot in matplotlib to understand what is going on. The other problem might be solved with the version that I am suggesting you to install.
Please, let me know how things evolve and how I can help you.
Cheers
Andrea
from jetset.
I am using 1.1.2, the last stable I guess. I will try the pre-release you mention. Any big compatibility issue I need to know in advance?
One, maybe relevant bit, is that I have my own electron distribution defined. It is basically a broken power law, but defined in a way that it is always concave (i.e. redefining p_1 so that p_1' = abs(p_1 - p). Maybe (I'm not saying it is the reason) jetset 'forgets' at some point it is a custom distribution and uses a standard broken power law?
from jetset.jet_emitters import EmittersDistribution
def distr_func_bkn(gamma_break,gamma,p,p_1):
return np.power(gamma,-np.abs(p))*(1.+(gamma/gamma_break))**(-np.abs(p_1))
bkn2=EmittersDistribution('bkn')
bkn2.add_par('gamma_break',par_type='turn-over-energy',val=1E3,vmin=1., vmax=None, unit='lorentz-factor')
bkn2.add_par('p',par_type='LE_spectral_slope',val=2.5,vmin=0., vmax=10, unit='')
bkn2.add_par('p_1',par_type='HE_spectral_slope',val=3.2,vmin=0., vmax=10, unit='')
bkn2.set_distr_func(distr_func_bkn)
bkn2.parameters.show_pars()
bkn2.parameters.p.val=2
bkn2.parameters.p_1.val=0.5
p=bkn2.plot3p()
p.fig
At least that would perhaps explain this non-sense SED
from jetset.
So I found what happens, you called the distribution with the same name of the custom model, 'bkn'. Once you save the model, and you load it, the constructor is getting the custom one. In version 1.1.2 I have not implemented the serialization of the custom electron distribution. This is done with the version that I have suggested before, anyhow I found the solution for your problem, still using version 1.1.2. Use the code attached, and remember, once you load the model and then you update it with the saved custom distribution, run .eval()
to update
custom_emitters_ditribution_serialization.ipynb.gz
from jetset.
I have also pushed the notebook with the solution to the git repo that you share before.
Please, let me know if this solved your problem
from jetset.
from jetset.
Regarding compatibility, there might be minor changes. Just in case, share with me a piece of code with all the jetset steps that you are using, I will check if it is OK
from jetset.
Related Issues (18)
- Set the distance from the photon field HOT 10
- Cannot load data in ObsData object HOT 3
- installation issue HOT 24
- Issue with external emitters class. HOT 2
- setting the size of the frequency grid HOT 2
- upload host galaxy template from a file HOT 5
- Cutoff in the SSC spectrum at high frequencies HOT 2
- jetset 1.1.2 and minuit minimization HOT 4
- Using JetSet, first steps HOT 11
- Some Modification to Code HOT 5
- Problem with IC fitting using Minuit HOT 19
- Issue with pytest after installation from anaconda(recommended for linux) HOT 9
- How to save the fitted SED component values ? HOT 4
- Testing `galactic_expanding_shell` branch HOT 4
- Is IC cooling off in `galactic_expanding_shell` ? HOT 1
- Dependency conflict with NumPy and Numba versions with conda installation HOT 4
- constrains parameters from observable ----- N_res was negative nan HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jetset.