关键词不能为空

当前您在: 主页 > 英语 >

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常用命令的相关文章

  • 爱心与尊严的高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊严高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊重的作文题库

    1.作文关爱与尊重议论文 如果说没有爱就没有教育的话,那么离开了尊重同样也谈不上教育。 因为每一位孩子都渴望得到他人的尊重,尤其是教师的尊重。可是在现实生活中,不时会有

    小学作文
  • 爱心责任100字作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任心的作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文