Introduction to MATLAB Practical 2

Size: px
Start display at page:

Download "Introduction to MATLAB Practical 2"

Transcription

1 Introduction to MATLAB Practical 2 Daniel Carrera November Searching through data One of the most important skills in scientific computing is sorting through large datasets and extracting the information that is interesting. On your PC, create a folder for the exercises. Download the Hipparcos catalogue as a text file from the web page for ASTM13 (below). Be careful not to save it as an html file. Check the file with Notepad to make sure that it only contains data. In the following we assume that the data file is called hipparcos.txt. Start MATLAB. Change the Current Directory to your folder. Open the script editor (press New Script ) and type in the following script: % Read from the file into the array data(:,:) data = dlmread( hipparcos.txt ); % Columns. HIP = data(:, 1); % (---) Hipparcos number. l = data(:, 2); % (deg) Star longitude. b = data(:, 3); % (deg) Star lattitude. p = data(:, 4); % (mas) Parallax. ul = data(:, 5); % (mas/yr) Proper motion, l direction. ub = data(:, 6); % (mas/yr) Proper motion, b direction. e_p = data(:, 7); % (mas) Standard Error in parallax. e_ul = data(:, 8); % (mas/yr) Standard Error in ul. e_ub = data(:, 9); % (mas/yr) Standard Error in ub. V = data(:,10); % (mag) Visual magnitude. col = data(:,11); % (mag) Colour index, B-V. mult = data(:,12); % (---) Stellar multiplicity. 1

2 Extract all stars with a parallax less than 1 mas. This is a list of all stars farther than 1000 pc. % % mask is an array that contains ones and zeros. % one == True == Parallax less than 1 mas % mask = (p < 1); subset = p(mask); size(subset) Stars with parallax less than 1 mas are located farther than 1000 pc. Determine the fraction of the Hipparcos catalogue that is farther than 1000 pc. size(p(mask),1) / size(p,1) 1.1 Map of Hipparcos stars In this section we are going to make a map of the local region of the galaxy, in order the study the distribution of red and blue stars. To do this well, we need to think about the best way to project the celestial sphere onto a flat plane so as to minimize distortion. I recomm a little-known projection by Soviet cartographer Vladimir Kavrayskiy ( ). It has a simple formula, and does a very good job at preserving area and shape: x = 3 l 1 ( ) 2 b 2 3 π y = b Where b [ π/2, π/2] and l [ π, π] are latitude and longitude (respectively). For illustration, here is a map of the Earth in this projection (source: wikipedia.org): 2

3 This projection is called Kavrayskiy VII. Enter the following lines to produce a Kavraiskiy VII projection of the red and blue stars in the Hipparcos catalog: % Convert latitude and longitude to radians. b = b * pi/180; l = l * pi/180; % Wrap around after longitude > pi, so it goes from -pi to pi. l(l > pi) = l(l > pi) - 2*pi; % Do the Kavrayskiy VII projection. y = b; x = l*3/2.* sqrt( 1/3 - (b/pi).^2 ); % Masks for blue and red stars. blue = (col < 0); % Stars with colour index B-V < 0.0 red = (col > 1); % Stars with colour index B-V > 1.0 % Final plot. plot( x(red), y(red), r., x(blue), y(blue), b. ) leg( B-V > 1, B-V < 0 ) title( Hipparcos stars - Kavrayskiy VII projection ) ylabel( Galactic latitude ) xlabel( Projection of galactic longitude ) In the, you should have a plot similar to this: 3

4 Discuss the distribution of red and blue stars with your classmates. Here are some interesting questions that you might want to think about: What are the main differences between the blue and red stars? Where in this picture can you find the galactic centre? (latitude = 0, longitude = 0). What could cause the two prominent over-densities of blue stars? What could cause the deep void of blue stars near the centre of the plot? Why does this void not affect red stars as much? Are there important biases in the sample? Why are there some blue stars at high galactic latitudes? Try to have an interesting discussion with your colleagues before moving to the next session. 2 Generating random data In science it is often necessary or useful to generate simulated data. For example, the first problem set for ASTM21 is to take the 2D galaxy distribution in the Hubble Ultra Deep Field (HUDF) and determine whether it is uniform. For this project it may be helpful to produce a few simulated galaxy distributions that are uniform and try to write a statistic that can distinguish the simulated data from the real Hubble data. Enter the following code on MATLAB. Here we use the rand function to produce a star field with a uniform distribution. % Number of stars. nstars = 1000 % X and Y position. u_x = rand(1,nstars); u_y = rand(1,nstars); % Plot the star field. plot(u_x,u_y, b. ) Enter the following code. This version uses randn instead of rand. The function randn produces random values following the standard normal distribution (zero mean, variance one). Thus, the following version produces a star field more akin to a star cluster. 4

5 % Normal distribution c_x = randn(1,nstars); c_y = randn(1,nstars); % Plot the cluster plot(c_x,c_y, b. ) Lastly, we would like to combine these two datasets. That would produce a more realistic star field around an open cluster. The star field would have a combination of stars from the cluster and background stars. Start by plotting the two data sets. You will have to modify the data sets slightly to get reasonable results. Here is my solution, but I encourage you to experiment. plot(u_x*20-10,u_y*20-10, r.,c_x,c_y, b. ) Once you are happy with your plot, join the data sets accordingly: x = [ u_x*20-10, c_x ]; y = [ u_y*20-10, c_y ]; You have now produced a simulated (x,y) dataset that is similar to what you might observe on a CCD image of a star cluster. 3 Sample application We want to pick a star at random. Because the data was randomly generated, we can pick star 1. Plot the star field in blue and put a red + on star 1: x1 = x(1); y1 = y(1); plot(x,y, b.,x1,y1, r+ ) First, find all the neighbours of star 1. The definition of neighbour is a bit arbitrary. In the following example I define it as the set of stars within distance 1 of star 1. But you should experiment with different distance values: % Distance that defines a neighbour d = 1; % Find the distance to every other star. 5

6 r = sqrt( (x1 - x).^2 + (y1 - y).^2 ); % Select those that have r < d. nbhr_x = x( r < d ); nbhr_y = y( r < d ); % Plot the neighbours with a black circle. plot(x,y, b.,x1,y1, r+,nbhr_x,nbhr_y, ko,x1,y1, r+ ) % Count the number of neighbours of star 1. num_neighbours = sum( r < 1 ) We can write a MATLAB script to help us find the globular cluster in our artificial star field. First, we can define the local density at the point (xp,yp) as the number of stars within distance d of (xp,yp). Write a function to compute the local density of a star field, and save if as density.m: % File: density.m function rho = density( starsx, starsy, xp, yp ) d = 1; r = sqrt( (xp - starsx).^2 + (yp - starsy).^2 ); rho = sum( r < d ); Confirm that this function is correct by confirming that it gives the same number of neighbours that you obtained earlier for star 1: density(x,y,x1,y1) Now plot the local density along the X axis. rho = []; yp = 0; for i = 1:21 xp = i - 11; rho(i) = density(x,y,xp,yp); plot(-10:10,rho) 6

7 The plot is probably not very smooth. Can you improve the for loop to produce a better plot? Based on this plot, how would you define the edge of the cluster? Alternatively, we could use the density function to determine which stars belong to the star cluster. A simple implementation would look like this: cluster_x = []; cluster_y = []; rho_min = 10 for i = 1:length(x) if density(x,y,x(i),y(i)) > rho_min cluster_x = [ cluster_x, x(i) ]; cluster_y = [ cluster_y, y(i) ]; plot(x,y, b.,cluster_x,cluster_y, r+ ) Experiment with different values of rho min and d. Choose a good set of parameters to find the star cluster. Compare answers with your class mates. Ideally you would like to find a routine that reliably finds the cluster for all the generated data sets. Could the routine be improved if it was based on the mean density of the star field? Try to implement a cluster-finding routine that uses the mean star density rather than a hard-coded value. 4 Code profiling Solving linear systems (x = A\b) is one of the most common and most expensive operations in scientific computing. For example, this operation is used for linear least squares optimization. In the following code example, we use the MATLAB commands tic and toc to profile the cost of this operation: t = zeros(1,500); for n = 1:500 A = rand(n,n); b = rand(n,1); tic for i = 1:5 x = A\b; t(n) = toc / 5; plot(t) 7

8 There is a risk that some times rand() will produce a matrix that just happens to be easy to invert. Can you suggest a way to improve the above for-loop to minimize this risk? Another important profiling tool is the keyboard command. When placed in a.m file, it stops execution and gives control to the keyboard. This lets you examine or change variables inside a function. Useful for debugging. Modify the density function from the previous section by adding the keyboard command somewhere inside the function. Confirm that you can examine and change the variables inside the function. Type return to terminate the keyboard mode and continue normally. Type dbquit to terminate the keyboard mode and exit the function immediately. 8

Introduction to Python Practical 2

Introduction to Python Practical 2 Introduction to Python Practical 2 Daniel Carrera & Brian Thorsbro November 2017 1 Searching through data One of the most important skills in scientific computing is sorting through large datasets and

More information

Open Cluster Research Project

Open Cluster Research Project Open Cluster Research Project I. Introduction The observational data indicate that all stars form in clusters. In a cloud of hydrogen gas, laced with helium and a trace of other elements, something triggers

More information

New Mexico Tech Hyd 510

New Mexico Tech Hyd 510 Vectors vector - has magnitude and direction (e.g. velocity, specific discharge, hydraulic gradient) scalar - has magnitude only (e.g. porosity, specific yield, storage coefficient) unit vector - a unit

More information

AstroBITS: Open Cluster Project

AstroBITS: Open Cluster Project AstroBITS: Open Cluster Project I. Introduction The observational data that astronomers have gathered over many years indicate that all stars form in clusters. In a cloud of hydrogen gas, laced with helium

More information

Introduction to Computational Neuroscience

Introduction to Computational Neuroscience CSE2330 Introduction to Computational Neuroscience Basic computational tools and concepts Tutorial 1 Duration: two weeks 1.1 About this tutorial The objective of this tutorial is to introduce you to: the

More information

MATH20411 PDEs and Vector Calculus B

MATH20411 PDEs and Vector Calculus B MATH2411 PDEs and Vector Calculus B Dr Stefan Güttel Acknowledgement The lecture notes and other course materials are based on notes provided by Dr Catherine Powell. SECTION 1: Introctory Material MATH2411

More information

LAB B. The Local Stellar Population

LAB B. The Local Stellar Population KEELE UNIVERSITY SCHOOL OF PHYSICAL AND GEOGRAPHICAL SCIENCES Year 1 ASTROPHYSICS LAB LAB B. The Local Stellar Population R. D. Jeffries version January 2010 D. E. McLaughlin Throughout this experiment

More information

PROBLEM SET #1. Galactic Structure 37 pts total. due Tuesday, 2/19/2019

PROBLEM SET #1. Galactic Structure 37 pts total. due Tuesday, 2/19/2019 PROBLEM SET #1 Galactic Structure 37 pts total due Tuesday, 2/19/2019 1. Stellar cluster problem [26 pts] The following refers to a star cluster observed on Aug 15, 2010 at about 4am UT. The cluster is

More information

January 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,

January 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB, Introduction to MATLAB January 18, 2008 Steve Gu Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB, Part I: Basics MATLAB Environment Getting Help Variables Vectors, Matrices, and

More information

Lab 2 Astronomical Coordinates, Time, Focal Length, Messier List and Open Clusters

Lab 2 Astronomical Coordinates, Time, Focal Length, Messier List and Open Clusters Lab 2 Astronomical Coordinates, Time, Focal Length, Messier List and Open Clusters Name: Partner(s): Boxes contain questions that you are expected to answer (in the box). You will also be asked to put

More information

Math 98 - Introduction to MATLAB Programming. Spring Lecture 3

Math 98 - Introduction to MATLAB Programming. Spring Lecture 3 Reminders Instructor: Chris Policastro Class Website: https://math.berkeley.edu/~cpoli/math98/fall2016.html Assignment Submission: https://bcourses.berkeley.edu Homework 2 1 Due September 8th by 11:59pm

More information

Newton s Cooling Model in Matlab and the Cooling Project!

Newton s Cooling Model in Matlab and the Cooling Project! Newton s Cooling Model in Matlab and the Cooling Project! James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University March 10, 2014 Outline Your Newton

More information

A Reconstruction of Regional and Global Temperature for the Past 11,300 Years Marcott et al STUDENT ACTIVITY

A Reconstruction of Regional and Global Temperature for the Past 11,300 Years Marcott et al STUDENT ACTIVITY A Reconstruction of Regional and Global Temperature for the Past 11,300 Years Marcott et al. 2013 STUDENT ACTIVITY How do we reconstruct global average temperatures? Learning Objective: This activity explores

More information

Introduction to MatLab

Introduction to MatLab Introduction to MatLab 1 Introduction to MatLab Graduiertenkolleg Kognitive Neurobiologie Friday, 05 November 2004 Thuseday, 09 Novemer 2004 Kurt Bräuer Institut für Theoretische Physik, Universität Tübingen

More information

Model-building and parameter estimation

Model-building and parameter estimation Luleå University of Technology Johan Carlson Last revision: July 27, 2009 Measurement Technology and Uncertainty Analysis - E7021E MATLAB homework assignment Model-building and parameter estimation Introduction

More information

Using the EartH2Observe data portal to analyse drought indicators. Lesson 4: Using Python Notebook to access and process data

Using the EartH2Observe data portal to analyse drought indicators. Lesson 4: Using Python Notebook to access and process data Using the EartH2Observe data portal to analyse drought indicators Lesson 4: Using Python Notebook to access and process data Preface In this fourth lesson you will again work with the Water Cycle Integrator

More information

MATH0328: Numerical Linear Algebra Homework 3 SOLUTIONS

MATH0328: Numerical Linear Algebra Homework 3 SOLUTIONS MATH038: Numerical Linear Algebra Homework 3 SOLUTIONS Due Wednesday, March 8 Instructions Complete the following problems. Show all work. Only use Matlab on problems that are marked with (MATLAB). Include

More information

Star Cluster Photometry and the H-R Diagram

Star Cluster Photometry and the H-R Diagram Star Cluster Photometry and the H-R Diagram Contents Introduction Star Cluster Photometry... 1 Downloads... 1 Part 1: Measuring Star Magnitudes... 2 Part 2: Plotting the Stars on a Colour-Magnitude (H-R)

More information

Okay now go back to your pyraf window

Okay now go back to your pyraf window PHYS 391 Astronomical Image Data: Measuring the Distance and Age of a Stellar Cluster Goals This lab is designed to demonstrate basic astronomy data analysis and how extracting stellar population information

More information

Galactic Census: Population of the Galaxy grades 9 12

Galactic Census: Population of the Galaxy grades 9 12 Galactic Census: Population of the Galaxy grades 9 12 Objective Introduce students to a range of celestial objects that populate the galaxy, having them calculate estimates of how common each object is

More information

Computer projects for Mathematical Statistics, MA 486. Some practical hints for doing computer projects with MATLAB:

Computer projects for Mathematical Statistics, MA 486. Some practical hints for doing computer projects with MATLAB: Computer projects for Mathematical Statistics, MA 486. Some practical hints for doing computer projects with MATLAB: You can save your project to a text file (on a floppy disk or CD or on your web page),

More information

Your work from these three exercises will be due Thursday, March 2 at class time.

Your work from these three exercises will be due Thursday, March 2 at class time. GEO231_week5_2012 GEO231, February 23, 2012 Today s class will consist of three separate parts: 1) Introduction to working with a compass 2) Continued work with spreadsheets 3) Introduction to surfer software

More information

EEE161 Applied Electromagnetics Laboratory 1

EEE161 Applied Electromagnetics Laboratory 1 Dr. Milica Marković Applied Electromagnetics Laboratory page 1 EEE161 Applied Electromagnetics Laboratory 1 Instructor: Dr. Milica Marković Office: Riverside Hall 3028 Email: milica@csus.edu Web:http://gaia.ecs.csus.edu/

More information

AMS 27L LAB #8 Winter 2009

AMS 27L LAB #8 Winter 2009 AMS 27L LAB #8 Winter 29 Solving ODE s in Matlab Objectives:. To use Matlab s ODE Solvers 2. To practice using functions and in-line functions Matlab s ODE Suite Matlab offers a suite of ODE solvers including:

More information

18.06 Problem Set 1 - Solutions Due Wednesday, 12 September 2007 at 4 pm in

18.06 Problem Set 1 - Solutions Due Wednesday, 12 September 2007 at 4 pm in 18.6 Problem Set 1 - Solutions Due Wednesday, 12 September 27 at 4 pm in 2-16. Problem : from the book.(5=1+1+1+1+1) (a) problem set 1.2, problem 8. (a) F. A Counterexample: u = (1,, ), v = (, 1, ) and

More information

Math 515 Fall, 2008 Homework 2, due Friday, September 26.

Math 515 Fall, 2008 Homework 2, due Friday, September 26. Math 515 Fall, 2008 Homework 2, due Friday, September 26 In this assignment you will write efficient MATLAB codes to solve least squares problems involving block structured matrices known as Kronecker

More information

HR Diagram of Globular Cluster Messier 80 Using Hubble Space Telescope Data

HR Diagram of Globular Cluster Messier 80 Using Hubble Space Telescope Data Jason Kendall, William Paterson University, Department of Physics HR Diagram of Globular Cluster Messier 80 Using Hubble Space Telescope Data Background Purpose: HR Diagrams are central to understanding

More information

Assignment #0 Using Stellarium

Assignment #0 Using Stellarium Name: Class: Date: Assignment #0 Using Stellarium The purpose of this exercise is to familiarize yourself with the Stellarium program and its many capabilities and features. Stellarium is a visually beautiful

More information

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations Lab 2 Worksheet Problems Problem : Geometry and Linear Equations Linear algebra is, first and foremost, the study of systems of linear equations. You are going to encounter linear systems frequently in

More information

Physics with Matlab and Mathematica Exercise #1 28 Aug 2012

Physics with Matlab and Mathematica Exercise #1 28 Aug 2012 Physics with Matlab and Mathematica Exercise #1 28 Aug 2012 You can work this exercise in either matlab or mathematica. Your choice. A simple harmonic oscillator is constructed from a mass m and a spring

More information

Satellite project, AST 1100

Satellite project, AST 1100 Satellite project, AST 1100 Introduction and useful information 0.1 Project overview In this project you are going to send a satellite from your home planet, in your own personal star system, to visit

More information

Experiment 1: Linear Regression

Experiment 1: Linear Regression Experiment 1: Linear Regression August 27, 2018 1 Description This first exercise will give you practice with linear regression. These exercises have been extensively tested with Matlab, but they should

More information

Open Cluster Photometry: Part II

Open Cluster Photometry: Part II Project 4 Open Cluster Photometry: Part II Observational Astronomy ASTR 310 Fall 2005 1 Introduction The objective of this and the previous project is to learn how to produce color-magnitude diagrams of

More information

Numerical solution of ODEs

Numerical solution of ODEs Péter Nagy, Csaba Hős 2015. H-1111, Budapest, Műegyetem rkp. 3. D building. 3 rd floor Tel: 00 36 1 463 16 80 Fax: 00 36 1 463 30 91 www.hds.bme.hu Table of contents Homework Introduction to Matlab programming

More information

Matlab for Review. NDSU Matlab Review pg 1

Matlab for Review. NDSU Matlab Review pg 1 NDSU Matlab Review pg 1 Becoming familiar with MATLAB The console The editor The graphics windows The help menu Saving your data (diary) General environment and the console Matlab for Review Simple numerical

More information

MITOCW ocw f99-lec01_300k

MITOCW ocw f99-lec01_300k MITOCW ocw-18.06-f99-lec01_300k Hi. This is the first lecture in MIT's course 18.06, linear algebra, and I'm Gilbert Strang. The text for the course is this book, Introduction to Linear Algebra. And the

More information

The Hertzsprung-Russell Diagram

The Hertzsprung-Russell Diagram Introduction + Aims Installing the Software Theory of Hertzsprung-Russell Diagrams Method: Part 1 - Distance to the Star Cluster Part 2 - Age of the Star Cluster Part 3 - Comparison of Star Clusters Extension

More information

Exercise 1.0 THE CELESTIAL EQUATORIAL COORDINATE SYSTEM

Exercise 1.0 THE CELESTIAL EQUATORIAL COORDINATE SYSTEM Exercise 1.0 THE CELESTIAL EQUATORIAL COORDINATE SYSTEM Equipment needed: A celestial globe showing positions of bright stars and Messier Objects. I. Introduction There are several different ways of representing

More information

Mitaka and Milky Way texture map

Mitaka and Milky Way texture map Mitaka and Milky Way texture map Tsunehiko Kato (4D2U Project, NAOJ) Four- Dimensional Digital Universe Project National Astronomical Observatory of Japan March 2nd, 2017 Data to Dome Workshop at Mitaka

More information

ASTRO 1050 LAB #9: Parallax and Angular Size-Distance relations

ASTRO 1050 LAB #9: Parallax and Angular Size-Distance relations ASTRO 1050 LAB #9: Parallax and Angular Size-Distance relations ABSTRACT Parallax is the name given to the technique astronomers use to find distances to the nearby stars. You will calibrate their own

More information

SKINAKAS OBSERVATORY. Astronomy Projects for University Students PROJECT GALAXIES

SKINAKAS OBSERVATORY. Astronomy Projects for University Students PROJECT GALAXIES PROJECT 7 GALAXIES Objective: The topics covered in the previous lessons target celestial objects located in our neighbourhood, i.e. objects which are within our own Galaxy. However, the Universe extends

More information

Chapter 7 Statistics, Probability, and Interpolation

Chapter 7 Statistics, Probability, and Interpolation PowerPoint to accompany Introduction to MATLAB for Engineers, Third Edition William J. Palm III Chapter 7 Statistics, Probability, and Interpolation Copyright 2010. The McGraw-Hill Companies, Inc. This

More information

ASTRONOMY 460: PROJECT INTRO - GALACTIC ROTATION CURVE

ASTRONOMY 460: PROJECT INTRO - GALACTIC ROTATION CURVE ASTRONOMY 460: PROJECT INTRO - GALACTIC ROTATION CURVE Snežana Stanimirović, October 6, 2014 1. Introduction This project has two goals: we want to measure the Milky Way (or Galactic) rotation curve by

More information

Digital Systems EEE4084F. [30 marks]

Digital Systems EEE4084F. [30 marks] Digital Systems EEE4084F [30 marks] Practical 3: Simulation of Planet Vogela with its Moon and Vogel Spiral Star Formation using OpenGL, OpenMP, and MPI Introduction The objective of this assignment is

More information

KEELE UNIVERSITY SCHOOL OF CHEMICAL AND PHYSICAL SCIENCES Year 1 ASTROPHYSICS LAB. WEEK 1. Introduction

KEELE UNIVERSITY SCHOOL OF CHEMICAL AND PHYSICAL SCIENCES Year 1 ASTROPHYSICS LAB. WEEK 1. Introduction KEELE UNIVERSITY SCHOOL OF CHEMICAL AND PHYSICAL SCIENCES Year 1 ASTROPHYSICS LAB WEEK 1. Introduction D. E. McLaughlin January 2011 The purpose of this lab is to introduce you to some astronomical terms

More information

Yuji Shirasaki. National Astronomical Observatory of Japan. 2010/10/13 Shanghai, China

Yuji Shirasaki. National Astronomical Observatory of Japan. 2010/10/13 Shanghai, China Yuji Shirasaki National Astronomical Observatory of Japan 1 Virtual Observatory Infrastructure for efficient research environment International standard for data publication & access Sharing data worldwide,

More information

CE 365K Exercise 1: GIS Basemap for Design Project Spring 2014 Hydraulic Engineering Design

CE 365K Exercise 1: GIS Basemap for Design Project Spring 2014 Hydraulic Engineering Design CE 365K Exercise 1: GIS Basemap for Design Project Spring 2014 Hydraulic Engineering Design The purpose of this exercise is for you to construct a basemap in ArcGIS for your design project. You may execute

More information

Statistical methods. Mean value and standard deviations Standard statistical distributions Linear systems Matrix algebra

Statistical methods. Mean value and standard deviations Standard statistical distributions Linear systems Matrix algebra Statistical methods Mean value and standard deviations Standard statistical distributions Linear systems Matrix algebra Statistical methods Generating random numbers MATLAB has many built-in functions

More information

Matlab Section. November 8, 2005

Matlab Section. November 8, 2005 Matlab Section November 8, 2005 1 1 General commands Clear all variables from memory : clear all Close all figure windows : close all Save a variable in.mat format : save filename name of variable Load

More information

Shape Measurement: An introduction to KSB

Shape Measurement: An introduction to KSB Shape Measurement: An introduction to KSB Catherine Heymans Institute for Astronomy, University of Edinburgh, UK DUEL Weak Lensing School September 2009 at the end of the week you ll be able to... Use

More information

The Night Sky [Optional - only for those interested] by Michael Kran - Thursday, 2 October 2008, 03:49 PM

The Night Sky [Optional - only for those interested] by Michael Kran - Thursday, 2 October 2008, 03:49 PM The Night Sky [Optional - only for those interested] by Michael Kran - Thursday, 2 October 2008, 03:49 PM A question sometimes arises: "What's up in the sky at a particular moment?" There are several ways

More information

Photometry of Messier 34

Photometry of Messier 34 Photometry of Messier 34 J. Kielkopf November 12, 2012 1 Messier 34 The open cluster Messier 34 (M34) is in the solar neighborhood, lying roughly in the plane of the Milky Way galaxy in the direction of

More information

Supervised Learning Coursework

Supervised Learning Coursework Supervised Learning Coursework John Shawe-Taylor Tom Diethe Dorota Glowacka November 30, 2009; submission date: noon December 18, 2009 Abstract Using a series of synthetic examples, in this exercise session

More information

22 Approximations - the method of least squares (1)

22 Approximations - the method of least squares (1) 22 Approximations - the method of least squares () Suppose that for some y, the equation Ax = y has no solutions It may happpen that this is an important problem and we can t just forget about it If we

More information

CESAR Science Case. Jupiter Mass. Calculating a planet s mass from the motion of its moons. Teacher

CESAR Science Case. Jupiter Mass. Calculating a planet s mass from the motion of its moons. Teacher Jupiter Mass Calculating a planet s mass from the motion of its moons Teacher 2 Table of Contents Fast Facts... 4 Summary of activities... 5 Background... 7 Kepler s Laws... 8 Activity description... 9

More information

Lecture 29. Our Galaxy: "Milky Way"

Lecture 29. Our Galaxy: Milky Way Lecture 29 The Milky Way Galaxy Disk, Bulge, Halo Rotation Curve Galactic Center Apr 3, 2006 Astro 100 Lecture 29 1 Our Galaxy: "Milky Way" Milky, diffuse band of light around sky known to ancients. Galileo

More information

Electro Magnetic Field Dr. Harishankar Ramachandran Department of Electrical Engineering Indian Institute of Technology Madras

Electro Magnetic Field Dr. Harishankar Ramachandran Department of Electrical Engineering Indian Institute of Technology Madras Electro Magnetic Field Dr. Harishankar Ramachandran Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 7 Gauss s Law Good morning. Today, I want to discuss two or three

More information

Astronomy 102 Lab: Stellar Parallax and Proper Motion

Astronomy 102 Lab: Stellar Parallax and Proper Motion Name: Astronomy 102 Lab: Stellar Parallax and Proper Motion If you own a laptop, please bring it to class. You will use Stellarium again. The Stellarium shortcuts you used in the first lab are on the inside

More information

Mimir NIR Spectroscopy Data Processing Cookbook V2.0 DPC

Mimir NIR Spectroscopy Data Processing Cookbook V2.0 DPC Mimir NIR Spectroscopy Data Processing Cookbook V2.0 DPC - 20111130 1. Fetch and install the software packages needed a. Get the MSP_WCT, MSP_CCS, MSP_SXC packages from the Mimir/Software web site: http://people.bu.edu/clemens/mimir/software.html

More information

2D Plotting with Matlab

2D Plotting with Matlab GEEN 1300 Introduction to Engineering Computing Class Meeting #22 Monday, Nov. 9 th Engineering Computing and Problem Solving with Matlab 2-D plotting with Matlab Script files User-defined functions Matlab

More information

Detecting Galactic HI line using 4-m SRT

Detecting Galactic HI line using 4-m SRT Detecting Galactic HI line using 4-m SRT 1 Goal of the experiment The final goal of the experiment is to detect the galactic HI line emission and to understand the physics behind it. In this experiment,

More information

Bfh Ti Control F Ws 2008/2009 Lab Matlab-1

Bfh Ti Control F Ws 2008/2009 Lab Matlab-1 Bfh Ti Control F Ws 2008/2009 Lab Matlab-1 Theme: The very first steps with Matlab. Goals: After this laboratory you should be able to solve simple numerical engineering problems with Matlab. Furthermore,

More information

Machine Learning: Homework 5

Machine Learning: Homework 5 0-60 Machine Learning: Homework 5 Due 5:0 p.m. Thursday, March, 06 TAs: Travis Dick and Han Zhao Instructions Late homework policy: Homework is worth full credit if submitted before the due date, half

More information

Relative Photometry with data from the Peter van de Kamp Observatory D. Cohen and E. Jensen (v.1.0 October 19, 2014)

Relative Photometry with data from the Peter van de Kamp Observatory D. Cohen and E. Jensen (v.1.0 October 19, 2014) Relative Photometry with data from the Peter van de Kamp Observatory D. Cohen and E. Jensen (v.1.0 October 19, 2014) Context This document assumes familiarity with Image reduction and analysis at the Peter

More information

Lab 2: Photon Counting with a Photomultiplier Tube

Lab 2: Photon Counting with a Photomultiplier Tube Lab 2: Photon Counting with a Photomultiplier Tube 1 Introduction 1.1 Goals In this lab, you will investigate properties of light using a photomultiplier tube (PMT). You will assess the quantitative measurements

More information

MEASURING DISTANCE WITH CEPHEID VARIABLES

MEASURING DISTANCE WITH CEPHEID VARIABLES Name Date Partner(s) Grade / MEASURING DISTANCE WITH CEPHEID VARIABLES Written by T. Jaeger INTRODUCTION Cepheid stars (named after the class prototype star, DELTA CEPHEI) are of great interest because

More information

The Hubble Redshift Distance Relation

The Hubble Redshift Distance Relation The Hubble Redshift Distance Relation Software Users Guide A Manual to Accompany Software for the Introductory Astronomy Lab Exercise Document SUG 3: Version 1 Department of Physics Gettysburg College

More information

Spectral Analysis of High Resolution X-ray Binary Data

Spectral Analysis of High Resolution X-ray Binary Data Spectral Analysis of High Resolution X-ray Binary Data Michael Nowak, mnowak@space.mit.edu X-ray Astronomy School; Aug. 1-5, 2011 Introduction This exercise takes a look at X-ray binary observations using

More information

Hubble's Law and the Age of the Universe

Hubble's Law and the Age of the Universe Hubble's Law and the Age of the Universe Procedure: Name: 1. Login into the network using your user ID and your password. 2. Double click on the Astronomy shortcuts folder on the desktop. 3. Double click

More information

The Curvature of Space and the Expanding Universe

The Curvature of Space and the Expanding Universe Summary The Curvature of Space and the Expanding Universe The idea of curved space and the curvature of our own universe may take some time to fully appreciate. We will begin by looking at some examples

More information

Vector Spaces. 1 Theory. 2 Matlab. Rules and Operations

Vector Spaces. 1 Theory. 2 Matlab. Rules and Operations Vector Spaces Rules and Operations 1 Theory Recall that we can specify a point in the plane by an ordered pair of numbers or coordinates (x, y) and a point in space with an order triple of numbers (x,

More information

Where on Earth are We? Projections and Coordinate Reference Systems

Where on Earth are We? Projections and Coordinate Reference Systems Where on Earth are We? Projections and Coordinate Reference Systems Nick Eubank February 11, 2018 If I told you that there was a treasure chest buried at the coordinates p2, 5q, your first response might

More information

Large Scale Structure of the Universe Lab

Large Scale Structure of the Universe Lab Large Scale Structure of the Universe Lab Introduction: Since the mid-1980 s astronomers have gathered data allowing, for the first time, a view of the structure of the Universe in three-dimensions. You

More information

PARALLAX AND PROPER MOTION

PARALLAX AND PROPER MOTION PARALLAX AND PROPER MOTION What will you learn in this Lab? We will be introducing you to the idea of parallax and how it can be used to measure the distance to objects not only here on Earth but also

More information

CS1110 Lab 3 (Feb 10-11, 2015)

CS1110 Lab 3 (Feb 10-11, 2015) CS1110 Lab 3 (Feb 10-11, 2015) First Name: Last Name: NetID: The lab assignments are very important and you must have a CS 1110 course consultant tell CMS that you did the work. (Correctness does not matter.)

More information

Best Pair II User Guide (V1.2)

Best Pair II User Guide (V1.2) Best Pair II User Guide (V1.2) Paul Rodman (paul@ilanga.com) and Jim Burrows (burrjaw@earthlink.net) Introduction Best Pair II is a port of Jim Burrows' BestPair DOS program for Macintosh and Windows computers.

More information

FleXScan User Guide. for version 3.1. Kunihiko Takahashi Tetsuji Yokoyama Toshiro Tango. National Institute of Public Health

FleXScan User Guide. for version 3.1. Kunihiko Takahashi Tetsuji Yokoyama Toshiro Tango. National Institute of Public Health FleXScan User Guide for version 3.1 Kunihiko Takahashi Tetsuji Yokoyama Toshiro Tango National Institute of Public Health October 2010 http://www.niph.go.jp/soshiki/gijutsu/index_e.html User Guide version

More information

Companion. Jeffrey E. Jones

Companion. Jeffrey E. Jones MATLAB7 Companion 1O11OO1O1O1OOOO1O1OO1111O1O1OO 1O1O1OO1OO1O11OOO1O111O1O1O1O1 O11O1O1O11O1O1O1O1OO1O11O1O1O1 O1O1O1111O11O1O1OO1O1O1O1OOOOO O1111O1O1O1O1O1O1OO1OO1OO1OOO1 O1O11111O1O1O1O1O Jeffrey E.

More information

ENGR Spring Exam 2

ENGR Spring Exam 2 ENGR 1300 Spring 013 Exam INSTRUCTIONS: Duration: 60 minutes Keep your eyes on your own work! Keep your work covered at all times! 1. Each student is responsible for following directions. Read carefully..

More information

LAB 1: MATLAB - Introduction to Programming. Objective:

LAB 1: MATLAB - Introduction to Programming. Objective: LAB 1: MATLAB - Introduction to Programming Objective: The objective of this laboratory is to review how to use MATLAB as a programming tool and to review a classic analytical solution to a steady-state

More information

Assignment #12 The Milky Way

Assignment #12 The Milky Way Name Date Class Assignment #12 The Milky Way For thousands of years people assumed that the stars they saw at night were the entire universe. Even after telescopes had been invented, the concept of a galaxy

More information

Lab 13: Ordinary Differential Equations

Lab 13: Ordinary Differential Equations EGR 53L - Fall 2009 Lab 13: Ordinary Differential Equations 13.1 Introduction This lab is aimed at introducing techniques for solving initial-value problems involving ordinary differential equations using

More information

Digital Control Semester Project

Digital Control Semester Project Digital Control Semester Project Part I: Transform-Based Design 1 Introduction For this project you will be designing a digital controller for a system which consists of a DC motor driving a shaft with

More information

Laboratory handout 1 Mathematical preliminaries

Laboratory handout 1 Mathematical preliminaries laboratory handouts, me 340 2 Laboratory handout 1 Mathematical preliminaries In this handout, an expression on the left of the symbol := is defined in terms of the expression on the right. In contrast,

More information

Physics 212E Spring 2004 Classical and Modern Physics. Computer Exercise #2

Physics 212E Spring 2004 Classical and Modern Physics. Computer Exercise #2 Physics 212E Spring 2004 Classical and Modern Physics Chowdary Computer Exercise #2 Launch Mathematica by clicking on the Start menu (lower left hand corner of the screen); from there go up to Science

More information

The IRS Flats. Spitzer Science Center

The IRS Flats. Spitzer Science Center Spitzer Science Center Table of Contents The IRS Flats 1 Chapter 1. The Purpose of this Document... 3 Chapter 2.... 4 2.1 Make a finely-spaced map of a star....4 2.2 Simulate an extended source...6 2.3

More information

The Rain in Spain - Tableau Public Workbook

The Rain in Spain - Tableau Public Workbook The Rain in Spain - Tableau Public Workbook This guide will take you through the steps required to visualize how the rain falls in Spain with Tableau public. (All pics from Mac version of Tableau) Workbook

More information

Computer Applications in Engineering and Construction Programming Assignment #2 Municipal Boundaries in State Plane Coordinates

Computer Applications in Engineering and Construction Programming Assignment #2 Municipal Boundaries in State Plane Coordinates CVEN 302 Computer Applications in Engineering and Construction Programming Assignment #2 Municipal Boundaries in State Plane Coordinates Date distributed : 9.11.2009 Date due : 9.25.2009 at 10:20 p.m.

More information

The Earth and the Sky

The Earth and the Sky The Earth and the Sky In this class, we want to understand why the objects in the sky as seen from the Earth - appear as they do. Even though we haven t yet discussed the details, I am assuming that there

More information

Lab #2: Activity 5 Exploring the Structure of the Solar Magnetic Field Using the MAS Model

Lab #2: Activity 5 Exploring the Structure of the Solar Magnetic Field Using the MAS Model Lab #2: Activity 5 Exploring the Structure of the Solar Magnetic Field Using the MAS Model In this lab activity we will use results from the MAS (Magnetohydrodynamics Around a Sphere) model of the solar

More information

CONFIRMATION OF A SUPERNOVA IN THE GALAXY NGC6946

CONFIRMATION OF A SUPERNOVA IN THE GALAXY NGC6946 CONFIRMATION OF A SUPERNOVA IN THE GALAXY NGC6946 G. Iafrate and M. Ramella INAF - Astronomical Observatory of Trieste 1 Introduction Suddenly a star runs out its nuclear fuel. Its life as a normal star

More information

EQUATION OF A CIRCLE (CENTRE A, B)

EQUATION OF A CIRCLE (CENTRE A, B) EQUATION OF A CIRCLE (CENTRE A, B) A circle can have different centres as well as different radii. Let s now consider a more general equation for a circle with centre (a, b) and radius r Exercise 1 Consider

More information

D4.2. First release of on-line science-oriented tutorials

D4.2. First release of on-line science-oriented tutorials EuroVO-AIDA Euro-VO Astronomical Infrastructure for Data Access D4.2 First release of on-line science-oriented tutorials Final version Grant agreement no: 212104 Combination of Collaborative Projects &

More information

10725/36725 Optimization Homework 4

10725/36725 Optimization Homework 4 10725/36725 Optimization Homework 4 Due November 27, 2012 at beginning of class Instructions: There are four questions in this assignment. Please submit your homework as (up to) 4 separate sets of pages

More information

STEP CORRESPONDENCE PROJECT. Assignment 31

STEP CORRESPONDENCE PROJECT. Assignment 31 Assignment 31: deadline Monday 21st March 11.00pm 1 STEP CORRESPONDENCE PROJECT Assignment 31 STEP I question 1 Preparation (i) Point A has position vector a (i.e. OA = a), and point B has position vector

More information

Integration by Parts Logarithms and More Riemann Sums!

Integration by Parts Logarithms and More Riemann Sums! Integration by Parts Logarithms and More Riemann Sums! James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University September 16, 2013 Outline 1 IbyP with

More information

Lab 4: Introduction to Signal Processing: Fourier Transform

Lab 4: Introduction to Signal Processing: Fourier Transform Lab 4: Introduction to Signal Processing: Fourier Transform This laboratory requires the following equipment: Matlab The laboratory duration is approximately 3 hours. Although this laboratory is not graded,

More information

Student s guide CESAR Science Case The Venus transit and the Earth-Sun distance

Student s guide CESAR Science Case The Venus transit and the Earth-Sun distance Student s guide CESAR Science Case The Venus transit and the Earth-Sun distance By: Abel de Burgos and Assiye Süer Name Date Introduction A transit happens when a body passes, or transits, in front of

More information

Prosurv LLC Presents

Prosurv LLC Presents Prosurv LLC Presents An Enterprise-Level Geo-Spatial Data Visualizer Part IV Upload Data Upload Data Click the Upload Data menu item to access the uploading data page. Step #1: Select a Project All Projects

More information

Sep 09, Overview of the Milky Way Structure of the Milky Way Rotation in the plane Stellar populations

Sep 09, Overview of the Milky Way Structure of the Milky Way Rotation in the plane Stellar populations Sep 09, 2015 Overview of the Milky Way Structure of the Milky Way Rotation in the plane Stellar populations PE#4: (pick up a copy; 1 page) Kinematics of stars in the Milky Way disk Matching datasets in

More information