1 Winter Quarter 2003Rolando V. Raqueño FINAL Project Information Two Design Review presentations (10- 15 minutes long) A Final Document of your Project.

Slides:



Advertisements
Similar presentations
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and.
Advertisements

Character and String definitions, algorithms, library functions Characters and Strings.
Elementary Data Types Prof. Alamdeep Singh. Scalar Data Types Scalar data types represent a single object, i.e. only one value can be derived. In general,
Rolando V. RaqueñoTuesday, May 12, FINAL Project Information Two Design Review presentations ( minutes long) A Final Document of your Project.
Introduction to IDL Lecture 2. ITT: solutions for data visualization and image analysis   IDL, programming.
Types and Variables. Computer Programming 2 C++ in one page!
Data Representation Computer Organization &
Data Representation COE 205
COMP3221: Microprocessors and Embedded Systems--Lecture 4 1 COMP3221: Microprocessors and Embedded Systems Lecture 4: Number Systems (II)
8 November Forms and JavaScript. Types of Inputs Radio Buttons (select one of a list) Checkbox (select as many as wanted) Text inputs (user types text)
Introduction to C Programming Overview of C Hello World program Unix environment C programming basics.
Rolando V. RaqueñoSaturday, June 27, Quiz #6 Topics cut paste sort tail head.
COMP3221 lec07-numbers-III.1 Saeid Nooshabadi COMP 3221 Microprocessors and Embedded Systems Lecture 7: Number Systems - III
1 Introduction Chapter 1 n What is Assembly Language? n Data Representation.
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
Homework Reading –Finish K&R Chapter 1 (if not done yet) –Start K&R Chapter 2 for next time. Programming Assignments –DON’T USE and string library functions,
Beyond Record Structures Dr. Robert J. Hammell Assistant Professor Towson University Computer and Information Sciences Department 8000 York Road - Suite.
Homework Reading Programming Assignments
IDL Tutorials: Day 1 Michael Hahn
Computers Organization & Assembly Language
C Programming Lecture 3. The Three Stages of Compiling a Program b The preprocessor is invoked The source code is modified b The compiler itself is invoked.
Assembly Language for x86 Processors 7th Edition
Instruction Set Architecture
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 1. Data Representation Data Representation – Why do we use binary? simplicity,
Shawlands Academy Higher Computing Data Representation.
1 Introduction Chapter 1 n What is Assembly Language? n Data Representation.
Copyright © 2002 W. A. Tucker1 Chapter 7 Lecture Notes Bill Tucker Austin Community College COSC 1315.
C programming for Engineers Lcc compiler – a free C compiler available on the web. Some instructions.
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
C Tokens Identifiers Keywords Constants Operators Special symbols.
Why does it matter how data is stored on a computer? Example: Perform each of the following calculations in your head. a = 4/3 b = a – 1 c = 3*b e = 1.
VCE IT Theory Slideshows By Mark Kelly vceit.com Data Types 1 a.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
Data TypestMyn1 Data Types The type of a variable is not set by the programmer; rather, it is decided at runtime by PHP depending on the context in which.
IDL Tutorial Day 1 Goals: 1) Introduce IDL basics 2) Describe fundamental IDL structures Angela Des Jardins
Quiz # 1 Chapters 1,2, & 3.
Introduction to IDL Lecture 2. ITT: solutions for data visualization and image analysis   IDL, programming.
Data Representation, Number Systems and Base Conversions
Object-Oriented Programming •Object-Oriented Programming (OOP) allows you to create your program based upon modeling objects.  Your program’s properties.
1 Winter Quarter 2003Rolando V. Raqueño FINAL Project Information One Design Review presentations (10 minutes long) A Final Document of your Project Wiki.
Info stored in computer (memory) Numbers All in binaray – can be converted to octal, hex Characters ASCII – 1-byte/char Unicode – 2-byte/char Unicode-table.com/en.
Rolando V. RaqueñoSunday, December 20, Mystery Images.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Types Chapter 2. C++ An Introduction to Computing, 3rd ed. 2 Objectives Observe types provided by C++ Literals of these types Explain syntax rules for.
Processing Data. Representing Numbers  Recap on Binary Numbers  Binary digit (1 or 0) – known as a ‘bit’, short for BInary digiT – bits generally grouped.
IDL Tutorials Day 1 Henry (Trae) Winter Room 235
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
PERL SCRIPTING. COMPUTER BASICS CPU, RAM, Hard drive CPU can only use data in the register directly CPU RAM HARD DRIVE.
Number Systems and Representations Binary Representation Binary Representation Signed numbers Signed numbers Very small and very big numbers Very small.
DATA Unit 2 Topic 2. Different Types of Data ASCII code: ASCII - The American Standard Code for Information Interchange is a standard seven-bit code that.
Data Representation COE 308 Computer Architecture
Programming and Data Structure
FINAL Project Information
Data Representation ICS 233
Lec 3: Data Representation
Microprocessor Systems Design I
EPSII 59:006 Spring 2004.
Slide design: Dr. Mark L. Hornick
Other Kinds of Arrays Chapter 11
COMP3221: Microprocessors and Embedded Systems
Introduction to CS Your First C Programs
Bits and Bytes Topics Representing information as bits
Bits and Bytes Topics Representing information as bits
Bits and Bytes Topics Representing information as bits
Bits and Bytes Topics Representing information as bits
Comp Org & Assembly Lang
Real-World File Structures
C Language B. DHIVYA 17PCA140 II MCA.
Data Representation COE 308 Computer Architecture
Presentation transcript:

1 Winter Quarter 2003Rolando V. Raqueño FINAL Project Information Two Design Review presentations ( minutes long) A Final Document of your Project Wiki Page Describing your Project –YourNameIdlGuiProject Teaming is Encouraged –LastNamesIdlGuiProject

2 Winter Quarter 2003Rolando V. Raqueño Final Project Post on the wiki, by Next Thursday, a half page abstract of your intended GUI design, and the problem domain that it addresses.

3 Winter Quarter 2003Rolando V. Raqueño Possible Project Choices mg726/project_archive/project_archive.h tml –Visualization of a DIRSIG Geometric Database –Visualization and modification of radiosonde data –Graphical User Interface for generating and modifying a MODTRAN Card deck –Visualiation of radiance data –GUI for generating and modifying object material parameters –GUI for visualizing emissivity files

4 Winter Quarter 2003Rolando V. Raqueño Possible Project Choices –GUI for texture image creation –Visualization and modification of a scene node file. –More Details to come...

5 Winter Quarter 2003Rolando V. Raqueño Quiz #2 (After Break) Topics RCS commands cd cp grep chmod Weekly wiki post The Cuckoo’s Egg Question

6 Winter Quarter 2003Rolando V. Raqueño Working with Data

7 Winter Quarter 2003Rolando V. Raqueño Representation of Information in a Computer All information in a computer is stored as a collection of bits A bit, also known as a binary digit, is a number represented in base 2. It can only be either a 1 (one) or 0 (zero) Think of information as data with structure –All the one’s and zero’s represented by the computer is data. How they are interpretted generates information (or garbage)

8 Winter Quarter 2003Rolando V. Raqueño Representation of Information in a Computer Information stored in a computer can represent –Instructions Executable Programs –Data Numbers - integers and real values Characters - ASCII, multinational characters Others - imagery, sound, etc.

9 Winter Quarter 2003Rolando V. Raqueño Representation of Information in a Computer Bits in a computer are usually grouped into the following units – 4 bits == 1 nibble –8 bits == 1 byte or 1 ( char ) - a single character –16 bits == 2 bytes or 1 ( short int, int ) - integer value –32 bits == 4 bytes or 1 ( long int, int ) - integer value –or 1( float) - real value –64 bits == 8 bytes or 1 (double) - real value

10 Winter Quarter 2003Rolando V. Raqueño Representation of Information in a Computer Numbers can be represented as either integers or real values –integers { -5, 0, 125, } –real { , , -1.0e-20, } Text is typically represented using the ASCII character set where each character is represented as a byte value.

11 Winter Quarter 2003Rolando V. Raqueño Representation of Information in a Computer

12 Winter Quarter 2003Rolando V. Raqueño Representation of Information in a Computer

13 Winter Quarter 2003Rolando V. Raqueño Line Delimiters on Different Systems In the UNIX System, lines are delimited by linefeed (also designated as nl and has an ASCII value of 012 or 10) In MACS and PC’s, lines are delimited by carriage returns (also designated as cr and has an ASCII value of 015 or 13) Still other systems use a combination of carriage return-line feeds to delimit lines

14 Winter Quarter 2003Rolando V. Raqueño Common Cross Platform File Problem Some one gave you a text file created on a PC which you transferred to the UNIX system. You try to edit the file using vi, but vi complains that the line is too long Solution: (A Stupid Unix Trick) –% cat old_file | tr “\015” “\012” > new_file –This command translates all carriage returns to line feeds.

15 Winter Quarter 2003Rolando V. Raqueño Numbering Systems

16 Winter Quarter 2003Rolando V. Raqueño Converting Number Bases

17 Winter Quarter 2003Rolando V. Raqueño Converting Number Bases

18 Winter Quarter 2003Rolando V. Raqueño Negative Number Representation

19 Winter Quarter 2003Rolando V. Raqueño Converting a Negative Number into Binary using 2’s Complement

20 Winter Quarter 2003Rolando V. Raqueño How Does This All Relate to Computers and Programming

21 Winter Quarter 2003Rolando V. Raqueño 1-bit Address Line and 1-bit Data Line Computer Architecture

22 Winter Quarter 2003Rolando V. Raqueño 2-bit Address Line and 1-bit Data Line Computer Architecture

23 Winter Quarter 2003Rolando V. Raqueño 1-bit Address Line and 2-bit Data Line Computer Architecture

24 Winter Quarter 2003Rolando V. Raqueño 2-bit Address Line and 2-bit Data Line Computer Architecture

25 Winter Quarter 2003Rolando V. Raqueño 8-bit Address Line and 8-bit Data Line Computer Architecture

26 Winter Quarter 2003Rolando V. Raqueño In General

27 Winter Quarter 2003Rolando V. Raqueño Caveat on Multi-Byte Data When dealing with data that encompasses more than a single byte (e.g. integer value greater than 255), you must know the “endian” of the data Endian represents how a machine interprets the significance of a set of bytes. There are big-endian machines and little endian machines

28 Winter Quarter 2003Rolando V. Raqueño Caveat on Multi-Byte Data Big Endian Machines (Suns, Motorolas) would represent the integer value 512 internally as two bytes in the following order. MSB LSB

29 Winter Quarter 2003Rolando V. Raqueño Caveat on Multi-Byte Data Little Endian Machines (DECS, Intels) would represent the integer value 512 internally as two bytes in the following order. LSB MSB

30 Winter Quarter 2003Rolando V. Raqueño Caveat on Multi-Byte Data This is typically not a problem as long as you stay on the same machine. If you, however, start transferring data (e.g. images) in raw form from one machine to another, you will need to be aware of this situation. You can often transpose multibyte data using the dd utility (does not work for data spanning more than two bytes)

31 Winter Quarter 2003Rolando V. Raqueño Working with IDL Variables Variable names must start with a letter but can include, letters, digits, underscore or dollar characters. Variables are not case sensitive, i.e., –Celsius is equivalent to celsius

32 Winter Quarter 2003Rolando V. Raqueño Working with IDL Variables Variables in IDL have two important attributes –Data type –Attributes

33 Winter Quarter 2003Rolando V. Raqueño IDL Variable Data Types Undefined Integer Values –Byte, Integer, Long Integer Floating Point Values –Floating Point, Double Precision –Single Precision Complex, Double Precision Complex String

34 Winter Quarter 2003Rolando V. Raqueño IDL Variable Data Structures Scalar Vector (one-dimensional array) Array (up to eight dimensions) Structure (combination of any mixture of data - Very Important in understanding Object-Oriented Programming Concepts)

35 Winter Quarter 2003Rolando V. Raqueño Initializing Scalar Variables byte_variable = 0B integer_variable = 0 long_integer = 0L float_variable = 0.0 double_variable = 0.0D complex_variable = Complex(0.0, 0.0) dcomplex_variable = DComplex(0.0, 0.0) string_variable = ‘‘

36 Winter Quarter 2003Rolando V. Raqueño Initializing Array Variables byte_array = bytarr( 256, 256, 3 ) integer_array = intarr( 256, 256 ) long_array = lonarr( 256, 256 ) float_array = fltarr( 256, 256 ) double_array = dblarr( 256, 256 ) complex_array = complexarr( 256, 256 ) dcomplex_array = dcomplexarr( 256, 256) string_array = strarr(80)

37 Winter Quarter 2003Rolando V. Raqueño Initializing Array Variables Initializing Array with each element set to its subscript –bindgen, indgen, lindgen, findgen, dindgen, cindgen, dcindgen, sindgen –Only real parts of complex numbers are set to the subscripts –An array of strings containing the numbers is created by sindgen

38 Winter Quarter 2003Rolando V. Raqueño Initializing Array Variables Make_array function is a general way of creating and initializing arrays array=make_array(10,12,Value=1,/Int) Replicate functions allows initialization of all elements of an array with a given variable (useful in structures) initial_value = 1 array=replicate(initial_value, 10,12)

39 Winter Quarter 2003Rolando V. Raqueño Structures in IDL Allows more abstract data types to be created from other basic data types Example –Date data structure IDL> a={date, month:0B, day:0B, year:0B} IDL> print,a { 0 0 0}

40 Winter Quarter 2003Rolando V. Raqueño Structures in IDL Date Example (using a Named Structure) IDL> a.month=12 IDL> a.day=25 IDL> a.year=96 IDL> print,a { } IDL> print,a.month 12 IDL> print,a.day 25 IDL> print,a.year 96

41 Winter Quarter 2003Rolando V. Raqueño Structures in IDL Date Structure Example IDL> c={date} IDL> print,c { 0 0 0} IDL> help,c C STRUCT = -> DATE Array(1)

42 Winter Quarter 2003Rolando V. Raqueño Structures in IDL Anonymous Structures IDL> d={month:1,day:1,year:97} IDL> print,d { } IDL> e=d IDL> print,e { }

43 Winter Quarter 2003Rolando V. Raqueño Structures in IDL Anonymous Structures IDL> e={month:'January',day:d.day,year:d.year} IDL> print,e { January 1 97} IDL> e.month='December' IDL> print,e { December 1 97}

44 Winter Quarter 2003Rolando V. Raqueño Structures in IDL Determining Variable Structure IDL> help,e,/structure ** Structure, 3 tags, length=12, refs=1: MONTH STRING 'December' DAY INT 1 YEAR INT 97

45 Winter Quarter 2003Rolando V. Raqueño Structures in IDL Determining Structure Characteristics IDL> print,n_tags(e) 3 IDL> print,tag_names(e) MONTH DAY YEAR

46 Winter Quarter 2003Rolando V. Raqueño Dual Nature of IDL structures IDL> e={month:"December", day:1, year:97} IDL> print,e.month December IDL> print,e.day 1 IDL> print,e.year 97 IDL> e={month:"December", day:1, year:97} IDL> print,e.(0) December IDL> print,e.(1) 1 IDL> print,e.(2) 97

47 Winter Quarter 2003Rolando V. Raqueño Array Manipulation in IDL Let’s create an array representing a multiband image IDL> image=bindgen(2,3,4) IDL> print,image

48 Winter Quarter 2003Rolando V. Raqueño Array Manipulation in IDL Extract the first and last band of the image IDL> print,image(*,*,0) IDL> print,image(*,*,3)

49 Winter Quarter 2003Rolando V. Raqueño Array Manipulation in IDL Extracting the “color” or “spectral vector” of the first pixel IDL> print,image(0,0,*)

50 Winter Quarter 2003Rolando V. Raqueño Array Manipulation in IDL Assign band 1 to band 4 IDL> band1=image(*,*,0) IDL> image(*,*,3) = band1 Shortcut IDL> image(*,*,3)=image(*,*,0)

51 Winter Quarter 2003Rolando V. Raqueño Array Manipulation in IDL Subsectioning parts of an image IDL> print,image(0:1,0:1,*)

52 Winter Quarter 2003Rolando V. Raqueño Array Manipulation where function to find indices of elements that meet certain criteria IDL> print, where( image gt 5 and image lt 12) Use of other arrays to index other arrays IDL> indices=where( image gt 5 and image lt 12) IDL> image(indices)=-1