idl_教程(编辑修改稿)内容摘要:
tore the variables saved in the file “” you would execute the mand: IDL RESTORE, ‟‟ A save file can be used to store your data in a form that is ready to be used by IDL, transfer data across platforms in a platform independent manner, and hide the source code of userwritten routines. Working in IDL In an IDL session, data (. numbers and strings) is stored in what‟s known as variables. There are 3 basic types of IDL variables: IDL Short Course (version ) Research Systems, Inc. – A Kodak Company IDL is a registered trademark of Research Systems, Inc. Page 7 of 37 Scalar (a single value) Array (from 1 to 8 dimensions。 a Vector is an array with only 1 dimension) Structure (an aggregate of various data types and other variables) Any given variable in IDL also has a specific data type. There are 12 basic atomic data types (seven different types of integers, two floatingpoint types, two plex types, and a string). These data types are delineated in Figure 2. The data type assigned to a variable is determined either by the syntax used when creating the variable, or as a result of some operation that changes the type of the variable. Figure 2: IDL data types Variables do not have to be declared in IDL. The type of a variable can be determined by its usage. If a variable is set equal to the sum of two integers, the variable will end up being an integer. For example, start by declaring a scalar variable named “a” and set it equal to a 16bit signed INTEGER value of (2): IDL a = 2 Next, declare a second scalar variable called “b” and set it equal to (5): IDL b = 5 You can now perform an arithmetic operation on these two variables and store the result in a new variable called “c” without having to first declare “c”: IDL c = a + b Since both variables “a” and “b” are of type INTEGER, so is the resulting variable “c”: IDL help, a, b, c A INT = 2 B INT = 5 C INT = 7 The IDL language is dynamically typed. This means that an operation on a variable can change not only its value but also that variable39。 s data type. In general, IDL Short Course (version ) Research Systems, Inc. – A Kodak Company IDL is a registered trademark of Research Systems, Inc. Page 8 of 37 when variables of different types are bined in an expression, the result has the data type that yields the highest precision. For instance, go back and redefine the variable “b” as a 32bit FLOATINGPOINT value of (5) and perform the same arithmetic operation again: IDL b = IDL c = a + b Even though the varialbes “a” and “b” have different data types, IDL will still allow operations on these variables together in the same statement: IDL help, a, b, c A INT = 2 B FLOAT = C FLOAT = You will notice that the resulting variable “c” now takes on the data type of the highest precision for the variables that were used in the operation to create “c”, which in this case is FLOATINGPOINT (variable “b”). You can also convert the data type of variables by using any of the type conversion routines listed in Figure 2 under the “Convert To” column. For example, to convert the variable “c” back to INTEGER you would use the FIX function: IDL c = FIX (c) IDL help, c C INT = 7 However, dynamic typing can also lead to problems if you are not careful. For instance, the precision of arithmetic operations is dictated by the variable‟s data type. For example, if you define a variable “d” and set it to an INTEGER value of (5), the following division is performed with “integer precision” because both “a” and “d” are of type INTEGER: IDL d=5 IDL help, a, b, c, d A INT = 2 B FLOAT = C FLOAT = D INT = 5 IDL print, d / a 2 In order to perform floating division, at least one of the variables has to have a data type of FLOATINGPOINT: IDL print, b / a IDL is also an arrayoriented language, which means that operations occur on entire arrays at once without the need for loops. For example, declare a variable called “array” as a subscript value array of type INTEGER with 2 dimensions of size 5 columns and 5 rows: IDL array = INDGEN (5,5) IDL Short Course (version ) Research Systems, Inc. – A Kodak Company IDL is a registered trademark of Research Systems, Inc. Page 9 of 37 IDL help, array ARRAY INT = Array[5, 5] IDL print, array 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 This creates a 2dimensional array where each element is set to the value of its onedimensional subscript. IDL is a rowmajor language, which means that arrays are internally indexed in memory according to row in order of the subscript values illustrated in this array. You can also manually define arrays (and vectors) manually using the [ ] operators, which are used for array concatenation: IDL vector = [0,1,2,3,4] IDL array = [ [0,1,2,3,4],[5,6,7,8,9],[10,11,12,13,14],[15,16,17,18,19], [20,21,22,23,24] ] IDL help, vector, array VECTOR INT = Array[5] ARRAY INT = Array[5, 5] In order to add the scalar value contained in the variable “d” to each element of this array, only one statement needs to be executed: IDL array = array + d IDL print, array 5 6 7 8 9 10 11 12 13 14 15。idl_教程(编辑修改稿)
相关推荐
{ //throw new Exception(This virtual directory is not exists)。 } return tmp。 } /// summary /// 更新一个虚拟目录 /// /summary /// param name=dir/param public void Update(VirtualDirectory dir) {
适用,并增加下列要求 The anization shall plan and develop the processes needed for HSF product realization. 组织应规划并发展实现 HSF 产品所需的流程。 In planning HSF product realization, the anization shall determine the
面、集成电路 半导体厂家将大的硅片切成小块,一个六英尺直径的硅片可以造出一千多个芯片。 对小硅片进行光刻以产生必要的电路,并将她封装在黑色的集成电路模块中。 将集成电路的输入输出端连结到大的接触面上,便于今后读写器的操作。 最后,把造好的模块嵌入到卡上。 我国 IC 卡工程的由来 93 年 6 月国务院启动了以发展我国电子货币应用为重点的各类卡基应用系统工程 ——金卡工程。
因本实验室 使用 天平,相对于样品的称样量 177。 ,对 标准不确定度分量 为( ) / 3 =%, ; ICP 仪引起的不确定度 分量 我们 使用的 ICP 仪为岛津 7510 型,标准 不确定度 为 % K=3;故 ICP 仪引起的不确定度分量 为 %% ; 则 B 类原因引起不确定度分量 %. 46 7%0. 11 5%0. 46 2%%. 51 0%U ( x3 ) 22222
一个功能强大的 STL 库。 STL 的一个重大成就在于,它提供了相当多的有用算法。 它是在一个有效的框架中完成这些算法的。 STL 提供了大约 100 个实现算法的模板函数。 熟悉了STL 之后,你就会发现:以前所写的许多 “有趣功能 ”的代码现在只需要用短短几行主能完全替换了。 “The Art of Computer Programming”书中强调 算法 + 数据结构 = 程序 在过去
曲线的端点在曲面的边界上,所以在选择曲面保留区域时比前者有更多的选择。 5 在实际运用中多用在导角后修剪 母曲面及利用两曲面的交线来修剪曲面以及在产品模型创建完毕时用来修剪边界,这些会在实战演练中讲到。 以下是其对话框的详细介绍: 进入 FACE命令后,会出现如上图所示的对话框,从其上部的SELECTION 对话框可知允许对曲面进行 FACE 处理的几何体有如下几种 : EDGE——