当前位置:文档之家› IDL常用命令

IDL常用命令

IDL常用命令
IDL常用命令

Slice 2D

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 ;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'+probe+'_hpca_'+species+'_phase_space_density'

bname = 'mms'+probe+'_fgm_b_gse_srvy_l2_bvec';name of bfield vector

vname = 'mms'+probe+'_hpca_'+species+'_ion_bulk_velocity';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, $

datatype='moments', varformat='*_'+species+'_ion_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'+probe+'_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(4)

samples = 2

for i=0, n_elements(times)-1dobegin

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

;+

; 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@https://www.doczj.com/doc/518202423.html,/repos/spdsoft/trunk/projects/mms /examples/advanced/mms_slice2d_hpca_crib.pro $

;-

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

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

;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 ;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'+probe+'_hpca_'+species+'_phase_space_density'

bname = 'mms'+probe+'_fgm_b_gse_srvy_l2_bvec';name of bfield vector

vname = 'mms'+probe+'_hpca_'+species+'_ion_bulk_velocity';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, $

datatype='moments', varformat='*_'+species+'_ion_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'+probe+'_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(4)

samples = 2

for i=0, n_elements(times)-1dobegin

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 "thm_ui_slice2d" on the IDL console to use for the GUI version. ;

;

;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," "BE", and "perp" will be invariant between coordinate systems).

;

; '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_adv.pro

; thm_crib_part_slice2d_multi.pro

;

;

;NOTES:

;

;

;$LastChangedBy: aaflores $

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

;$LastChangedRevision: 21727 $

;$URL:

svn+ssh://thmsvn@https://www.doczj.com/doc/518202423.html,/repos/spdsoft/trunk/projects/the mis/examples/basic/thm_crib_part_slice2d.pro $

;

;-

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 = thm_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

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;generate an identical cut using 2D interpolation

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

/two_d_interp

thm_part_slice2d_plot, slice

print, nl,'This is an identical cut produced using the 2D interplation method.' print, 'This method linearly interpolates all data within a specified range ' print, 'onto the slice plane (default is +-20 degrees)',nl

stop

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

;Generate basic slice using 3D interpolation

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;generate an identical cut using 3D interpolation

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

/three_d_interp

thm_part_slice2d_plot, slice

print, nl,'Another identical cut using the 3D interpolation method,'

print, 'Here the entire distribution is linearly interpolated in

print, 'three dimensions and a slice is extracted.',nl

stop

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

;Basic ESA background removal

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;Background removal is enabled by default with the options listed below.

;Seethm_crib_esa_bgnd_remove for more info.

; bgnd_remove/esa_bgnd_remove: Flag to switch background removal on/off (set to 0 to disable)

; bgnd_type: Type of removal ('anode', 'omni', 'angle')

; bgnd_npoints: Number of points used to calculate background

; bgnd_scale: Factor to multiply calculated background by

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

/bgnd_remove, bgnd_type='anode', bgnd_npoints=3,

bgnd_scale=1.0, $

/three_d_interp

thm_part_slice2d_plot, slice

print, nl,'Another identical cut using the 3D interpolation method,'

print, 'Here the entire distribution is linearly interpolated in

print, 'three dimensions and a slice is extracted.',nl

stop

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

;Smoothing

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;Increase the smoothing width to create smoother plots.

;The value supplied to the SMOOTH keyword is the width (in points)

;of the gaussian blur that is applied to the slice data.

;2D interpolate and 3D interpolation use smooth=3 by default.

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

smooth=15, /three_d_interp

;Add contour lines to the plot

thm_part_slice2d_plot, slice

print,nl,'Set the SMOOTH keyword to specify the width of the smoothing window.' print, '(in # of points). 2D interpolate and 3D interpolation use smooth=3 print, 'by default.',nl

stop

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

;Units / Show N count level

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;This example uses the UNITS keyword to create a slice in counts.

; valid units are: 'df', 'flux', 'eflux', 'counts', and 'rate'

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice_counts, $

units='counts', /three_d_interp

;get default phase space density slice

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice_df, $

/three_d_interp

;plot counts slice

thm_part_slice2d_plot, slice_counts, window=2

;plot DF slice with contour line at 1 count

thm_part_slice2d_plot, slice_df, window=1

spd_slice2d_add_line, slice_counts, 1

;plot DF slice with dotted colored contour lines at 1, 5, and 10 count

; see IDL documentation for CONTOUR procedure for valid keywords

thm_part_slice2d_plot, slice_df, window=0

spd_slice2d_add_line, slice_counts, [1,5,10], c_colors=[60,170,230],

c_linestyle=1

print,nl,'Use the UNITS keyword to select what units the data will be presented in.'

print,nl,'Use spd_slice2d_add_line to add annotation in different units' print, ' (e.g. "Counts", "DF", "Rate", "Flux", "EFlux")',nl

stop

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

;Plot Against Energy

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;Setting the /ENERGY keyword will plot the data against energy instead of velocity.

;By default this will use radial log scaling, to use linear scaling use LOG=0. thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

/energy, /three_d_interp;, log=0

thm_part_slice2d_plot, slice

print,nl,'Use the ENERGY keyword to plot the data against energy instead of velocity.'

print, 'Energy plots will use radial log scaling; use "log=0" for linear scaling.',nl

stop

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

;Basic Orientation

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;This will produce a slice along the DSL xz plane.

;See the top of this crib for more options.

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

rotation='xz', /three_d_interp

thm_part_slice2d_plot, slice

print,nl,'This example cuts along the DSL xz plane instead of xy'

print, 'See the documentation at the top of this crib for a full '

print, 'description of the available rotations.',nl

stop

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

;Basic Field Aligned Orientation

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;Field aligned rotations require magnetic field data to be loaded beforehand. thm_load_fgm, probe='b', datatype='fgl', level=2, coord='dsl', trange=trange thm_load_esa, probe='b', datatype='peib_velocity_dsl', trange=trange

;This example aligns the slice plane along the BV plane.

;The MAG_DATA keyword is used to specify a tplot variable containing magnetic field data.

;The VEL_DATA keyword is used to specify a tplot variable containing a bulk velocity vector.

; -bulk velocity is calculated from distribution if tplot variable is not specified

;These vectors will be averaged over the time range of the slice.

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

rotation='BV', mag_data='thb_fgl_dsl', vel_data='thb_peib_velocity_dsl',

/three_d_interp

thm_part_slice2d_plot, slice

print, nl,'This example orients the slice along a plane defined by the magnetic' print, 'field and bulk velocity vectors. Orientations that use the magnetic '

print, 'field will require support data to be loaded first. Bulk velocity can '

print, 'be calculated automatically or loaded separately. See the documentation '

print, 'at the top of this crib for a list of valid inputs to the ROTATION keyword.',nl

stop

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

;Basic Orientation and Coordinates

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;This example combines the COORD and ROTATION keywords.

;The COORD keyword specifies GSM coordinates and the ROTATION keyword specifies ;the slice plane's orientation with respect to those coordinates.

;The 'xvel' rotation aligns the slice's x axis with the (GSM) x axis and the ;slice's y axis is defined by the bulk velocity.

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

coord='gsm', rotation='xvel', /three_d_interp

thm_part_slice2d_plot, slice

print,nl,'This example plots a slice oriented along the GSM x axis and the ' print, 'bulk velocity vector. See the documentation at the top of this crib '

print, 'for a list of valid inputs to the COORD and ROTATION keywords.',nl

stop

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

;Eclipse Corrections

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

;set time range

trange = '2011-11-28/' + ['21:50','22:55']

;Eclipse corrections are loaded when the raw data is loaded.

; use_eclipse_corrections = 0 No corrections are loaded (default).

; = 1 Load partial corrections (not recommended)

; = 2 Load full corrections.

dist_corr = thm_part_dist_array(probe='b',type='peif', trange=trange, $

use_eclipse_corrections=2)

;load data without corrections for comparison

dist_uncorr = thm_part_dist_array(probe='b',type='peif', trange=trange)

;createidential plots from each data set

thm_part_slice2d, dist_corr, slice_time=trange[0], timewin=300,

part_slice=slice_corr

thm_part_slice2d, dist_uncorr, slice_time=trange[0], timewin=300,

part_slice=slice_uncorr

;compare

zrange = [1e-13,1e-7]

thm_part_slice2d_plot, slice_corr, zrange=zrange, window=0, title='Corrected' thm_part_slice2d_plot, slice_uncorr, zrange=zrange, window=1,

title='Uncorrected'

print,nl,'This example demonstrates how to use spin corrections when the ' print, 'spacecraft is in the Earth''s shadow. Corrections are loaded with ' print, 'the raw particle data and applied when plot is generated.',nl

stop

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

;Plotting options (standard)

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;generate slice

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

/three_d_interp

;Set tick numbers, character size, and range keywords.

;Keywords with an axis prefix can be set for all axes.

; (e.g. xticks/yticks/zticks)

thm_part_slice2d_plot, slice, $

charsize = 1.5, $ ;set charcter size to 1.5 times the default

xticks = 6, $ ;set number of major x ticks

yminor = 2, $ ;set number of minor y ticks

zrange = [1e-15,1e-9] ;specify the z axis range

zprecision = 2;specify number of significant digits for

;tick annotations

print,nl,'This example demonstrates the keywords that control some of the print, 'standard annotation options (character size, ticks, ranges, and print, 'numerical annotations)',nl

stop

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

;Plotting options (miscellaneous)

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

; -use /get_sun_direction keyword to load requisite

; data for plotting sun direction vector

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange,

/get_sun)

;load B field data so it can be plotted on slice

thm_load_fgm, probe='b', datatype='fgl', level=2, coord='dsl', trange=trange

;generate slice

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

mag_data='thb_fgl_dsl', /three_d_interp

;Various keywords control other aspects of the plot.

; -/sundir requires that thm_part_dist_array is called with /get_sun_direction ; -/plotbfield requires that mag_data was specified to thm_part_slice2d

; -sun direction and B field vectors are scaled to the size of the plotting ; area, i.e. an in-plane vector will be drawn to the x/y maximum

; while an orthogonal vector will not appear

thm_part_slice2d_plot, slice, $

olines = 0, $ ;do not plot contour lines

plotbulk = 0, $ ;do not plot velocity vector

plotaxes = 0, $ ;do not plot axis zeros

ecircle = 1, $ ;plot instrument's energy limits

sundir = 1, $ ;plot projection of sun direction

plotbfield = 1;plot projection of B field

print,nl,'This example demonstrates the keywords that control some of the print, 'non-standard annotations seen on slice plots (plotting of bulk print, 'velocity, sun direction, energy limits, and contour lines).',nl

stop

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

;Plotting options (exporting)

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

;set time range

trange = '2008-02-26/' + ['04:54','04:55']

;esa ion burst data

dist_arr = thm_part_dist_array(probe='b',type='peib', trange=trange)

;generate slice

thm_part_slice2d, dist_arr, slice_time=trange[0], timewin=30,

part_slice=slice, $

/three_d_interp

;The EXPORT keyword can be used to automatically produce .png or .eps

;images of the plot. Set export='filename' to write a .png file and

;add /EPS to use postscript output.

thm_part_slice2d_plot, slice, export='slice_crib_plot';, /eps

print,nl,'This example demostrates how to automatically export a plot ' print, 'to a png image or postscript file. This should create a '

print, '"slice_crib_plot.png" in your current home directory.',nl

stop

print, 'End of crib.'

end

PDMS-PML基础

PML基础王元 AVEVA中国2005.11.19

如何学习PML编程 T需要具备的基本知识 –熟悉Pdms的基本操作 –了解Pdms的运行机制,模块之间的关系 –Pdms属性的操作 –Pdms命令的操作 –Pml语法(本教程) –通过Pdms菜单查找示范程序 课程将包括... T PML介绍 –PML概念 –PML功能 –PML构成 T PML程序语言 –变量的定义及用法 –循环Do、判断If、跳转Golabel –错误处理 –文件处理 –函数Functions、方法Method –对话框Forms和菜单Menu

课程结束后... T您会具有以下知识… –PML构成及功能 –编写简单的宏 –PML变量的定义及应用 –PML函数/方法的定义及调用 –PML窗体/对象的定义及调用 PML -功能强大的语言 T P rogrammable M acro L anguage可编程宏语言 T PML2基于面向对象(Object Oriented)概念的编程语言T支持用户自定义对象类型(Object Types) T简单易学,与PDMS无缝连接 T丰富的内置函数,方法及对象 T最简单的对话框,菜单编写语言

PML构成 T Macros –Macros是包含PDMS 命令序列的ASCII文件 –Macros 在PDMS 中通过$m /FILENAME来执行 T PML –变量(Variables) –判断语句(if Constrcuct) –循环(Do loops) –错误处理(Error Handling) –文件处理(Files and Directories) T窗体和菜单 –PDMS大多数应用程序都由对话框(Forms)和菜单(Menus)来驱动 一个简单的Macro T宏是包含PDMS 命令序列的一个文本文件 T运行宏 $M /MyFile ASCII 文件 MYFILE NEW EQUIP /FRED NEW BOX XLEN 300 YLEN 400 ZLEN 600 NEW CYL DIA 400 HEI 600 CONN P1 TO P2 OF PREV

2021届高中英语新高考语法基础版一轮复习讲义(30)表语从句知识点整理总结

2021届高中英语新高考语法基础版一轮复习讲义(30) 表语从句知识点整理总结 01 表语从句的概念和引导词 表语从句是指一个句子充当主系表结构中的表语而成的从句。它的构成和其他名词性从句一样。 和宾语从句、主语从句的类似,表语从句的引导词也分为如下三类: a. 陈述句做表语从句,用that引导。如: T h e p ro bl e m i s th a t t h e y do n't f o l l o w m y a d vi ce. 问题在于他们不听我的劝告。 注意:表语从句中的that不可以省略。 b. 一般疑问句做表语从句,一般用whether引导,不用if。如: The key is whether the boss will give us the chance to participate in the project. 关键是老板是是否会让我们参与这个项目。 c. 特殊疑问句做表语从句,用what/who等特殊疑问词引导。如: The problem is when we will receive the fund. 问题在于我们何时能收到这笔资金。 02 常见表语从句的句型

和主语从句类似,表语从句也有一些常见的结构化的句型,具体包括以下几类: a. 名词+is +表语从句。 这些名词有表示事实的truth, fact,表示观点的idea, advice, problem, question, thought, feeling, plan, suggestion等。如:The fact is that he is the best teacher in the entire school. 事实是,他是全校最好的老师。 The question is when the rescue team will arrive here. 问题是救援小组何时能到这里。 当然,名词这里也可以是主语从句。如: What I want to know is who will be elected as the monitor in the new term. 我想知道的是新学期谁会被当选为班长? 注意:当名词是suggestion/order/request等表示主张和建议时,表语从句要用should+do的虚拟语气,其中should可以省略。 b. It/This/That is because/why从句。 如: That is why he was sent to the mental hospital. 这就是他被送往精神病医院的原因。

人教部编版小学英语1到6年级十大基础语法知识总结

人教部编版小学英语1到6年级十大基础语法知识总结 小学英语形容词性物主代词 1、形容词性物主代词8个: My your his her its our your their 我的你的他的她的它的我们的你们的他(她、它)们的 2、形容词性物主代词的特点: 1)译成汉语都有"的" eg:my 我的their 他们的 2)后面加名词:eg:my backpack his name 3)前后不用冠词 a an the This is a my eraser(错误) That is your a pen(错误) It's his the pen(错误) 3、I(物主代词)my you(物主代词)your he (物主代词)her we (物主代词) our 注:在变物主代词时,把原题所给的词加上的,再译成 单词就可以了。 小学英语名词性物主代词 1、名词性物主代词和形容词性物主代词一样有8个: Mine yours his hers its ours yours theirs 我的你的他的她的它的我们的你们的他(她、它)们的 2、名词性物主代词的特点:

1)译成汉语都有"的" 2)后面不加名词 3)名词性物主代词=形容词性物主代词+名词 Eg:1、the pen is mine 钢笔是我的(mine=my pen) 小学英语单数的句子变成复数的句子 把单数的句子成复数的句子很简单:变法是把能变成复 数的词变成复数,但a或an要把去掉。特殊疑问词、形容词、国家及地点通常不变。 Eg:把下列句子变成复数 1, I have a car ----we have cars 2, He is an American boy. ----They are American boys 3, It is a car ----They are cars 4,This is an eraser ----These are erasers 5,That is a backpsck -----Those are backpacks 6,I'm an English teather ------We are English teathers 7,It's a new shirt---- They are new shirts 8,He's a boy ----They are boys 9,She's a singer ------They are singers 10,What'sthis in English?---- What are these in English? 小学英语名词单复数 名词有单数和复数两种形式

法语基础语法总结

I主语人称代词 如同英语中人称代词主格,用作主语。 1)1)1)tu 用作家人、好友间;vous(您)礼貌、尊重。 2)2)2)第三人称也可用作(它,它们) * 抽象名词前,一般用定冠词Je n’aime pas le café. * 名词作表语,表身份、职业、国籍时,可省冠词Je suis étudiant. * 定冠词le les前有介词à, de 时,要缩合au(à + le) , aux (à + les) , du ( de + le ) , des ( de + les )。Nous allons au magasin. III名词 1.1.1.阴阳性人与动物的自然性别或固定用法un étudiant/ une étudiante le frère/ la so e ur une valise mon bureau 某些行业无阴性,但可用于女性un professeur 2.2.2.复数词尾加s 但不发音;un stylo/des stylos, une chaise / des chaises;-s –x –z 单复数相同un cours / des cours;-eau, -au, -eu结尾复数加x 但不发音un tableau / des tableaux;-al结尾复数改为-aux un journal/ des journaux 3.3.3.种类月份、星期、语种在法语中不属于专用名词,词首不用大写décembre, fran?ais IV动词变位 法语按动词变位分为三组: 第一组-er结尾;第二组-ir结尾;第三组-re, -oir, -ir结尾 直陈式现在时(英语中的现在进行时和一般现在时)中,第一组动词变位如下: parler je parle vous parlez tu parles nous parlons il parle ils parlent V一般疑问句 1.陈述句型,语调上升V ous parlez anglais ? 2.主谓倒置,中加- Etes-vous médecins ? 第三人称单数不以t, d结尾时A-t-il un manuel de fran?ais ? 3.疑问词放前Est-ce qu’elle a un manuel de fran?ais ? GRAMMAIRE I主有形容词

中国急性早幼粒细胞白血病诊疗指南(全文版)

中国急性早幼粒细胞白血病诊疗指南(全文版) 急性早幼粒细胞白血病(APL)是一种特殊类型的急性髓系白血病(AML),绝大多数患者具有特异性染色体易位t(15;17)(q22;q12),形成PML-RARα融合基因,其蛋白产物导致细胞分化阻滞和凋亡不足,是APL发生的主要分子机制[1,2]。APL易见于中青年人,平均发病年龄为44岁,APL占同期AML的10%~15%,发病率约0.23/10万[1]。APL 临床表现凶险,起病及诱导治疗过程中容易发生出血和栓塞而引起死亡。近三十年来,由于全反式维甲酸(ATRA)及砷剂的规范化临床应用,APL 已成为基本不用进行造血干细胞移植即可治愈的白血病[3,4]。 一、初诊患者入院评估 1.病史和体检 2.血液检查:血常规、血型,外周血涂片,生化,DIC相关指标检查,输血前有关传染性病原学检查。 3.骨髓检查: (1)细胞形态学和组织化学: 以异常的颗粒增多的早幼粒细胞增生为主,且细胞形态较一致,胞质中有大小不均的颗粒,常见呈柴梱状的Auer小体。FAB分型根据颗粒的大小将APL分为:①M3a(粗颗粒型);②M3b(细颗粒型);③M3c(微颗粒型):较少见,易与其他类型AML混淆。细胞化学:APL的典型特征表现为过氧化酶强阳性、非特异性酯酶强阳性且不被氟化钠抑制、碱性磷酸酶和糖原染色(PAS)呈阴性或弱阳性。

(2)免疫分型: 免疫分型在APL诊断中起到辅助作用。其典型表现:表达CD13、CD33、CD117和MPO,不表达或弱表达CD34、HLA-DR、CD11b、CD14、CD64、CD56。少数表达CD56患者提示预后较差。 (3)细胞遗传学: 典型APL表现为t(15;17)(q22;q12)。变异型APL占2%,如t (11;17)(11q23;q12)、t(5;17)(5q35;q12)、t(11;17)(q13;q21)、der(17)、t(17;17)(q24;q12)、t(4;17)(q12;q21)、t(X;17)(p11;q21)、t(2;17)(q32;q21)、t(3;17)(q26;q21)、t(7;17)(q11;q21)、t(1;17)(q42;q21)等。5%的APL患者核型正常。常规染色体检测有时还可发现除t(15;17)以外的附加染色体异常。 (4)分子生物学: ①PML-RARα融合基因:98%以上的APL患者存在PML-RARα融合基因,另有低于2%的APL患者为其他类型融合基因(见以下变异型APL 诊断标准),检测PML-RARα融合基因是诊断APL的最特异、敏感的方法之一,也是APL治疗方案选择、疗效评价、预后分析和复发预测最可靠的指标。实时定量PCR(RQ-PCR)可在99%的典型APL患者中检出PML-RARα融合基因,但仍有1%的APL患者可出现假阴性。②基因突变:部分APL患者可伴有FLT3-ITD突变。 4.其他检查:心电图,超声心动图(必要时),胸片,腹部B超或CT(必要时)。

初中英语语法基础知识汇总

初中英语语法基础知识汇总(1) 英语语法基础知识词类-名词Noun 名词(Noun.-n.) 第一部分:名词基础知识 定义:人、地、物、事或观念等名称叫做名词。 人:Edison(爱迪生),Helen(海伦),Mr.Wang(王先生) 地:Asia(亚洲),China(中国),New York(纽约) 物:book(书),dog(狗),tree(树),water(水) 事或观念:work(工作),music(音乐),truth(真理) 注: 1.如人名、地名、国名等属于该名称持有者专用的名称,其第一字母必须大写,如E dison,New York,China。 2.名词亦有可数和不可数之分,如果是可数的就有单数和复数的区别。所谓复数就是多于一个的意思,通常是在单数名词的词尾加“-s,es,ies,…”以示其为复数。例如: a book(一本书)two books(两本书) one boy(一个男孩)some boys(一些男孩) one girl(一个女孩)many girls(许多女孩) 名词在句子中的主要功能如下: (1)作句子的主语,例: Miss Lin is our English teacher. (林小姐是我们的英语老师。) (2)作句子的主语补语或宾语补语,例: John and Tom are good friends. (约翰和汤姆是好朋友。—主语补语) I call my puppy “Luck”. (我叫我的小狗“来福”。—宾语补语)

(3)作及物动词的直接宾语,例: Can you ride a bicycle?(你会骑自行车吗?) (4)作介词的宾语,例: You can go by taxi.(你可以乘出租车去。) 第二部分:名词单复数-单数变复数 一、绝大多数的可数名词的复数形式,是在该词末尾加上后辍-s。 读音变化:结尾是清辅音读[s],结尾是浊辅音或元音读[z]。 例:friend→friends; cat→cats; style→styles; sport→sports; piece→pieces 二、凡是以s、z、x、ch、sh结尾的词,在该词末尾加上后辍-es构成复数。 读音变化:统一加读[iz]。 例:bus→buses; quiz→quizzes; fox→foxes; match→matches; flash→flashes 三、以辅音字母+y结尾的名词,将y改变为i,再加-es。 读音变化:加读[z]。 例:candy→candies; daisy→daisies; fairy→fairies; lady→ladies; story→stories 四、以-o结尾的名词,如果不是外来词或缩写,就加-es,否则加-s构成复数。 读音变化:加读[z]。 例:tomato→tomatoes; potato→potatoes; torpedo→torpedoes; bingo→bingoes 反例:silo→silos; piano→pianos(外来词); photo→photos; macro→macros(缩写词)五、以-f或-fe结尾的名词,多为将-f或-fe改变为-ves,但有例外。 读音变化:尾音[f]改读[vz]。 例:knife→knives; life→lives; leaf→leaves; staff→staves; scarf→scarves 反例:roof→roofs 还有一些不规则变化,请参照中学英语频道相关文章。 第三部分:名词所有格 A. 's用在单数名词以及不以s结尾的复数名词之后: a man's jo b 男人的活儿

物联网中的通信语言PML

The Communicating Language in EPCglobal: PML 物联网中的通信语言:PML PML:物体标记语言 摘要:随着RFID 的大规模应用,EPC 物联网也得到了很大的发展。在此物联网络中,相互通信的公共语言是PML。PML是在XML的基础上扩展而来,用于描述自然物体、处理过程及环境情况。本文详细地讲述了PML 语言的概念、组成、设计,并给出了其应用实例。EPC的6个组成部件: EPC编码标准 EPC标签 阅读器 Savant ONS EPC信息服务器(EPCIS,旧称PML服务器) PML设计 现实生活中的产品丰富多样,难以用一个统一的语言来客观的描述每一个物体。然而,自然物体都有着共同的特性,如体积、重量;企业、个人交易时有着时间、空间上的共性。例如,苹果、橙子、统一鲜橙多,它们三者都属于食品饮料,而苹果、橙子同属于农作物,鲜橙多又是橙子加工后的商品;人们交易一箱苹果的时间、地点又是相同的。但是,自然物体的一些相关信息(如生产地、保质期)不会变化。同时,EPC物联网是建立在现有的互联网上的。为此,作为描述物体信息载体的PML 语言,其设计有着独特的要求。 (1)开发技术 PML 首先使用现有的标准(如XML、TCP/IP)来规范语法和数据传输,并利用现有工具来设计编制PML 应用程序。PML 需提供一种简单的规范,通过通用默认的方案,使方案无需进行转换,即能可靠传输和翻译。PML 对所有的数据元素提供单一的表示方法,如有多个对数据类型编码的方法,PML 仅选择其中一种,如日期编码。 (2)数据存储和管理 PML 只是用在信息发送时对信息区分的方法,实际内容可以任意格式存放在服务器(SQL 数据库或数据表)中,即不必一定以PML 格式存储信息。企业应用程序将以现有的格式和程序来维护数据,如Aaplet 可以从互联网上通过ONS来选取必需的数据,为便于传输,数据将按照PML 规范重新进行格式化。这个过程与DHTML 相似,也是按照用户的输入将一个HTML 页面重新格式。此外,一个PML“文件”可能是多个不同来源的文件和传送过程的集合,因为物理环境所固有的分布式特点,使得PML“文件”可以在实际中从不同位置整合多个PML片断。 (3 )设计策略 现将PML 分为PML Core(PML 核)与PML Extension(PML扩展)两个主要部分进行研究,如图3 所示。

abap基本语法汇总(汇编)

一数据类型和对象 在ABAP中,可以使用与标准数据声明相似的语法处理数据类型,而与数据对象无关。 在程序中必须声明要使用的全部数据对象。声明过程中,必须给数据对象分配属性,其中最重要的属性就是数据类型。 1.1 基本数据类型 对算术运算的非整型结果(如分数)进行四舍五入,而不是截断。 类型 P 数据允许在小数点后有数字。有效大小可以是从 1 到 16 字节的任何值。将两个十进制数字压缩到一个字节,而最后一个字节包含一个数字和符号。在小数点后最多允许14 个数字。 1.2 系统定义的数据对象

1.3 确定数据对象的属性 如果要查明数据对象的数据类型,或者要在程序的运行期间使用其属性,可使用DESCRIBE 语句。语法如下: DESCRIBE FIELD [LENGTH ] [TYPE [COMPONENTS ]] [OUTPUT-LENGTH ] [DECIMALS ] [EDIT MASK ]. 将由语句的参数指定的数据对象的属性写入参数后的变量。 DESCRIBE FIELDS 语句具有下列参数: 1.3.1 确定字段长度 要确定数据对象的长度,利用DESCRIBE FIELD 语句使用 LENGTH 参数,如下所示:DESCRIBE FIELD LENGTH . 系统读取字段的长度,并将值写入字段。 1.3.2确定数据类型 要确定字段的数据类型,利用DESCRIBE FIELD 语句使用 TYPE 参数,如下所示:DESCRIBE FIELD TYPE [COMPONENTS ]. 系统读取字段的数据类型,然后将值写入字段。 除返回预定义数据类型 C、D、F、I、N、P、T 和 X 外,该语句还返回 2 s 对于带前导符号的两字节整型 2 b 对于无前导符号的一字节整型 2 h 对于内表 2 C 对于组件中没有嵌套结构的结构 2 C 对于组件中至少有一个嵌套结构的结构 1.3.3确定输出长度 要确定字段的输出长度,利用 DESCRIBE FIELD 语句使用 OUTPUT-LENGTH 参数,如下

法语常用句型讲解 法语基础语法知识汇总

法语常用句型讲解法语基础语法知识汇总 、问时间 Quelle heure est-il? Est-ce que tu as l’huere? As-tu l’heure? 2、无人称句型 Il y a …,加上名词后即成为“有…” 3、询问他人姓名 C omment t’appelles-tu? Comment vous appelez-vous? Comment s’appelle-t-il? 4、询问有多少东西 Combine de +名词+ y a-t-il +状语 5、询问日期 今天几号:Quelle date sommes-nous aujourd’hui? 今天星期几:Quel jour sommes-nous aujourd’hui? 今年是哪年:quelle année sommes-nous? 6、表达日期 规定日期说法是用“nous sommes”,加上定冠词“le”,再加上数字 星期几也用“nous sommes”,直接加上Lundi、Mardi等就可以 表达年份时,用介词en,如:nous sommes en mille neuf cent quatre-vingt-dix. 从几点到几点:de … à … 7、面积大小 Quelle surface fait la chamber? Quelle surface mesure la chamber? La chamber fait (mesure) quatre mètres sur trios.这个房子的面积是四米长,三米宽。 8、询问天气 Quel temps fait-il chez toi en ce moment?

英语基础语法重点知识总结

英语基础语法知识 第一节 词类和句子成分 一、词类 能够自由运用的最小语言单位叫词。根据词的形式、意义及其在句中的作用所作的分类叫 词类( parts of speech )。 英语的词通常分为十大类,即名词、冠词、代词、数词、形容词、副词、动词、介词、连 词和感叹词。现分别叙述如下: (一)名词 名词(n ou n)是表示人、事物、地点或抽象概念的名称。例如: foreig ner 外国 人 soap 肥皂 Newt on 牛顿 law 法律 freedom 自由 peace 和平 英语名词可分为 两大类: 1。普通名词(common noun)是某一类人、事物、某种物质或抽象概念的名称。例 女口: teacher 教师 market 市场 rice 大米 magaz ine 杂志 sound 声音 producti on 生产 2。专有名词(proper noun)是特定的某人、地方或机构的名称。专有名词的第一个字母必 须 大写。例如: Hemingway 海明威 Russia 俄罗斯 New York 纽约 United Nations 联合国 名词又可分为可数名词(countable noun 与不可数名词(uncountable noun 两种。可数名词有 单、复数之分。绝大多数名词的复数形式的构成是在单数名词的后面加 -s 或-es 。 例如: shop — shops 商店 bus — buses 公共汽车 library — librarie 图书馆 toy — toys 玩 具leaf — leaes 树叶英语中有一些名词的复数形式是不规则的。例如: mar — men 男 人tooth — teeth 牙齿datum — data 数据有关名词复数形式构成的具体规则,请参阅有关 的英语语法书。 (二)冠词 冠词(article)放在名词之前,帮助说明该名词所指的对象。冠词分为不定冠词 (indefinite article)和定冠词(definite article)两种。 不定冠词为a/an,用在单数名词之前,表示某一类人或事物的 一个” a 用在以辅音开头 的名词之前,an 用在以元音开头的名词之前。例如: a hotel 一家旅 馆 a cha nee —次机会 a double room 一个双人间 a useful book 一本有用的 书 an exhibiti on —次展览 an hon est man 一 个诚实的人 冠词只有一个,既the ,表示某一类人或事物中特定的一个或一些。可用于单数或复数名 词前,也可用于不可数名词前。例如: the TV programs 那些电视节目 the house 那座房子 the Olympic Games 奥运会 (三) 代词 代词(pro noun)是用来指代人或事物的词。代词包括: I, you, they, it 等; my, his, their, our, mine, hers 等; myself, yourself, itself, ourselves, on eself 等; each other, one ano the 等; this, that, these, those, such, sam 等 ; who, whom, whose, which, what 等; who, whom, whose, which, that 等; some, any, no, all, one, every, many, a little, some one, any thin 等 ; 四)数词 数词(numeral)是表示 数量”和 顺序”的词。前者称为基数词,例如:one 一),twenty ( 十),thirty-five(三十五),one hundred and ninety-five 一百九十五)等;后者称为序数词,例 1。 人称代词,如 2。 物主代词,如 3。 反身代词,如 4。 相互代词,如 5。 指示代词,如 6。 疑问代词,如 7。 关系代词,如 8。 不定代词,如

pml基础手册与总结

PML开发介绍与总结 1 pml语言简介 (2) 1.1 pml变量 (2) 1.2 变量类型 (2) 1.3 自定义变量类型 (3) 1.4 定义变量 (3) 1.5 函数(Function)和方法(Method) (4) 1.6 使用ANY类型的变量作为函数参数 (5) 1.7 变量的方法 (6) 1.8 自定义变量类型的方法 (7) 1.9 方法的重载 (8) 1.10 Unset和Undefined (9) 1.11 删除变量 (10) 2 Pml的一些特点 (10) 3 Pml表达式 (11) 4 pml流程控制 (11) 4.1选择结构 (12) 4.2 do循环 (13) 4.3 GoLabel跳转语句 (14) 5 pml数组 (15) 5.1 定义数组 (15) 5.2 数组的赋值 (15) 5.3 多维数组 (15) 5.4 数组的方法 (16) 5.5 利用数组进行字符串处理 (17) 5.6 数组排序 (18) 5.7 Do values循环和Do indices循环访问数组变量 (19) 6 pml宏文件概念及其运行 (19) 6.1 概念 (19) 6.2 带参数的宏文件 (20)

语言简介介 1pml语言简 pml是用于pdms二次开发的面向对象的编程语言,它的面向对象属性是与其他脚本语言的最大区别,也是现代高级语言的基本特征。pml提供了编辑窗体和菜单的功能,且语法简单方便,使得pml能实现高级语言的大部分功能,用户可以开发自己的菜单窗体,完成需求定制。 pml提供了大量的变量类型(object type)及与变量类型相对应的方法(method)。pml 提供的方法实用,具有针对性。比如数组(Array object)可以存放不同的数据类型,可以进行排序、清空没有赋值的元素、查找、删除等等方法,这是大多数高级语言没有提供的功能。 1.1pml变量 对于pml语言,每个变量即是一个object,对应一个变量类型object type。不同类型的变量只能保存对应类型的数据。pml变量的特点: 变量名称唯一,且不能重复。 每个object type即是一个类(class),有属于类的通用的方法和属性。因此每个pml 的变量(object)都可以调用所属类的方法。 每个变量对应一个变量类型,在定义变量前,对应的变量类型必须存在。 1.2变量类型 Pml的变量类型比较多,可以分为三类,built-in、system-defined、user-defined。 Built-in变量类型包括以下几种: 字符串 实数 布尔 数组 system-defined变量类型包括Direction,Position,Orientation等多种类型,详细信息可以参考手册。 user-defined变量类型是指用户自定义的类型。

pml基础语法简明教程

第一部分: 基础知识 PML基本概念 Programmable Macro Language 可编程宏语言. 通常的PML开发包括两部分, 一部分是PML宏,脚本语言; 另一部分是PML2,面向对象的编程语言. 1.PML宏(Macro) 宏, 就是一系列pml命令的集合. 通过$m执行. 格式为: $m filename [param1 param2 ….] (举例) 其中param1为参数, 宏可以参数化. (举例) 2.面向对象的PML2 PML支持对象(Object),对话框(Form)和菜单(Menu). (举例) 一.变量,函数和方法 1. 变量的定义及用法 在PML2中, 每一个变量都是对象. 变量名以!或者!!开头,例如!weight. !开头的变量为局部变量, !!开头的为全局变量. PML内置了常用的变量类型. (1)Real 实属类型. 提供基本的四则运算操作. 例如 !a = 10 !b = 10 !a = !a + !b $p $!a --输出变量a的值 (2)String 字符串类型. 例如 !strName = ‘/EQUI-TEST-1’ (3)Boolean 用于逻辑表达式. 值只能是true/false (4)Array 数组 (5)Position (6)Direction 3.变量的创建, 删除, 查看 变量可以用赋值来创建. 例如 !str = ‘abc’ 也可以用类型标识来创建. !str= string() !str= ‘abc’ 删除: !str.delete() 查看:通常使用q var!str也可以用$p $!str 4.方法(method) 和函数(Function) Method是一个对象的子程序. 只有当对象存在,才可以调用对象的方法. 例如

初中英语必知最基础语法总结

初中英语必知最基础语法总结 一、词类 1、名词:主要指各种人或事物的名称,也可以指抽象的概念。例如:bag,hero 2、代词:可以代替名词及其名词作用的短语、不定式、动词的-ing 形式、从句或句子。如: I,we,you,that 3、数词:表示数目多少或顺序先后的词。One,ten,first 4、冠词:a,an,the 用来说明名词所表示的人或事物,这三个词常位于名词前。 5、介词:是一种“媒介”,表示句中某一词或短语与另一个词或短语的关系的词。如in,at, for,behind 6、形容词:描述事物特征的词,描述事物的大小、形状、颜色、等具体特征,也可用来陈述 事物的状态。主要修饰名词、代词。如big,good, 7、副词:副词是一种用来修饰动词,形容词,副词或全句的词,说明时间,地点,程度,方式等概 念。副词可以分成七类: 1) 时间和频度副词: now,then,often,always,usually,early,today, lately, 2) 地点副词: here, there, everywhere, anywhere, in, out, inside, outside, above, below, 3) 方式副词: carefully, properly, anxiously, suddenly, normally, fast, well, calmly, 4) 程度副词: much,little, very,rather,so,too,still, quite, perfectly, enough, extremely, 5) 疑问副词: how, when, where, why. 6) 关系副词: when, where, why. 7) 连接副词: how, when, where, why, whether. 8、连词:连接单词、短语、从句或句子的一种虚词,在句子中不单独做任何成分,大多数连 词具有实义。如and,or,if,because 9、感叹词:用来表示人们的各种情感或情绪的词,在句中不做任何成分。如ah,oh 10、动词:用来表示动作或状态的,在句子中作谓语,是句子不可缺少的部分,用来说明 主语是什么或者做什么。如is,do,like,can 二、

PDMS 12.0 编程基础ABC

下面是PDMS编程介绍 一个简单的Macro NEW EQUIP /FRED NEW BOX XLEN 300 YLEN 400 ZLEN 600 NEW CYL DIA 400 HEI 600 CONN P1 TO P2 OF PREV 参数化宏Parameterized Macro NEW EQUIP /$1 NEW BOX XLEN $2 YLEN $3 ZLEN $4 NEW CYL DIA $3 HEI $4 CONN P1 TO P2 OF PREV 变量给属性赋值 New Pipe Desc 'My Description' Temp 100 Pspec /A3B Purp PIPI !desc = desc !temp = temp !pspec = pspec !purp = purp New Pipe Desc '$!desc' Temp $!temp !pspec $!pspec !purp $!purp 字符串方法实例 !line = 'hello how are you' !newline = !line.after('hello').trim().upcase()

q var !newline !newline = !newline.replace('how', 'where').replace('you', 'you?') 定义函数 define function !!Area( !Length is REAL, !Width is REAL ) is REAL !Area = !Length * !Width return !Area $*函数!!Area有两个参数一个返回值Endfunction 练习-新建函数计算园的面积,测试函数 define function !!circleArea( !radius is REAL) is REAL !Area = PI * pow(!radius,2) return !Area Endfunction 条件判断语句(If Construct) !Type = Type !OwnType = Type of Owner IF (!Type eq 'BRAN') THEN $P CE is Branch. ELSEIF (!OwnType eq 'BRAN') THEN $P CE is Branch member. ELSE $P CE is $!Type,Pls select Branch. ENDIF 练习-条件判断 !n = 0 !type = type if(!type eq 'BRAN') then !href = href !tref = tref if(!href.set()) then !n = !n + 1 add href endif if(!tref.set()) then !n = !n + 1 add tref

初中英语语法基础知识总结

初中英语语法基础知识总结 一、名词 1.可数名词 可数名词是指能计数事物名称的词,包括个体名词和集体名词,有单、复数形式。复数名词构成法如下: 以s,x,ch,sh结尾的名词加-es(除stomach)。 以辅音字母加y结尾的名词,要变y为-ies。但以元音字母加y结尾时直接加-s。以f或fe结尾的名词须直接加-s的,如:beliefs,proofs。变f或fe为-ves的,如:knives,leaves,wives,lives,thieves.wolves,shelves,。注意handkerchief的复数可直接加-s。也可变f为-ves。 以o结尾直接加-s,如:zoos,pianos,kilos,photos,autos,radios。加-es,如:Negroes,heroes,potatoes。 复数不规则的名词,如:man—men,woman—women,foot—feet,goose—geese,ox—oxen,child—children,tooth—teeth等。 单复数形式一样的名词,如:Chinese,Japanese,sheep,deer,means,works等。 2.不可数名词 不可数名词一般没有单复数之分,它包括物质名词、抽象名词和专有名词。以-ics结尾的表示学科名称的名词一般用做单数。 某些以-s结尾的表示单一事物的专有名词常用做单数。 3.名词的所有格

(1) “’s”所有格。一般名词后加“’s”。如:Tom’s brother’s bag。 以-s或-es结尾的复数名词,在名词右上方加“’”。如:the workers’ organization。以-s结尾的专有名词所有格,若以读音[Z]结尾,一般可在名词右上方加“’”,也可加“’s”。如:Dickens’/Dickens’s cup。 如果一样东西为两个人共有,则只有后一个名词加“’s”;如果不是共有的,两个名词后都要加“’s”。如:Tom and Mary’s room (共有);Mary’s and Tom’s cups(不共有)。 (2) 表示无生命东西的名词,通常采用of+名词的结构来表示所有关系,总的来讲of所有格是’s所有格的一种替换形式。如:the class—room of the school。 (3) 表示时间、距离、国家、城市、团体、机构等无生命东西的名词,也可以加“’s”来构成所有格。如:t oday’s newspaper。 一、基本型 写出下列名词的复数形式: 1. pencil-box ___________ 2. wife _______ 3. Sunday________ 4. city______ 5. dress _______ 6. Englishman ________ 7. match _______ 8. Chinese ________9. zoo ________ 10. exam________ 11. German __________ 12. I have a lot of ________(作业) to do every day. 13. His _______(裤子) are new, but mine are old.

pymol基本教学教程

简介&安装 Pymol是一个开放源码,由使用者赞助的分子三维结构显示软件,由Warren Lyford DeLano编写,并且由DeLano Scientific LLC负责商业发行。Pymol被用来创作高品质的分子(特别是生物大分子如蛋白质)三维结构。据软件作者宣称,在所有正式发表的科学论文中的蛋白质结构图像中,有四分之一是使用Pymol来制作的。 Pymol名字的来源:“Py”表示该软件基于python这个计算机语言,“Mol”则是英文分子(molucule)的缩写,表示该软件用来显示分子结构。 由于实验需要,本人正在学习该软件,在这里把学习过程记录下来,希望对有需要的朋友有所帮助。今天先来说说安装吧。 自2006年8月1日起,DeLano Scientific 对事先编译好的PyMOL执行程序(包括beta版)采取限定下载的措施。目前,只有付费用户可以取得。不过源代码目前还是可以免费下载,供使用者编译。如果你和我一样,不想为此花钱的话: 1.如果你是Windows用户,首先下载Pymol的源代码。 然后安装CygWin,并且确保正确安装以下模块: ?C++ (gcc or g++ package name) ?Python ?OpenGL ?PNG 然后在源代码目录里面依次运行:

2.如果你是Linux用户,首先确保以下东东已安装: ?Python ?Pmw ?OpenGL driver(我用的是NVdia) ?libpng ?Subversion client(下载源代码需要) 然后下载Pymol的源代码 $ mkdir pymol-src $ svn co https://https://www.doczj.com/doc/518202423.html,/svnroot/pymol/trunk/pymol pymol-src 然后进入源代码目录 # cd pymol-src 开始依次编译 # python setup.py install # python setup2.py install 拷贝执行脚本到某个$PATH,安装就搞定了 # cp ./pymol /usr/bin

英语基本语法总结

英语基本语法总结 英语动词的时态 (一)英汉两种语言在时态表达方式上的差异: 英语的词类与汉语的不同。汉语词类形态稳定,比如“书”这个字,“一本书”、“三本书”都一样,没有词形变化。英语就不同了,book, books仅从词形上就能知道是单数还是复数。 动词是英语中变化最多、最复杂的词类。有人说,学好英语就是学好动词,此言甚是。同一个动作或状态分别在不同时间发生或存在,表达这个动作或状态的动词就要用不同的形式,这就是时态。 例如:在“中国是个伟大的国家。”和“中国曾经是世界上最伟大的国家。”这两句话当中,汉语的“是”没有变化,而是用“曾经”这个词来表达时间的不同。 China is a great country.中国是个伟大的国家。 China was the greatest country in the world.中国曾经是世界上最伟大的国家。 在这几句中,动词be的形态变了,表示的时间变了,但意义没有变化。 再如,“他经常帮助我。”“他昨天帮助我了。”和“他一直在帮助我。”这三句话当中,汉语的“帮助”没有任何变化,而是用“经常”、“一直”和“昨天”分别表达出时间的区别。英语就不同,它必须用动词本身的形态变化来完成任务。 He often helps me.他经常帮助我。 He helped me yesterday.他昨天帮助我了。 He has been helping me.他一直在帮助我。 在这几句中,动词help的形态变了,表示的时间变了,但意义没有变化。 (二)英语动词的形式: 英语的时态是通过动词的变化来体现的。因此,了解动词的形式及其变化规律非常重要。英语的实义动词有以下五种形式:(1) 动词原形:动词原形在句子中形式不变。主要用于主语为非第三人称单数的一般现在时,情态动词之后,或根据语法规定必须用动词原形的其他情况。 (2) 一般现在时第三人称单数形式(简称现单三):主要用于主语为第三人称单数的一般现在时。 (3) 过去式:主要用于一般过去时。 (4) 现在分词:主要用于进行时态,或语法规定的其他情况。 (5) 过去分词:主要用于完成时态,或语法规定的其他情况。 这里提到的“语法规定的其他情况”我们在以后的讲座中会详细介绍。 下面把这些动词形式的构成说明一下。 动词一般现在时第三人称单数(现单三)的构成,见下表: 词尾变化(规律与名词变复数相同,读音也与名词复数相同)举例 一般加-s Help---helps; read---reads 在ch, sh, s, x 或元音字母o后面加-es Do, fix, pass, push, teach ---does, fixes, passes, pushes, teaches 以辅音字母加y结尾的词,变y为i再加-es Try, study --- tries, studies

相关主题
文本预览
相关文档 最新文档