diff --git a/DatosRC.dat b/DatosRC.dat index e195f426af368c93cf177b4887cbc7a74bbd26b0..8471ba6ede62a5a8fb35c19e94dc1059a9d5029d 100644 --- a/DatosRC.dat +++ b/DatosRC.dat @@ -1,27 +1,46 @@ -#lugar, ALT, LAT, LONG, STATUS, Ru, Rc, Rl, -Marambio,200.0,-64.24,-56.62,uprunning,2.19,2.19,2.19, -Machu Picchu,10,-62.09,-58.47,ongoing,2.19,2.19,2.19, -Bariloche,850.0,-41.15,-71.3,uprunning,7.84,7.84,7.84, -Buenos Aires,10.0,-34.54,-58.44,ongoing,8.19,8.19,8.19, -VinaDelMar,347,-33.07,-71.55,ongoing,9.15,9.15,9.15, -La Serena,28,-29.90,-71.25,uprunning,9.25,9.25,9.25, -Tucuman,430,-26.50,-65.11,planned,9.40,9.40,9.40, -Asuncion-Paraguay,136,-25.19,-57.30,planned,9.40,9.40,9.40, -Sao Paulo-UFABC,760,-23.38,-46.31,uprunning,9.73,9.73,9.73, -Campinas,640,-22.9,-47.06,uprunning,9.73,9.73,9.73, -La Paz,3630,-16.49,-68.15,ongoing,11.55,11.55,11.55, -Cota cota(bo),3917,-16.41,-68.5,ongoing,11.55,11.55,11.55, -Chacaltaya,5240.0,-16.35,-68.13,uprunning,11.55,11.55,11.55, -Lima,150.0,-12.1,-77.02,uprunning,12.03,12.03,12.03, -Campina Grande,550,-7.23,-35.88,uprunning,11.86,11.86,11.86, -Riobamba-EPOSCH,2750,-1.81,-78.74,ongoing,12.18,12.18,12.18, -Quito-EPN,2850,-0.2,-78.5,ongoing,12.18,12.18,12.18, -Quito-USFQ,2200,-0.2,-78.5,ongoing,12.18,12.18,12.18, -Bucaramanga,956.0,7.14,-73.12,ongoing,11.63,11.63,11.63, -Pamplona,2342,7.22,-72.39,planned,11.63,11.63,11.63, -Guatemala,1490.0,14.63,-90.59,ongoing,9.11,9.11,9.11, -Chiapas,522,16.75,-93.12,ongoing,9.11,9.11,9.11, -Sierra Negra,4550.0,18.16,-97.95,ongoing,7.36,7.36,7.36, -Imata,4600,-15.841,-71.091,planned,8.00,8.00,8.00, -Atacama,5105,-23.005778,-67.759167,planned,8.00,8.00,8.00, -San Antonio de los Cobres,4820,-24.71,-66.38,planned,8.00,8.00,8.00, +#place,ALT,LAT,LONG,STATUS,Ru,Rc,Rl +Madrid,700,40.5,-3.67,uprunning,8,8,8 +Sierra Negra,4550,18.16,-97.95,ongoing,7.36,7.36,7.36 +Chiapas,522,16.75,-93.12,ongoing,9.11,9.11,9.11 +Tacana,4060,15.13,-92.11,suspended,9.11,9.11,9.11 +Guatemala,1490,14.63,-90.59,ongoing,9.11,9.11,9.11 +Caracas-UCV,900,10.49,-66.89,suspended,11.69,11.69,11.69 +Caracas-USB,900,10.49,-66.89,suspended,11.69,11.69,11.69 +Mordor,4400,9.02,-70.8,cancelled,11.6,11.6,11.6 +CIDA,3650,8.78,-70.871,suspended,11.6,11.6,11.6 +Merida,1893,8.63,-71.15,suspended,11.6,11.6,11.6 +Pico Espejo,4754,8.53,-71.064,suspended,11.6,11.6,11.6 +Pamplona,2342,7.22,-72.39,cancelled,11.63,11.63,11.63 +Berlin,3450,7.19,-72.88,planned,11.6,11.6,11.6 +Bucaramanga,956,7.14,-73.12,uprunning,11.63,11.63,11.63 +Bogotá,2600,4.60971,-74.08175,ongoing,7,7,7 +Pasto,2530,1.21,-77.27,suspended,12.18,12.18,12.18 +Quito-EPN,2850,-0.2,-78.5,suspended,12.18,12.18,12.18 +Quito-USFQ,2200,-0.2,-78.5,ongoing,12.18,12.18,12.18 +Chimborazo,5000,-1.47,-78.82,ongoing,12.2,12.2,12.2 +Riobamba-EPOSCH,2750,-1.81,-78.74,ongoing,12.18,12.18,12.18 +Campina Grande,550,-7.23,-35.88,uprunning,11.86,11.86,11.86 +Marcapomacocha,4500,-11.41,-76.34,suspended,12,12,12 +Huancayo,3370,-12.04,-75.3,suspended,12.03,12.03,12.03 +Lima,150,-12.1,-77.02,ongoing,12.03,12.03,12.03 +Cusco,3400,-13.52,-71.96,suspended,11.86,11.86,11.86 +Imata,4600,-15.841,-71.091,planned,8,8,8 +Chacaltaya,5230,-16.35,-68.13,ongoing,11.55,11.55,11.55 +Cota Cota,3917,-16.41,-68.5,suspended,11.55,11.55,11.55 +Characato,3150,-16.46544,-71.49327,planned,9,9,9 +La Paz,3630,-16.49,-68.15,ongoing,11.55,11.55,11.55 +Campinas,640,-22.9,-47.06,uprunning,9.73,9.73,9.73 +Atacama,5105,-23.005778,-67.759167,planned,8,8,8 +Sao Paulo-UFABC,760,-23.38,-46.31,ongoing,9.73,9.73,9.73 +S. A. Cobres,4820,-24.71,-66.38,planned,9.5,9.5,9.5 +Asuncion,136,-25.19,-57.3,planned,9.4,9.4,9.4 +Tucuman,430,-26.5,-65.11,ongoing,9.4,9.4,9.4 +La Serena,28,-29.9,-71.25,uprunning,9.25,9.25,9.25 +Vina Del Mar,347,-33.07,-71.55,ongoing,9.15,9.15,9.15 +Lima,25,-33.97,-59.21,uprunning,9,9,9 +Buenos Aires,0,-34.54,-58.44,ongoing,8.19,8.19,8.19 +Malargue,1450,-35.45,-69.57,uprunning,9,9,9 +Bariloche,850,-41.15,-71.3,uprunning,7.84,7.84,7.84 +Machu Picchu,10,-62.09,-58.47,ongoing,2.19,2.19,2.19 +Marambio,200,-64.24,-56.62,uprunning,2.19,2.19,2.19 +San Martin ,10,-68.13,-67.102222,uprunning,1.69,1.69,1.69 diff --git a/DatosRCviejos/DatosRC-20241109.dat b/DatosRCviejos/DatosRC-20241109.dat new file mode 100644 index 0000000000000000000000000000000000000000..e195f426af368c93cf177b4887cbc7a74bbd26b0 --- /dev/null +++ b/DatosRCviejos/DatosRC-20241109.dat @@ -0,0 +1,27 @@ +#lugar, ALT, LAT, LONG, STATUS, Ru, Rc, Rl, +Marambio,200.0,-64.24,-56.62,uprunning,2.19,2.19,2.19, +Machu Picchu,10,-62.09,-58.47,ongoing,2.19,2.19,2.19, +Bariloche,850.0,-41.15,-71.3,uprunning,7.84,7.84,7.84, +Buenos Aires,10.0,-34.54,-58.44,ongoing,8.19,8.19,8.19, +VinaDelMar,347,-33.07,-71.55,ongoing,9.15,9.15,9.15, +La Serena,28,-29.90,-71.25,uprunning,9.25,9.25,9.25, +Tucuman,430,-26.50,-65.11,planned,9.40,9.40,9.40, +Asuncion-Paraguay,136,-25.19,-57.30,planned,9.40,9.40,9.40, +Sao Paulo-UFABC,760,-23.38,-46.31,uprunning,9.73,9.73,9.73, +Campinas,640,-22.9,-47.06,uprunning,9.73,9.73,9.73, +La Paz,3630,-16.49,-68.15,ongoing,11.55,11.55,11.55, +Cota cota(bo),3917,-16.41,-68.5,ongoing,11.55,11.55,11.55, +Chacaltaya,5240.0,-16.35,-68.13,uprunning,11.55,11.55,11.55, +Lima,150.0,-12.1,-77.02,uprunning,12.03,12.03,12.03, +Campina Grande,550,-7.23,-35.88,uprunning,11.86,11.86,11.86, +Riobamba-EPOSCH,2750,-1.81,-78.74,ongoing,12.18,12.18,12.18, +Quito-EPN,2850,-0.2,-78.5,ongoing,12.18,12.18,12.18, +Quito-USFQ,2200,-0.2,-78.5,ongoing,12.18,12.18,12.18, +Bucaramanga,956.0,7.14,-73.12,ongoing,11.63,11.63,11.63, +Pamplona,2342,7.22,-72.39,planned,11.63,11.63,11.63, +Guatemala,1490.0,14.63,-90.59,ongoing,9.11,9.11,9.11, +Chiapas,522,16.75,-93.12,ongoing,9.11,9.11,9.11, +Sierra Negra,4550.0,18.16,-97.95,ongoing,7.36,7.36,7.36, +Imata,4600,-15.841,-71.091,planned,8.00,8.00,8.00, +Atacama,5105,-23.005778,-67.759167,planned,8.00,8.00,8.00, +San Antonio de los Cobres,4820,-24.71,-66.38,planned,8.00,8.00,8.00, diff --git a/DatosRCviejos/DatosRC-ARTI.dat b/DatosRCviejos/DatosRC-ARTI.dat new file mode 100644 index 0000000000000000000000000000000000000000..f26aca7a007cefffb3ede7b35233f881ab4a97de --- /dev/null +++ b/DatosRCviejos/DatosRC-ARTI.dat @@ -0,0 +1,9 @@ +#lugar, ALT, LAT, LONG, STATUS, Ru, Rc, Rl, +Chacaltaya,5240.0,-16.35,-68.13,uprunning,11.55,11.55,11.55, +Quito-USFQ,2200,-0.2,-78.5,uprunning,12.18,12.18,12.18, +Guatemala,1490.0,14.63,-90.59,uprunning,9.11,9.11,9.11, +Bucaramanga,956.0,7.14,-73.12,uprunning,11.63,11.63,11.63, +La Serena,28,-29.90,-71.25,uprunning,9.25,9.25,9.25, +Lima,150.0,-12.1,-77.02,uprunning,12.03,12.03,12.03, +Buenos Aires,10.0,-34.54,-58.44,uprunning,8.19,8.19,8.19, +Marambio,200.0,-64.24,-56.62,uprunning,2.19,2.19,2.19, diff --git a/LAGOmapa-sitios.py b/LAGOmapa-sitios.py index 9666d09313c67776f4e204d6e7f16dce2d003f2b..90147a4a8cffac1a9159be84b723fd60dd82e213 100644 --- a/LAGOmapa-sitios.py +++ b/LAGOmapa-sitios.py @@ -4,29 +4,6 @@ import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np -def logo(): - print (" \n\n\n ") - print (" ___ ___ ___ ___") - print (" /\__\ /\ \ /\ \ /\ \ ") - print (" /:/ / /::\ \ /::\ \ /::\ \ ") - print (" /:/ / /:/\:\ \ /:/\:\ \ /:/\:\ \ ") - print (" /:/ / /::\~\:\ \ /:/ \:\ \ /:/ \:\ \ ") - print (" /:/__/ /:/\:\ \:\__\ /:/__/_\:\__\ /:/__/ \:\__\ ") - print (" \:\ \ \/__\:\/:/ / \:\ /\ \/__/ \:\ \ /:/ / ") - print (" \:\ \ \::/ / \:\ \:\__\ \:\ /:/ / ") - print (" \:\ \ /:/ / \:\/:/ / \:\/:/ / ") - print (" \:\__\ /:/ / \::/ / \::/ / ") - print (" \/__/ __ _\/__/__ _ _ __\/____ ___ _\/__/ ") - print (" | '_ ` _ \ / _` | '_ \| '_ \ / _ \ '__| ") - print (" | | | | | | (_| | |_) | |_) | __/ | ") - print (" |_| |_| |_|\__,_| .__/| .__/ \___|_| ") - print (" | | | | ") - print (" |_| |_| ") - return - - - -logo() comand='python3 mapingLAGO/AutoMap.py ' comand2='python3 SitiosAlturas/plotalturas3.py ' @@ -34,28 +11,25 @@ for i in range(1, len(sys.argv)): comand+=sys.argv[i]+' ' comand2+=sys.argv[i]+' ' - - - -print ("\n\n\ngenerando mapa..... ") +print ("generando mapa..... ") os.system(comand) -print ("\n\n\ngenerando curva de alturas... \n\n\n") -os.system(comand2) - -fig = plt.figure() -gs = gridspec.GridSpec(1, 2, width_ratios=[1, 1.2],left=None,bottom=None,right=None,top=None,wspace=.005,hspace=.005) - -ax1=plt.subplot(gs[0]) -ax1.set_axis_off() -img = mpimg.imread('lagoplano.png') -lum_img = img[:,:,:] -imgplot = plt.imshow(lum_img) - -ax2=plt.subplot(gs[1]) -ax2.set_axis_off() -img2 = mpimg.imread('alturas3.png') -lum_img2 = img2[:,:,:] -imgplot2 = plt.imshow(lum_img2) -#plt.show() -#plt.figure(figsize=(30,18)) -plt.savefig("MAPAtodo.png",dpi=600,bbox_inches='tight', pad_inches = 0) +print ("reduciendo mapa..... ") +os.system('convert lagoplano.png -scale 25% lagoplano_small.jpg') +# print ("\n\n\ngenerando curva de alturas... \n\n\n") +# os.system(comand2) + +# fig = plt.figure() +# gs = gridspec.GridSpec(1, 2, width_ratios=[1, 1.2],left=None,bottom=None,right=None,top=None,wspace=.005,hspace=.005) + +# ax1=plt.subplot(gs[0]) +# ax1.set_axis_off() +# img = mpimg.imread('lagoplano.png') +# lum_img = img[:,:,:] +# imgplot = plt.imshow(lum_img) + +# ax2=plt.subplot(gs[1]) +# ax2.set_axis_off() +# img2 = mpimg.imread('alturas3.png') +# lum_img2 = img2[:,:,:] +# imgplot2 = plt.imshow(lum_img2) +# plt.savefig("MAPAtodo.png",dpi=72,bbox_inches='tight', pad_inches = 0) \ No newline at end of file diff --git a/MAPAtodo.png b/MAPAtodo.png deleted file mode 100644 index 32893e81d5314f2bd029cf4c11bb36d607c588c3..0000000000000000000000000000000000000000 Binary files a/MAPAtodo.png and /dev/null differ diff --git a/alturas3.png b/alturas3.png index 3508bc8aeb1be71e43653e02b831a988396b0e6f..11eece2c88fe49b582e499d02a71f72c1a0246a6 100644 Binary files a/alturas3.png and b/alturas3.png differ diff --git a/lagoplano.png b/lagoplano.png index 9102820f824ef182e7011f7c45d714cc8f0dc0a5..2a3158bf73a7a834ec9db789c2b9dba83d116dcc 100644 Binary files a/lagoplano.png and b/lagoplano.png differ diff --git a/lagoplano_small.jpg b/lagoplano_small.jpg new file mode 100644 index 0000000000000000000000000000000000000000..46bc61b320b8753a2459d9d896e62b82944ca26a Binary files /dev/null and b/lagoplano_small.jpg differ diff --git a/lagoplano_small.png b/lagoplano_small.png index 6b59f9a6c253a117d8b73f3cc7d25159daa9bf78..1af4363bb6b79156ec20333113ca270b33a9055b 100644 Binary files a/lagoplano_small.png and b/lagoplano_small.png differ diff --git a/mapingLAGO/AutoMap.py b/mapingLAGO/AutoMap.py index ecd22f307c639e076a188558299624c942a90a7f..137411027d150b0207d8bffe20f7f217403c44d1 100644 --- a/mapingLAGO/AutoMap.py +++ b/mapingLAGO/AutoMap.py @@ -4,7 +4,9 @@ import matplotlib.pyplot as plt import numpy as np ################ ignorar algun estado on,soon,uc desde el argumento ## -ignore=[0,0,0] +# uprunning, ongoing, planned, suspended, cancelled +# suspended and cancelled ignored by default +ignore=[0,0,0,1,1] for j in range(0,len(sys.argv)): if sys.argv[j]=='-uprunning': ignore[0]=1 @@ -12,21 +14,30 @@ for j in range(0,len(sys.argv)): ignore[1]=1 if sys.argv[j]=='-planned': ignore[2]=1 -ig=ignore[0]+ignore[1]+ignore[2] + if sys.argv[j]=='-suspended': + ignore[3]=0 + if sys.argv[j]=='-cancelled': + ignore[4]=0 -if ig==3: +ig=ignore[0]+ignore[1]+ignore[2]+ignore[3]+ignore[4] + +if ig==5: sys.exit("ERROR--IGNORANDO TODO!!!") ##################### define el marker y color segun el estado ####### def estatus(x): - status=(0,0) - if x=='uprunning': + status=(0, 0) + if x == 'uprunning': status=('^','#0033CC') - elif x=='ongoing': + elif x == 'ongoing': status=('s','#FF8C00') - elif x=='planned': + elif x == 'planned': status=('o','#CC0000') + elif x == 'suspended': + status=('-','#CCCC00') + elif x == 'cancelled': + status=('x','#CCCCCC') else: print (x) sys.exit("ERROR--ESTAUS DE SITIO NO VALIDO!!!") @@ -40,7 +51,20 @@ files=open('misdatos.dat') #### genera mapa basico ################################################# -map = Basemap(projection='cyl',llcrnrlat=-84,urcrnrlat=33.56,llcrnrlon=-118.25,urcrnrlon=-33.56,resolution='l') +# map = Basemap(projection='cyl',llcrnrlat=-84,urcrnrlat=33.56,llcrnrlon=-118.25,urcrnrlon=-33.56,resolution='l') +lowerleftlat=-75 +lowerleftlon=-110 +upperrightlat=+55 +upperrightlon=+20 + +map = Basemap( + projection='cyl', + llcrnrlat=lowerleftlat, + llcrnrlon=lowerleftlon, + urcrnrlat=upperrightlat, + urcrnrlon=upperrightlon, + resolution='l' +) plt.figure(figsize=(13,18)) map.drawcoastlines(linewidth=.5) @@ -81,47 +105,76 @@ for line in files: if ig>0: if ignore[0]>0 and row[4]=='uprunning': #ignora on continue - if ignore[1]>0 and row[4]=='ongoing':#ignora soon + if ignore[1]>0 and row[4]=='ongoing':#ignora ongoing continue if ignore[2]>0 and row[4]=='planned': #ingnora uc - #print row[0],ignore continue - if row[0][0]=='#': - continue - if row[1]=='': + if ignore[3]>0 and row[4]=='suspended':#ignora suspended + continue + if ignore[4]>0 and row[4]=='cancelled':#ignora cancelled + continue + if row[0][0] == '#': continue - cont+=1 - lat=float(row[2]) - lon=float(row[3]) + cont += 1 + lat = float(row[2]) + lon = float(row[3]) tatus=estatus(row[4]) # determina color y marker segun estatus - x,y = map(lon,lat) - map.scatter(x,y,marker=tatus[0],facecolor=tatus[1][0:7],s=150,zorder=10)#grafica los puntos - #print row[0], x,xaux, y,yaux - cornu=crosletras(y,yaux,x,xaux,len(row[1]),cont) - #print crosletras(y,yaux,x,xaux,len(row[1]),cont) + x, y = map(lon, lat) + + map.scatter( + x, + y, + marker=tatus[0], + facecolor=tatus[1][0:7], + s=150, + zorder=10 + ) + # cornu=crosletras(y,yaux,x,xaux,len(row[1]),cont) +# markers +# grafica numeros impares a la izquierda del marker y pares a la derecha m=((-1)**(cont)) - plt.text(-117,13-(2.6*cont),str(cont)+' = '+row[0]+' ('+str(int(float(row[1])))+' m)',color='w',fontsize=17,zorder=10, fontweight='bold')#grafica la leyenda que numero-lugar en blanco a la derecha - if cont==5 or cont==14: - plt.text(x+(m*3.5)-((0.5+(cont/10))*m)+m*(cont/10)-1.2,y-2,str(cont),color='black',fontsize=12,zorder=15,fontweight='bold')# grafica los nuero 5 y 14 mas cerca de los marker esto tal vez de ba quitarse ############### - continue + plt.text( + x + (m * 3) - ((0.5 + (cont / 10)) * m) + m * (cont / 10) - 1.3, + y - 0.5, + ('0' if cont < 10 else '') + str(cont), + color='#000000', + fontsize=10, + zorder=15, + fontfamily='monospace', + fontweight='normal' + ) + +# Leyenda + # plt.text(-117,13-(2.6*cont),str(cont)+' = '+row[0]+' ('+str(int(float(row[1])))+' m)',color='w',fontsize=17,zorder=10, fontweight='bold')#grafica la leyenda que numero-lugar en blanco a la derecha + plt.text( + -30.0 , + +25.0 - (2.9 * cont), + ('0' if cont < 10 else '') + str(cont) + '. ' + row[0] + ' ('+str(int(float(row[1])))+' m)', + zorder=10, + color='#ffffff', + fontsize=15, + fontfamily='monospace', + fontweight='bold' + ) - plt.text(x+(m*3)-((0.5+(cont/10))*m)+m*(cont/10)-1.2,y-0.5,str(cont),color='black',fontsize=12,zorder=15,fontweight='bold')# grafica numeros impares a la izquierda del marker y pares a la derecha ##################### genera etiquetas para la leyenda superior sobre los puntos############################## xi=23 yi=23 +fs=150 xi,yi=map(lon,lat) if ignore[0]==0: - plt.scatter(xi,yi,marker='^',s=200,color='#0033CC',label='Stable') + plt.scatter(xi, yi, marker='^', s=fs, color='#0033CC', label='LAGO Site') if ignore[2]==0: - plt.scatter(xi,yi,marker='s',s=200,color='#FF8C00',label='Deploying') + plt.scatter(xi, yi, marker='s', s=fs, color='#FF8C00', label='Deploying') if ignore[1]==0: - plt.scatter(xi,yi,marker='o',s=200,color='#CC0000',label='Planned') -lg = plt.legend(loc='upper right', fontsize=26,scatterpoints=1) -lg.get_frame().set_alpha(.8) # A little transparency - + plt.scatter(xi, yi, marker='o', s=fs, color='#CC0000', label='Planned') +if ignore[3]==0: + plt.scatter(xi, yi, marker='x', s=fs, color='#CCCC00', label='Suspended') +if ignore[4]==0: + plt.scatter(xi, yi, marker='-', s=fs, color='#CCCCCC', label='Cancelled') +lg = plt.legend(loc='upper left', fontsize=20, scatterpoints=1) +lg.get_frame().set_alpha(.6) # A little transparency os.system("rm misdatos.dat") -plt.savefig('lagoplano.png',dpi=300,bbox_inches='tight', pad_inches = 0) - -#plt.show() +plt.savefig('lagoplano.png',dpi=300,bbox_inches='tight', pad_inches = 0) \ No newline at end of file