pro linedenoise file=filepath('mabel_l2_20120914t220000_010_2.h5',SUBDIR=['ABC']) file_id = H5F_OPEN(file) elev_initi = H5D_OPEN(file_id, '/channel001/photon/ph_h') elev_initial = h5d_read(elev_initi) time_initi = H5D_OPEN(file_id, '/channel001/photon/delta_time') time_initial = h5d_read(time_initi) time_novat = H5D_OPEN(file_id, '/novatel_ins/delta_time') time_novatel = h5d_read(time_novat) velocity_ea = H5D_OPEN(file_id, '/novatel_ins/velocity/ins_v_east') velocity_east = h5d_read(velocity_ea) velocity_nor = H5D_OPEN(file_id, '/novatel_ins/velocity/ins_v_north') velocity_north = h5d_read(velocity_nor) velocity_total=SQRT((velocity_east)^2+(velocity_north)^2) min_vel=min(velocity_total) print, 'min_velocity=',min_vel max_vel=max(velocity_total) print, 'max_velocity=',max_vel if max_vel-min_vel gt 20 then begin return endif else begin avg_vel=mean(velocity_total) endelse dist=avg_vel*max(time_initial) dist_initial=time_initial*(dist/max(time_novatel)) r=scatterplot(dist_initial,elev_initial,SYMBOL='dot', /SYM_FILLED,sym_color='red') ;plotting data. num_elem=n_elements(dist_initial) log=[] x_deline=[] y_deline=[] x_deline=dist_initial y_deline=elev_initial temp=dist_initial ; Removes all data having more than one elevation reading for the same distance for i=0,num_elem-1 do begin if temp[i] eq 0 then begin endif log=dist_initial eq dist_initial[i] endfor if total(log) gt 1 then begin ;checks if the number of elevation values are more than one. temp[log]=0 endif print,total(log) a_deline=dist_initial[temp ne 0] b_deline=elev_initial[temp ne 0] s=scatterplot(a_deline,b_deline,SYMBOL='dot', /SYM_FILLED,sym_color='blue') H5D_CLOSE, elev_initi H5D_CLOSE, time_initi H5D_CLOSE, time_novat H5D_CLOSE, velocity_ea H5D_CLOSE, velocity_nor H5F_CLOSE, file_id end
|