<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Create XANES by passing spectrum energy and mu directly
Step1:  Initiate XANES object from Materials Project website downloaded spectrum file (tsv)
Step2:  Initiate XANES object from XAS Data Interchange (XDI) distribution
<ASSISTANT_TASK:>
Python Code:
Fe2O3_spectrum_dataframe = pd.read_pickle('Fe2O3_computational_spectrum.pkl')
Fe2O3_spectrum_dataframe
spectrum_energy = Fe2O3_spectrum_dataframe['x_axis_energy_55eV'].values[0]
spectrum_mu = Fe2O3_spectrum_dataframe['interp_spectrum_55eV'].values[0]
Fe2O3_XANES_object1 = XANES(spectrum_energy, spectrum_mu, absorption_specie='Fe', edge='K')
Fe2O3_object1_CenvPred = CenvPrediction(Fe2O3_XANES_object1, energy_reference='lowest', energy_range=45)
##Plot interpolated spectrum used in coordination environment prediction
plt.plot(Fe2O3_object1_CenvPred.interp_energy, Fe2O3_object1_CenvPred.interp_spectrum)
Fe2O3_object1_CenvPred.cenv_prediction()
print('Predicted coordination environment label: ', Fe2O3_object1_CenvPred.pred_cenv)
Explanation: Create XANES by passing spectrum energy and mu directly
End of explanation
Fe2O3_XANES_object2 = XANES.from_K_XANES_MP_tsv('xas.XANES.K.Fe2O3.mp-24972.tsv')
Fe2O3_object2_CenvPred = CenvPrediction(Fe2O3_XANES_object2, energy_reference='lowest', energy_range=45)
##Plot interpolated spectrum used in coordination environment prediction
plt.plot(Fe2O3_object2_CenvPred.interp_energy, Fe2O3_object2_CenvPred.interp_spectrum)
Fe2O3_object2_CenvPred.cenv_prediction()
print('Predicted coordination environment label: ', Fe2O3_object2_CenvPred.pred_cenv)
Explanation: Initiate XANES object from Materials Project website downloaded spectrum file (tsv)
End of explanation
Fe2O3_xdi_file = 'fe2o3_rt.xdi'
Fe2O3_xanes_xdi = XANES.from_XDI_file(Fe2O3_xdi_file, absorption_specie='Fe')
#Using the -15eV to 45eV range around the edge energy reference point for coordination environment prediction
Fe2O3_CenvPred_xdi = CenvPrediction(Fe2O3_xanes_xdi, 'E0', [-15, 45], Fe2O3_xanes_xdi.e0)
##Plot interpolated spectrum used in coordination environment prediction
plt.plot(Fe2O3_CenvPred_xdi.interp_energy, Fe2O3_CenvPred_xdi.interp_spectrum)
Fe2O3_CenvPred_xdi.cenv_prediction()
print('Predicted coordination environment label: ', Fe2O3_CenvPred_xdi.pred_cenv)
Explanation: Initiate XANES object from XAS Data Interchange (XDI) distribution
End of explanation
<END_TASK>