rvignesh2102
rvignesh2102
Untitled
4 posts
Don't wanna be here? Send us removal request.
rvignesh2102 · 1 year ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media
import pandas as pd
import numpy as np
import os
import seaborn
import matplotlib.pyplot as plt
#default directory
dir(os)
os.chdir ("/Users/rvignesh/Documents/Python Code")
data = pd.read_csv('mars_carter.csv', low_memory="false") #low memory false to avoid error
#print (data)
print(len(data)) #Number of rows
print(len(data.columns)) #Number of columns
#average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)
print ('average elevation of each of the manually determined N points along the crater rim in KM')
C2= data["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='Flase')
P2=data["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='False', normalize="True")
print ("The count of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)")
print(C2)
print ("The aggregate of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)")
print (P2)
#the maximum number of cohesive layers in any azimuthal direction that could be reliably identified
print ('the maximum number of cohesive layers in any azimuthal direction that could be reliably identified')
C3= data["NUMBER_LAYERS"].value_counts(sort='Flase')
P3=data["NUMBER_LAYERS"].value_counts(sort='False', normalize="True")
print ("The count of the maximum number of cohesive layers in any azimuthal direction that could be reliably identified")
print(C3)
print ("The aggregate the maximum number of cohesive layers in any azimuthal direction that could be reliably identified")
print (P3)
#Interested in crater layer and rim floor depth. Hence, do not require data in which no layer formation occured or rimdepth is 0
Depth_rimfloor = data[(data['DEPTH_RIMFLOOR_TOPOG']>0)]
D1 = Depth_rimfloor.copy()
Layer_number = data[(data["NUMBER_LAYERS"]>0)]
D2 = Layer_number.copy()
#No Such Data is missing, Excluding 0 depth and layers by giving them NAN
D1['DEPTH_RIMFLOOR_TOPOG']=D1['DEPTH_RIMFLOOR_TOPOG'].replace(0,np.nan)
D2['NUMBER_LAYERS']=D1['NUMBER_LAYERS'].replace(0,np.nan)
#Depth excluding 0
print ('Depth from rim floor excluding 0')
C4= D1["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='Flase')
P4= D1["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='False', normalize="True")
print ("The count of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)")
print(C4)
print ("The aggregate of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)")
print (P4)
#Layers excluding 0
print ('Number of layers excluding 0')
C5= D2["NUMBER_LAYERS"].value_counts(sort='Flase')
P5= data["NUMBER_LAYERS"].value_counts(sort='False', normalize="True")
print ("The count of the maximum number of cohesive layers in any azimuthal direction that could be reliably identified")
print(C5)
print ("The aggregate the maximum number of cohesive layers in any azimuthal direction that could be reliably identified")
print (P5)
#Product of depth and no of layers. Performing for practice only
#D1["Product of depth and no of layers"]=D1['DEPTH_RIMFLOOR_TOPOG']*D2['NUMBER_LAYERS']
#print(D1)
D1["DEPTH_RIMFLOOR_TOPOG"]=D1["DEPTH_RIMFLOOR_TOPOG"].astype('category')
E1=D1.groupby("DEPTH_RIMFLOOR_TOPOG").size()
print(E1)
E2=D1.groupby("DEPTH_RIMFLOOR_TOPOG").size()*100/len(data)
print(E2)
E4=D1.groupby("NUMBER_LAYERS").size()
print(E4)
E5=D1.groupby("NUMBER_LAYERS").size()*100/len(data)
print(E5)
seaborn.countplot(x="DEPTH_RIMFLOOR_TOPOG",data=D1)
plt.xlabel("Depth of rimfloor")
plt.title("depth of rimfloor from the top")
plt.show()
#secondary variable
D2['NUMBER_LAYERS']=D1['NUMBER_LAYERS']/20
E6=D2.groupby("NUMBER_LAYERS").size()
print(E6)
seaborn.displot(x="NUMBER_LAYERS",data=D1)
plt.xlabel("number of layer")
plt.title("nmaximum number of cohesive layers in any azimuthal direction that could be reliably identified")
plt.show()
scatterplot = seaborn.regplot(x="NUMBER_LAYERS", y="DEPTH_RIMFLOOR_TOPOG", fit_reg=False, data=D1)
plt.xlabel("Number of layers")
plt.ylabel("Depth of rimfloor")
plt.title("relationship between no of layer and depth of rimfloor")
plt.show()
There doesn't seem to be any relationship between the depth of rimfloor and no of layer in crater.However, the data shows that it's more likely to have a cater with 0 depth. The number of layers might be dependent on the velocity and angle of impact and the type of soil and not the depth of crater
0 notes
rvignesh2102 · 1 year ago
Text
Tumblr media
import pandas as pd import numpy as np import os
default directory
dir(os) os.chdir ("/Users/rvignesh/Documents/Python Code") data = pd.read_csv('mars_carter.csv', low_memory="false") #low memory false to avoid error
print (data)
print(len(data)) #Number of rows print(len(data.columns)) #Number of columns
average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)
print ('average elevation of each of the manually determined N points along the crater rim in KM') C2= data["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='Flase') P2=data["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='False', normalize="True") print ("The count of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)") print(C2) print ("The aggregate of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)") print (P2)
the maximum number of cohesive layers in any azimuthal direction that could be reliably identified
print ('the maximum number of cohesive layers in any azimuthal direction that could be reliably identified') C3= data["NUMBER_LAYERS"].value_counts(sort='Flase') P3=data["NUMBER_LAYERS"].value_counts(sort='False', normalize="True") print ("The count of the maximum number of cohesive layers in any azimuthal direction that could be reliably identified") print(C3) print ("The aggregate the maximum number of cohesive layers in any azimuthal direction that could be reliably identified") print (P3)
Interested in crater layer and rim floor depth. Hence, do not require data in which no layer formation occured or rimdepth is 0
Depth_rimfloor = data[(data['DEPTH_RIMFLOOR_TOPOG']>0)] D1 = Depth_rimfloor.copy() Layer_number = data[(data["NUMBER_LAYERS"]>0)] D2 = Layer_number.copy()
No Such Data is missing, Excluding 0 depth and layers by giving them NAN
D1['DEPTH_RIMFLOOR_TOPOG']=D1['DEPTH_RIMFLOOR_TOPOG'].replace(0,np.nan) D2['NUMBER_LAYERS']=D1['NUMBER_LAYERS'].replace(0,np.nan)
Depth excluding 0
print ('Depth from rim floor excluding 0') C4= D1["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='Flase') P4= D1["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='False', normalize="True") print ("The count of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)") print(C4) print ("The aggregate of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)") print (P4)
Layers excluding 0
print ('Number of layers excluding 0') C5= D2["NUMBER_LAYERS"].value_counts(sort='Flase') P5= data["NUMBER_LAYERS"].value_counts(sort='False', normalize="True") print ("The count of the maximum number of cohesive layers in any azimuthal direction that could be reliably identified") print(C5) print ("The aggregate the maximum number of cohesive layers in any azimuthal direction that could be reliably identified") print (P5)
Product of depth and no of layers. Performing for practice only
D1["Product of depth and no of layers"]=D1['DEPTH_RIMFLOOR_TOPOG']*D2['NUMBER_LAYERS'] print(D1)
0 notes
rvignesh2102 · 1 year ago
Text
Week 2
Tumblr media
import pandas as pd import numpy as np import os
dir(os) os.chdir ("/Users/rvignesh/Documents/Python Code") data = pd.read_csv('mars_carter.csv', low_memory="false") #low memory false to avoid error
print(len(data)) print(len(data.columns)) print ('average elevation of each of the manually determined N points along the crater rim in KM') C2= data["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='Flase') P2=data["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='False', normalize="True") print ("The count of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)") print(C2) print ("The aggregate of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)") print (P2) print ('the maximum number of cohesive layers in any azimuthal direction that could be reliably identified') C3= data["NUMBER_LAYERS"].value_counts(sort='Flase') P3=data["NUMBER_LAYERS"].value_counts(sort='False', normalize="True") print ("The count of the maximum number of cohesive layers in any azimuthal direction that could be reliably identified") print(C3) print ("The aggregate the maximum number of cohesive layers in any azimuthal direction that could be reliably identified") print (P3) Depth_rimfloor = data[(data['DEPTH_RIMFLOOR_TOPOG']>0)] D1 = Depth_rimfloor.copy() Layer_number = data[(data["NUMBER_LAYERS"]>0)] D2 = Layer_number.copy() print ('Depth from rim floor excluding 0') C4= D1["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='Flase') P4= D1["DEPTH_RIMFLOOR_TOPOG"].value_counts(sort='False', normalize="True") print ("The count of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)") print(C4) print ("The aggregate of average elevation of each of the manually determined N points along (or inside) the crater rim(units are km)") print (P4) print ('Number of layers excluding 0') C5= D2["NUMBER_LAYERS"].value_counts(sort='Flase') P5= D2["NUMBER_LAYERS"].value_counts(sort='False', normalize="True") print ("The count of the maximum number of cohesive layers in any azimuthal direction that could be reliably identified") print(C5) print ("The aggregate the maximum number of cohesive layers in any azimuthal direction that could be reliably identified") print (P5)
0 notes
rvignesh2102 · 1 year ago
Text
Week 1
After reviewing the codebook for Martian craters, I am interested in understanding the factors contributing to surface layer formation on Mars. I am particularly intrigued to find out what affects the formation of layers in the Mars craters in turn may be able to understand its impact in geological formation.
From my research and literature review, I've learned that impact velocity is influenced by the object’s mass(O'Keefe, J. D., & Ahrens, T. J. (1977). Meteorite impact ejecta: Dependence of mass and energy lost on planetary escape velocity. Science, 198(4323), 1249-1251) which as lo depends on the planets esacpe velocity, as air resistance is negligible for large meteors (Fisher, W. J. (1934). Mass and Velocity of Meteorites and the Air Density Along Their Luminous Paths. Harvard College Observatory Circular, vol. 385, pp. 1-16, 385, 1-16). Additionally, studies indicate that the depth of a crater depends on several factors, including impact velocity (Ahrens, T. J., Xia, K., & Coker, D. (2002, July). Depth of cracking beneath impact craters: New constraint for impact velocity. In AIP Conference Proceedings (Vol. 620, No. 1, pp. 1393-1396). American Institute of Physics), surface hardness of the soil, and the presence of ice layers on Mars (Senft, L. E., & Stewart, S. T. (2008). Impact crater formation in icy layered terrains on Mars. Meteoritics & Planetary Science, 43(12), 1993-2013).
After examining the data, I have come up with a hypothesis that the depth of the crater on Mars is likely to have a correlation with the number of layers present. This proposes that the impact velocity and other factors could affect both the depth of the crater and the formation of layers on the Martian surface. Further investigation into these relationships can provide valuable insights into the geological processes that shape the landscape of Mars.
2 notes · View notes