博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
IDL Save a Procedure that Restores Variable Data
阅读量:2441 次
发布时间:2019-05-10

本文共 2712 字,大约阅读时间需要 9 分钟。

  1. Create the program file. Create the following IDL program that first restores the image variable contained within the imagefile.sav file. This variable is used in the following program statements defining the size of the window and in the TV routine which displays the image. The ARROW routine then draws an arrow within the window. Enter the following lines in a text editor.

    draw_arrow
     
    ; Restore image data.
    , 'imagefile.sav'
     
    ; Get the dimensions of the image file.
    s = (image, /DIMENSIONS)
     
    ; Prepare display device and display image.
    , DECOMPOSED = 0
    , 0, XSIZE=s[0], YSIZE=s[1], TITLE="Point of Interest"
    , image
     
    ; Draw the arrow.
    , 40, 20, 165, 115
     
    ; The IDL Virtual Manchine exits IDL when the end of a
    ; program is reached if there are not internal events. The
    ; WAIT statement here allows the user to view the .sav file
    ; results for 10 seconds when executed through the IDL
    ; Virtual Machine.
    , 10
     
     
  2. Save the file. Name the saved file draw_arrow.pro.
  3. Reset the IDL session. Enter the following at the IDL prompt to ensure that no unwanted session information is saved along with the program:

    .FULL_RESET_SESSION
  4. Compile the program. Enter the following at the IDL prompt:

    .COMPILE draw_arrow
  5. Resolve dependencies. Use  (or  if the routine has any dependencies on iTools components) to iteratively compile any uncompiled user-written or library procedures or functions that are called in any already-compiled procedure or function:

     

    Note: RESOLVE_ALL does not resolve procedures or functions that are called via quoted strings such as CALL_PROCEDURE, CALL_FUNCTION, or EXECUTE, or in keywords that can contain procedure names such as TICKFORMAT or EVENT_PRO. You must manually compile these routines.

  6. Create the SAVE file. Create a file called draw_arrow.sav that contains the user-defined draw_arrow procedure. When the procedure is called with the ROUTINES keyword and no arguments, it create a SAVE file containing all currently compiled routines. Because the procedures within the draw_arrow procedure are the only routines that are currently compiled in the IDL session, create the SAVE file as follows:

    , /ROUTINES, FILENAME='draw_arrow.sav'

    Note: When the name of the SAVE file uses the .sav extension and has the same base name as the main level program, it can be automatically compiled by IDL. This means that it can be called from another routine or restored from the IDL command line using only the name of the saved routine.

  7. Test the SAVE file in the IDL Virtual Machine. Click on the splash screen and open draw_arrow.sav. You could also test the SAVE file from IDL, enter the following at the command prompt.

    , 'draw_arrow.sav'
    draw_arrow
       8. In command mode
         
idl -vm='draw_arrow.sav'

转载地址:http://vpiqb.baihongyu.com/

你可能感兴趣的文章
数据科学 python_Python如何帮助数据科学专业人员
查看>>
pcb布局设计_PCB设计布局的重要提示
查看>>
软件敏捷开发_避免开发敏捷软件的错误
查看>>
每个设计专业学生都需要知道的8件事
查看>>
微软云 az-100_新的Microsoft AZ-900考试:参加理由–为什么要准备考试
查看>>
企业为什么需要it服务?_为什么要考虑为您的企业提供IT支持服务?
查看>>
Django博客教程–创建一个简单的博客
查看>>
操作系统的主要类型_操作系统类型
查看>>
编程和编码的区别_安全编程和编码提示
查看>>
实用的小应用_使您的新应用更安全的实用提示
查看>>
小学生c语言编程入门教程_学生编程语言
查看>>
linux ops_使用OPS在现有Linux应用程序中运行Unikernels
查看>>
icloud unlock_iCloud Unlock 2019的7大替代解决方案
查看>>
os和操作系统_操作系统(OS)中的抛出
查看>>
android mvp示例_Android深层链接示例
查看>>
Android RSS阅读器教程
查看>>
SkySilk –托管云服务提供商
查看>>
什么是虚拟主机? 为什么我需要它?
查看>>
django安装 mac_如何在Windows / Linux / Mac上安装Django
查看>>
kettle 逐行读取文件_C程序逐行读取文件
查看>>