Undergraduate ALFALFA
Answers to scavenger2 questions
- Plot the location of galaxies with different labels for velocity:
pro SQL
; You need to know the minimum and the maximum velocities in the array and you use it doing
; mayor = max(v) and
; menor = min(v)
; You also need to know how many elements the array has' youcan do that with
; numero = n_elements(v)
openr,lun, 'resultsmall.csv',/get_lun
data = fltarr(15,15)
readf,lun,data
;Here it read the data from the SQL Search
x = data[0,*]
y = data[1,*]
; we pick out R.A. and Dec as our x and y axis respectively
c = 2.99792458E8
z = data[2,*]
v=( z*2.99792458E5)
; It translates the redshifs to velocities
plot,x,y,/nodata,xrange=[210,208],yrange=[5.0,6.0],title= 'Distribution of galaxies in the NGC 5364 group from SQL',xtitle ='R.A. (deg)',ytitle=' Dec (deg)'
; It plots the box with no data in it
index = where( (v gt 500) and (v le 1000))
for i= 0,14 do a= data[0,index]
for i= 0,14 do b= data[1,index]
oplot, a,b,psym=1
; from here on the program picks out the values of v that fall into a certain range and overplots them over the empty box with a distinctive symbol
index2 = where((v gt 1000) and(v le 3000))
for i= 0,14 do c= data[0,index2]
for i= 0,14 do d= data[1,index2]
oplot,c,d,psym=2
index3 = where((v gt 3000) and(v le 6000))
for i= 0,14 do e= data[0,index3]
for i= 0,14 do f= data[1,index3]
oplot,e,f,psym=4
index4 = where((v gt 6000) and(v le 9000))
for i= 0,14 do g= data[0,index4]
for i= 0,14 do h= data[1,index4]
oplot,g,h,psym=5
index5 = where((v gt 9000)and (v le 12000))
for i= 0,14 do j= data[0,index5]
for i= 0,14 do k= data[1,index5]
oplot,j,k,psym=6
index6 = where(v gt 12000)
for i= 0,14 do l= data[0,index6]
for i= 0,14 do m= data[1,index6]
oplot,l,m,psym=7
legend, ['v : (500-1000]','v : (1000-3000]','v : (3000-6000]','v : (6000-9000]','v : (9000-12000]','v : (> 12000)'],psym = [1,2,4,5,6,7]
; Finally, it adds a legend to the graph specifying the v value ranges that correspond to the symbols of the data points.
set_plot, 'ps'
device, filename = 'SQLplot.ps'
plot,x,y,/nodata,xrange=[210,208],yrange=[5.0,6.0],title= 'Distribution of galaxies in the NGC 5364 group from SQL',xtitle ='R.A. (deg)',ytitle=' Dec (deg)'
oplot, a,b,psym=1
oplot,c,d,psym=2
oplot,e,f,psym=4
oplot,g,h,psym=5
oplot,j,k,psym=6
oplot,l,m,psym=7
legend, ['v : (500-1000]','v : (1000-3000]','v : (3000-6000]','v : (6000-9000]','v : (9000-12000]','v : (> 12000)'],psym = [1,2,4,5,6,7]
device,/close
set_plot, 'x'
end