IDL常用命令.docx

上传人:b****8 文档编号:29946974 上传时间:2023-08-03 格式:DOCX 页数:26 大小:53.07KB
下载 相关 举报
IDL常用命令.docx_第1页
第1页 / 共26页
IDL常用命令.docx_第2页
第2页 / 共26页
IDL常用命令.docx_第3页
第3页 / 共26页
IDL常用命令.docx_第4页
第4页 / 共26页
IDL常用命令.docx_第5页
第5页 / 共26页
点击查看更多>>
下载资源
资源描述

IDL常用命令.docx

《IDL常用命令.docx》由会员分享,可在线阅读,更多相关《IDL常用命令.docx(26页珍藏版)》请在冰豆网上搜索。

IDL常用命令.docx

IDL常用命令

IDL常用命令

Slice2D

probe='1'

level='l2'

species='hplus'

data_rate='srvy'

name='mms'+probe+'_hpca_'+species+'_phase_space_density'

timespan,'2015-10-16/13:

06:

00',1,/min;timerangetoload

trange=timerange()

time=trange[0];slicetime

;loaddataintotplot

mms_load_hpca,probes=probe,trange=trange,data_rate=data_rate,level=level,datatype='ion'

;reformatdatafromtplotvariablesintocompatible3Dstructures

dist=mms_get_dist(name)

;getsingledistribution

;-3d/2dinterpolationshowsmoothcontours

;-3dinterpolatesentirevolume

;-2dinterpolatesprojectionofasubsetofdatanearthesliceplane

;-geometricinterpolationisslowbutshowsbinboundaries

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

slice=spd_slice2d(dist,time=time);3Dinterpolation

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

;slice=spd_slice2d(dist,time=time,/geo);geometricinterpolation

;averagealldatainspecifiedtimewindow

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

;slice=spd_slice2d(dist,time=time,/geo,window=20,/center_time);windowcenteredonTIME

;averagespecificnumberofdistributions(usesNclosesttospecifiedtime)

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

;plot

spd_slice2d_plot,slice

 

stop

;+

;Purpose:

;Cribsheetdemonstratinghowtoobtainparticledistributionslices

;fromMMSHPCAdatausingspd_slice2d.

;

;Runasscriptorcopy-pastetocommandline.

;(examplescontainingloopscannotbecopy-pastedtocommandline)

;

;

;Field-alignedcoordinatedescriptions:

;'BV':

ThexaxisisparalleltoBfield;thebulkvelocitydefinesthex-yplane

;'BE':

ThexaxisisparalleltoBfield;theBxV(bulk)vectordefinesthex-yplane

;'xy':

(default)Thexaxisisalongthecoordinate'sxaxisandyisalongthecoordinate'syaxis

;'xz':

Thexaxisisalongthecoordinate'sxaxisandyisalongthecoordinate'szaxis

;'yz':

Thexaxisisalongthecoordinate'syaxisandyisalongthecoordinate'szaxis

;'xvel':

Thexaxisisalongthecoordinate'sxaxis;thex-yplaneisdefinedbythebulkvelocity

;'perp':

ThexaxisisthebulkvelocityprojectedontotheplanenormaltotheBfield;yisBxV(bulk)

;'perp_xy':

Thecoordinate'sx&yaxesareprojectedontotheplanenormaltotheBfield

;'perp_xz':

Thecoordinate'sx&zaxesareprojectedontotheplanenormaltotheBfield

;'perp_yz':

Thecoordinate'sy&zaxesareprojectedontotheplanenormaltotheBfield

;

;

;

;$LastChangedBy:

egrimes$

;$LastChangedDate:

2016-05-2513:

37:

25-0700(Wed,25May2016)$

;$LastChangedRevision:

21200$

;$URL:

svn+ssh:

//thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/mms/examples/advanced/mms_slice2d_hpca_crib.pro$

;-

 

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

;Basic

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

;setup

probe='1'

level='l2'

species='hplus'

data_rate='srvy'

name='mms'+probe+'_hpca_'+species+'_phase_space_density'

timespan,'2015-10-16/13:

06:

00',1,/min;timerangetoload

trange=timerange()

time=trange[0];slicetime

;loaddataintotplot

mms_load_hpca,probes=probe,trange=trange,data_rate=data_rate,level=level,datatype='ion'

;reformatdatafromtplotvariablesintocompatible3Dstructures

dist=mms_get_dist(name)

;getsingledistribution

;-3d/2dinterpolationshowsmoothcontours

;-3dinterpolatesentirevolume

;-2dinterpolatesprojectionofasubsetofdatanearthesliceplane

;-geometricinterpolationisslowbutshowsbinboundaries

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

slice=spd_slice2d(dist,time=time);3Dinterpolation

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

;slice=spd_slice2d(dist,time=time,/geo);geometricinterpolation

;averagealldatainspecifiedtimewindow

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

;slice=spd_slice2d(dist,time=time,/geo,window=20,/center_time);windowcenteredonTIME

;averagespecificnumberofdistributions(usesNclosesttospecifiedtime)

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

;plot

spd_slice2d_plot,slice

 

stop

 

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

;Field-alignedslices

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

probe='1'

level='l2'

species='hplus'

data_rate='srvy'

name='mms'+probe+'_hpca_'+species+'_phase_space_density'

bname='mms'+probe+'_fgm_b_gse_srvy_l2_bvec';nameofbfieldvector

vname='mms'+probe+'_hpca_'+species+'_ion_bulk_velocity';nameofbulkvelocityvector

timespan,'2015-10-16/13:

06:

00',1,/min;timerangetoload

trange=timerange()

time=trange[0];slicetime

mms_load_hpca,probes=probe,trange=trange,data_rate=data_rate,level=level,datatype='ion'

dist=mms_get_dist(name)

;loadBfielddata

mms_load_fgm,probe=probe,trange=trange,level='l2'

;loadvelocitymoment

mms_load_hpca,probes=probe,trange=trange,data_rate=data_rate,level=level,$

datatype='moments',varformat='*_'+species+'_ion_bulk_velocity'

;field/velocityalignedslice

;-theplot'sxaxisisparalleltotheBfield

;-theplot'syaxisisdefinedbythebulkvelocitydirection

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

slice=spd_slice2d(dist,time=time,window=window,$

rotation='bv',mag_data=bname,vel_data=vname)

;plot

spd_slice2d_plot,slice

 

stop

 

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

;Exporttimeseries

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

probe='1'

level='l2'

species='hplus'

data_rate='srvy'

name='mms'+probe+'_hpca_'+species+'_phase_space_density'

timespan,'2015-10-16/13:

06:

00',1,/min;timerangetoload

trange=timerange()

mms_load_hpca,probes=probe,trange=trange,data_rate=data_rate,level=level,datatype='ion'

dist=mms_get_dist(name)

;produceaplotoftheclosest2distributionsevery20secondsfor1minute

times=trange[0]+20*findgen(4)

samples=2

fori=0,n_elements(times)-1dobegin

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

filename='mms'+probe+'_'+species+'_'+time_string(times[i],format=2)

;plotandwrite.pngimagetocurrentdirectory

spd_slice2d_plot,slice,export=filename;,/eps

endfor

stop

 

end

;Purpose:

Abasicoverviewofhowtoobtainandplottwo-dimentionalslicesof

;SSTand/orESAparticledistributions.

;

;Run"thm_ui_slice2d"ontheIDLconsoletousefortheGUIversion.

;

;

;Methods:

;Geomtric:

;Eachpointontheplotisgiventhevalueofthebinitinstersects.

;Thisallowsbinboundariestobedrawnathighresolutions.

;

;2DInterpolation:

;Datapointswithinthespecifiedthetaorz-axisrangeareprojectedonto

;thesliceplaneandlinearlyinterpolatedontoaregular2Dgrid.

;

;3DInterpolation:

;Theentire3-dimensionaldistributionislinearlyinterpolatedontoa

;regular3Dgridandasliceisextractedfromthevolume.

;

;

;Coordinates:

;Thecoordinatesysteminwhichtheslicewillbeoriented.

;Optionsare'DSL'(default),'GSM','GSE'andthefollowingmagnetic

;fieldalignedcoordinates(fieldparalleltozaxis).

;

;'xgse':

ThexaxisistheprojectionoftheGSEx-axis

;'ygsm':

TheyaxisistheprojectionoftheGSMy-axis

;'zdsl':

TheyaxisistheprojectionoftheDSLz-axis

;'RGeo':

Thexistheprojectionofradialspacecraftpositionvector(GEI)

;'mRGeo':

Thexaxisistheprojectionofthenegativeradialspacecraftpositionvector(GEI)

;'phiGeo':

Theyaxisistheprojectionoftheazimuthalspacecraftpositionvector(GEI),positiveeastward

;'mphiGeo':

Theyaxisistheprojectionoftheazimuthalspacecraftpositionvector(GEI),positivewestward

;'phiSM':

TheyaxisistheprojectionoftheazimuthalspacecraftpositionvectorinSolarMagneticcoords

;'mphiSM':

TheyaxisistheprojectionofthenegativeazimuthalspacecraftpositionvectorinSolarMagneticcoords

;

;

;SliceOrientation

;Thesliceplaneisorientedbyusingthefollowingoptionstospecify

;itsxandyaxeswithrespecttothecoordinatesystem.

;("BV,""BE",and"perp"willbeinvariantbetweencoordinatesystems).

;

;'BV':

ThexaxisisparalleltoBfield;thebulkvelocitydefinesthex-yplane

;'BE':

ThexaxisisparalleltoBfield;theBxV(bulk)vectordefinesthex-yplane

;'xy':

(default)Thexaxisisalongthecoordinate'sxaxisandyisalongthecoordinate'syaxis

;'xz':

Thexaxisisalongthecoordinate'sxaxisandyisalongthecoordinate'szaxis

;'yz':

Thexaxisisalongthecoordinate'syaxisandyisalongthecoordinate'szaxis

;'xvel':

Thexaxisisalongthecoordinate'sxaxis;thex-yplaneisdefinedbythebulkvelocity

;'perp':

ThexaxisisthebulkvelocityprojectedontotheplanenormaltotheBfield;yisBxV(bulk)

;'perp_xy':

Thecoordinate'sx&yaxesareprojectedontotheplanenormaltotheBfield

;'perp_xz':

Thecoordinate'sx&zaxesareprojectedontotheplanenormaltotheBfield

;'perp_yz':

Thecoordinate'sy&zaxesareprojectedontotheplanenormaltotheBfield

;

;

;OTHER:

;

;Formoredetailed/advancedusagesee:

;thm_crib_part_slice2d_adv.pro

;thm_crib_part_slice2d_multi.pro

;

;

;NOTES:

;

;

;$LastChangedBy:

aaflores$

;$LastChangedDate:

2016-08-2513:

12:

48-0700(Thu,25Aug2016)$

;$LastChangedRevision:

21727$

;$URL:

svn+ssh:

//thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/examples/basic/thm_crib_part_slice2d.pro$

;

;-

compile_optidl2

thm_init

nl=ssl_newline()

print,nl,'Startingbasic2Dparticledistri

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 商务科技

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1