Closed Ayon2001 closed 4 months ago
Dear @Ayon2001, thanks a lot for using jetset. I need to know which version you are using. I suggest you use the latest stable version https://jetset.readthedocs.io/en/latest/ v1.2.2. The message is from the minimizer, I suspect there is some issue with the error of the data. In any case, it looks like a warning from minuit or lsb, not a major issue.
Dear @andreatramacere ,
I am already using latest stable version https://jetset.readthedocs.io/en/latest/ v1.2.2. But the same error happening. please help!
@Ayon2001, to understand the issue I need to reproduce it. Can you share the data?
Dear @andreatramacere here is the some data sets 0_54685.6058098_54831.1866574_0.csv 0_54685.6058098_54831.1866574_0.txt 0_54685.6058098_54831.1866574_1.csv 0_54685.6058098_54831.1866574_2.csv 0_54685.6058098_54831.1866574_3.csv 0_54685.6058098_54831.1866574_4.csv 0_54685.6058098_54831.1866574_5.csv
@Ayon2001, please send me also a notebook where the error shows up with one of the dataset above
Here it is in the google drive link @andreatramacere https://drive.google.com/drive/folders/1q1YX4gmDe9A3_uJSAiUZ07Y0R4Zbq9f1?usp=sharing
@Ayon2001 The problem was that when you built your sed data you forgot to set the redshift! Please update the creation of the data object as follows
d=np.genfromtxt('0_54685.6058098_54831.1866574_0.txt')
data=Data(n_rows=d.shape[0])
data.set_field('x',d[:,0])
data.set_field('y',d[:,1])
data.set_field('dy',value=d[:,2])
data.set_meta_data('z',0.07)
Moreover, for the Synch bump, where the points are very unevenly sampled, I would suggest you to force log-par fit
mm,best_fit=my_shape.sync_fit(check_host_gal_template=False,
use_log_par=True,
Ep_start=None,
minimizer='minuit',
silent=True,
fit_range=[10.,16.])
Dear @andreatramacere, Thanks a lot for your comment. This works fine. But I have an another problem. I have encounterd the seme problem for an another set of data. I am attaching the notebook and data file in the google drive link herewith for your reference. It will be very helpful if you kindly take a look. The error is showing in the line '87' of the code.
https://drive.google.com/drive/folders/1wLoFxIjVZJ7L5PCDIeSTcPRGrgDdxLJi?usp=sharing
Dear @Ayon2001,
1) you are missing radio data, so please add radio data
2) remind to add the evaluations of spectral indices (my_shape.eval_indices(minimizer='lsb',silent=True)
)
3) inspect always the plots at each step
4) the phenomenological constrain is not a magic
or black box
step, it requires inspection and understanding of the underlying physics (please have a look here and here)
5) if you do not have enough data, it will not work
6) once you add the radio data (close in time if possible) you can ignore them during the model fitting, by setting the fit_range accordingly
Dear @andreatramacere In case of SED data where radio observation is not available, then how can I fit that with JetSeT. I can add the radio data from some close time observations from that epoch, then how can I set the fit_range ??
In principle, one would add data close in time, or averaged over a long period, if close-in-time data are not available. Regarding fit rage, just set the lower bound in order to exclude radio data.
Thats great ! @andreatramacere
import jetset
from jetset.data_loader import Data
from jetset.data_loader import ObsData, Data
from jetset.plot_sedfit import PlotSED
from jetset.test_data_helper import test_SEDs
from jetset.sed_shaper import SEDShape
import warnings
warnings.filterwarnings('ignore')
from jetset.minimizer import fit_SED, ModelMinimizer
from jetset.jet_model import Jet
from jetset.obs_constrain import ObsConstrain
from jetset.model_manager import FitModel
from jetset.minimizer import ModelMinimizer
#data.table
from jetset.data_loader import Data
import numpy as np
d=np.genfromtxt('5_54989.2883969_55014.9052868_1.txt')
data=Data(n_rows=d.shape[0])
data.set_field('x',d[:,0])
data.set_field('y',d[:,1])
data.set_field('dy',value=d[:,2])
data.set_meta_data('z',0.069)
#data.table
sed_data = ObsData(data_table= data)
sed_data.group_data(bin_width= 0.01)
sed_data.add_systematics(0.1,[10.**6,10.**29])
my_shape=SEDShape(sed_data)
my_shape.eval_indices(minimizer='lsb',silent=True)
p=my_shape.plot_indices()
Here I can't give the object name. I want to give the object name as "BL Lac". But in the plot JetSeT is showing new-src
How to solve this ?? I am using the data as a .txt file
you can see that in the image attached here.
sed_data = ObsData(data_table= data, obj_name='BL Lac') you should read the documentation 🙂https://jetset.readthedocs.io/en/latest/user_guide/documentation_notebooks/load_data/Jet_example_load_data.html
Hi @andreatramacere , I am Ayon Mondal, a final year Master's student in Astrophysics at Presidency University, Kolkata, India. I am using Jetset for modeling the multi-epoch SED of Blazars as a part of my Msc thesis work. When I am using a very well data the code works fine. But my multi-epoch data has many gaps in different wavebands. For this the pre-fit part works fine, but, after that in the constrains parameters from observable section it shows N_res was negative nan. How can I solve this ?
I am attaching the screenshots herewith.
![plot](https://github.com/andreatramacere/jetset/assets/140542167/5c44e8d2-5545-4d86-bc7f-98c9b1b54d4e)
Your response in this matter would be much appreciated. I am sincerely waiting for your reply.