from ztf_summerschool import source_lightcurve, barycenter_times %matplotlib inline

Size: px
Start display at page:

Download "from ztf_summerschool import source_lightcurve, barycenter_times %matplotlib inline"

Transcription

1 In [2]: # imports import numpy as np import matplotlib.pyplot as plt import astropy.coordinates as coords import astropy.units as u from astropy.time import Time from astroml.time_series import \ lomb_scargle, lomb_scargle_bootstrap from ztf_summerschool import source_lightcurve, barycenter_times %matplotlib inline Hands-On Exercise 3: Period Finding One of the fundamental tasks of time-domain astronomy is determining if a source is periodic, and if so, measuring the period. Period measurements are a vital first step for more detailed scientific study, which may include source classification (e.g., RR Lyrae, W Uma), lightcurve modeling (binaries), or luminosity estimation (Cepheids). Binary stars in particular have lightcurves which may show a wide variety of shapes, depending on the nature of the stars and the system geometry. In this workbook we will develop a basic toolset for the generic problem of finding periodic sources. by Eric Bellm ( ) Let's use the relative-photometry corrected light curves we built in Exercise 2. We'll use the utility function source_lightcurve to load the columns MJD, magnitude, and magnitude error. Note that we will use days as our time coordinate throughout the homework. In [3]: # point to our previously-saved data reference_catalog = '../data/ptf_refims_files/ptf_d022683_f02_c06_u _ p12_sexcat.ctlg' outfile = reference_catalog.split('/')[-1].replace('ctlg','shlv') We'll start by loading the data from our favorite star, which has coordinates α J2000, δ J2000 = ( , ). In [4]: ra_fav, dec_fav = ( , ) mjds, mags, magerrs = source_lightcurve('../data/'+outfile, ra_fav, dec_fav) Exercise 0: Barycentering Our times are Modified Julian Date on earth. We need to correct them for Earth's motion around the sun (this is called heliocentering or barycentering). How big is the error if we do not make this correction?

2 In [4]: # CALCULATE AN ANSWER HERE import astropy.constants as const (const.au/const.c).to(u.min) Out[4]: min We have provided a script to barycenter the data--note that it assumes that the data come from the P48. Use the bjds (barycentered modified julian date) variable through the remainder of this notebook. In [5]: bjds = barycenter_times(mjds,ra_fav,dec_fav) In [6]: bjds Out[6]: array([ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ]) Optional exercise: plot a histogram of the time differences between the barycentered and non-barycentered data. In [12]: s = np.argsort(bjds) bjds = bjds[s] mags = mags[s] magerrs = magerrs[s] Exercise 1: Getting started plotting Complete this function for plotting the lightcurve: In [7]: # define plot function def plot_data(mjd, mag, magerr): # COMPLETE THIS LINE plt.errorbar(mjd, mag, yerr=magerr, # COMPLETE THIS LINE fmt = '_', capsize=0) plt.xlabel('date (MJD)') plt.ylabel('magnitude') plt.gca().invert_yaxis()

3 In [8]: # run plot function plot_data(bjds, mags, magerrs) /opt/local/library/frameworks/python.framework/versions/2.7/lib/python2.7/si te-packages/matplotlib/figure.py:1653: UserWarning: This figure includes Axe s that are not compatible with tight_layout, so its results might be incorre ct. warnings.warn("this figure includes Axes that are not "

4 In [8]: # documentation for the lomb_scargle function help(lomb_scargle) Help on built-in function lomb_scargle in module astroml_addons.periodogram: lomb_scargle(...) (Generalized) Lomb-Scargle Periodogram with Floating Mean lse ue Parameters t : array_like sequence of times y : array_like sequence of observations dy : array_like sequence of observational errors omega : array_like frequencies at which to evaluate p(omega) generalized : bool if True (default) use generalized lomb-scargle method otherwise, use classic lomb-scargle. subtract_mean : bool if True (default) subtract the sample mean from the data before computing the periodogram. Only referenced if generalized is False. significance : None or float or ndarray if specified, then this is a list of significances to compute for the results. Returns p : array_like Lomb-Scargle power associated with each frequency omega z : array_like if significance is specified, this gives the levels corresponding to the desired significance (using the Scargle 1982 formalism) Notes The algorithm is based on reference [1]_. The result for generalized=fa is given by equation 4 of this work, while the result for generalized=tr is given by equation 20. t Note that the normalization used in this reference is different from tha used in other places in the literature (e.g. [2]_). For a discussion of normalization and false-alarm probability, see [1]_. To recover the normalization used in Scargle [3]_, the results should be multiplied by (N - 1) / 2 where N is the number of data points. References [1] M. Zechmeister and M. Kurster, A&A 496, (2009).. [2] W. Press et al, Numerical Recipies in C (2002).. [3] Scargle, J.D. 1982, ApJ 263:

5 Exercise 2: Determining the frequency grid One of the challenges of using the LS periodogram is determining the appropriate frequency grid to search. We have to select the minimum and maximum frequencies as well as the bin size. If we don't include the true frequency in our search range, we can't find the period! If the bins are too coarse, true peaks may be lost. If the bins are too fine, the periodogram becomes very slow to compute. The first question to ask is what range of frequencies our data is sensitive to. Exercise 2.1 What is the smallest angular frequency ω min our data is sensitive to? (Hint: smallest frequency => largest time) In [9]: freq_min = 2*np.pi / (bjds[-1]-bjds[0]) # COMPLETE print 'The minimum frequency our data is sensitive to is {:.3f} radian/days, corresponding to a period of {:.3f} days'.format(freq_min, 2*np.pi/freq_min) The minimum frequency our data is sensitive to is radian/days, corresp onding to a period of days Exercise 2.2 Determining the highest frequency we are sensitive to turns out to be complicated. if Δt is the difference between consecutive observations, π/median( Δt) is a good starting point, although in practice we may be sensitive to frequencies even higher than 2π/min( Δt) depending on the details of the sampling. What is the largest angular frequency ω max our data is sensitive to? In [10]: freq_max = np.pi / np.median(bjds[1:]-bjds[:-1]) # COMPLETE print 'The maximum frequency our data is sensitive to is APPROXIMATELY {:.3f} radian/days, corresponding to a period of {:.3f} days'.format(freq_max, 2*np.pi/freq_max) The maximum frequency our data is sensitive to is APPROXIMATELY radia n/days, corresponding to a period of days Exercise 2.3 We need enough bins to resolve the periodogram peaks, which have ( /lomb_scargle.html) frequency width Δf 2π/( t max t min ) = ω min. If we want to have 5 samples of Δf, how many bins will be in our periodogram? Is this computationally feasible? In [11]: n_bins = np.round(5 * (freq_max-freq_min)/freq_min) # COMPLETE print n_bins

6 Exercise 2.4 Let's wrap this work up in a convenience function that takes as input a list of observation times and returns a frequency grid with decent defaults. In [12]: # define frequency function def frequency_grid(times): freq_min = 2*np.pi / (times[-1]-times[0]) # COMPLETE freq_max = np.pi / np.median(times[1:]-times[:-1]) # COMPLETE n_bins = np.floor((freq_max-freq_min)/freq_min * 5.) # COMPLETE print 'Using {} bins'.format(n_bins) return np.linspace(freq_min, freq_max, n_bins) In [13]: # run frequency function omegas = frequency_grid(bjds) Using bins In some cases you'll want to generate the frequency grid by hand, either to extend to higher frequencies (shorter periods) than found by default, to avoid generating too many bins, or to get a more precise estimate of the period. In that case use the following code. We'll use a large fixed number of bins to smoothly sample the periodogram as we zoom in. In [14]: # provided alternate frequency function def alt_frequency_grid(pmin, Pmax, n_bins = 5000): """Generate an angular frequency grid between Pmin and Pmax (assumed to b e in days)""" freq_max = 2*np.pi / Pmin freq_min = 2*np.pi / Pmax return np.linspace(freq_min, freq_max, n_bins) Exercise 3: Computing the Periodogram Calculate the LS periodiogram and plot the power.

7 In [15]: # calculate and plot LS periodogram P_LS = lomb_scargle(bjds, mags, magerrs, omegas) # COMPLETE plt.plot(omegas, P_LS) plt.xlabel('$\omega$') plt.ylabel('$p_{ls}$') Out[15]: <matplotlib.text.text at 0x110483a90> In [16]: # provided: define function to find best period def LS_peak_to_period(omegas, P_LS): """find the highest peak in the LS periodogram and return the correspondi ng period.""" max_freq = omegas[np.argmax(p_ls)] return 2*np.pi/max_freq In [17]: # run function to find best period best_period = LS_peak_to_period(omegas, P_LS) print "Best period: {} days".format(best_period) Best period: days Exercise 4: Phase Calculation Complete this function that returns the phase of an observation (in the range 0-1) given its period. For simplicity set the zero of the phase to be the time of the initial observation. Hint: Consider the python modulus operator, %. Add a keyword that allows your function to have an optional user-settable time of zero phase. In [18]: # define function to phase lightcurves def phase(time, period, t0 = None): """ Given an input array of times and a period, return the corresponding phase.""" if t0 is None: t0 = time[0] return ((time - t0)/period) % 1 # COMPLETE

8 Exercise 5: Phase Plotting Plot the phased lightcurve at the best-fit period. In [19]: # define function to plot phased lc def plot_phased_lc(mjds, mags, magerrs, period, t0=none): phases = phase(mjds, period, t0=t0) # COMPLETE plt.errorbar(phases,mags,yerr=magerrs, #COMPLETE fmt = '_', capsize=0) plt.xlabel('phase') plt.ylabel('magnitude') plt.gca().invert_yaxis() In [20]: # run function to plot phased lc plot_phased_lc(bjds, mags, magerrs, best_period) How does that look? Do you think you are close to the right period? Try re-running your analysis using the alt_frequency_grid command, searching a narrower period range around the best-fit period.

9 In [23]: # COMPLETE omegas = alt_frequency_grid(.6,.65) P_LS = lomb_scargle(bjds, mags, magerrs, omegas) plt.plot(omegas, P_LS) plt.xlabel('$\omega$') plt.ylabel('$p_{ls}$') Out[23]: <matplotlib.text.text at 0x108c4d850> In [24]: # COMPLETE best_period = LS_peak_to_period(omegas, P_LS) print "Best period: {} days".format(best_period) plot_phased_lc(bjds, mags, magerrs, best_period) Best period: days

10 [Challenge] Exercise 6: Calculating significance of the period detection Real data may have aliases--frequency components that appear because of the sampling of the data, such as once per night. Bootstrap significance tests, which shuffle the data values around but keep the times the same, can help rule these out. Calculate the chance probability of finding a LS peak higher than the observed value in random data observed at the specified intervals: use lomb_scargle_bootstrap and np.percentile to find the 95 and 99 percent significance levels and plot them over the LS power. In [78]: Out[78]: D = lomb_scargle_bootstrap(mjds, mags, magerrs, omegas, generalized=true, N_bootstraps=1000) # COMPLETE sig99, sig95 = np.percentile(d, [99, 95]) # COMPLETE plt.plot(omegas, P_LS) plt.plot([omegas[0],omegas[-1]], sig99*np.ones(2),'--') plt.plot([omegas[0],omegas[-1]], sig95*np.ones(2),'--') plt.xlabel('$\omega$') plt.ylabel('$p_{ls}$') <matplotlib.text.text at 0x1111dced0> [Challenge] Exercise 7: Find periods of other sources Now try finding the periods of these sources: , [Challenge] Exercise 9: gatspy Try using the gatspy ( package to search for periods. It uses a slightly different interface but has several nice features, such as automatic zooming on candidate frequency peaks.

11 In [49]: import gatspy ls = gatspy.periodic.lombscarglefast() ls.optimizer.period_range = (0.2,1.2) # we have to subtract the t0 time so the model plotting has the correct phase origin ls.fit(bjds-bjds[0],mags,magerrs) gatspy_period = ls.best_period print gatspy_period plot_phased_lc(bjds, mags, magerrs, gatspy_period) p = np.linspace(0,gatspy_period,100) plt.plot(p/gatspy_period,ls.predict(p,period=gatspy_period)) - Computing periods at 1358 steps Out[49]: [<matplotlib.lines.line2d at 0x1110c2b10>] [Challenge] Exercise 10: Alternate Algorithms Lomb-Scargle is equivalent to fitting a sinusoid to the phased data, but many kinds of variable stars do not have phased lightcurves that are well-represented by a sinusoid. Other algorithms, such as those that attempt to minimize the dispersion within phase bins over a grid of trial phases, may be more successful in such cases. See Graham et al (2013) ( for a review.

12 In [50]: ss = gatspy.periodic.supersmoother(fit_period=true) ss.optimizer.period_range = (0.2, 1.2) ss.fit(bjds-bjds[0],mags,magerrs) gatspy_period = ss.best_period print gatspy_period plot_phased_lc(bjds, mags, magerrs, gatspy_period) p = np.linspace(0,gatspy_period,100) plt.plot(p/gatspy_period,ss.predict(p,period=gatspy_period)) - Computing periods at 1358 steps Out[50]: [<matplotlib.lines.line2d at 0x110d332d0>] [Challenge] Exercise 10: Multi-harmonic fitting Both AstroML and gatspy include code for including multiple Fourier components in the fit, which can better fit lightcurves that don't have a simple sinusoidal shape (like RR Lyrae).

13 In [76]: from astroml.time_series import multiterm_periodogram omegas = alt_frequency_grid(.2,1.2) P_mt = multiterm_periodogram(bjds, mags, magerrs, omegas) #COMPLETE plt.plot(omegas, P_mt) plt.xlabel('$\omega$') plt.ylabel('$p_{mt}$') Out[76]: <matplotlib.text.text at 0x110f6e210> In [77]: best_period = LS_peak_to_period(omegas, P_mt) # COMPLETE print "Best period: {} days".format(best_period) plot_phased_lc(bjds, mags, magerrs, best_period) Best period: days

14 In [75]: ls = gatspy.periodic.lombscargle(nterms=4) ls.optimizer.period_range = (0.2,1.2) ls.fit(bjds-bjds[0],mags,magerrs) gatspy_period = ls.best_period print gatspy_period plot_phased_lc(bjds, mags, magerrs, gatspy_period) p = np.linspace(0,gatspy_period,100) plt.plot(p/gatspy_period,ls.predict(p,period=gatspy_period)) - Computing periods at 1358 steps Out[75]: [<matplotlib.lines.line2d at 0x111440d10>] [Challenge] Exercise 8: Compute all periods This is a big one: can you compute periods for all of the sources in our database with showing evidence of variability? How will you compute variablity? How can you tell which sources are likely to have good periods? In [43]: # open the stored data import shelve import astropy shelf = shelve.open('../data/'+outfile) all_mags = shelf['mags'] all_mjds = shelf['mjds'] all_errs = shelf['magerrs'] all_coords = shelf['ref_coords'] shelf.close()

15 In [64]: # loop over stars variable_inds = [] best_periods = [] best_power = [] chisq_min = 5 with astropy.utils.console.progressbar(all_mags.shape[0],ipython_widget=true) as bar: for i in range(all_mags.shape[0]): # make sure there's real data wgood = (all_mags[i,:].mask == False) n_obs = np.sum(wgood) if n_obs < 40: continue # find variable stars using chi-squared. If the data points are cons istent with a line, reduced chisq ~ 1 chisq = np.sum((all_mags[i,:]-np.mean(all_mags[i,:]))**2./all_errs[i, :]**2./(n_obs - 1.)) if chisq < chisq_min: continue variable_inds.append(i) bjds = barycenter_times(all_mjds[wgood],all_coords[i].ra.degree,all_c oords[i].dec.degree) ls = gatspy.periodic.lombscarglefast() ls.optimizer.period_range = (0.2,1.2) ls.fit(bjds-bjds[0],all_mags[i,:][wgood],all_errs[i,:][wgood]) best_periods.append(ls.best_period) best_power.append(float(ls.periodogram(ls.best_period))) bar.update()

16 - Computing periods at 1357 steps - Estimated peak width = Computing periods at 1357 steps - Computing periods at 1358 steps - Computing periods at 1358 steps - Computing periods at 1358 steps - Computing periods at 1358 steps - Computing periods at 1358 steps - Computing periods at 1358 steps - Computing periods at 1358 steps

17 In [65]: # cut out the NaNs: w = np.isfinite(np.array(best_power)) best_power = np.array(best_power)[w] best_periods = np.array(best_periods)[w] variable_inds = np.array(variable_inds)[w] # sort by most power in the LS peak s = np.argsort(best_power) # reverse s = s[::-1]

18 In [66]: iis = variable_inds[s][:10] periods = best_periods[s][:10] for i,period in zip(iis,periods): # make sure there's real data wgood = (all_mags[i,:].mask == False) print all_coords[i].ra.degree,all_coords[i].dec.degree bjds = barycenter_times(all_mjds[wgood],all_coords[i].ra.degree,all_coord s[i].dec.degree) ls = gatspy.periodic.lombscarglefast() ls.optimizer.period_range = (0.2,2) ls.fit(bjds-bjds[0],all_mags[i,:][wgood],all_errs[i,:][wgood]) plt.figure() plot_phased_lc(bjds, all_mags[i,:][wgood], all_errs[i,:][wgood], period) p = np.linspace(0,period,100) plt.plot(p/period,ls.predict(p,period=period))

19

20

21

22 Other effects to consider Many eclipsing binaries have primary and secondary eclipses, often with comparable depths. The period found by LS (which fits a single sinusoid) will thus often be only half of the true period. Plotting the phased lightcurve at double the LS period is often the easiest way to determine the true period. References and Further Reading Scargle, J. 1982, ApJ 263, 835 ( Zechmeister, M., and Kürster, M. 2009, A&A 496, 577 ( Graham, M. et al. 2013, MNRAS 434, 3423 ( Statistics, Data Mining, and Machine Learning in Astronomy ( (Ivezic, Connolly, VanderPlas, & Gray) gatspy documentation (

Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart

Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart Overview Due Thursday, November 12th at 11:59pm Last updated

More information

Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering

Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering Engineering Problem Solving and Excel EGN 1006 Introduction to Engineering Mathematical Solution Procedures Commonly Used in Engineering Analysis Data Analysis Techniques (Statistics) Curve Fitting techniques

More information

Python. Python. 1 Python. M.Ulvrova, L.Pouilloux (ENS LYON) Informatique L3 Automne 2011 1 / 25

Python. Python. 1 Python. M.Ulvrova, L.Pouilloux (ENS LYON) Informatique L3 Automne 2011 1 / 25 Python 1 Python M.Ulvrova, L.Pouilloux (ENS LYON) Informatique L3 Automne 2011 1 / 25 Python makes you fly M.Ulvrova, L.Pouilloux (ENS LYON) Informatique L3 Automne 2011 2 / 25 Let s start ipython vs python

More information

CSCE 110 Programming I Basics of Python: Variables, Expressions, and Input/Output

CSCE 110 Programming I Basics of Python: Variables, Expressions, and Input/Output CSCE 110 Programming Basics of Python: Variables, Expressions, and nput/output Dr. Tiffani L. Williams Department of Computer Science and Engineering Texas A&M University Fall 2011 Python Python was developed

More information

Advanced Functions and Modules

Advanced Functions and Modules Advanced Functions and Modules CB2-101 Introduction to Scientific Computing November 19, 2015 Emidio Capriotti http://biofold.org/ Institute for Mathematical Modeling of Biological Systems Department of

More information

Intro to scientific programming (with Python) Pietro Berkes, Brandeis University

Intro to scientific programming (with Python) Pietro Berkes, Brandeis University Intro to scientific programming (with Python) Pietro Berkes, Brandeis University Next 4 lessons: Outline Scientific programming: best practices Classical learning (Hoepfield network) Probabilistic learning

More information

Face detection is a process of localizing and extracting the face region from the

Face detection is a process of localizing and extracting the face region from the Chapter 4 FACE NORMALIZATION 4.1 INTRODUCTION Face detection is a process of localizing and extracting the face region from the background. The detected face varies in rotation, brightness, size, etc.

More information

Getting started in Excel

Getting started in Excel Getting started in Excel Disclaimer: This guide is not complete. It is rather a chronicle of my attempts to start using Excel for data analysis. As I use a Mac with OS X, these directions may need to be

More information

Data Exploration Data Visualization

Data Exploration Data Visualization Data Exploration Data Visualization What is data exploration? A preliminary exploration of the data to better understand its characteristics. Key motivations of data exploration include Helping to select

More information

CUDAMat: a CUDA-based matrix class for Python

CUDAMat: a CUDA-based matrix class for Python Department of Computer Science 6 King s College Rd, Toronto University of Toronto M5S 3G4, Canada http://learning.cs.toronto.edu fax: +1 416 978 1455 November 25, 2009 UTML TR 2009 004 CUDAMat: a CUDA-based

More information

Statistics, Data Mining and Machine Learning in Astronomy: A Practical Python Guide for the Analysis of Survey Data. and Alex Gray

Statistics, Data Mining and Machine Learning in Astronomy: A Practical Python Guide for the Analysis of Survey Data. and Alex Gray Statistics, Data Mining and Machine Learning in Astronomy: A Practical Python Guide for the Analysis of Survey Data Željko Ivezić, Andrew J. Connolly, Jacob T. VanderPlas University of Washington and Alex

More information

EXPERIMENTAL ERROR AND DATA ANALYSIS

EXPERIMENTAL ERROR AND DATA ANALYSIS EXPERIMENTAL ERROR AND DATA ANALYSIS 1. INTRODUCTION: Laboratory experiments involve taking measurements of physical quantities. No measurement of any physical quantity is ever perfectly accurate, except

More information

GETTING STARTED WITH LABVIEW POINT-BY-POINT VIS

GETTING STARTED WITH LABVIEW POINT-BY-POINT VIS USER GUIDE GETTING STARTED WITH LABVIEW POINT-BY-POINT VIS Contents Using the LabVIEW Point-By-Point VI Libraries... 2 Initializing Point-By-Point VIs... 3 Frequently Asked Questions... 5 What Are the

More information

VISUAL ALGEBRA FOR COLLEGE STUDENTS. Laurie J. Burton Western Oregon University

VISUAL ALGEBRA FOR COLLEGE STUDENTS. Laurie J. Burton Western Oregon University VISUAL ALGEBRA FOR COLLEGE STUDENTS Laurie J. Burton Western Oregon University VISUAL ALGEBRA FOR COLLEGE STUDENTS TABLE OF CONTENTS Welcome and Introduction 1 Chapter 1: INTEGERS AND INTEGER OPERATIONS

More information

Introduction to Python

Introduction to Python Caltech/LEAD Summer 2012 Computer Science Lecture 2: July 10, 2012 Introduction to Python The Python shell Outline Python as a calculator Arithmetic expressions Operator precedence Variables and assignment

More information

Statistical Distributions in Astronomy

Statistical Distributions in Astronomy Data Mining In Modern Astronomy Sky Surveys: Statistical Distributions in Astronomy Ching-Wa Yip [email protected]; Bloomberg 518 From Data to Information We don t just want data. We want information from

More information

Drawing a histogram using Excel

Drawing a histogram using Excel Drawing a histogram using Excel STEP 1: Examine the data to decide how many class intervals you need and what the class boundaries should be. (In an assignment you may be told what class boundaries to

More information

chapter Introduction to Digital Signal Processing and Digital Filtering 1.1 Introduction 1.2 Historical Perspective

chapter Introduction to Digital Signal Processing and Digital Filtering 1.1 Introduction 1.2 Historical Perspective Introduction to Digital Signal Processing and Digital Filtering chapter 1 Introduction to Digital Signal Processing and Digital Filtering 1.1 Introduction Digital signal processing (DSP) refers to anything

More information

Exercise 0. Although Python(x,y) comes already with a great variety of scientic Python packages, we might have to install additional dependencies:

Exercise 0. Although Python(x,y) comes already with a great variety of scientic Python packages, we might have to install additional dependencies: Exercise 0 Deadline: None Computer Setup Windows Download Python(x,y) via http://code.google.com/p/pythonxy/wiki/downloads and install it. Make sure that before installation the installer does not complain

More information

Part VI. Scientific Computing in Python

Part VI. Scientific Computing in Python Part VI Scientific Computing in Python Compact Course @ GRS, June 03-07, 2013 80 More on Maths Module math Constants pi and e Functions that operate on int and float All return values float ceil (x) floor

More information

STATS8: Introduction to Biostatistics. Data Exploration. Babak Shahbaba Department of Statistics, UCI

STATS8: Introduction to Biostatistics. Data Exploration. Babak Shahbaba Department of Statistics, UCI STATS8: Introduction to Biostatistics Data Exploration Babak Shahbaba Department of Statistics, UCI Introduction After clearly defining the scientific problem, selecting a set of representative members

More information

5: Magnitude 6: Convert to Polar 7: Convert to Rectangular

5: Magnitude 6: Convert to Polar 7: Convert to Rectangular TI-NSPIRE CALCULATOR MENUS 1: Tools > 1: Define 2: Recall Definition --------------- 3: Delete Variable 4: Clear a-z 5: Clear History --------------- 6: Insert Comment 2: Number > 1: Convert to Decimal

More information

6 Scalar, Stochastic, Discrete Dynamic Systems

6 Scalar, Stochastic, Discrete Dynamic Systems 47 6 Scalar, Stochastic, Discrete Dynamic Systems Consider modeling a population of sand-hill cranes in year n by the first-order, deterministic recurrence equation y(n + 1) = Ry(n) where R = 1 + r = 1

More information

STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc.

STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc. STATGRAPHICS Online Statistical Analysis and Data Visualization System Revised 6/21/2012 Copyright 2012 by StatPoint Technologies, Inc. All rights reserved. Table of Contents Introduction... 1 Chapter

More information

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0

VISUAL GUIDE to. RX Scripting. for Roulette Xtreme - System Designer 2.0 VISUAL GUIDE to RX Scripting for Roulette Xtreme - System Designer 2.0 UX Software - 2009 TABLE OF CONTENTS INTRODUCTION... ii What is this book about?... iii How to use this book... iii Time to start...

More information

AMATH 352 Lecture 3 MATLAB Tutorial Starting MATLAB Entering Variables

AMATH 352 Lecture 3 MATLAB Tutorial Starting MATLAB Entering Variables AMATH 352 Lecture 3 MATLAB Tutorial MATLAB (short for MATrix LABoratory) is a very useful piece of software for numerical analysis. It provides an environment for computation and the visualization. Learning

More information

Analog and Digital Signals, Time and Frequency Representation of Signals

Analog and Digital Signals, Time and Frequency Representation of Signals 1 Analog and Digital Signals, Time and Frequency Representation of Signals Required reading: Garcia 3.1, 3.2 CSE 3213, Fall 2010 Instructor: N. Vlajic 2 Data vs. Signal Analog vs. Digital Analog Signals

More information

The Orbital Period Distribution of Wide Binary Millisecond Pulsars

The Orbital Period Distribution of Wide Binary Millisecond Pulsars Binary Radio Pulsars ASP Conference Series, Vol. 328, 2005 F. A. Rasio and I. H. Stairs The Orbital Period Distribution of Wide Binary Millisecond Pulsars B. Willems Northwestern University, Department

More information

MS Access Lab 2. Topic: Tables

MS Access Lab 2. Topic: Tables MS Access Lab 2 Topic: Tables Summary Introduction: Tables, Start to build a new database Creating Tables: Datasheet View, Design View Working with Data: Sorting, Filtering Help on Tables Introduction

More information

Data Analysis Tools. Tools for Summarizing Data

Data Analysis Tools. Tools for Summarizing Data Data Analysis Tools This section of the notes is meant to introduce you to many of the tools that are provided by Excel under the Tools/Data Analysis menu item. If your computer does not have that tool

More information

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations. EXCEL Tutorial: How to use EXCEL for Graphs and Calculations. Excel is powerful tool and can make your life easier if you are proficient in using it. You will need to use Excel to complete most of your

More information

Programming Languages & Tools

Programming Languages & Tools 4 Programming Languages & Tools Almost any programming language one is familiar with can be used for computational work (despite the fact that some people believe strongly that their own favorite programming

More information

GeoGebra Statistics and Probability

GeoGebra Statistics and Probability GeoGebra Statistics and Probability Project Maths Development Team 2013 www.projectmaths.ie Page 1 of 24 Index Activity Topic Page 1 Introduction GeoGebra Statistics 3 2 To calculate the Sum, Mean, Count,

More information

CIS 192: Lecture 13 Scientific Computing and Unit Testing

CIS 192: Lecture 13 Scientific Computing and Unit Testing CIS 192: Lecture 13 Scientific Computing and Unit Testing Lili Dworkin University of Pennsylvania Scientific Computing I Python is really popular in the scientific and statistical computing world I Why?

More information

Planning Observations

Planning Observations Lab 6: Eclipsing Binary Stars (Due: 2008 Apr 23) Binary Stars Binary stars are systems in which two stars orbit each other under their mutual gravitational interaction. It is commonly claimed that most

More information

C. elegans motility analysis in ImageJ - A practical approach

C. elegans motility analysis in ImageJ - A practical approach C. elegans motility analysis in ImageJ - A practical approach Summary This document describes some of the practical aspects of computer assisted analysis of C. elegans behavior in practice. C. elegans

More information

POISSON AND LAPLACE EQUATIONS. Charles R. O Neill. School of Mechanical and Aerospace Engineering. Oklahoma State University. Stillwater, OK 74078

POISSON AND LAPLACE EQUATIONS. Charles R. O Neill. School of Mechanical and Aerospace Engineering. Oklahoma State University. Stillwater, OK 74078 21 ELLIPTICAL PARTIAL DIFFERENTIAL EQUATIONS: POISSON AND LAPLACE EQUATIONS Charles R. O Neill School of Mechanical and Aerospace Engineering Oklahoma State University Stillwater, OK 74078 2nd Computer

More information

Intro to Excel spreadsheets

Intro to Excel spreadsheets Intro to Excel spreadsheets What are the objectives of this document? The objectives of document are: 1. Familiarize you with what a spreadsheet is, how it works, and what its capabilities are; 2. Using

More information

Descriptive Statistics

Descriptive Statistics Y520 Robert S Michael Goal: Learn to calculate indicators and construct graphs that summarize and describe a large quantity of values. Using the textbook readings and other resources listed on the web

More information

Programming Exercises

Programming Exercises s CMPS 5P (Professor Theresa Migler-VonDollen ): Assignment #8 Problem 6 Problem 1 Programming Exercises Modify the recursive Fibonacci program given in the chapter so that it prints tracing information.

More information

Active Vibration Isolation of an Unbalanced Machine Spindle

Active Vibration Isolation of an Unbalanced Machine Spindle UCRL-CONF-206108 Active Vibration Isolation of an Unbalanced Machine Spindle D. J. Hopkins, P. Geraghty August 18, 2004 American Society of Precision Engineering Annual Conference Orlando, FL, United States

More information

AP Physics 1 and 2 Lab Investigations

AP Physics 1 and 2 Lab Investigations AP Physics 1 and 2 Lab Investigations Student Guide to Data Analysis New York, NY. College Board, Advanced Placement, Advanced Placement Program, AP, AP Central, and the acorn logo are registered trademarks

More information

Data Mining: Exploring Data. Lecture Notes for Chapter 3. Slides by Tan, Steinbach, Kumar adapted by Michael Hahsler

Data Mining: Exploring Data. Lecture Notes for Chapter 3. Slides by Tan, Steinbach, Kumar adapted by Michael Hahsler Data Mining: Exploring Data Lecture Notes for Chapter 3 Slides by Tan, Steinbach, Kumar adapted by Michael Hahsler Topics Exploratory Data Analysis Summary Statistics Visualization What is data exploration?

More information

Regression Clustering

Regression Clustering Chapter 449 Introduction This algorithm provides for clustering in the multiple regression setting in which you have a dependent variable Y and one or more independent variables, the X s. The algorithm

More information

Performance Monitoring using Pecos Release 0.1

Performance Monitoring using Pecos Release 0.1 Performance Monitoring using Pecos Release 0.1 Apr 19, 2016 Contents 1 Overview 1 2 Installation 1 3 Simple example 2 4 Time series data 5 5 Translation dictionary 5 6 Time filter 6 7 Quality control tests

More information

T O P I C 1 2 Techniques and tools for data analysis Preview Introduction In chapter 3 of Statistics In A Day different combinations of numbers and types of variables are presented. We go through these

More information

Timing Analysis of X-ray Lightcurves

Timing Analysis of X-ray Lightcurves Timing Analysis of X-ray Lightcurves Michael Nowak, [email protected] X-ray Astronomy School; Aug. 1-5, 2011 Introduction This exercise is designed to give a brief introduction to one aspect of timing

More information

Plotting: Customizing the Graph

Plotting: Customizing the Graph Plotting: Customizing the Graph Data Plots: General Tips Making a Data Plot Active Within a graph layer, only one data plot can be active. A data plot must be set active before you can use the Data Selector

More information

Auto-Tuning Using Fourier Coefficients

Auto-Tuning Using Fourier Coefficients Auto-Tuning Using Fourier Coefficients Math 56 Tom Whalen May 20, 2013 The Fourier transform is an integral part of signal processing of any kind. To be able to analyze an input signal as a superposition

More information

SOFTWARE FOR GENERATION OF SPECTRUM COMPATIBLE TIME HISTORY

SOFTWARE FOR GENERATION OF SPECTRUM COMPATIBLE TIME HISTORY 3 th World Conference on Earthquake Engineering Vancouver, B.C., Canada August -6, 24 Paper No. 296 SOFTWARE FOR GENERATION OF SPECTRUM COMPATIBLE TIME HISTORY ASHOK KUMAR SUMMARY One of the important

More information

Basic Excel Handbook

Basic Excel Handbook 2 5 2 7 1 1 0 4 3 9 8 1 Basic Excel Handbook Version 3.6 May 6, 2008 Contents Contents... 1 Part I: Background Information...3 About This Handbook... 4 Excel Terminology... 5 Excel Terminology (cont.)...

More information

CHM 579 Lab 1: Basic Monte Carlo Algorithm

CHM 579 Lab 1: Basic Monte Carlo Algorithm CHM 579 Lab 1: Basic Monte Carlo Algorithm Due 02/12/2014 The goal of this lab is to get familiar with a simple Monte Carlo program and to be able to compile and run it on a Linux server. Lab Procedure:

More information

An introduction to using Microsoft Excel for quantitative data analysis

An introduction to using Microsoft Excel for quantitative data analysis Contents An introduction to using Microsoft Excel for quantitative data analysis 1 Introduction... 1 2 Why use Excel?... 2 3 Quantitative data analysis tools in Excel... 3 4 Entering your data... 6 5 Preparing

More information

CHAPTER 1 Splines and B-splines an Introduction

CHAPTER 1 Splines and B-splines an Introduction CHAPTER 1 Splines and B-splines an Introduction In this first chapter, we consider the following fundamental problem: Given a set of points in the plane, determine a smooth curve that approximates the

More information

MEP Y9 Practice Book A

MEP Y9 Practice Book A 1 Base Arithmetic 1.1 Binary Numbers We normally work with numbers in base 10. In this section we consider numbers in base 2, often called binary numbers. In base 10 we use the digits 0, 1, 2, 3, 4, 5,

More information

TEST 2 STUDY GUIDE. 1. Consider the data shown below.

TEST 2 STUDY GUIDE. 1. Consider the data shown below. 2006 by The Arizona Board of Regents for The University of Arizona All rights reserved Business Mathematics I TEST 2 STUDY GUIDE 1 Consider the data shown below (a) Fill in the Frequency and Relative Frequency

More information

Battleships Searching Algorithms

Battleships Searching Algorithms Activity 6 Battleships Searching Algorithms Summary Computers are often required to find information in large collections of data. They need to develop quick and efficient ways of doing this. This activity

More information

WEB TRADER USER MANUAL

WEB TRADER USER MANUAL WEB TRADER USER MANUAL Web Trader... 2 Getting Started... 4 Logging In... 5 The Workspace... 6 Main menu... 7 File... 7 Instruments... 8 View... 8 Quotes View... 9 Advanced View...11 Accounts View...11

More information

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share. LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.

More information

Appendix 2.1 Tabular and Graphical Methods Using Excel

Appendix 2.1 Tabular and Graphical Methods Using Excel Appendix 2.1 Tabular and Graphical Methods Using Excel 1 Appendix 2.1 Tabular and Graphical Methods Using Excel The instructions in this section begin by describing the entry of data into an Excel spreadsheet.

More information

Scicos is a Scilab toolbox included in the Scilab package. The Scicos editor can be opened by the scicos command

Scicos is a Scilab toolbox included in the Scilab package. The Scicos editor can be opened by the scicos command 7 Getting Started 7.1 Construction of a Simple Diagram Scicos contains a graphical editor that can be used to construct block diagram models of dynamical systems. The blocks can come from various palettes

More information

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8 ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also

More information

TwinCAT NC Configuration

TwinCAT NC Configuration TwinCAT NC Configuration NC Tasks The NC-System (Numeric Control) has 2 tasks 1 is the SVB task and the SAF task. The SVB task is the setpoint generator and generates the velocity and position control

More information

Orbital Dynamics with Maple (sll --- v1.0, February 2012)

Orbital Dynamics with Maple (sll --- v1.0, February 2012) Orbital Dynamics with Maple (sll --- v1.0, February 2012) Kepler s Laws of Orbital Motion Orbital theory is one of the great triumphs mathematical astronomy. The first understanding of orbits was published

More information

USB 3.0 CDR Model White Paper Revision 0.5

USB 3.0 CDR Model White Paper Revision 0.5 USB 3.0 CDR Model White Paper Revision 0.5 January 15, 2009 INTELLECTUAL PROPERTY DISCLAIMER THIS WHITE PAPER IS PROVIDED TO YOU AS IS WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY,

More information

Astromechanics. 1 solar day = 1.002737909350795 sidereal days

Astromechanics. 1 solar day = 1.002737909350795 sidereal days Astromechanics 13. Time Considerations- Local Sidereal Time The time that is used by most people is that called the mean solar time. It is based on the idea that if the Earth revolved around the Sun at

More information

Measuring Line Edge Roughness: Fluctuations in Uncertainty

Measuring Line Edge Roughness: Fluctuations in Uncertainty Tutor6.doc: Version 5/6/08 T h e L i t h o g r a p h y E x p e r t (August 008) Measuring Line Edge Roughness: Fluctuations in Uncertainty Line edge roughness () is the deviation of a feature edge (as

More information

Directions for Frequency Tables, Histograms, and Frequency Bar Charts

Directions for Frequency Tables, Histograms, and Frequency Bar Charts Directions for Frequency Tables, Histograms, and Frequency Bar Charts Frequency Distribution Quantitative Ungrouped Data Dataset: Frequency_Distributions_Graphs-Quantitative.sav 1. Open the dataset containing

More information

Why you shouldn't use set (and what you should use instead) Matt Austern

Why you shouldn't use set (and what you should use instead) Matt Austern Why you shouldn't use set (and what you should use instead) Matt Austern Everything in the standard C++ library is there for a reason, but it isn't always obvious what that reason is. The standard isn't

More information

Scientific Programming in Python

Scientific Programming in Python UCSD March 9, 2009 What is Python? Python in a very high level (scripting) language which has gained widespread popularity in recent years. It is: What is Python? Python in a very high level (scripting)

More information

The Center for Teaching, Learning, & Technology

The Center for Teaching, Learning, & Technology The Center for Teaching, Learning, & Technology Instructional Technology Workshops Microsoft Excel 2010 Formulas and Charts Albert Robinson / Delwar Sayeed Faculty and Staff Development Programs Colston

More information

Spreadsheet - Introduction

Spreadsheet - Introduction CSCA0102 IT and Business Applications Chapter 6 Spreadsheet - Introduction Spreadsheet A spreadsheet (or spreadsheet program) is software that permits numerical data to be used and to perform automatic

More information

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 4204 Computer Graphics Computer Animation Adapted from notes by Yong Cao Virginia Tech 1 Outline Principles of Animation Keyframe Animation Additional challenges in animation 2 Classic animation Luxo

More information

Basic Tools for Process Improvement

Basic Tools for Process Improvement What is a Histogram? A Histogram is a vertical bar chart that depicts the distribution of a set of data. Unlike Run Charts or Control Charts, which are discussed in other modules, a Histogram does not

More information

Memory Management Simulation Interactive Lab

Memory Management Simulation Interactive Lab Memory Management Simulation Interactive Lab The purpose of this lab is to help you to understand deadlock. We will use a MOSS simulator for this. The instructions for this lab are for a computer running

More information

Programming Using Python

Programming Using Python Introduction to Computation and Programming Using Python Revised and Expanded Edition John V. Guttag The MIT Press Cambridge, Massachusetts London, England CONTENTS PREFACE xiii ACKNOWLEDGMENTS xv 1 GETTING

More information

Module 4: Data Exploration

Module 4: Data Exploration Module 4: Data Exploration Now that you have your data downloaded from the Streams Project database, the detective work can begin! Before computing any advanced statistics, we will first use descriptive

More information

Data Visualization. Christopher Simpkins [email protected]

Data Visualization. Christopher Simpkins chris.simpkins@gatech.edu Data Visualization Christopher Simpkins [email protected] Data Visualization Data visualization is an activity in the exploratory data analysis process in which we try to figure out what story

More information

CSU, Fresno - Institutional Research, Assessment and Planning - Dmitri Rogulkin

CSU, Fresno - Institutional Research, Assessment and Planning - Dmitri Rogulkin My presentation is about data visualization. How to use visual graphs and charts in order to explore data, discover meaning and report findings. The goal is to show that visual displays can be very effective

More information

Whitnall School District Report Card Content Area Domains

Whitnall School District Report Card Content Area Domains Whitnall School District Report Card Content Area Domains In order to align curricula kindergarten through twelfth grade, Whitnall teachers have designed a system of reporting to reflect a seamless K 12

More information

Scientific Graphing in Excel 2010

Scientific Graphing in Excel 2010 Scientific Graphing in Excel 2010 When you start Excel, you will see the screen below. Various parts of the display are labelled in red, with arrows, to define the terms used in the remainder of this overview.

More information

PROBABILITY AND STATISTICS

PROBABILITY AND STATISTICS PROBABILITY AND STATISTICS Grade Level: Written by: Length of Unit: Middle School, Science and Math Monica Edwins, Twin Peaks Charter Academy, Longmont, Colorado Four Lessons, plus a Culminating Activity

More information

E x c e l 2 0 1 0 : Data Analysis Tools Student Manual

E x c e l 2 0 1 0 : Data Analysis Tools Student Manual E x c e l 2 0 1 0 : Data Analysis Tools Student Manual Excel 2010: Data Analysis Tools Chief Executive Officer, Axzo Press: Series Designer and COO: Vice President, Operations: Director of Publishing Systems

More information

Welcome to Introduction to programming in Python

Welcome to Introduction to programming in Python Welcome to Introduction to programming in Python Suffolk One, Ipswich, 4:30 to 6:00 Tuesday Jan 14, Jan 21, Jan 28, Feb 11 Welcome Fire exits Toilets Refreshments 1 Learning objectives of the course An

More information

Excel Guide for Finite Mathematics and Applied Calculus

Excel Guide for Finite Mathematics and Applied Calculus Excel Guide for Finite Mathematics and Applied Calculus Revathi Narasimhan Kean University A technology guide to accompany Mathematical Applications, 6 th Edition Applied Calculus, 2 nd Edition Calculus:

More information

Analysis of Bayesian Dynamic Linear Models

Analysis of Bayesian Dynamic Linear Models Analysis of Bayesian Dynamic Linear Models Emily M. Casleton December 17, 2010 1 Introduction The main purpose of this project is to explore the Bayesian analysis of Dynamic Linear Models (DLMs). The main

More information

VoIP Traffic Analysis. Break through your data

VoIP Traffic Analysis. Break through your data VoIP Traffic Analysis Break through your data We have ACD and ASR, what is missing? Traffic analysis module includes several advanced tools to help you understand what is happening in your network: Call

More information

Python for Scientific Computing. http://bender.astro.sunysb.edu/classes/python-science

Python for Scientific Computing. http://bender.astro.sunysb.edu/classes/python-science http://bender.astro.sunysb.edu/classes/python-science Course Goals Simply: to learn how to use python to do Numerical analysis Data analysis Plotting and visualizations Symbol mathematics Write applications...

More information

Interpreting Data in Normal Distributions

Interpreting Data in Normal Distributions Interpreting Data in Normal Distributions This curve is kind of a big deal. It shows the distribution of a set of test scores, the results of rolling a die a million times, the heights of people on Earth,

More information

Visualizing molecular simulations

Visualizing molecular simulations Visualizing molecular simulations ChE210D Overview Visualization plays a very important role in molecular simulations: it enables us to develop physical intuition about the behavior of a system that is

More information

Benefits of Upgrading to Phoenix WinNonlin 6.2

Benefits of Upgrading to Phoenix WinNonlin 6.2 Benefits of Upgrading to Phoenix WinNonlin 6.2 Pharsight, a Certara Company 5625 Dillard Drive; Suite 205 Cary, NC 27518; USA www.pharsight.com March, 2011 Benefits of Upgrading to Phoenix WinNonlin 6.2

More information

TIPS FOR DOING STATISTICS IN EXCEL

TIPS FOR DOING STATISTICS IN EXCEL TIPS FOR DOING STATISTICS IN EXCEL Before you begin, make sure that you have the DATA ANALYSIS pack running on your machine. It comes with Excel. Here s how to check if you have it, and what to do if you

More information

MetroBoston DataCommon Training

MetroBoston DataCommon Training MetroBoston DataCommon Training Whether you are a data novice or an expert researcher, the MetroBoston DataCommon can help you get the information you need to learn more about your community, understand

More information

SAS Data Set Encryption Options

SAS Data Set Encryption Options Technical Paper SAS Data Set Encryption Options SAS product interaction with encrypted data storage Table of Contents Introduction: What Is Encryption?... 1 Test Configuration... 1 Data... 1 Code... 2

More information

AP * Statistics Review. Descriptive Statistics

AP * Statistics Review. Descriptive Statistics AP * Statistics Review Descriptive Statistics Teacher Packet Advanced Placement and AP are registered trademark of the College Entrance Examination Board. The College Board was not involved in the production

More information

HR Diagram Student Guide

HR Diagram Student Guide Name: HR Diagram Student Guide Background Information Work through the background sections on Spectral Classification, Luminosity, and the Hertzsprung-Russell Diagram. Then complete the following questions

More information

6.170 Tutorial 3 - Ruby Basics

6.170 Tutorial 3 - Ruby Basics 6.170 Tutorial 3 - Ruby Basics Prerequisites 1. Have Ruby installed on your computer a. If you use Mac/Linux, Ruby should already be preinstalled on your machine. b. If you have a Windows Machine, you

More information