关键词不能为空

当前您在: 主页 > 英语 >

IDL常用命令

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-09 19:54
tags:

-

2021年2月9日发(作者:celebrate是什么意思)


Slice 2D



probe =


'1'



level =


'l2'



species =


'hplus'



data_rate =


'srvy'




name =


'mms'


+prob e+


'_hpca_'


+species+

'_phase_space_density'




timespan


,


'2015-10-16/13:06:00'


,


1


, /min


;time range to load



trange =


timerange


()


time = trange[


0


]


;slice time




;load data into tplot



mms_load_hpca


,


probes=probe,


trange=trange,


data_rate=data_rate,


level=level,


datatype=


'ion'




;reformat data from tplot variables into compatible 3D structures



dist =


mms_get_dist


(name)



;get single distribution



; -3d/2d interpolation show smooth contours



; -3d interpolates entire volume



; -2d interpolates projection of a subset of data near the slice plane



; -geometric interpolation is slow but shows bin boundaries



;---------------- -----------------------------



slice =


spd_slice2d


(dist, time=time)


;3D interpolation



;slice = spd_slice2d(dist, time=time, /two) 2D interpolation



;slice = spd_slice2d(dist, time=time, /geo) geometric interpolation




;average all data in specified time window



;slice = spd_slice2d(dist, time=time, /geo, window=20) window (sec) starts


at TIME



;slice


=


spd_slice2d(dist,


time=time,


/geo,


window=20,


/center_time)


window


centered on TIME




;average specific number of distributions (uses N closest to specified time)



;slice = spd_slice2d(dist, time=time, /geo, samples=3)




;plot



spd_slice2d_plot


, slice




stop





;============== ================================================== ======



; Field-aligned slices



;==================== ==================================================




probe =


'1'



level =


'l2'



species =


'hplus'



data_rate =


'srvy'




name =


'mms'


+prob e+


'_hpca_'


+species+

'_phase_space_density'



bname =


'mms'


+pro be+


'_fgm_b_gse_srvy_l2_bvec'


;name of bfield vector



vname =


'mms'


+probe+


'_h pca_'


+species+


'_ion_bulk_vel ocity'


;name of bulk


velocity vector




timespan


,


'2015-10-16/13:06:00'


,


1


, /min


;time range to load



trange =


timerange


()


time = trange[


0


]


;slice time




mms_load_hpca


,


probes=probe,


trange=trange,


data_rate=data_rate,


level=level,


datatype=


'ion'




dist =


mms_get_dist


(name)



;load B field data



mms_load_fgm


, probe=probe, trange=trange, level=


'l2'




;load velocity moment



mms_load_hpca


,


probes=probe,


trange=trange,


data_rate=data_rate,


level=level,


$$


da tatype=


'moments'


, varformat=


'*_'


+species+


'_io n_bulk_velocity'




;field/velocity aligned slice



; -the plot's x axis is parallel to the B field



; -the plot's y axis is defined by the bulk velocity direction



;----------------- ----------------------------



slice =


spd_slice2d


(dist, time=time, window=window, $$


rotation=


'bv'


, mag_data=bname, vel_data=vname)



;plot



spd_slice2d_plot


, slice




stop





;============== ================================================== ==========


=



; Export time series



;======== ================================================== ================


=




probe =


'1'



level =


'l2'



species =


'hplus'



data_rate =


'srvy'




name =


'mms'


+prob e+


'_hpca_'


+species+

'_phase_space_density'




timespan


,


'2015-10-16/13:06:00'


,


1


, /min


;time range to load



trange =


timerange


()



mms_load_hpca


,


probes=probe,


trange=trange,


data_rate=data_rate,


level=level,


datatype=


'ion'




dist =


mms_get_dist


(name)



;produce a plot of the closest 2 distributions every 20 seconds for 1 minute



times = trange[


0


] +


20


*


findgen

< p>
(


4


)


samples =


2




for


i=


0


,


n_elements


(times)-


1


dobegin




slice =


spd_slice2d


(dist, time=times[i], samples=samples)



filename =


'mms'


+ probe+


'_'


+species+


'_'


+


time_string


( times[i],format=


2


)



;plot and write .png image to current directory



spd_slice2d_plot


, slice, export=filename


;,/eps




endfor




stop





end


;+



;Purpose:



; Crib sheet demonstrating how to obtain particle distribution slices



; from MMS HPCA data using spd_slice2d.



;



; Run as script or copy-paste to command line.



; (examples containing loops cannot be copy-pasted to command line)



;



;



;Field-aligned coordinate descriptions:



; 'BV': The x axis is parallel to B field; the bulk velocity defines the x-y


plane



; 'BE': The x axis is parallel to B field; the B x V(bulk) vector defines


the


x-y plane



; 'xy': (default) The x axis is along the coordinate's x axis and y is along


the coordinate's y axis



; 'xz': The x axis is along the coordinate's x axis and y is along the


coordinate's z axis



; 'yz': The x axis is along the coordinate's y axis and y is along the


coordinate's z axis



; 'xvel': The


x


axis


is


along


the


coordinate's


x


axis;


the


x-y


plane


is


defined


by the bulk velocity



; 'perp': The x axis is the bulk velocity projected onto the plane normal to


the B field; y is B x V(bulk)



; 'perp_xy': The coordinate's x & y axes are projected onto the plane normal


to the B field



; 'perp_xz': The coordinate's x & z axes are projected onto the plane normal


to the B field



; 'perp_yz': The coordinate's y & z axes are projected onto the plane normal


to the B field



;



;



;



;$$LastChangedBy: egrimes $$



;$$LastChangedDate: 2016-05-25 13:37:25 -0700 (Wed, 25 May 2016) $$



;$$LastChangedRevision: 21200 $$



;$$URL:


svn+ssh: //thmsvn@/repos/spdsoft/trunk/projects/mms

< br>/examples/advanced/mms_slice2d_hpca_ $$



;-






;============== ================================================== ==========


=



; Basic



;===================== ================================================== ===


=




;setup



probe =


'1'



level =


'l2'



species =


'hplus'



data_rate =


'srvy'




name =


'mms'


+prob e+


'_hpca_'


+species+

'_phase_space_density'




timespan


,


'2015-10-16/13:06:00'


,


1


, /min


;time range to load



trange =


timerange


()


time = trange[


0


]


;slice time




;load data into tplot



mms_load_hpca


,


probes=probe,


trange=trange,


data_rate=data_rate,


level=level,


datatype=


'ion'




;reformat data from tplot variables into compatible 3D structures



dist =


mms_get_dist


(name)



;get single distribution



; -3d/2d interpolation show smooth contours



; -3d interpolates entire volume



; -2d interpolates projection of a subset of data near the slice plane



; -geometric interpolation is slow but shows bin boundaries



;---------------- -----------------------------



slice =


spd_slice2d


(dist, time=time)


;3D interpolation



;slice = spd_slice2d(dist, time=time, /two) 2D interpolation



;slice = spd_slice2d(dist, time=time, /geo) geometric interpolation




;average all data in specified time window



;slice = spd_slice2d(dist, time=time, /geo, window=20) window (sec) starts


at TIME



;slice


=


spd_slice2d(dist,


time=time,


/geo,


window=20,


/center_time)


window


centered on TIME




;average specific number of distributions (uses N closest to specified time)



;slice = spd_slice2d(dist, time=time, /geo, samples=3)




;plot



spd_slice2d_plot


, slice




stop





;============== ================================================== ======



; Field-aligned slices



;==================== ==================================================




probe =


'1'



level =


'l2'



species =


'hplus'



data_rate =


'srvy'




name =


'mms'


+prob e+


'_hpca_'


+species+

'_phase_space_density'



bname =


'mms'


+pro be+


'_fgm_b_gse_srvy_l2_bvec'


;name of bfield vector



vname =


'mms'


+probe+


'_h pca_'


+species+


'_ion_bulk_vel ocity'


;name of bulk


velocity vector




timespan


,


'2015-10-16/13:06:00'


,


1


, /min


;time range to load



trange =


timerange


()


time = trange[


0


]


;slice time




mms_load_hpca


,


probes=probe,


trange=trange,


data_rate=data_rate,


level=level,


datatype=


'ion'




dist =


mms_get_dist


(name)



;load B field data



mms_load_fgm


, probe=probe, trange=trange, level=


'l2'




;load velocity moment



mms_load_hpca


,


probes=probe,


trange=trange,


data_rate=data_rate,


level=level,


$$


da tatype=


'moments'


, varformat=


'*_'


+species+


'_io n_bulk_velocity'




;field/velocity aligned slice



; -the plot's x axis is parallel to the B field



; -the plot's y axis is defined by the bulk velocity direction



;----------------- ----------------------------



slice =


spd_slice2d


(dist, time=time, window=window, $$


rotation=


'bv'


, mag_data=bname, vel_data=vname)



;plot



spd_slice2d_plot


, slice




stop





;============== ================================================== ==========


=



; Export time series



;======== ================================================== ================


=




probe =


'1'



level =


'l2'



species =


'hplus'



data_rate =


'srvy'




name =


'mms'


+prob e+


'_hpca_'


+species+

'_phase_space_density'




timespan


,


'2015-10-16/13:06:00'


,


1


, /min


;time range to load



trange =


timerange


()



mms_load_hpca


,


probes=probe,


trange=trange,


data_rate=data_rate,


level=level,


datatype=


'ion'




dist =


mms_get_dist


(name)



;produce a plot of the closest 2 distributions every 20 seconds for 1 minute



times = trange[


0


] +


20


*


findgen

< p>
(


4


)


samples =


2




for


i=


0


,


n_elements


(times)-


1


dobegin




slice =


spd_slice2d


(dist, time=times[i], samples=samples)



filename =


'mms'


+ probe+


'_'


+species+


'_'


+


time_string


( times[i],format=


2


)



;plot and write .png image to current directory



spd_slice2d_plot


, slice, export=filename


;,/eps




endfor




stop





end


;Purpose: A basic overview of how to obtain and plot two- dimentional slices of



; SST and/or ESA particle distributions.



;



; Run



;



;



;Methods:



; Geomtric:



; Each point on the plot is given the value of the bin it instersects.



; This allows bin boundaries to be drawn at high resolutions.



;



; 2D Interpolation:



; Datapoints within the specified theta or z-axis range are projected onto



; the slice plane and linearly interpolated onto a regular 2D grid.



;



; 3D Interpolation:



; The entire 3-dimensional distribution is linearly interpolated onto a



; regular 3D grid and a slice is extracted from the volume.



;



;



;Coordinates:



; The coordinate system in which the slice will be oriented.



; Options are 'DSL' (default), 'GSM', 'GSE' and the following magnetic



; field aligned coordinates (field parallel to z axis).



;



; 'xgse': The x axis is the projection of the GSE x-axis



; 'ygsm': The y axis is the projection of the GSM y-axis



; 'zdsl': The y axis is the projection of the DSL z-axis



; 'RGeo': The


x


is


the


projection


of


radial


spacecraft


position


vector


(GEI)



; 'mRGeo': The x axis is the projection of the negative radial spacecraft


position vector (GEI)



; 'phiGeo': The


y


axis


is


the


projection


of


the


azimuthal


spacecraft


position


vector (GEI), positive eastward



; 'mphiGeo': The y axis is the projection of the azimuthal spacecraft


position vector (GEI), positive westward



; 'phiSM': The


y


axis


is


the


projection


of


the


azimuthal


spacecraft


position


vector in Solar Magnetic coords



; 'mphiSM': The


y


axis


is


the


projection


of


the


negative


azimuthal


spacecraft


position vector in Solar Magnetic coords



;



;



;Slice Orientation



; The slice plane is oriented by using the following options to specify



; its x and y axes with respect to the coordinate system.



; (



;



; 'BV': The


x


axis


is


parallel


to


B


field;


the


bulk


velocity


defines


the


x-y


plane



; 'BE': The x axis is parallel to B field; the B x V(bulk) vector defines


the x-y plane



; 'xy': (default)


The


x


axis


is


along


the


coordinate's


x


axis


and


y


is


along


the coordinate's y axis



; 'xz': The x axis is along the coordinate's x axis and y is along the


coordinate's z axis



; 'yz': The x axis is along the coordinate's y axis and y is along the


coordinate's z axis



; 'xvel': The


x


axis


is


along


the


coordinate's


x


axis;


the


x-y


plane


is


defined


by the bulk velocity



; 'perp': The x axis is the bulk velocity projected onto the plane normal


to the B field; y is B x V(bulk)



; 'perp_xy': The


coordinate's


x


&


y


axes


are


projected


onto


the


plane


normal


to the B field



; 'perp_xz': The


coordinate's


x


&


z


axes


are


projected


onto


the


plane


normal


to the B field



; 'perp_yz': The


coordinate's


y


&


z


axes


are


projected


onto


the


plane


normal


to the B field



;



;



;OTHER:



;



; For more detailed/advanced usage see:



; thm_crib_part_slice2d_



; thm_crib_part_slice2d_



;



;



;NOTES:



;



;



;$$LastChangedBy: aaflores $$



;$$LastChangedDate: 2016-08-25 13:12:48 -0700 (Thu, 25 Aug 2016) $$



;$$LastChangedRevision: 21727 $$



;$$URL:


svn+ssh: //thmsvn@/repos/spdsoft/trunk/projects/the

< br>mis/examples/basic/thm_crib_part_ $$



;



;-




compile_opt


idl2



thm_init




nl =


ssl_newline


()



print


, nl,


'Starting basic 2D particle distribution slice crib.'


,nl




;-------------- -------------------------------------------------- ----------


------------



;Generate basic slice from ESA data



;---------------------- -------------------------------------------------- --


------------




;set time range



trange =


'2008-02-26/'


+ [


'04:54'


,


'04:55'


]



;esa ion burst data



dist_arr =


t hm_part_dist_array


(probe=


'b'


,type=


'peib'


, trange=trange)



;generate a 30 second slice starting at the beginning of the time range



thm_part_slice2d


, dist_arr, slice_time=trange[


0


], timewin=


30


,


part_slice=slice



;plot the output



thm_part_slice2d_plot


, slice



print


, nl,


'This example shows a basic slice of ESA burst data (ions) along the


DSL xy plane.'



print


,


'The default method will produce a plot with visible bin boundaries.'



print


,


'The red line is the projection of the bulk velocity vector.'


,nl



stop





;-------------------------------------- ------------------------------------


--- ---------



;Generate basic slice using 2D interpolation



;------------------------------------------------ --------------------------


------------< /p>




;set time range


-


-


-


-


-


-


-


-



本文更新与2021-02-09 19:54,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/623527.html

IDL常用命令的相关文章

  • 余华爱情经典语录,余华爱情句子

    余华的经典语录——余华《第七天》40、我不怕死,一点都不怕,只怕再也不能看见你——余华《第七天》4可是我再也没遇到一个像福贵这样令我难忘的人了,对自己的经历如此清楚,

    语文
  • 心情低落的图片压抑,心情低落的图片发朋友圈

    心情压抑的图片(心太累没人理解的说说带图片)1、有时候很想找个人倾诉一下,却又不知从何说起,最终是什么也不说,只想快点睡过去,告诉自己,明天就好了。有时候,突然会觉得

    语文
  • 经典古训100句图片大全,古训名言警句

    古代经典励志名言100句译:好的药物味苦但对治病有利;忠言劝诫的话听起来不顺耳却对人的行为有利。3良言一句三冬暖,恶语伤人六月寒。喷泉的高度不会超过它的源头;一个人的事

    语文
  • 关于青春奋斗的名人名言鲁迅,关于青年奋斗的名言鲁迅

    鲁迅名言名句大全励志1、世上本没有路,走的人多了自然便成了路。下面是我整理的鲁迅先生的名言名句大全,希望对你有所帮助!当生存时,还是将遭践踏,将遭删刈,直至于死亡而

    语文
  • 三国群英单机版手游礼包码,三国群英手机单机版攻略

    三国群英传7五神兽洞有什么用那是多一个武将技能。青龙飞升召唤出东方的守护兽,神兽之一的青龙。玄武怒流召唤出北方的守护兽,神兽之一的玄武。白虎傲啸召唤出西方的守护兽,

    语文
  • 不收费的情感挽回专家电话,情感挽回免费咨询

    免费的情感挽回机构(揭秘情感挽回机构骗局)1、牛牛(化名)向上海市公安局金山分局报案,称自己为了挽回与女友的感情,被一家名为“实花教育咨询”的情感咨询机构诈骗4万余元。

    语文