phoebe-project / phoebe2

PHOEBE - Eclipsing Binary Star Modeling Software
http://phoebe-project.org
GNU General Public License v3.0
80 stars 30 forks source link

Can't change 'atm' option for a hot semi-detached system. #939

Closed gokhannY closed 1 month ago

gokhannY commented 1 month ago

Hey all,

I know it's a very silly question, but I'm stuck at this moment. I have been trying to do a fitting for a hot OB semi-detached system. For that, I changed the atm table for 'blackbody' option as

b.set_value('teff', component='primary', value=23500) b.set_value('teff', component='secondary', value=15816)

b.set_value_all('atm', component='primary', value='blackbody') b.set_value_all('atm', component='secondary', value='blackbody')

The problem is when I try to do compute it raises this error;

ValueError: Could not compute intensities with atm='ck2004'. Try changing atm to a table that covers a sufficient range of values (or to 'blackbody' in which case ld_mode will need to be set to 'manual' and coefficients provided via ld_coeffs). Enable 'warning' logger to see out-of-bounds arrays.

I even tried to do calculate LDs with other codes and implanted as a constraint as such;

b.set_value_all('ld_mode', 'manual') b.set_value_all('ld_mode_bol', 'manual') b.set_value_all('ld_func', 'logarithmic')

b.set_value_all('ld_coeffs', component='primary', value=[0.388, 0.232]) b.set_value_all('ld_coeffs', component='secondary', value=[0.4588, 0.256])

But, it still gives the same error.

I know it's something silly but couldn't figure it out yet. What am I missing here?

I use Phoebe version of 2.4.14

amiszuda commented 1 month ago

Take a look at this tutorial: https://phoebe-project.org/docs/latest/tutorials/limb_darkening , as it covers exactly what you have issued here. BTW, why do you want to use 'blackbody' atmospheres and not ATLAS instead?

gokhannY commented 1 month ago

Take a look at this tutorial: https://phoebe-project.org/docs/latest/tutorials/limb_darkening , as it covers exactly what you have issued here. BTW, why do you want to use 'blackbody' atmospheres and not ATLAS instead?

I checked there but as you can see the default option is "ck2004" which is ATLAS. And it doesn't compute and raises and error. That's why ı tried to change to manual values but still it somehow is stuck at "ck2004" option.

Primary is T = 23500, logg=4.12, and secondary is T = 15800, logg=3.68

gokhannY commented 1 month ago

Wait, I think i figured it out. The "atm" option in compute was stuck as "ck2004"

ParameterSet: 48 parameters
     sample_from@phoebe01@compute: []
        comments@phoebe01@compute: 
      use_server@phoebe01@compute: none
   dynamics_method@phoebe01@co...: keplerian
            ltte@phoebe01@compute: False
    irrad_method@phoebe01@compute: horvat
   boosting_method@phoebe01@co...: none
   eclipse_method@phoebe01@com...: native
   horizon_method@phoebe01@com...: boolean
   mesh_method@primary@phoebe0...: marching
   mesh_method@secondary@phoeb...: marching
   ntriangles@primary@phoebe01...: 1500
   ntriangles@secondary@phoebe...: 1500
   distortion_method@primary@p...: roche
   distortion_method@secondary...: roche
     atm@primary@phoebe01@compute: blackbody
   atm@secondary@phoebe01@compute: blackbody
       enabled@V@phoebe01@compute: True
      fti_method@phoebe01@compute: none
    enabled@rv01@phoebe01@compute: True
   rv_method@primary@phoebe01@...: flux-weighted
   rv_method@secondary@phoebe0...: flux-weighted
   rv_grav@primary@phoebe01@co...: False
   rv_grav@secondary@phoebe01@...: False
       sample_from@nm_fit@compute: []
          comments@nm_fit@compute: 
        use_server@nm_fit@compute: none
   dynamics_method@nm_fit@compute: keplerian
              ltte@nm_fit@compute: False
      irrad_method@nm_fit@compute: horvat
   boosting_method@nm_fit@compute: none
    eclipse_method@nm_fit@compute: native
    horizon_method@nm_fit@compute: boolean
         enabled@V@nm_fit@compute: True
      enabled@rv01@nm_fit@compute: True
   mesh_method@primary@nm_fit@...: marching
   mesh_method@secondary@nm_fi...: marching
   ntriangles@primary@nm_fit@c...: 1500
   ntriangles@secondary@nm_fit...: 1500
   distortion_method@primary@n...: roche
   distortion_method@secondary...: roche
       atm@primary@nm_fit@compute: ck2004
     atm@secondary@nm_fit@compute: ck2004
        fti_method@nm_fit@compute: none
   rv_method@primary@nm_fit@co...: flux-weighted
   rv_method@secondary@nm_fit@...: flux-weighted
   rv_grav@primary@nm_fit@compute: False
   rv_grav@secondary@nm_fit@co...: False

Adding atm='blackbody' in add_compute() fixed the problem. As such,

b.add_compute(compute='nm_fit',
              irrad_method='horvat',
              rv_method='flux-weighted',
              distortion_method='roche',)
             atm='blackbody')

Sorry for trouble.