<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Gravity Brightening/Darkening (gravb_bol)
Setup
Let's first make sure we have the latest version of PHOEBE 2.2 installed. (You can comment out this line if you don't use pip for your installation or don't want to update to the latest release).
Step1:  As always, let's do imports and initialize a logger and a new bundle.  See Building a System for more details.
Step2:  Relevant Parameters
The 'gravb_bol' parameter corresponds to the &beta; coefficient for gravity darkening corrections.
Step3:  If you have a logger enabled, PHOEBE will print a warning if the value of gravb_bol is outside the "suggested" ranges.  Note that this is strictly a warning, and will never turn into an error at b.run_compute().
You can also manually call b.run_checks().  The first returned item tells whether the system has passed checks
Step4:  Influence on Intensities
Step5:  Comparing these two plots, it is essentially impossible to notice any difference between the two models.  But if we compare the intensities directly, we can see that there is a subtle difference, with a maximum difference of about 3%.
<ASSISTANT_TASK:>
Python Code:
!pip install -I "phoebe>=2.2,<2.3"
Explanation: Gravity Brightening/Darkening (gravb_bol)
Setup
Let's first make sure we have the latest version of PHOEBE 2.2 installed. (You can comment out this line if you don't use pip for your installation or don't want to update to the latest release).
End of explanation
%matplotlib inline
import phoebe
from phoebe import u # units
import numpy as np
import matplotlib.pyplot as plt
logger = phoebe.logger()
b = phoebe.default_binary()
b.add_dataset('lc', dataset='lc01')
b.add_dataset('mesh', times=[0], columns=['intensities*'])
Explanation: As always, let's do imports and initialize a logger and a new bundle.  See Building a System for more details.
End of explanation
print(b['gravb_bol'])
print(b['gravb_bol@primary'])
Explanation: Relevant Parameters
The 'gravb_bol' parameter corresponds to the &beta; coefficient for gravity darkening corrections.
End of explanation
print(b.run_checks())
b['teff@primary'] = 8500
b['gravb_bol@primary'] = 0.8
print(b.run_checks())
b['teff@primary'] = 7000
b['gravb_bol@primary'] = 0.2
print(b.run_checks())
b['teff@primary'] = 6000
b['gravb_bol@primary'] = 1.0
print(b.run_checks())
Explanation: If you have a logger enabled, PHOEBE will print a warning if the value of gravb_bol is outside the "suggested" ranges.  Note that this is strictly a warning, and will never turn into an error at b.run_compute().
You can also manually call b.run_checks().  The first returned item tells whether the system has passed checks: True means it has, False means it has failed, and None means the tests pass but with a warning.  The second argument tells the first warning/error message raised by the checks.
The checks use the following "suggested" values:
 * teff 8000+: gravb_bol >= 0.9 (suggest 1.0)
 * teff 6600-8000: gravb_bol 0.32-1.0
 * teff 6600-: grav_bol < 0.9 (suggest 0.32)
End of explanation
b['teff@primary'] = 6000
b['gravb_bol@primary'] = 0.32
b.run_compute(model='gravb_bol_32')
afig, mplfig = b['primary@mesh01@gravb_bol_32'].plot(fc='intensities', ec='None', show=True)
b['gravb_bol@primary'] = 1.0
b.run_compute(model='gravb_bol_10')
afig, mplfig = b['primary@mesh01@gravb_bol_10'].plot(fc='intensities', ec='None', show=True)
Explanation: Influence on Intensities
End of explanation
np.nanmax((b.get_value('intensities', component='primary', model='gravb_bol_32') - b.get_value('intensities', component='primary', model='gravb_bol_10'))/b.get_value('intensities', component='primary', model='gravb_bol_10'))
Explanation: Comparing these two plots, it is essentially impossible to notice any difference between the two models.  But if we compare the intensities directly, we can see that there is a subtle difference, with a maximum difference of about 3%.
End of explanation
<END_TASK>