Doppler Shifts in Cen X-3 Chandra ObservationĀ¶
Within a Cen X-3 Chandra observation, some very prominent Doppler shifts in the Fe xxv central energy were observed in phase resolved analysis.
In this example, we will explore how these shifts are compatible with the emitting plasma's ballistic movement around the orbit.
InĀ [1]:
Copied!
import xraybinaryorbit
from xraybinaryorbit import *
import xraybinaryorbit
from xraybinaryorbit import *
HELLO, nice to see you! :) PLEASE READ THIS, IT'S VERY IMPORTANT: These are the units that must be used within this package: - Rstar: Solar radius - Mstar: Solar masses - Inclination: Sexagesimal degrees - Periapsis: Sexagesimal degrees - Semimajor: Stellar radius - Periods: Days (Periods in the case of the period_sliding_window function will support any units) - Iphase: Radians A list of the functions contained in this package will be displayed by runing the function list_functions(). As these functions use a lot of parameters, which can sometimes be difficult to handle, we have implemented a user-friendly method for parameter input: A form will be displayed, and the parameters will be saved in the directory for further interactions. These saved parameters will be used if new parameters are not provided. For the function to work, the submit button must be pressed. Please, take into account that fits in general will take A LOT of time to complete. If you need help, contact graciela.sanjurjo@ua.es.
InĀ [3]:
Copied!
# REAL DATA
# Known orbital phases for each time bin
phase_array = np.array([0.21901885, 0.24120082, 0.2522918 , 0.26338279, 0.27447377,
0.28556475, 0.29665574, 0.30774672, 0.31883771, 0.32715595,
0.33270144, 0.33824693, 0.35488341, 0.3604289 , 0.36597439,
0.37706538, 0.38815636, 0.40479284, 0.41033833])
# Time bins: The beguining and end are provided.
x = np.array([[7.97000557e+08, 7.97002557e+08],
[7.97004557e+08, 7.97006557e+08],
[7.97006557e+08, 7.97008557e+08],
[7.97008557e+08, 7.97010557e+08],
[7.97010557e+08, 7.97012557e+08],
[7.97012557e+08, 7.97014557e+08],
[7.97014557e+08, 7.97016557e+08],
[7.97016557e+08, 7.97018557e+08],
[7.97018557e+08, 7.97020557e+08],
[7.97020557e+08, 7.97021557e+08],
[7.97021557e+08, 7.97022557e+08],
[7.97022557e+08, 7.97023557e+08],
[7.97025557e+08, 7.97026557e+08],
[7.97026557e+08, 7.97027557e+08],
[7.97027557e+08, 7.97028557e+08],
[7.97029557e+08, 7.97030557e+08],
[7.97031557e+08, 7.97032557e+08],
[7.97034557e+08, 7.97035557e+08],
[7.97035557e+08, 7.97036557e+08]])
# Emission line evolution
y = np.array([6.68379, 6.80991, 6.67892, 6.70604, 6.59522, 6.69305, 6.78357,
6.7602 , 6.71054, 6.59051, 6.58941, 6.6197 , 6.6798 , 6.73628,
6.72427, 6.70338, 6.81985, 6.60144, 6.60003])
# Emission line evolution positive and negative errors
y_err = np.array([[0.01962, 0.01599, 0.0353 , 0.02163, 0.01522, 0.02066, 0.01784,
0.0408 , 0.09066, 0.01051, 0.00941, 0.0344 , 0.0998 , 0.02562,
0.02753, 0.03273, 0.08475, 0.02144, 0.02003],
[0.09961, 0.01009, 0.04271, 0.02659, 0.12467, 0.01667, 0.03643,
0.03073, 0.03159, 0.02861, 0.01781, 0.04638, 0.09535, 0.0397 ,
0.03344, 0.10163, 0.00015, 0.06801, 0.04635]])
# REAL DATA
# Known orbital phases for each time bin
phase_array = np.array([0.21901885, 0.24120082, 0.2522918 , 0.26338279, 0.27447377,
0.28556475, 0.29665574, 0.30774672, 0.31883771, 0.32715595,
0.33270144, 0.33824693, 0.35488341, 0.3604289 , 0.36597439,
0.37706538, 0.38815636, 0.40479284, 0.41033833])
# Time bins: The beguining and end are provided.
x = np.array([[7.97000557e+08, 7.97002557e+08],
[7.97004557e+08, 7.97006557e+08],
[7.97006557e+08, 7.97008557e+08],
[7.97008557e+08, 7.97010557e+08],
[7.97010557e+08, 7.97012557e+08],
[7.97012557e+08, 7.97014557e+08],
[7.97014557e+08, 7.97016557e+08],
[7.97016557e+08, 7.97018557e+08],
[7.97018557e+08, 7.97020557e+08],
[7.97020557e+08, 7.97021557e+08],
[7.97021557e+08, 7.97022557e+08],
[7.97022557e+08, 7.97023557e+08],
[7.97025557e+08, 7.97026557e+08],
[7.97026557e+08, 7.97027557e+08],
[7.97027557e+08, 7.97028557e+08],
[7.97029557e+08, 7.97030557e+08],
[7.97031557e+08, 7.97032557e+08],
[7.97034557e+08, 7.97035557e+08],
[7.97035557e+08, 7.97036557e+08]])
# Emission line evolution
y = np.array([6.68379, 6.80991, 6.67892, 6.70604, 6.59522, 6.69305, 6.78357,
6.7602 , 6.71054, 6.59051, 6.58941, 6.6197 , 6.6798 , 6.73628,
6.72427, 6.70338, 6.81985, 6.60144, 6.60003])
# Emission line evolution positive and negative errors
y_err = np.array([[0.01962, 0.01599, 0.0353 , 0.02163, 0.01522, 0.02066, 0.01784,
0.0408 , 0.09066, 0.01051, 0.00941, 0.0344 , 0.0998 , 0.02562,
0.02753, 0.03273, 0.08475, 0.02144, 0.02003],
[0.09961, 0.01009, 0.04271, 0.02659, 0.12467, 0.01667, 0.03643,
0.03073, 0.03159, 0.02861, 0.01781, 0.04638, 0.09535, 0.0397 ,
0.03344, 0.10163, 0.00015, 0.06801, 0.04635]])
In this observation, the Fe xxvi emission line energy exhibited remarkable Doppler shifts. In this example, we will utilize the fitting functions from the xraybinaryorb package to disentangle this intriguing behavior.
The best model (phisical interpretation + results) was achieved with the fit_disc_ps function, i.e, this emitting plasma is likely orbiting around the compact object, traveling in its orbit.
InĀ [4]:
Copied!
plt.errorbar(phase_array,y, yerr =y_err,fmt="k", alpha=0.5)
plt.errorbar(phase_array,y,fmt="k")
plt.xlabel("Orbital phase")
plt.ylabel("Fe xxi energy evolution")
plt.errorbar(phase_array,y, yerr =y_err,fmt="k", alpha=0.5)
plt.errorbar(phase_array,y,fmt="k")
plt.xlabel("Orbital phase")
plt.ylabel("Fe xxi energy evolution")
Out[4]:
Text(0, 0.5, 'Fe xxi energy evolution')
DISC IN ORBITĀ¶
InĀ [4]:
Copied!
result, phase, dphase, predicted_data, r_squared = fit_disc_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="extended",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
result, phase, dphase, predicted_data, r_squared = fit_disc_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="extended",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
Stopping search: Swarm best objective change less than 1e-08 Stopping search: maximum iterations reached --> 100
Out[4]:
Name of the parameter | iphase | semimajor | orbitalperiod | eccentricity | periapsis | inclination | Rstar | Mstar1 | Mstar2 | iphase2 | semimajor2 | orbitalperiod2 | eccentricity2 | periapsis2 | inclination2 | Mass3 | feature | wind_vel |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | 0.199140 | 1.589276 | 2.087822 | 2.533493e-06 | 9.943691e-71 | 68.621156 | 11.800649 | 21.335643 | 1.405025 | 0.002423 | 1.00000 | 0.148397 | 0.419432 | 178.353129 | 71.852455 | 9.003696e-23 | 6.697133 | 1.000000e-70 |
Std | 0.015315 | 0.024253 | 0.000174 | 5.184498e-07 | 4.034923e-71 | 3.297979 | 0.023713 | 1.298307 | 0.020059 | 0.455633 | 0.05892 | 0.001728 | 0.047004 | 19.276144 | 0.956224 | 1.764827e-23 | 0.005342 | 2.214635e-71 |
InĀ [5]:
Copied!
result, phase, dphase, predicted_data, r_squared = fit_disc_ls(x, y, y_err=y_err,
units="keV",method_="discrete",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
result, phase, dphase, predicted_data, r_squared = fit_disc_ls(x, y, y_err=y_err,
units="keV",method_="discrete",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
The number of time points does not allow an extended approach. Changing to discrete
Out[5]:
Name of the parameter | iphase | semimajor | orbitalperiod | eccentricity | periapsis | inclination | Rstar | Mstar1 | Mstar2 | iphase2 | semimajor2 | orbitalperiod2 | eccentricity2 | periapsis2 | inclination2 | Mass3 | feature | wind_vel |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | 0.229421 | 1.602705e+00 | 2.088416 | 0.000005 | 5.000000e-71 | 7.185122e+01 | 1.202115e+01 | 2.073527e+01 | 1.389881e+00 | 0.051058 | 9.478598e-01 | 0.149553 | 0.309786 | 179.230921 | 7.188573e+01 | 5.000000e-23 | 6.687091 | 5.000000e-71 |
Std | 95.773487 | 3.305021e+06 | 17491.780267 | 1018.059231 | 1.510464e+01 | 3.136903e+08 | 2.269546e+07 | 3.994571e+07 | 1.581843e+06 | 0.605037 | 2.592831e+06 | 0.000017 | 1.071481 | 141.799174 | 1.839176e+08 | 0.000000e+00 | 163.553841 | 0.000000e+00 |
SIMPLE ORBITĀ¶
InĀ [13]:
Copied!
result, phase, predicted_data, r_squared = fit_orbit_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="extended",
extended_binsize=0.01, load_directly=False)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
result, phase, predicted_data, r_squared = fit_orbit_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="extended",
extended_binsize=0.01, load_directly=False)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
Stopping search: Swarm best objective change less than 1e-08 Stopping search: Swarm best objective change less than 1e-08
Out[13]:
Name of the parameter | iphase | semimajor | orbitalperiod | eccentricity | periapsis | inclination | Rstar | Mstar1 | Mstar2 | wind_vel | feature |
---|---|---|---|---|---|---|---|---|---|---|---|
Value | 0.877626 | 0.953377 | 0.136915 | 0.000001 | 0.000003 | 71.100357 | 12.153615 | 22.598133 | 1.359200 | 0.259007 | 6.681255 |
Std | 0.438781 | 0.502451 | 0.075085 | 0.000004 | 0.000002 | 1.420469 | 0.172452 | 0.473675 | 0.002993 | 0.113941 | 0.001278 |
InĀ [7]:
Copied!
result, phase, predicted_data, r_squared = fit_orbit_ls(x, y, y_err=y_err,
units="keV",method_="discrete",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
result, phase, predicted_data, r_squared = fit_orbit_ls(x, y, y_err=y_err,
units="keV",method_="discrete",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
The number of time points does not allow an extended approach. Changing to discrete
Out[7]:
Name of the parameter | iphase | semimajor | orbitalperiod | eccentricity | periapsis | inclination | Rstar | Mstar1 | Mstar2 | wind_vel | feature |
---|---|---|---|---|---|---|---|---|---|---|---|
Value | 0.346083 | 3.000000e+00 | 1.413539 | 0.00001 | 2.588310e-07 | 7.600000e+01 | 1.220000e+01 | 22.770000 | 1.330000 | 0.968640 | 6.68708 |
Std | 94.048495 | 2.070051e+06 | 532.634043 | 98.38035 | 5.926204e-05 | 7.721913e+07 | 8.800959e+06 | 48832.976952 | 836035.252628 | 567833.929341 | 0.40136 |
SIMPLE SPIRALĀ¶
InĀ [8]:
Copied!
result, phase, predicted_data, r_squared = fit_spiral_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="extended",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
result, phase, predicted_data, r_squared = fit_spiral_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="extended",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
Stopping search: Swarm best objective change less than 1e-08 Stopping search: Swarm best objective change less than 1e-08
Out[8]:
Name of the parameter | iphase_spiral | semimajor_spiral | b | omega | inclination_spiral | feature |
---|---|---|---|---|---|---|
Value | 0.914062 | 6.775387 | -0.953417 | 0.911496 | 21.639983 | 6.693066 |
Std | 0.393342 | 4.181845 | 0.347828 | 0.161760 | 34.180008 | 0.000001 |
InĀ [9]:
Copied!
result, phase, predicted_data, r_squared = fit_spiral_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="discrete",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
result, phase, predicted_data, r_squared = fit_spiral_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="discrete",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
The number of time points does not allow an extended approach. Changing to discrete Stopping search: Swarm best objective change less than 1e-08 Stopping search: Swarm best objective change less than 1e-08
Out[9]:
Name of the parameter | iphase_spiral | semimajor_spiral | b | omega | inclination_spiral | feature |
---|---|---|---|---|---|---|
Value | 0.00000 | 1.000000 | -0.193534 | 0.110914 | 90.0 | 6.693068 |
Std | 0.30383 | 41.613181 | 0.085854 | 0.004413 | 45.0 | 0.000003 |
SPIRAL IN ORBITĀ¶
InĀ [10]:
Copied!
result, phase,predicted_data, r_squared = fit_spiral_in_orbit_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="extended",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
result, phase,predicted_data, r_squared = fit_spiral_in_orbit_ps(x, y, y_err=y_err,
num_iterations=2, maxiter = 100, swarmsize = 10,
units="keV",method_="extended",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
Stopping search: Swarm best objective change less than 1e-08 Stopping search: Swarm best position change less than 1e-08
Out[10]:
Name of the parameter | iphase_orbit | semimajor_orbit | orbitalperiod | eccentricity | periapsis | inclination | Rstar | Mstar1 | Mstar2 | iphase_spiral | semimajor_spiral | b | omega | inclination_spiral | feature |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | 0.193541 | 1.599911 | 2.092679 | 0.000009 | 9.043930e-06 | 68.408215 | 12.000956 | 22.605434 | 1.422866 | 0.035448 | 32.299697 | -0.078057 | 0.000458 | 71.420973 | 6.668666 |
Std | 0.024344 | 0.011176 | 0.002397 | 0.000004 | 5.012522e-07 | 1.907146 | 0.083272 | 0.857287 | 0.029576 | 0.062191 | 33.850152 | 0.023385 | 0.001986 | 2.789513 | 0.014301 |
InĀ [11]:
Copied!
result, phase, predicted_data, r_squared = fit_spiral_in_orbit_ls(x, y, y_err=y_err,
units="keV",method_="discrete",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
result, phase, predicted_data, r_squared = fit_spiral_in_orbit_ls(x, y, y_err=y_err,
units="keV",method_="discrete",
extended_binsize=0.01, load_directly=True)
plt.plot(phase_array, predicted_data,"o:")
plt.errorbar(phase_array, y, yerr=y_err)
plt.xlabel("Orbital phase")
plt.ylabel("Fe xvv Doppler shifts")
result
The number of time points does not allow an extended approach. Changing to discrete
Out[11]:
Name of the parameter | iphase_orbit | semimajor_orbit | orbitalperiod | eccentricity | periapsis | inclination | Rstar | Mstar1 | Mstar2 | iphase_spiral | semimajor_spiral | b | omega | inclination_spiral |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Value | 2.150000e-01 | 1.580000e+00 | 2.090000e+00 | 0.000005 | 5.000000e-06 | 72.000000 | 12.000000 | 20.735000 | 1.39 | 0.499992 | 5.000500e+01 | -0.050000 | 0.050000 | 7.200000e+01 |
Std | 1.196357e+06 | 4.569182e+06 | 3.836764e+06 | 0.000105 | 1.305855e-09 | 7.368156 | 601608.972213 | 348170.132775 | 0.00 | 0.394674 | 5.964791e-07 | 0.000022 | 0.001275 | 2.582047e-07 |