-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conversion formula for flux #221
Comments
The data are generated with this script: https://github.com/sncosmo/sncosmo/blob/master/misc/gen_example_data.py Interpret the flux using the zp and zpsys columns: the flux is the number of photons through the given bandpass relative to a source with magnitude 'zp' in the 'zpsys' magnitude system. (Eg, a source with a magnitude of 25 in the AB system.) |
Thank you for your response sir. How can i generate the sample data for other models (Other Models have other parameters ). Please mention an script for any other model( eg. snf-2011fe). |
This documentation page demonstrates how to use Models to generate synthetic photmetry: https://sncosmo.readthedocs.io/en/latest/models.html Do you have a question about a specific model's parameters? |
The data in 'example_photometric_data.txt' is that of supernova 2006lc( that i have downloaded from an open catalog and converted it in the format that is accepted by sncosmo) . I am trying to fit "snana-2006lc" model in this data but i am getting some random results. I am enclosing here the data file(in txt format) and the screenshots of program(lightcurve.png) to fit the light curve and the results(result1.png &result2.png) that i have got. Also please tell something about " t0 " for this model, in my data i have taken " t0 " as the day of band maximum.For calculating the errors i have used the error propagation equation. |
Thanks for including the script you're using. Here are some observations:
|
Thank you very much for your response sir.I did the modification suggested
by you and successfully run the script. Actually this is the first time i
am trying to fit a light curve in a data set so i tried to fit the known
model in a known data set just to see the response and to understand the
process of fitting.
Now i want to know few things:-
1) In case i need to fit Core collapse supernovae(CCNe) type 1b and 1c then which model
should i call in the script?
2) Generally data are available in the format (
#event,time,magnitude,e_magnitude,upper limit,band). Is there any built in
script in sncosmo which translates any different format to the one that is
accepted by sncosmo?
3) I am using error propagation equation to calculate error in the flux. Is
this the reason for getting higher value of chi square? Then how should i
calculate error?. Moreover how different data points can have same error
(the example data file in sncosmo consist of constant error for every data).
I hope to get valuable suggestions from you.
Thank you.
…On Wed, Aug 29, 2018 at 8:20 AM Kyle Barbary ***@***.***> wrote:
Thanks for including the script you're using. Here are some observations:
-
You don't need to copy your data to the example data file. Use data =
sncosmo.read_lc('your_data_file.txt').
-
In the script, you're only fitting redshift and t0. You probably want
to fit amplitude as well. You may also want to add dust to the model
and fit the amount of dust. (this will change the relative amplitude
between bands). Here's how you would create a model with dust (from the
docs here:
<https://sncosmo.readthedocs.io/en/v1.6.x/models.html#creating-a-model-with-a-source-and-effect-s>)
:
>>> dust = sncosmo.CCM89Dust()>>> model = sncosmo.Model(source='snana-2006lc',... effects=[dust],... effect_names=['host'],... effect_frames=['rest'])
Then try fitting parameters ['z', 't0', 'amplitude', 'hostebv'].
-
The definition of t0 is "the observer-frame time corrsponding to the
model's phase=0." Phase=0 varies from model to model; in general it is
arbitrary. Think of t0 as just a parameter that shifts the model in
time with respect to the data. It's not necessarily the time of max in any
band.
-
Finally, it is a bit weird to be fitting a model based on 2006lc to
the data for 2006lc. What are you trying to accomplish here?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#221 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AoQt9ZbdBLg7qr9BDf0GduhueD5Z52MHks5uVgF3gaJpZM4WEaq8>
.
|
Depends on what you are trying to accomplish. But there is a list of built-in sources and their types here:
No (because it's not possible to cover every type of file format people use for their data). But you don't have to write a file that is accepted by sncosmo, you just have to get the data into a table in the right format. So, you can read in your data and then programmatically construct an astropy Table with columns Yes, you do have to convert magnitude errors to flux errors yourself. Watch out for the upper limits in your file. You should take those into account in the flux errors.
You should not expect to get a chi^2 / dof of 1 if your model is not a good representation of the data. When you have very small errors on the data (as is the case here), discrepancies between the model and the data become more apparent. This will always be the case for any model: No model is perfect, but some models are useful.
The example data is synthetic (made up). I pointed you to the script that creates it in my first reply. |
Thank you very much for such a nice and clear reply.
|
Core collapse SNe (even for a given subtype such as IIp) are much less uniform than Type Ia SNe. Therefore, it's more difficult to come up with a model that adequately explains the diversity of light curve shapes for CC SNe. The CC models in sncosmo are typically used in simulations. By using many different models, each based on a single SN, we hope to cover most of the diversity of light curve shapes. There may be parameterized models for some CC subtypes in the literature, but we don't have any in sncosmo at the moment. |
If you have data for a new CC SN, and you want to identify which subtype it belongs to, you could fit it to all the different CC models and see which one fits best. Just be aware that you are not going to get a great chi^2 value. |
Hi sir, |
Fit the colorWhen you call result, fitted_model = sncosmo.fit_lc(
data, model,
['z', 't0','amplitude'], # parameters of model to vary
bounds={'z':(0.01, 0.018)},method='minuit', guess_amplitude =True,
guess_t0=True, guess_z=True, minsnr=5.0, modelcov=False,maxcall=10000,
phase_range=None,wave_range=None, warn=True) you are fitting No template is going to be greatLooking at the plots, I would predict that no value of hostebv will give you a great fit though. This may just be a case of the model not being a great description of all Ib/c SNe. It is illuminating to read about the template on Peter Nugent's website:
Note that the lightcurve is based on a single SN. The spectral template (which dictates the color ) is based on more SNe, but there's probably diversity of color behavior within those SNe, and that diversity is not captured in the template. Don't fit the redshiftDo you have a spectroscopic redshift for this SN? I'm assuming you do, since you have a type. If so, I would recommend setting the redshift to this value and not varying |
Thank you very much for your reply. I would do the required modifications and will inform you. |
Hello sir, Honestly speaking, here i am confused about zero point (zp). After converting in to "ab" system, i simply took zp = 25 , i am not sure how to obtain the zp (is 25 default zp for every data in "ab" system if not then how to decide this??). Is this my mistake??? |
please explain how has the flux been calculated in example_photometric_data.dat and what is its unit.
The text was updated successfully, but these errors were encountered: