Skip to content
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

How to add a BB model within speedyfit? #8

Closed
AstroJLin opened this issue Jun 4, 2022 · 18 comments
Closed

How to add a BB model within speedyfit? #8

AstroJLin opened this issue Jun 4, 2022 · 18 comments

Comments

@AstroJLin
Copy link

Hi,

How to an extra model of blackbody within SED using the speedyfit?

Thanks!

@vosjo
Copy link
Owner

vosjo commented Jun 4, 2022 via email

@AstroJLin
Copy link
Author

Hi Joris,

I want to fit a binary of which one component is a BB that may result from accretion disk. Here, when I use a BB to fit my source, I find that the WISE W3 and W4 band also have a very bad fit. Therefore, I want to add to a BB within the model so that
see if it can fit well.

In addition, If I consider a BB from the accretion disk, should I use the first case and does a the atmosphere model of star still apply?

Fitting results of the main sequence star model as follow:
pic

Thanks!

@vosjo
Copy link
Owner

vosjo commented Jun 4, 2022 via email

@AstroJLin
Copy link
Author

Hi Joris,
Thank you for your reply.

Here, I should how to set up to add BB model into the speedyfit (add BB model to **.yaml?). Could you give my a model of 2 components?

This source has a V band magnitude of approximately 13.7, it may be too bright for sdss?

Thanks!

@vosjo
Copy link
Owner

vosjo commented Jun 4, 2022 via email

@AstroJLin
Copy link
Author

Hi Joris,

Here, I try to use the grid binary model, but the model of blackbody seems too hot for an accretion disc. Here, Is the speedyfit have able to set up a cold temperature blackbody (e.g 2000-4000 K)?

If I'm not mistaken, it only be set up like this:
Screenshot from 2022-06-05 01-34-44
Thanks!

@vosjo
Copy link
Owner

vosjo commented Jun 4, 2022 via email

@AstroJLin
Copy link
Author

Hi Joris,

I try to adjust the limits ([500, 3000]), but the speedyfit throw an error. Could you tell me the reason for this error?

My settings are as follows:
Screenshot from 2022-06-05 02-22-57

The error is as follow:
/home/jlin/anaconda3/lib/python3.8/site-packages/secretstorage/dhcrypto.py:16: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
/home/jlin/anaconda3/lib/python3.8/site-packages/secretstorage/util.py:25: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
from cryptography.utils import int_from_bytes
Going to read Vizier photometry catalog from /home/jlin/anaconda3/lib/python3.8/site-packages/speedyfit/vizier_cats_phot.cfg.
Going to read TAP photometry catalog from /home/jlin/anaconda3/lib/python3.8/site-packages/speedyfit/tap_cats_phot.cfg.
Applied constraints:
distance = 117.9704366085859 - 0.15447896544118625 + 0.15447896544118625
/home/jlin/anaconda3/lib/python3.8/site-packages/speedyfit/interpol.py:79: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result.
pixelgrid[indices] = grid_data.T
Traceback (most recent call last):
File "/home/jlin/anaconda3/bin/speedyfit", line 8, in
sys.exit(main())
File "/home/jlin/anaconda3/lib/python3.8/site-packages/speedyfit/main.py", line 506, in main
args.func(args)
File "/home/jlin/anaconda3/lib/python3.8/site-packages/speedyfit/main.py", line 418, in perform_fit
results, samples, constraints, gridnames = fit_sed(setup, photbands, obs, obs_err)
File "/home/jlin/anaconda3/lib/python3.8/site-packages/speedyfit/main.py", line 157, in fit_sed
grids = model.load_grids(gridnames, pnames, limits, photbands)
File "/home/jlin/anaconda3/lib/python3.8/site-packages/speedyfit/model.py", line 158, in load_grids
axis_values, grid_pars, pixelgrid, grid_names = prepare_grid(photbands, name,
File "/home/jlin/anaconda3/lib/python3.8/site-packages/speedyfit/model.py", line 188, in prepare_grid
lidx = np.abs(ext.data.field(name)[ext.data.field(name) <= low] - low).argmin()
ValueError: attempt to get argmin of an empty sequence

@vosjo
Copy link
Owner

vosjo commented Jun 4, 2022 via email

@AstroJLin
Copy link
Author

Hi Joris,

This is setup file!
J152748.50+353657.3_setup_binary.zip

Thanks!

@AstroJLin
Copy link
Author

Hi Joris,

Here, I try to use the get_table_single of speedyfit.model to combine 'kurucz' and 'blackbody', but I discovery that the shapes of the array is not consistent. Therefore, I guess the former error may be same this reason?

The error is as follow:
Screenshot from 2022-06-06 03-56-48

@vosjo
Copy link
Owner

vosjo commented Jun 6, 2022 via email

@AstroJLin
Copy link
Author

Hi Joris,

Thank you for your help!

Here,I have the ability to fit the SED combining kurucz atmosphere and blackbody. The result of combining kurucz atmosphere and blackbody model fit well compared to the kurucz atmosphere. Do you think it is more reasonable to add BB's model for fitting?

In addition, I don't understand what the symbol of the cross (×) on the graph represents and what the C of O-C refers to the calculation result from?

Thanks!

The result of kurucz atmosphere model:
kurucz-model

The result of combining kurucz atmosphere and blackbody model :
kurucz+bb

@vosjo
Copy link
Owner

vosjo commented Jun 6, 2022 via email

@AstroJLin
Copy link
Author

Hi,
Thank you for your reply again.

If the crosses is the modelled fluxes, then the WISE W3 is lower compare with the modelled fluxes. Why is W3 so low, what may be the reason for this, do you have any suggestions for this?

Thanks!

@vosjo
Copy link
Owner

vosjo commented Jun 6, 2022 via email

@AstroJLin
Copy link
Author

Hi Joris,

Thank you very much for your patience and help!

@vosjo
Copy link
Owner

vosjo commented Jun 6, 2022

No problem. Glad I could help.

@vosjo vosjo closed this as completed Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants