How to use generateTemplate

Slides:



Advertisements
Similar presentations
Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
Advertisements

Procedures Procedures are very important for writing reusable and maintainable code in assembly and high-level languages. How are they implemented? Application.
Chapter 7: User-Defined Functions II
Chapter 7: User-Defined Functions II Instructor: Mohammad Mojaddam.
1 Chapter 7: Runtime Environments. int * larger (int a, int b) { if (a > b) return &a; //wrong else return &b; //wrong } int * larger (int *a, int *b)
1. 2 FUNCTION INLINE FUNCTION DIFFERENCE BETWEEN FUNCTION AND INLINE FUNCTION CONCLUSION 3.
1 Class 8. 2 Chapter Objectives Use Swing components to build the GUI for a Swing program Implement an ActionListener to handle events Add interface components.
Reduced Instruction Set Computers (RISC) Computer Organization and Architecture.
Chapter 8 :: Subroutines and Control Abstraction
CH13 Reduced Instruction Set Computers {Make hardware Simpler, but quicker} Key features  Large number of general purpose registers  Use of compiler.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition, Fifth Edition Chapter 7: User-Defined Functions II.
Variables & Random Number Generation.  A penguin is playing arctic basketball. The penguin has a basketball and will push the basketball toward.
Members ❖ LSC 20 Members 6 senior 3 post doctors 4 graduate students 4 technical staffs ❖ KAGRA: LSC plus 4 Senior members HW Lee (data analysis; parameter.
Korean Group 12 th KAGRA face-to-face Meeting August 28, 2015 on behalf Korean Gravitational Wave Group 1.
Hyung Won Lee(Inje), Chunglee Kim(SNU), and Jeongcho Kim(Inje) Nov. 2013, Seoul National University.
CSEB 114: PRINCIPLE OF PROGRAMMING Chapter 7: Pointers.
Functions Math library functions Function definition Function invocation Argument passing Scope of an variable Programming 1 DCT 1033.
By Anand George SourceLens.org Copyright. All rights reserved. Content Owner - Meera R (meera at sourcelens.org)
CMSC 202 Computer Science II for Majors. CMSC 202UMBC Topics Templates Linked Lists.
L131 Assignment Operators Topics Increment and Decrement Operators Assignment Operators Debugging Tips rand( ) math library functions Reading Sections.
Analysis Tools interface - configuration Wouter Verkerke Wouter Verkerke, NIKHEF 1.
Procedures Procedures are very important for writing reusable and maintainable code in assembly and high-level languages. How are they implemented? Application.
Generic Programming in C
Run-Time Environments Chapter 7
Test 2 Review Outline.
Chapter 7: User-Defined Functions II
UNIT – I Linked Lists.
CS1010 Programming Methodology
Exceptions, Templates, and the Standard Template Library (STL)
Optimizing Compilers Background
CS 153: Concepts of Compiler Design October 5 Class Meeting
C Language By Sra Sontisirikit
Objectives Identify the built-in data types in C++
Pointers.
C++ Interlude 2 Pointers, Polymorphism, and Memory Allocation
KAGALI PE code development
Data Structures and Abstract Data Types
Introduction to javadoc
CSC 253 Lecture 8.
KAGALI PE code development
CSC 253 Lecture 8.
Procedures – Overview Lecture 19 Mon, Mar 28, 2005.
CSC 533: Programming Languages Spring 2015
Basic Sensors – Laser Distance Sensor
Array and Method.
Medications Utilities – Mass Void Medications
Assignment Operators Topics Increment and Decrement Operators
Topics discussed in this section:
Assignment Operators Topics Increment and Decrement Operators
CS2011 Introduction to Programming I Arrays (I)
Suppose I want to add all the even integers from 1 to 100 (inclusive)
Initializing variables
Python 19 Mr. Husch.
From C to C++: Summary of weeks 1 - 4
Introduction to javadoc
Pointers Pointers point to memory locations
See requirements for practice program on next slide.
VPL Patterns – Loop Pattern using Notification
Method exercises Without IF
SPL Programming – Procedure Pattern
Python 19 Mr. Husch.
C++ Array 1.
Functions Reasons Concepts Passing arguments to a function
CSCE 206 Lab Structured Programming in C
17CS1102 DATA STRUCTURES © 2018 KLEF – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED.
Assignment Operators Topics Increment and Decrement Operators
CSC 533: Programming Languages Spring 2018
pointer-to-pointer (double pointer)
CSC 533: Programming Languages Spring 2019
Presentation transcript:

How to use generateTemplate By KGWG DAS team Hyung Won Lee, Chunglee Kim, Yeong-Bok Bae, Jeongcho Kim Date 11 Dec. 2017 2017-12-11 KAGRA DAS Telecon

Content A single waveform generation function How to use it Example run Sample output 2017-12-11 KAGRA DAS Telecon

A single waveform generation function /kagali/waveform/src/KGLWaveforms.c void KGLDefaultFDWaveformArray( //begin{proto} KGLStatus *status, /**< [in, out] kgl status pointer */ KGLWaveformModelParams * params, /**< [in] waveform model parameters to print */ double complex *hp, /**< [out] calculated h_plus value array */ double complex *hc, /**< [out] calculated h_cross value array */ double *f, /**< [in] the given frequency value array */ int n_start, /**< [in] start index of frequency values */ int n_end, /**< [in] end index of frequency values */ int N, /**< [in] number of frequency values */ KGLFDWaveform func /**< [in] actual waveform function pointer for a single frequency */ ) //end{proto} 2017-12-11 KAGRA DAS Telecon

What it does Calculate a FD waveform for given approximant and frequency range f : frequency array to be calculated for f[0] to f[N_h-1] actual waveform is calculated from f[n_start] to f[n_end] params : KGLWaveformModelParams pointer containing all necessary information to calculate waveform N : total size of array for hp, and hc(=n_end-n_start+1) hp, hc : complex double array for output waveform 2017-12-11 KAGRA DAS Telecon

2017-12-11 KAGRA DAS Telecon

2017-12-11 KAGRA DAS Telecon

General procedure to use it Include headers Set appropriate values for KGLWaveformModelParams Allocate frequency array and assign values Allocate arrays for hp and hc Call KGLDefaultFDWaveformArray function Save result (hp and hc) or do something you want 2017-12-11 KAGRA DAS Telecon

Headers needed 2017-12-11 KAGRA DAS Telecon

generateTemplate application Location : kagali-v0r4a/kagaliapps/cbc/mpisrc Purpose : show how to generate a given waveform Branch : mcmc 2017-12-11 KAGRA DAS Telecon

Algorithm 2017-12-11 KAGRA DAS Telecon

Options of generateTemplate application One can see this option by generateTemplate --help 2017-12-11 KAGRA DAS Telecon

Part of main code of generateTemplate application Prepare variables Set model params Calculate waveform and save 2017-12-11 KAGRA DAS Telecon

Parse command line options 2017-12-11 KAGRA DAS Telecon

Set appropriate variables 1 2017-12-11 KAGRA DAS Telecon

Set appropriate variables 2 2017-12-11 KAGRA DAS Telecon

KGLWaveformModelParams structure has values in SI unit Allocate memories KGLWaveformModelParams structure has values in SI unit KGLSetComponentMasses : set masses given in solar unit and set also chirp mass and eta KGLSetDistance : set distance given in Mpc unit defined in /kagali/waveform/src/KGLWaveformModelParams.c 2017-12-11 KAGRA DAS Telecon

Generate waveform and save 2017-12-11 KAGRA DAS Telecon

Example run run.sh script 2017-12-11 KAGRA DAS Telecon

Sample run output 2017-12-11 KAGRA DAS Telecon

Sample output(waveform.dat) 2017-12-11 KAGRA DAS Telecon

2017-12-11 KAGRA DAS Telecon

Repository Snapshot 2017-12-11 KAGRA DAS Telecon

What has been done generateTemplate Make a simple application to generate data for the given waveform 2017-12-11 KAGRA DAS Telecon

What to do generateTemplate inferenceMCMC Add options, --strain, --ifo K1/L1/H1/V1, --gps GPS Generate strain data for given template at given observatory and ti me (Jeongcho will implement) inferenceMCMC Parallel tempering MCMC parameter estimation for CBC signal Implementation for likelihood calculation Likelihood function : Young-bok Bae will implement 2017-12-11 KAGRA DAS Telecon

Discussions 2017-12-11 KAGRA DAS Telecon