karthika-perumal
karthika-perumal
Untitled
3 posts
Don't wanna be here? Send us removal request.
karthika-perumal · 7 days ago
Text
Cleaned up the primary variable!
My primary variable in question is Ejecta Morphology (MORPHOLOGY_EJECTA_1) and I have cleaned up the primary variable. I have chosen the subsets of the other 3 variables namely Diameter (DIAM_CIRCLE_IMAGE), Depth (DEPTH_RIMFLOOR_TOPOG) and Number of Layers (NUMBER_LAYERS) based on the not null values of the primary variable! I have also grouped the variables for better understanding using bin function. My code: ""
import pandas import numpy
data = pandas.read_csv('MarsCrater.csv', low_memory=False) data.columns = map(str.upper, data.columns)
print("Number of Observations =", len(data)) # rows print("Number of Variables =", len(data.columns)) # columns
data['MORPHOLOGY_EJECTA_1'] = data['MORPHOLOGY_EJECTA_1'].astype(str).str.strip() data['MORPHOLOGY_EJECTA_1'] = data['MORPHOLOGY_EJECTA_1'].replace('', numpy.nan)
data.loc[data['MORPHOLOGY_EJECTA_1'].isnull() & data['DIAM_CIRCLE_IMAGE'].isnull(), 'DIAM_CIRCLE_IMAGE'] = 50000 data.loc[data['MORPHOLOGY_EJECTA_1'].isnull() & data['DEPTH_RIMFLOOR_TOPOG'].isnull(), 'DEPTH_RIMFLOOR_TOPOG'] = 10 data.loc[data['MORPHOLOGY_EJECTA_1'].isnull() & data['NUMBER_LAYERS'].isnull(), 'NUMBER_LAYERS'] = 10
print("Primary Ejecta Morphology") c1 = data['MORPHOLOGY_EJECTA_1'].value_counts(sort=False, dropna=False) print(c1)
print("Primary Ejecta Morphology as %") p1 = data['MORPHOLOGY_EJECTA_1'].value_counts(sort=False, normalize=True, dropna=False) * 100 print(p1)
sub2 = data[data['MORPHOLOGY_EJECTA_1'].notnull()].copy()
dia_bins = [0, 25, 50, data['DIAM_CIRCLE_IMAGE'].max()] dia_names = ['Minor', 'Intermediate', 'Major'] sub2['DIAMETER_NAMES'] = pandas.cut(sub2['DIAM_CIRCLE_IMAGE'], bins=dia_bins, labels=dia_names)
print("Crater Diameter") c2 = sub2['DIAMETER_NAMES'].value_counts(sort=False) print(c2)
print("Crater Diameter as %") p2 = sub2['DIAMETER_NAMES'].value_counts(sort=False, normalize=True) * 100 print(p2)
dep_bins = [0, 0.5, 1, data['DEPTH_RIMFLOOR_TOPOG'].max()] dep_names = ['Low', 'Mid', 'High'] sub2['DEPTH_NAMES'] = pandas.cut(sub2['DEPTH_RIMFLOOR_TOPOG'], bins=dep_bins, labels=dep_names)
print("Crater Depth") c3 = sub2['DEPTH_NAMES'].value_counts(sort=False) print(c3)
print("Crater Depth as %") p3 = sub2['DEPTH_NAMES'].value_counts(sort=False, normalize=True) * 100 print(p3)
print("Number of layers") c4 = sub2['NUMBER_LAYERS'].value_counts(sort=False) print(c4)
print("Number of layers as %") p4 = sub2['NUMBER_LAYERS'].value_counts(sort=False, normalize=True) * 100 print(p4)
""" Output: Number of Observations = 384343 Number of Variables = 10
Primary Ejecta Morphology NaN 339718 Rd/MLERS 199 Rd 24892 Rd/DLEPC/DLERS 33 SLERS 4828
MLEPC/MLERC/MSLEPS 1 DLERCPd/DLERSPd 1 MLERSRd 1 DLERC/Rd/SLERS 1 Rd/SLEPCRd 1 Primary Ejecta Morphology as % NaN 88.389277 Rd/MLERS 0.051777 Rd 6.476507 Rd/DLEPC/DLERS 0.008586 SLERS 1.256170
MLEPC/MLERC/MSLEPS 0.000260 DLERCPd/DLERSPd 0.000260 MLERSRd 0.000260 DLERC/Rd/SLERS 0.000260 Rd/SLEPCRd 0.000260 Crater Diameter Minor 42070 Intermediate 1866 Major 689 Crater Diameter as % Minor 94.274510 Intermediate 4.181513 Major 1.543978 Crater Depth Low 23381 Mid 11582 High 3673 Crater Depth as % Low 60.516099 Mid 29.977223 High 9.506678 Number of layers 3 739 0 24894 2 3435 1 15467 4 85 5 5 Number of layers as % 3 1.656022 0 55.784874 2 7.697479 1 34.659944 4 0.190476 5 0.011204
0 notes
karthika-perumal · 19 days ago
Text
First Program for my Research: How Do Crater Size and Depth Influence Ejecta Morphology and the Number of Ejecta Layers in Martian Impact Craters?
I have come up with my first program focusing on frequency distributions of the variables essential for my research. Below you will see the program highlighting the variables such as, 1. Primary Ejecta Morphology: MORPHOLOGY_EJECTA_1
2. Crater Diameter (Grouped accordingly): DIAM_CIRCLE_IMAGE
3. Crater Depth (Grouped accordingly): DEPTH_RIMFLOOR_TOPOG
4. Bonus - Number of layers!: NUMBER_LAYERS
Primary Ejecta Morphology subset is also displayed among the 384343 observations in the dataset. My Code:
"
import pandas
data = pandas.read_csv('MarsCrater.csv', low_memory=False)
data.columns = map(str.upper, data.columns)
print("Number of Observations =", len(data)) # rows print("Number of Variables =",len(data.columns)) # columns
data['MORPHOLOGY_EJECTA_1'] = data['MORPHOLOGY_EJECTA_1'].astype(str).str.strip() not_null = data[data['MORPHOLOGY_EJECTA_1'] != ''] not_null = data[data['MORPHOLOGY_EJECTA_1'] != ''] print("Number of Observations for Primary Ejecta Morphology =", len(not_null)) # subset
print("Primary Ejecta Morphology") c1 = data['MORPHOLOGY_EJECTA_1'].value_counts(sort=False) print(c1)
print("Primary Ejecta Morphology as %") p1 = data['MORPHOLOGY_EJECTA_1'].value_counts(sort=False, normalize=True) * 100 print(p1)
dia_bins = [0, 25, 50, data ['DIAM_CIRCLE_IMAGE'].max()] dia_names = ['Minor', 'Intermediate', 'Major'] data['DIAMETER_NAMES'] = pandas.cut(data['DIAM_CIRCLE_IMAGE'], bins=dia_bins, labels=dia_names)
print("Crater Diameter") c2 = data['DIAMETER_NAMES'].value_counts(sort=False) print(c2)
print("Crater Diameter as %") p2 = data['DIAMETER_NAMES'].value_counts(sort=False, normalize=True) * 100 print(p2)
dep_bins = [0, 0.5, 1, data ['DEPTH_RIMFLOOR_TOPOG'].max()] dep_names = ['Low', 'Mid', 'High'] data['DEPTH_NAMES'] = pandas.cut(data['DEPTH_RIMFLOOR_TOPOG'], bins=dep_bins, labels=dep_names)
print("Crater Depth") c3 = data['DEPTH_NAMES'].value_counts(sort=False) print(c3)
print("Crater Depth as %") p3 = data['DEPTH_NAMES'].value_counts(sort=False, normalize=True) * 100 print(p3)
print("Number of layers") c4 = data['NUMBER_LAYERS'].value_counts(sort=False) print(c4)
print("Number of layers as %") p4 = data['NUMBER_LAYERS'].value_counts(sort=False, normalize=True) * 100 print(p4)
"
Output:
Number of Observations = 384343
Number of Variables = 10
Number of Observations for Primary Ejecta Morphology = 44625
Primary Ejecta Morphology
Rd/MLERS                                      199
Rd                                                      24892
Rd/DLEPC/DLERS                     33
SLERS                                              4828
MLEPC/MLERC/MSLEPS         1
DLERCPd/DLERSPd                   1
MLERSRd                                       1
DLERC/Rd/SLERS                       1
Rd/SLEPCRd                                 1
Primary Ejecta Morphology as %
Rd/MLERS                                      0.051777
Rd                                                      6.476507
Rd/DLEPC/DLERS                      0.008586
SLERS                                              1.256170
MLEPC/MLERC/MSLEPS        0.000260
DLERCPd/DLERSPd                   0.000260
MLERSRd                                       0.000260
DLERC/Rd/SLERS                      0.000260
Rd/SLEPCRd                                 0.000260
Crater Diameter
Minor                  376464
Intermediate  5809
Major                  2070
Crater Diameter as %
Minor                  97.950008
Intermediate  1.511410
Major                  0.538581
Crater Depth
Low      56653
Mid       15343
High     4808
Crater Depth as %
Low      73.763085
Mid       19.976824
High     6.260091
Number of layers
0            364612
3            739
2            3435
1            15467
4            85
5            5
Number of layers as %
0            94.866304
3            0.192276
2            0.893733
1            4.024270
4            0.022116
5            0.001301
0 notes
karthika-perumal · 22 days ago
Text
Coursera - Data Analysis and Interpretation Specialization
I have chosen Mars Craters for my research dataset! Research question: How Do Crater Size and Depth Influence Ejecta Morphology in Mars Crater Data?
Topic 2: How Do Crater Size and Depth Influence Ejecta Morphology and the Number of Ejecta Layers in Martian Impact Craters?
Abstract of the study:
Ejecta morphology offers a window into the impact processes and surface properties of planetary bodies. This study leverages a high-resolution Mars crater dataset comprising over 44,000 entries among 380k entries with classified ejecta morphologies, focusing on how crater diameter and depth influence ejecta type. Crater size and rim-to-floor depth are examined whether they serve as reliable predictors of ejecta morphology complexity. Using statistical methods, we assess the relationship between crater dimensions and the occurrence of specific ejecta morphologies and number of layers.
Research Papers Referred:
Nadine G. Barlow., "Martian impact crater ejecta morphologies as indicators of the distribution of subsurface volatiles"
R. H. Hoover1 , S. J. Robbins , N. E. Putzig, J. D. Riggs, and B. M. Hynek. "Insight Into Formation Processes of Layered Ejecta Craters onMars From Thermophysical Observations"
2 notes · View notes