Problem Definition Binary stars are two stars orbiting a common center of mass. The apparent brightness of a binary star, measured as magnitude varies. It can be calculated through a complex...


Python, Please use Spyder


Problem Definition<br>Binary stars are two stars orbiting a common center of mass. The apparent brightness of a binary<br>star, measured as magnitude varies. It can be calculated through a complex mathematical model but<br>we can approximate the brightness of a binary star as a cyclic function of time. For example, for the<br>red giant star Mira and its companion, we use the approximation as follows:<br>At time t = 0 days, its magnitude is 2.5, and it stays at this level until t = 0.9 days. Its magnitude is<br>then determined by the formula<br>T(t – 0.9)]<br>0.7<br>3.255 – In 1.352 + cos·<br>until t = 2.3 days, its magnitude is then 2.5 until t = 4.4 days, and it is then determined by the<br>formula<br>T(t – 4.4)]<br>3.598 – In 1.998 + cos-<br>0.4<br>until t = 5.2. It then remains at 2.5 until t = 6.4 days, after which the cycle repeats with a period of<br>6.4 days.<br>Write a PY'THON program to read in the value of time tin days and print the magnitude of the red<br>giant star Mira A and its companion at that time. See run samples when input data is valid (figure 1).<br>Your program prints out an error message when the time value is negative (figure 2).<br>In (28): runfile('/Users/hamzazidoum/Documents/2101/2101_F2®21/PA2/<br>PA2_Hz. py', wdir='/Users/hamzazidoum/Documents/2101/2101_F2021/PA2' )<br>PROGRAM TO COMPUTE THE BRIGHTNESS OF TWIN STARS<br>Enter time in days: 11<br>Magnitue of binary star at time 11.e days is 2.906<br>Bye!...<br>In [29]: |<br>Figure 1: Sample Input/Output when input data is valid<br>

Extracted text: Problem Definition Binary stars are two stars orbiting a common center of mass. The apparent brightness of a binary star, measured as magnitude varies. It can be calculated through a complex mathematical model but we can approximate the brightness of a binary star as a cyclic function of time. For example, for the red giant star Mira and its companion, we use the approximation as follows: At time t = 0 days, its magnitude is 2.5, and it stays at this level until t = 0.9 days. Its magnitude is then determined by the formula T(t – 0.9)] 0.7 3.255 – In 1.352 + cos· until t = 2.3 days, its magnitude is then 2.5 until t = 4.4 days, and it is then determined by the formula T(t – 4.4)] 3.598 – In 1.998 + cos- 0.4 until t = 5.2. It then remains at 2.5 until t = 6.4 days, after which the cycle repeats with a period of 6.4 days. Write a PY'THON program to read in the value of time tin days and print the magnitude of the red giant star Mira A and its companion at that time. See run samples when input data is valid (figure 1). Your program prints out an error message when the time value is negative (figure 2). In (28): runfile('/Users/hamzazidoum/Documents/2101/2101_F2®21/PA2/ PA2_Hz. py', wdir='/Users/hamzazidoum/Documents/2101/2101_F2021/PA2' ) PROGRAM TO COMPUTE THE BRIGHTNESS OF TWIN STARS Enter time in days: 11 Magnitue of binary star at time 11.e days is 2.906 Bye!... In [29]: | Figure 1: Sample Input/Output when input data is valid

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here