<jupyter_start><jupyter_text><jupyter_code>import pandas as pd
import numpy as np
import math
H=pd.DataFrame({'Name of pulsar':['J0205+6449','J0218+4232','J0437-4715','J0534+2200','J1105-6107','J1124-5916','J1617-5055','J1930+1852','J2124-3358','J2229+6114'],'po':[0.06571592849324,0.00232309053151224,0.005757451936712637,0.0333924123,0.0632021309179,0.13547685441,0.069356847,0.136855046957,0.00493111494309662,0.05162357393],'pdot':[1.93754256e-13,7.73955e-20,5.729215e-20,4.20972e-13,1.584462e-14,7.52566e-13,1.351e-13,7.5057e-13,2.05705e-20,7.827e-14],'D in Kpc':[3.200,3.150,0.157,2.000,2.360, 5.000, 4.743, 7.000, 0.410, 3.000],'Age':[5.37e+03,4.76e+08,1.59e+09,1.26e+03,6.32e+04,2.85e+03, 8.13e+03, 2.89e+03, 3.8e+09, 1.05e+04],'R_L':['NaN',466.36,13.52,2200.00,'NaN','NaN','NaN','NaN', 2.86, 13.50],'B_s':[3.61e+12,4.29e+08,4.29e+08,3.79e+12,1.01e+12,1.02e+13,3.1e+12,1.03e+13,3.22e+08,2.03e+12],
'Edot':[2.7e+37,2.4e+35,1.2e+34,4.5e+38,2.5e+36,1.2e+37,1.6e+37,1.2e+37,6.8e+33,2.2e+37],
'Edot2':[2.6e+36,2.5e+34,4.8e+35,1.1e+38,4.4e+35,4.8e+35,7.1e+35,2.4e+35,2.4e+35,2.5e+36],
'B_sI':[3.61e+12,4.27e+08,2.85e+08,3.79e+12,np.nan,np.nan,np.nan,np.nan, 1.92e+08,np.nan],
'B_Lc':[1.19e+05,3.21e+05,2.85e+04,9.55e+05,3.76e+04,3.85e+04, 8.70e+04, 3.75e+04, 2.52e+04, 1.39e+05]})
H
H.iloc[:,[0,1]].max()

from scipy import stats
import seaborn as sns
import matplotlib.pyplot as plt
np.random.seed(0)
sns.scatterplot(x=np.log10(H['B_Lc']), y=np.log10(H['po']),hue=H['Name of pulsar'])
plt.title("$B_{Lc}$ vs p")
plt.xlabel("$logB_{Lc}$")
plt.ylabel("logP")<jupyter_output><empty_output><jupyter_text>Seeing the data<jupyter_code>H.iloc[:,[0,1]].sort_values(by='po',ascending=True)
H.iloc[:,[0,10]].sort_values(by='B_Lc',ascending=False)<jupyter_output><empty_output><jupyter_text>type 1: The faster the pulsar spins(Lower po values is said to be fast moving pulsar), the higher the B_Lc values<jupyter_code>t_1=H.iloc[[3,9,0,6,5,7],[0,1,10]]
t_1
sns.scatterplot(x=np.log10(t_1['B_Lc']), y=np.log10(t_1['po']),hue=t_1['Name of pulsar'])<jupyter_output><empty_output><jupyter_text>Type2: same as previous one, but it doesn't match when i put type 1, type 2 together(The fast spinning pulsar has good B_Lc)<jupyter_code>t_2=H.iloc[[1,4],[0,1,10]]
t_2
sns.scatterplot(x=np.log10(t_2['B_Lc']), y=np.log10(t_2['po']),hue=t_2['Name of pulsar'])<jupyter_output><empty_output><jupyter_text>Together type 1 , type 2<jupyter_code>ty_1_2=H.iloc[[3,9,0,6,5,7,1,4],[0,1,10]]
sns.scatterplot(x=np.log10(ty_1_2['B_Lc']), y=np.log10(ty_1_2['po']),hue=ty_1_2['Name of pulsar'])<jupyter_output><empty_output><jupyter_text>type3 The faster pulsar spins, the lower the B_Lc(Having inverse relationship compared to previous)<jupyter_code>t_3=H.iloc[[8,2],[0,1,10]]
t_3
sns.scatterplot(x=np.log10(t_3['B_Lc']), y=np.log10(t_3['po']),hue=t_3['Name of pulsar'])<jupyter_output><empty_output><jupyter_text>*We have to check why type 1 is giving good relation, Why Type 2 is not giving proper relation when we combine with the type 1 data, Why Type 3 is giving inverse relation compare to type 1, 2 *<jupyter_code><jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.22628205128205128, 'fraction_numerical': 0.22948717948717948, 'mean_word_length': 8.662538699690403, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '289875', 'license': 'MIT', 'n_tokens_mistral': 1975, 'n_tokens_neox': 1642, 'n_words': 179, 'path': 'Graph_1_Analysis_part_1.ipynb', 'repo_name': 'TANJALISHIVANIREDDY/Pulsars', 'size': '3120'}