You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1409 lines
890 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "9ba73897-d59c-4603-9fbd-e01ecbbdaafc",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import shutil\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"import math"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "1309934e-06ad-4fc2-844e-aedb5e0307e2",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"#--<ILR-TUBS/NEOPOP/POPGEN>-------<Version: v2.0.0>---<2022-07-04>-\n",
"\n",
"#\n",
"\n",
"# _/ _/ _/_/_/_/ _/_/ _/_/_/ _/_/ _/_/_/\n",
"\n",
"# _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/\n",
"\n",
"# _/ _/ _/ _/_/_/ _/ _/ _/_/_/ _/ _/ _/_/_/\n",
"\n",
"# _/ _/_/ _/ _/ _/ _/ _/ _/ _/\n",
"\n",
"# _/ _/ _/_/_/_/ _/_/ _/ _/_/ _/\n",
"\n",
"#\n",
"\n",
"# _/_/_/_/_/\n",
"\n",
"#\n",
"\n",
"# _/_/_/ _/_/ _/_/_/ _/_/_/ _/_/_/_/ _/ _/\n",
"\n",
"# _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/\n",
"\n",
"# _/_/_/ _/ _/ _/_/_/ _/ _/_/ _/_/_/ _/ _/ _/\n",
"\n",
"# _/ _/ _/ _/ _/ _/ _/ _/ _/_/\n",
"\n",
"# _/ _/_/ _/ _/_/_/ _/_/_/_/ _/ _/\n",
"\n",
"#\n",
"\n",
"#------------------------------------------------------------------\n",
"\n",
"# Near Earth Object Population Observation Program\n",
"\n",
"# Population Generator - v2.0.0\n",
"\n",
"#------------------------------------------------------------------\n",
"\n",
"#\n",
"\n",
"# Generated at 2024-01-18 16:35:48\n",
"\n",
"#\n",
"\n",
"#------------------------------------------------------------------\n",
"\n",
"#\n",
"\n",
"# Test run of the\n",
"\n",
"# Population Generator\n",
"\n",
"#\n",
"\n",
"#------------------------------------------------------------------\n",
"\n",
"#\n",
"\n",
"#\n",
"\n",
"#\n",
"\n",
"# Analysed Population File : .\\01-POPGEN/output\\test.dys\n",
"\n",
"# Related Physical Properties : .\\01-POPGEN/output\\test.ppf\n",
"\n",
"#-----------------------------------------------------------------\n",
"\n",
"#\n",
"\n",
"# Close Approach Analysis (F=Off, T=On) : F\n",
"\n",
"#\n",
"\n",
"#-----------------------------------------------------------------\n",
"\n",
"#\n",
"\n",
"# Filter Groups:\n",
"\n",
"#\n",
"\n",
"# Amors (F=Off, T=On) : T\n",
"\n",
"# Apollos (F=Off, T=On) : T\n",
"\n",
"# Atens (F=Off, T=On) : T\n",
"\n",
"# Atiras (F=Off, T=On) : T\n",
"\n",
"# Main Belt Asteroids (F=Off, T=On) : T\n",
"\n",
"# Jupiter Trojans (F=Off, T=On) : T\n",
"\n",
"# Other Asteroids (F=Off, T=On) : T\n",
"\n",
"#\n",
"\n",
"#-----------------------------------------------------------------\n",
"\n",
"#\n",
"\n",
"# Filter Sources:\n",
"\n",
"#\n",
"\n",
"# Hungaria (F=Off, T=On) : T\n",
"\n",
"# Phocea (F=Off, T=On) : T\n",
"\n",
"# nu6 secular resonance (F=Off, T=On) : T\n",
"\n",
"# Jupiter 3/1 resonance (F=Off, T=On) : T\n",
"\n",
"# Jupiter 5/2 resonance (F=Off, T=On) : T\n",
"\n",
"# Jupiter 2/1 resonance (F=Off, T=On) : T\n",
"\n",
"# Jupiter Family Comets (F=Off, T=On) : T\n",
"\n",
"# Unknown (F=Off, T=On) : T\n",
"\n",
"#\n",
"\n",
"#-----------------------------------------------------------------\n",
"\n",
"#\n",
"\n",
"# Filter settings:\n",
"\n",
"#\n",
"\n",
"# Semi-Major Axis (F=Off, T=On) : F\n",
"\n",
"# Periapsis (F=Off, T=On) : F\n",
"\n",
"# Apoapsis (F=Off, T=On) : F\n",
"\n",
"# Eccentricity (F=Off, T=On) : F\n",
"\n",
"# Inclination (F=Off, T=On) : F\n",
"\n",
"# Long. of asc. node (F=Off, T=On) : F\n",
"\n",
"# Arg. of periapsis (F=Off, T=On) : F\n",
"\n",
"# Mean anomaly (F=Off, T=On) : F\n",
"\n",
"# H-value (F=Off, T=On) : F\n",
"\n",
"# Min. orb. intersec. dist. (F=Off, T=On) : F\n",
"\n",
"# Stat. coll. probability (F=Off, T=On) : F\n",
"\n",
"# Diameter (F=Off, T=On) : F\n",
"\n",
"# Distance to Sun (F=Off, T=On) : F\n",
"\n",
"# Distance to Earth (F=Off, T=On) : F\n",
"\n",
"#\n",
"\n",
"#-----------------------------------------------------------------\n",
"\n",
"#\n",
"\n",
"#\n",
"\n",
"#-----------------------------------------------------------------\n",
"\n",
"#\n",
"\n",
"#\n",
"\n",
"#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
"\n",
"# ID | GRP | SRC | SMA | PHD | AHD | ECC | INC | RAAN | AOP | MANO | H-value | MOID | COLLPROB | DIAMETER | SUN DIST | EARTH DIST | EPOCH | ALBEDO | CAA_EPOCH | CAA_DIST | X | Y | Z |\n",
"\n",
"#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n",
"\n",
" '0000001' AMO UNK 2.662454 1.241035 4.083873 0.533875 26.694270 19.950131 284.514731 14.514345 9.4500 0.461500 -1.000000 44.206 1.427074 1.890029 59945.0000 0.1500 0.0000 0.000000 1.401874 -0.047162 -0.262802\n",
"\n",
" '0000002' AMO UNK 1.457965 1.133373 1.782557 0.222633 10.828980 209.642798 343.753667 338.406046 11.1600 0.135600 -1.000000 20.113 1.169997 1.091686 59945.0000 0.1500 0.0000 0.000000 -1.086536 0.399615 -0.169231\n",
"\n",
" '0000003' APO UNK 1.893819 0.874387 2.913251 0.538294 41.189780 286.606414 287.585635 83.688834 12.4000 0.116200 -1.000000 11.363 2.279611 2.744226 59945.0000 0.1500 0.0000 0.000000 1.767939 -0.394953 1.383846\n",
"\n",
" '0000004' AMO UNK 2.001212 1.103185 2.899239 0.448742 17.447710 214.338458 245.558687 15.816629 12.6000 0.244700 -1.000000 10.363 1.206930 0.894673 59945.0000 0.1500 0.0000 0.000000 -0.942347 0.672316 -0.341546\n",
"\n",
" '0000005' AMO UNK 4.221445 1.210531 7.232359 0.713243 30.982280 206.677675 330.127884 117.375359 12.9000 0.259200 -1.000000 9.026 6.605104 7.044888 59945.0000 0.1500 0.0000 0.000000 5.939216 -1.555697 2.435757\n",
"\n",
" '0000006' AMO UNK 1.863123 1.123961 2.602284 0.396733 8.449240 191.098076 81.970357 338.537304 13.2000 0.188400 -1.000000 7.861 1.252203 1.963847 59945.0000 0.1500 0.0000 0.000000 -0.919872 -0.844091 0.096739\n",
"\n",
" '0000007' AMO UNK 2.478143 1.071686 3.884600 0.567545 9.359400 120.092502 78.686357 153.402557 13.4000 0.175800 -1.000000 7.169 3.822725 3.954580 59945.0000 0.1500 0.0000 0.000000 3.725984 0.624820 -0.582983\n",
"\n",
" '0000008' AMO UNK 2.560880 1.284533 3.837228 0.498402 15.748900 194.926714 72.250450 99.560237 13.5000 0.388300 -1.000000 6.847 3.263491 2.723898 59945.0000 0.1500 0.0000 0.000000 2.002784 2.519238 -0.540990\n",
"\n",
" '0000009' APO UNK 2.423972 0.890240 3.957704 0.632735 31.880760 264.698528 276.719728 32.105160 13.7000 0.221700 -1.000000 6.244 1.774516 2.741606 59945.0000 0.1500 0.0000 0.000000 0.443674 -1.677583 0.371184\n",
"\n"
]
}
],
"source": [
"shutil.copyfile(r'/home/unipi/v.vichi3/Desktop/test_ANA.res', r'/home/unipi/v.vichi3/Desktop/NEOPOP/neopop_data.res')\n",
"myfile=open('/home/unipi/v.vichi3/Desktop/test_ANA.res','r')\n",
"for x in range(100):\n",
" print(myfile.readline())"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "a3d2aefa-bb6c-4a84-b909-cf2cf7c9f486",
"metadata": {},
"outputs": [],
"source": [
"with open(r'/home/unipi/v.vichi3/Desktop/NEOPOP/neopop_data.res','r+') as f:\n",
" lines=f.readlines()\n",
" f.seek(0)\n",
" f.truncate()\n",
" f.writelines(lines[91:])"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "5834fcef-5e27-43fb-a6b5-4b3a9d0b5b10",
"metadata": {},
"outputs": [],
"source": [
"col_names=['ID','GRP','SRC','a','PHD','AHD','e','i','om','w','ma','H-value','MOID','COLLPROB','DIAMETER','SUN_DIST','EARTH_DIST','EPOCH','ALBEDO','CAA_EPOCH','CAA_DIST','X','Y','Z']\n",
"df=pd.read_csv(r'/home/unipi/v.vichi3/Desktop/NEOPOP/neopop_data.res',header=None, sep='\\s+',names=col_names)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "7c16fa5e-a021-4359-81c4-7eba90495632",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>ID</th>\n",
" <th>GRP</th>\n",
" <th>SRC</th>\n",
" <th>a</th>\n",
" <th>PHD</th>\n",
" <th>AHD</th>\n",
" <th>e</th>\n",
" <th>i</th>\n",
" <th>om</th>\n",
" <th>w</th>\n",
" <th>...</th>\n",
" <th>DIAMETER</th>\n",
" <th>SUN_DIST</th>\n",
" <th>EARTH_DIST</th>\n",
" <th>EPOCH</th>\n",
" <th>ALBEDO</th>\n",
" <th>CAA_EPOCH</th>\n",
" <th>CAA_DIST</th>\n",
" <th>X</th>\n",
" <th>Y</th>\n",
" <th>Z</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>'0000001'</td>\n",
" <td>AMO</td>\n",
" <td>UNK</td>\n",
" <td>2.662454</td>\n",
" <td>1.241035</td>\n",
" <td>4.083873</td>\n",
" <td>0.533875</td>\n",
" <td>26.69427</td>\n",
" <td>19.950131</td>\n",
" <td>284.514731</td>\n",
" <td>...</td>\n",
" <td>44.206</td>\n",
" <td>1.427074</td>\n",
" <td>1.890029</td>\n",
" <td>59945.0</td>\n",
" <td>0.15</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.401874</td>\n",
" <td>-0.047162</td>\n",
" <td>-0.262802</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>'0000002'</td>\n",
" <td>AMO</td>\n",
" <td>UNK</td>\n",
" <td>1.457965</td>\n",
" <td>1.133373</td>\n",
" <td>1.782557</td>\n",
" <td>0.222633</td>\n",
" <td>10.82898</td>\n",
" <td>209.642798</td>\n",
" <td>343.753667</td>\n",
" <td>...</td>\n",
" <td>20.113</td>\n",
" <td>1.169997</td>\n",
" <td>1.091686</td>\n",
" <td>59945.0</td>\n",
" <td>0.15</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-1.086536</td>\n",
" <td>0.399615</td>\n",
" <td>-0.169231</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>'0000003'</td>\n",
" <td>APO</td>\n",
" <td>UNK</td>\n",
" <td>1.893819</td>\n",
" <td>0.874387</td>\n",
" <td>2.913251</td>\n",
" <td>0.538294</td>\n",
" <td>41.18978</td>\n",
" <td>286.606414</td>\n",
" <td>287.585635</td>\n",
" <td>...</td>\n",
" <td>11.363</td>\n",
" <td>2.279611</td>\n",
" <td>2.744226</td>\n",
" <td>59945.0</td>\n",
" <td>0.15</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.767939</td>\n",
" <td>-0.394953</td>\n",
" <td>1.383846</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>'0000004'</td>\n",
" <td>AMO</td>\n",
" <td>UNK</td>\n",
" <td>2.001212</td>\n",
" <td>1.103185</td>\n",
" <td>2.899239</td>\n",
" <td>0.448742</td>\n",
" <td>17.44771</td>\n",
" <td>214.338458</td>\n",
" <td>245.558687</td>\n",
" <td>...</td>\n",
" <td>10.363</td>\n",
" <td>1.206930</td>\n",
" <td>0.894673</td>\n",
" <td>59945.0</td>\n",
" <td>0.15</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-0.942347</td>\n",
" <td>0.672316</td>\n",
" <td>-0.341546</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>'0000005'</td>\n",
" <td>AMO</td>\n",
" <td>UNK</td>\n",
" <td>4.221445</td>\n",
" <td>1.210531</td>\n",
" <td>7.232359</td>\n",
" <td>0.713243</td>\n",
" <td>30.98228</td>\n",
" <td>206.677675</td>\n",
" <td>330.127884</td>\n",
" <td>...</td>\n",
" <td>9.026</td>\n",
" <td>6.605104</td>\n",
" <td>7.044888</td>\n",
" <td>59945.0</td>\n",
" <td>0.15</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>5.939216</td>\n",
" <td>-1.555697</td>\n",
" <td>2.435757</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 24 columns</p>\n",
"</div>"
],
"text/plain": [
" ID GRP SRC a PHD AHD e i \\\n",
"0 '0000001' AMO UNK 2.662454 1.241035 4.083873 0.533875 26.69427 \n",
"1 '0000002' AMO UNK 1.457965 1.133373 1.782557 0.222633 10.82898 \n",
"2 '0000003' APO UNK 1.893819 0.874387 2.913251 0.538294 41.18978 \n",
"3 '0000004' AMO UNK 2.001212 1.103185 2.899239 0.448742 17.44771 \n",
"4 '0000005' AMO UNK 4.221445 1.210531 7.232359 0.713243 30.98228 \n",
"\n",
" om w ... DIAMETER SUN_DIST EARTH_DIST EPOCH \\\n",
"0 19.950131 284.514731 ... 44.206 1.427074 1.890029 59945.0 \n",
"1 209.642798 343.753667 ... 20.113 1.169997 1.091686 59945.0 \n",
"2 286.606414 287.585635 ... 11.363 2.279611 2.744226 59945.0 \n",
"3 214.338458 245.558687 ... 10.363 1.206930 0.894673 59945.0 \n",
"4 206.677675 330.127884 ... 9.026 6.605104 7.044888 59945.0 \n",
"\n",
" ALBEDO CAA_EPOCH CAA_DIST X Y Z \n",
"0 0.15 0.0 0.0 1.401874 -0.047162 -0.262802 \n",
"1 0.15 0.0 0.0 -1.086536 0.399615 -0.169231 \n",
"2 0.15 0.0 0.0 1.767939 -0.394953 1.383846 \n",
"3 0.15 0.0 0.0 -0.942347 0.672316 -0.341546 \n",
"4 0.15 0.0 0.0 5.939216 -1.555697 2.435757 \n",
"\n",
"[5 rows x 24 columns]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "e8709fac-0050-401c-98c5-2f2d90b7afe5",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>ID</th>\n",
" <th>GRP</th>\n",
" <th>SRC</th>\n",
" <th>a</th>\n",
" <th>PHD</th>\n",
" <th>AHD</th>\n",
" <th>e</th>\n",
" <th>i</th>\n",
" <th>om</th>\n",
" <th>w</th>\n",
" <th>...</th>\n",
" <th>DIAMETER</th>\n",
" <th>SUN_DIST</th>\n",
" <th>EARTH_DIST</th>\n",
" <th>EPOCH</th>\n",
" <th>ALBEDO</th>\n",
" <th>CAA_EPOCH</th>\n",
" <th>CAA_DIST</th>\n",
" <th>X</th>\n",
" <th>Y</th>\n",
" <th>Z</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>802374</th>\n",
" <td>'0802375'</td>\n",
" <td>APO</td>\n",
" <td>NU6</td>\n",
" <td>2.148966</td>\n",
" <td>0.818457</td>\n",
" <td>3.479475</td>\n",
" <td>0.619139</td>\n",
" <td>2.402986</td>\n",
" <td>92.347303</td>\n",
" <td>231.810402</td>\n",
" <td>...</td>\n",
" <td>0.046</td>\n",
" <td>2.190746</td>\n",
" <td>1.217675</td>\n",
" <td>59945.0</td>\n",
" <td>0.154</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-0.145542</td>\n",
" <td>2.185905</td>\n",
" <td>0.002346</td>\n",
" </tr>\n",
" <tr>\n",
" <th>802375</th>\n",
" <td>'0802376'</td>\n",
" <td>ATE</td>\n",
" <td>3/1</td>\n",
" <td>0.978003</td>\n",
" <td>0.315704</td>\n",
" <td>1.640302</td>\n",
" <td>0.677196</td>\n",
" <td>36.433250</td>\n",
" <td>99.284713</td>\n",
" <td>264.256012</td>\n",
" <td>...</td>\n",
" <td>0.039</td>\n",
" <td>1.580383</td>\n",
" <td>1.595391</td>\n",
" <td>59945.0</td>\n",
" <td>0.167</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-1.275277</td>\n",
" <td>0.250441</td>\n",
" <td>0.899199</td>\n",
" </tr>\n",
" <tr>\n",
" <th>802376</th>\n",
" <td>#</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>802377</th>\n",
" <td>#</td>\n",
" <td>----------------------------------------------...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>802378</th>\n",
" <td>#</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 24 columns</p>\n",
"</div>"
],
"text/plain": [
" ID GRP SRC \\\n",
"802374 '0802375' APO NU6 \n",
"802375 '0802376' ATE 3/1 \n",
"802376 # NaN NaN \n",
"802377 # ----------------------------------------------... NaN \n",
"802378 # NaN NaN \n",
"\n",
" a PHD AHD e i om \\\n",
"802374 2.148966 0.818457 3.479475 0.619139 2.402986 92.347303 \n",
"802375 0.978003 0.315704 1.640302 0.677196 36.433250 99.284713 \n",
"802376 NaN NaN NaN NaN NaN NaN \n",
"802377 NaN NaN NaN NaN NaN NaN \n",
"802378 NaN NaN NaN NaN NaN NaN \n",
"\n",
" w ... DIAMETER SUN_DIST EARTH_DIST EPOCH ALBEDO \\\n",
"802374 231.810402 ... 0.046 2.190746 1.217675 59945.0 0.154 \n",
"802375 264.256012 ... 0.039 1.580383 1.595391 59945.0 0.167 \n",
"802376 NaN ... NaN NaN NaN NaN NaN \n",
"802377 NaN ... NaN NaN NaN NaN NaN \n",
"802378 NaN ... NaN NaN NaN NaN NaN \n",
"\n",
" CAA_EPOCH CAA_DIST X Y Z \n",
"802374 0.0 0.0 -0.145542 2.185905 0.002346 \n",
"802375 0.0 0.0 -1.275277 0.250441 0.899199 \n",
"802376 NaN NaN NaN NaN NaN \n",
"802377 NaN NaN NaN NaN NaN \n",
"802378 NaN NaN NaN NaN NaN \n",
"\n",
"[5 rows x 24 columns]"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.tail()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "d48eb405-1310-4dc4-86f3-e53c712b28ad",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['ID', 'GRP', 'SRC', 'a', 'PHD', 'AHD', 'e', 'i', 'om', 'w', 'ma',\n",
" 'H-value', 'MOID', 'COLLPROB', 'DIAMETER', 'SUN_DIST', 'EARTH_DIST',\n",
" 'EPOCH', 'ALBEDO', 'CAA_EPOCH', 'CAA_DIST', 'X', 'Y', 'Z'],\n",
" dtype='object')"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.columns"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "77ab16b3-3803-4e8f-9827-c11d5b1032f1",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(802379, 24)"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.shape"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "e1cdf4a8-9926-4380-8ca3-a58884230e4e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 802379 entries, 0 to 802378\n",
"Data columns (total 24 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 ID 802379 non-null object \n",
" 1 GRP 802377 non-null object \n",
" 2 SRC 802376 non-null object \n",
" 3 a 802376 non-null float64\n",
" 4 PHD 802376 non-null float64\n",
" 5 AHD 802376 non-null float64\n",
" 6 e 802376 non-null float64\n",
" 7 i 802376 non-null float64\n",
" 8 om 802376 non-null float64\n",
" 9 w 802376 non-null float64\n",
" 10 ma 802376 non-null float64\n",
" 11 H-value 802376 non-null float64\n",
" 12 MOID 802376 non-null float64\n",
" 13 COLLPROB 802376 non-null float64\n",
" 14 DIAMETER 802376 non-null float64\n",
" 15 SUN_DIST 802376 non-null float64\n",
" 16 EARTH_DIST 802376 non-null float64\n",
" 17 EPOCH 802376 non-null float64\n",
" 18 ALBEDO 802376 non-null float64\n",
" 19 CAA_EPOCH 802376 non-null float64\n",
" 20 CAA_DIST 802376 non-null float64\n",
" 21 X 802376 non-null float64\n",
" 22 Y 802376 non-null float64\n",
" 23 Z 802376 non-null float64\n",
"dtypes: float64(21), object(3)\n",
"memory usage: 146.9+ MB\n"
]
}
],
"source": [
"df.info()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "c3b1de96-d9e5-4f87-adde-6271a4fd1f32",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(802376, 24)"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Eliminate the null values\n",
"df.drop(df[df['a'].isna()].index,inplace=True)\n",
"df.reset_index(drop=True,inplace=True)\n",
"df.shape"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "b8f13e3c-85b1-4b5e-ba04-cfe80f468682",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 802376 entries, 0 to 802375\n",
"Data columns (total 24 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 ID 802376 non-null object \n",
" 1 GRP 802376 non-null object \n",
" 2 SRC 802376 non-null object \n",
" 3 a 802376 non-null float64\n",
" 4 PHD 802376 non-null float64\n",
" 5 AHD 802376 non-null float64\n",
" 6 e 802376 non-null float64\n",
" 7 i 802376 non-null float64\n",
" 8 om 802376 non-null float64\n",
" 9 w 802376 non-null float64\n",
" 10 ma 802376 non-null float64\n",
" 11 H-value 802376 non-null float64\n",
" 12 MOID 802376 non-null float64\n",
" 13 COLLPROB 802376 non-null float64\n",
" 14 DIAMETER 802376 non-null float64\n",
" 15 SUN_DIST 802376 non-null float64\n",
" 16 EARTH_DIST 802376 non-null float64\n",
" 17 EPOCH 802376 non-null float64\n",
" 18 ALBEDO 802376 non-null float64\n",
" 19 CAA_EPOCH 802376 non-null float64\n",
" 20 CAA_DIST 802376 non-null float64\n",
" 21 X 802376 non-null float64\n",
" 22 Y 802376 non-null float64\n",
" 23 Z 802376 non-null float64\n",
"dtypes: float64(21), object(3)\n",
"memory usage: 146.9+ MB\n"
]
}
],
"source": [
"df.info()"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "a4265d66-e012-4c56-8361-5d81582a780e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Groups: ['AMO' 'APO' 'ATE' 'ATI']\n",
"AMO : 323707\n",
"APO : 439571\n",
"ATE : 27655\n",
"ATI : 11443\n"
]
}
],
"source": [
"#Number of elements in each group\n",
"print(\"Groups:\",df['GRP'].unique())\n",
"for el in df['GRP'].unique():\n",
" print(el, \":\", df[df['GRP']==el].shape[0])"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "389a184c-5cd3-4cfb-a342-2c531577aba1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Source regions: ['UNK' '3/1' 'JFC' 'NU6' 'HUN' '2/1' '5/2' 'PHO']\n",
"UNK : 53\n",
"3/1 : 286780\n",
"JFC : 61825\n",
"NU6 : 297089\n",
"HUN : 143501\n",
"2/1 : 4468\n",
"5/2 : 7420\n",
"PHO : 1240\n"
]
}
],
"source": [
"#Number of elements in each source region\n",
"print(\"Source regions:\", df['SRC'].unique())\n",
"for el in df['SRC'].unique():\n",
" print(el, \":\", df[df['SRC']==el].shape[0])"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "ebdf334e-d62a-4cbb-8256-192f2f6ead9f",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>a</th>\n",
" <th>PHD</th>\n",
" <th>AHD</th>\n",
" <th>e</th>\n",
" <th>i</th>\n",
" <th>om</th>\n",
" <th>w</th>\n",
" <th>ma</th>\n",
" <th>H-value</th>\n",
" <th>MOID</th>\n",
" <th>...</th>\n",
" <th>DIAMETER</th>\n",
" <th>SUN_DIST</th>\n",
" <th>EARTH_DIST</th>\n",
" <th>EPOCH</th>\n",
" <th>ALBEDO</th>\n",
" <th>CAA_EPOCH</th>\n",
" <th>CAA_DIST</th>\n",
" <th>X</th>\n",
" <th>Y</th>\n",
" <th>Z</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>...</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.0</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.0</td>\n",
" <td>802376.0</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" <td>802376.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>1.999840</td>\n",
" <td>0.878479</td>\n",
" <td>3.121201</td>\n",
" <td>0.530142</td>\n",
" <td>26.732453</td>\n",
" <td>180.054430</td>\n",
" <td>180.024695</td>\n",
" <td>179.962978</td>\n",
" <td>24.306090</td>\n",
" <td>0.180350</td>\n",
" <td>...</td>\n",
" <td>0.053419</td>\n",
" <td>2.343866</td>\n",
" <td>2.500796</td>\n",
" <td>59945.0</td>\n",
" <td>0.236466</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-0.000411</td>\n",
" <td>0.000126</td>\n",
" <td>-0.000944</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>0.636680</td>\n",
" <td>0.298658</td>\n",
" <td>1.222976</td>\n",
" <td>0.182228</td>\n",
" <td>18.384555</td>\n",
" <td>103.897338</td>\n",
" <td>103.809390</td>\n",
" <td>104.001408</td>\n",
" <td>0.913128</td>\n",
" <td>0.128424</td>\n",
" <td>...</td>\n",
" <td>0.104170</td>\n",
" <td>1.174165</td>\n",
" <td>1.258951</td>\n",
" <td>0.0</td>\n",
" <td>0.140910</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.734848</td>\n",
" <td>1.738225</td>\n",
" <td>0.917197</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>0.400020</td>\n",
" <td>0.000130</td>\n",
" <td>0.409896</td>\n",
" <td>0.002401</td>\n",
" <td>0.016999</td>\n",
" <td>0.000343</td>\n",
" <td>0.000483</td>\n",
" <td>0.000098</td>\n",
" <td>9.450000</td>\n",
" <td>0.000000</td>\n",
" <td>...</td>\n",
" <td>0.013000</td>\n",
" <td>0.013751</td>\n",
" <td>0.007500</td>\n",
" <td>59945.0</td>\n",
" <td>0.020000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-7.574055</td>\n",
" <td>-7.530529</td>\n",
" <td>-6.697879</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>1.545199</td>\n",
" <td>0.656602</td>\n",
" <td>2.176234</td>\n",
" <td>0.407335</td>\n",
" <td>11.777570</td>\n",
" <td>90.108360</td>\n",
" <td>90.269310</td>\n",
" <td>89.781130</td>\n",
" <td>24.140000</td>\n",
" <td>0.072300</td>\n",
" <td>...</td>\n",
" <td>0.028000</td>\n",
" <td>1.415403</td>\n",
" <td>1.580195</td>\n",
" <td>59945.0</td>\n",
" <td>0.126000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-1.156981</td>\n",
" <td>-1.158295</td>\n",
" <td>-0.409950</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>1.968684</td>\n",
" <td>0.924434</td>\n",
" <td>3.040806</td>\n",
" <td>0.537035</td>\n",
" <td>23.345656</td>\n",
" <td>180.059317</td>\n",
" <td>180.053955</td>\n",
" <td>179.952631</td>\n",
" <td>24.610000</td>\n",
" <td>0.163900</td>\n",
" <td>...</td>\n",
" <td>0.038000</td>\n",
" <td>2.117173</td>\n",
" <td>2.321764</td>\n",
" <td>59945.0</td>\n",
" <td>0.224000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>-0.000109</td>\n",
" <td>0.000985</td>\n",
" <td>-0.000589</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>2.447988</td>\n",
" <td>1.143327</td>\n",
" <td>3.944685</td>\n",
" <td>0.663158</td>\n",
" <td>37.073965</td>\n",
" <td>270.079511</td>\n",
" <td>269.836762</td>\n",
" <td>270.130772</td>\n",
" <td>24.840000</td>\n",
" <td>0.264800</td>\n",
" <td>...</td>\n",
" <td>0.055000</td>\n",
" <td>3.097151</td>\n",
" <td>3.264691</td>\n",
" <td>59945.0</td>\n",
" <td>0.321000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>1.157290</td>\n",
" <td>1.161571</td>\n",
" <td>0.408376</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>4.221445</td>\n",
" <td>1.300000</td>\n",
" <td>7.979270</td>\n",
" <td>0.999937</td>\n",
" <td>179.483635</td>\n",
" <td>359.999346</td>\n",
" <td>359.999185</td>\n",
" <td>359.999796</td>\n",
" <td>25.000000</td>\n",
" <td>0.875500</td>\n",
" <td>...</td>\n",
" <td>44.206000</td>\n",
" <td>7.925145</td>\n",
" <td>8.682100</td>\n",
" <td>59945.0</td>\n",
" <td>0.999000</td>\n",
" <td>0.0</td>\n",
" <td>0.0</td>\n",
" <td>7.517952</td>\n",
" <td>7.733153</td>\n",
" <td>7.048493</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>8 rows × 21 columns</p>\n",
"</div>"
],
"text/plain": [
" a PHD AHD e \\\n",
"count 802376.000000 802376.000000 802376.000000 802376.000000 \n",
"mean 1.999840 0.878479 3.121201 0.530142 \n",
"std 0.636680 0.298658 1.222976 0.182228 \n",
"min 0.400020 0.000130 0.409896 0.002401 \n",
"25% 1.545199 0.656602 2.176234 0.407335 \n",
"50% 1.968684 0.924434 3.040806 0.537035 \n",
"75% 2.447988 1.143327 3.944685 0.663158 \n",
"max 4.221445 1.300000 7.979270 0.999937 \n",
"\n",
" i om w ma \\\n",
"count 802376.000000 802376.000000 802376.000000 802376.000000 \n",
"mean 26.732453 180.054430 180.024695 179.962978 \n",
"std 18.384555 103.897338 103.809390 104.001408 \n",
"min 0.016999 0.000343 0.000483 0.000098 \n",
"25% 11.777570 90.108360 90.269310 89.781130 \n",
"50% 23.345656 180.059317 180.053955 179.952631 \n",
"75% 37.073965 270.079511 269.836762 270.130772 \n",
"max 179.483635 359.999346 359.999185 359.999796 \n",
"\n",
" H-value MOID ... DIAMETER SUN_DIST \\\n",
"count 802376.000000 802376.000000 ... 802376.000000 802376.000000 \n",
"mean 24.306090 0.180350 ... 0.053419 2.343866 \n",
"std 0.913128 0.128424 ... 0.104170 1.174165 \n",
"min 9.450000 0.000000 ... 0.013000 0.013751 \n",
"25% 24.140000 0.072300 ... 0.028000 1.415403 \n",
"50% 24.610000 0.163900 ... 0.038000 2.117173 \n",
"75% 24.840000 0.264800 ... 0.055000 3.097151 \n",
"max 25.000000 0.875500 ... 44.206000 7.925145 \n",
"\n",
" EARTH_DIST EPOCH ALBEDO CAA_EPOCH CAA_DIST \\\n",
"count 802376.000000 802376.0 802376.000000 802376.0 802376.0 \n",
"mean 2.500796 59945.0 0.236466 0.0 0.0 \n",
"std 1.258951 0.0 0.140910 0.0 0.0 \n",
"min 0.007500 59945.0 0.020000 0.0 0.0 \n",
"25% 1.580195 59945.0 0.126000 0.0 0.0 \n",
"50% 2.321764 59945.0 0.224000 0.0 0.0 \n",
"75% 3.264691 59945.0 0.321000 0.0 0.0 \n",
"max 8.682100 59945.0 0.999000 0.0 0.0 \n",
"\n",
" X Y Z \n",
"count 802376.000000 802376.000000 802376.000000 \n",
"mean -0.000411 0.000126 -0.000944 \n",
"std 1.734848 1.738225 0.917197 \n",
"min -7.574055 -7.530529 -6.697879 \n",
"25% -1.156981 -1.158295 -0.409950 \n",
"50% -0.000109 0.000985 -0.000589 \n",
"75% 1.157290 1.161571 0.408376 \n",
"max 7.517952 7.733153 7.048493 \n",
"\n",
"[8 rows x 21 columns]"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.describe()"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "89eb8d15-e543-484f-b60e-6cbada5a0d8c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['ID', 'a', 'e', 'i', 'om', 'w', 'ma', 'H-value', 'MOID', 'EPOCH'], dtype='object')"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Eliminate some of the columns\n",
"df=df.drop(columns=['GRP','SRC','PHD','AHD','COLLPROB','DIAMETER','SUN_DIST','EARTH_DIST','ALBEDO','CAA_EPOCH','CAA_DIST','X','Y','Z'])\n",
"df.columns"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "e08e4a01-b7b1-4eb4-bfbc-5834870e7108",
"metadata": {},
"outputs": [],
"source": [
"#Add a column that contains 1 if the asteroid is a PHA, 0 otherwise\n",
"N=df.shape[0]\n",
"col=np.zeros((N,1))\n",
"for el in range(N):\n",
" if (df['MOID'][el]<=0.05) and (df['H-value'][el]<=22):\n",
" col[el]=1\n",
" else:\n",
" col[el]=0\n",
"df['PHA']=col"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "a1191e54-4727-45ad-bd4d-3c3c592d3460",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Number of PHAs: 4646\n",
"Percentage of PHAs: 0.5790302800681975\n"
]
}
],
"source": [
"#Count the number of PHAs in the dataset\n",
"print(\"Number of PHAs:\", np.count_nonzero(df['PHA']==1))\n",
"print(\"Percentage of PHAs:\", 100*np.count_nonzero(df['PHA']==1)/df.shape[0])"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "6e145b6b-3d04-4794-8741-e1c78baa536e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Number of asteroids with MOID=0: 168\n",
"Of those, only 3 are PHAs.\n"
]
}
],
"source": [
"#Number of asteroids with MOID=0\n",
"print(\"Number of asteroids with MOID=0:\", len(df[df['MOID']==0.0]))\n",
"print(\"Of those, only\", len(df[(df['MOID']==0)&(df['PHA']==1)]) , \"are PHAs.\")"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "80a43d55-2c2e-4270-a0da-bb1876eed266",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Axes: >"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAGiCAYAAAB6c8WBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAABAUElEQVR4nO3deVhU1RsH8O+wDYuyCIhgiiCaKIIKqeCCWEqa5laR5hqaaIVKbqQ/t9QxzTVzwTVNjdIWTVKpFDE1RUFNaVMLF5DABRQYtvv7gxydGbYZLw5wv5+e+zxw5i7vCWTeec8598oEQRBAREREkmVk6ACIiIjIsJgMEBERSRyTASIiIoljMkBERCRxTAaIiIgkjskAERGRxDEZICIikjgmA0RERBLHZICIiEjimAwQERFJHJMBIiKiauLo0aPo27cvXFxcIJPJ8M0331R4TFxcHHx9fWFubg53d3esW7dO5+syGSAiIqomHjx4AB8fH6xevbpS+1+9ehW9e/dGly5dkJiYiPfffx/h4eHYs2ePTteV8UFFRERE1Y9MJsPXX3+N/v37l7nPtGnTsHfvXiQnJ6vawsLCcO7cOZw4caLS12JlgIiIqAoplUpkZWWpbUqlUpRznzhxAj179lRrCw4ORkJCAgoKCip9HhNRohGBRdt3DB1ClRr03hhDh1DlNr7uY+gQqlxufpGhQyCqkExm6Aiqnq2FcZWeX8z3pGn9HDB37ly1ttmzZ2POnDlPfO60tDQ4OTmptTk5OaGwsBAZGRlwdnau1HmqTTJARERUbcjEK5xHRkYiIiJCrU0ul4t2fplG9vdw9F+zvTxMBoiIiKqQXC4X9c3/cQ0aNEBaWppaW3p6OkxMTGBvb1/p8zAZICIi0lRDxlr8/f2xb98+tbZDhw7Bz88PpqamlT4PJxASERFpkhmJt+ng/v37SEpKQlJSEoCSpYNJSUlISUkBUDLkMHz4cNX+YWFh+OeffxAREYHk5GRs3rwZmzZtwuTJk3W6LisDREREmgxUGUhISEBQUJDq+4dzDUaMGIGtW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5d3g6lb9vqwZ10MBajt9ulf2pXEw3rl9HRsa/8O/UWdVmZmYGX7/ncC4xsczjziclwT+gs1pbQKcuOJekfszC+fPQtWsgOvoHVBhLZkYG4o/GYcDAV3TsxSM3b1xHZkYGOjx2PTMzM7T19cOFc0llHvfr+SR08O+k1tbBvxMunCvpT0FBPn5PvqS9T8eAcs+rKT8/HzKZDKZmZo/FJ4eRkRHOJZ2tVv3R5doHY75DcFAABg/qi1XLFpf76fZo3GHcu3sHL73cv0b18aHc3Bzs3/s1XBo+A6cGDQAAv/92Cf+m34KRkQzDXx+Il3p0xcS33yqz7F/mdf38cCGp7D5fOJ+EDh3V+9NRo8+/ldLn9hq/p8XFxZgzczqGjngT7h7NyrxetSCTibfVAHpNILxy5QoGDBiACxcuqDJsAJD91+nHS1ilUSqVUCqVam1CcRFkRsb6hFOr1ZUbw9hIhnu5hWrt93ILYetS+o/vbm4hNp68hr9v58LESIbObnaIfKEpFsRexu/pj/5YWpga4eOBLWFibIRiQcDWUzfwa9rTSQYyMv4FANjbq1c37O0dcPOmdlnx0XEZpRxjrzofAHwfsx/JyZewM3p3pWLZ++3XsLS0wvM9elY2fC2ZGSVj7/XqOai117N3KLVM+vhx9TT6U8/eXjWWf/fOXRQVFaFevbL3qQyv1j4wt7DAJyuXYtw7EyFAwCcrl6G4uBiZj/2/qw79qey1g3v3gYtLQ9g7OOLKX39izcfL8ecfv+PjdZtKjW3fN3vQwb8TnBo415g+AiVzDz5Z8RFyc3Ph6uaOVWs3wtS0JKm7ef06AGDjuk8Q/t40uLg0xM7tWxE2egS
"text/plain": [
"<Figure size 640x480 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#Correlation\n",
"corr=df[['a','e','i','om','w','ma','H-value']].corr() #computes the Pearson's correlation coefficients\n",
"sns.heatmap(corr,cmap='Blues',annot=True)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "b4c24072-067a-479b-a230-8ef04803ab39",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA+wAAAPmCAYAAAB+QhXuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9d5Rk+XmeCT7X3/A+0tvyrqt9A+gG0AABAgRIkRJFmRFlKFFarbQaaebs7EijHa0o7VlpznKl3RmtOLLUjqShSFEELTzQ3Wi0t+Vdukqf4e31Zv+IzOzyrqu7C837nFOnqysjIm9G5L339/6+73tfIQzDkIiIiIiIiIiIiIiIiIiIiAcK8aM+gIiIiIiIiIiIiIiIiIiIiOuJBHtERERERERERERERERExANIJNgjIiIiIiIiIiIiIiIiIh5AIsEeEREREREREREREREREfEAEgn2iIiIiIiIiIiIiIiIiIgHkEiwR0REREREREREREREREQ8gESCPSIiIiIiIiIiIiIiIiLiASQS7BERERERERERERERERERDyDyR30AHyVBELC+vk4qlUIQhI/6cCIiIq7B933m5ubYu3cvkiR91IcTERFxBdH5GRHxYBOdoxERDy5hGNLtdhkdHUUUb11D/0Mt2NfX15mYmPioDyMiIiIiIiIiIiIiIiLiDxkrKyuMj4/f8jF/qAV7KpUCBm9UOp3+iI8mIiLiWlZXVzly5Eh0jkZEPIBE52dExINNdI5GRDy4dDodJiYmdvXorfhDLdh32uDT6XR0IYuIeADZOS+jczQi4sEjOj8jIh5sonM0IuLB507GsiPTuYiIiIiIiIiIiIiIiIiIB5BIsEdEREREREREREREREREPIBEgj0iIiIiIuI2bHUsaj37oz6MiPfBSsOgY7kf9WFERES8T8Iw5Mx6+6M+jIiID40/1DPsERERERER17JU6/GPv36O2WKClWafJ6YL7B9OEQK/9VabmWKcbEzlidnidc9drPWZKSY+/IN+gAiCENcPaFsu5ZR+w8e0DYdLlR6PT+d3/81yfXRFYr1l0rVc9pSSWK7Pesuk3ncoJFT2DaV44UKFobTOodEMKw0DgLS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WyWKtx0Kly0rL4qceGeW581WqHZuRbAw3CMjGNF64UMV2fZ6Yzr6vnztqiY+4Y7Y6Fv/TNy8A8MzeweLgV56f5+3l5kd5WBERERH3jd96a4XFqsGvvrRAWlVw/YBAgHxCJ5dQaBo+v/D09HXPc/0Ay/U//AN+QNkxgduprEuCQP6ainPP9igmNfIJlbXWoEUxpiroskhMlXjzchPT8VmsGyzXDTRF5LkLW1za6jGcibHRtvjUniIXtrocH8swmo0B0DFdXl+ss9UxeWuxSaVn0zEdlpsGmiTx3XObPDmT5eHJHHuKSY6NZSmmVPaXkvzydy5gewFfPDzC985V2F9O4Xg+tZ7Dzz46gS6/t1Gz2jQwnTv/zMMQvODmbelbHYvL9f51rxmGd1ZNioiIiHi/WK6P9yM+PmM6PgvVHnFVZrZ081b0tuHSsVxeXqgBg+q+YXusNAxeuFhlppggpSs4XkDTsEloMumYQlKXeXKmwOW6geEE6LLEQq2PKkDLdMjFVTKaguO6bHVMxnIaG533l1ASVdgj7phffWkJ0/V5dDLLv/9LT/Lf/eZJfvOtVf7B753la3/tU1FrfERExI80luvzn15bxg8DEqrCVs9ktWUgBVBKq1xuOCRjIv/mxTm2eg7n1zukYwqm43FsPMtSvU/TsPnkTJHFusFXjg5zqWpQTKqcWW+x0bKYKiV5YirP8YkMqiRyuWGyp5yAEBwv5M3LddZbJpbj84XDwyR1ma7l0TYcREHg+GSOl+dqjOdj7Cun0BWJ85sdxjIxeo7HK/N1Pr2
"text/plain": [
"<Figure size 1200x1200 with 16 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#Scatter matrix of a,e,i,H\n",
"from pandas.plotting import scatter_matrix\n",
"scatter_matrix(df[['a','e','i','H-value']],diagonal='kde',s=1,figsize=(12,12))\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "48f31a85-4ad4-4c1d-a644-5c4794f7e230",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAlY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p07puuuu0/Lly9vcv3DhQi1ZskTLly/Xrl27FBcXp9TUVJ04ccKuycvL04YNG1RUVKTS0lKdPHlSEydOVFNTk12TmZmpiooKFRcXq7i4WBUVFcrKyrL3NzU1acKECTp16pRKS0tVVFSk9evXa8aMGXZNQ0ODUlNTFR8fr127dqmwsFCLFi3SkiVLOuGdAQAA3VFwV774rbfeqltvvbXNfZZladmyZXrooYd02223SZJWr16t2NhYrVu3TtOnT1d9fb1WrlypF154QePHj5ckrVmzRgkJCdq8ebPS09O1Z88eFRcXa/v27RoxYoQkacWKFUpJSdHevXuVmJgot9utqqoqHT58WPHx8ZKkxYsXa+rUqZo3b54iIyO1du1affrpp1q1apWcTqeSkpK0b98+LVmyRPn5+XI4HJfgHQMAAP6sS4PV+ezfv181NTVKS0uztzmdTo0ePVplZWWaPn26ysvL5fV6fWri4+OVlJSksrIypaena9u2bXK5XHaokqSbbrpJLpdLZWVlSkxM1LZt25SUlGSHKklKT0+Xx+NReXm5xo4dq23btmn06NFyOp0+NXPmzNGBAwc0cODANo/D4/HI4/HYjxsaGiRJXq9XXq/34t+o/6tlLGeP7nFq0uSx+7uWYw2kY+4u6I3/ojf+K1B7c6HH67fBqqamRpIUGxvrsz02NlYHDx60a0JDQxUVFdWqpuX5NTU1iomJaTV+TEyMT83ZrxMVFaX
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#Histogram of the MOID\n",
"num_bins=math.ceil(math.log2(len(df))+1) #Sturges rule\n",
"df['MOID'].hist(bins=num_bins)\n",
"plt.xlabel('MOID')\n",
"plt.ylabel('count')\n",
"plt.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
}
},
"nbformat": 4,
"nbformat_minor": 5
}