87
Edith Cowan University Edith Cowan University Research Online Research Online Theses : Honours Theses 2003 A Linux-based graphical user interface for the creation and A Linux-based graphical user interface for the creation and reading of the frame format: Version 2.4 reading of the frame format: Version 2.4 Muhammed Aoun Edith Cowan University Follow this and additional works at: https://ro.ecu.edu.au/theses_hons Part of the Graphics and Human Computer Interfaces Commons Recommended Citation Recommended Citation Aoun, M. (2003). A Linux-based graphical user interface for the creation and reading of the frame format: Version 2.4. https://ro.ecu.edu.au/theses_hons/570 This Thesis is posted at Research Online. https://ro.ecu.edu.au/theses_hons/570

A Linux-based graphical user interface for the creation

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Linux-based graphical user interface for the creation

Edith Cowan University Edith Cowan University

Research Online Research Online

Theses : Honours Theses

2003

A Linux-based graphical user interface for the creation and A Linux-based graphical user interface for the creation and

reading of the frame format: Version 2.4 reading of the frame format: Version 2.4

Muhammed Aoun Edith Cowan University

Follow this and additional works at: https://ro.ecu.edu.au/theses_hons

Part of the Graphics and Human Computer Interfaces Commons

Recommended Citation Recommended Citation Aoun, M. (2003). A Linux-based graphical user interface for the creation and reading of the frame format: Version 2.4. https://ro.ecu.edu.au/theses_hons/570

This Thesis is posted at Research Online. https://ro.ecu.edu.au/theses_hons/570

Page 2: A Linux-based graphical user interface for the creation

Edith Cowan University  

 

Copyright Warning      

You may print or download ONE copy of this document for the purpose 

of your own research or study.  

The University does not authorize you to copy, communicate or 

otherwise make available electronically to any other person any 

copyright material contained on this site.  

You are reminded of the following:  

Copyright owners are entitled to take legal action against persons who infringe their copyright. 

 

A reproduction of material that is protected by copyright may be a 

copyright infringement. Where the reproduction of such material is 

done without attribution of authorship, with false attribution of 

authorship or the authorship is treated in a derogatory manner, 

this may be a breach of the author’s moral rights contained in Part 

IX of the Copyright Act 1968 (Cth). 

 

Courts have the power to impose a wide range of civil and criminal 

sanctions for infringement of copyright, infringement of moral 

rights and other offences under the Copyright Act 1968 (Cth). 

Higher penalties may apply, and higher damages may be awarded, 

for offences and infringements involving the conversion of material 

into digital or electronic form.

Page 3: A Linux-based graphical user interface for the creation

Honours Research Thesis "A Linux-based Graphical User Interface for the

Creation and Reading of the Frame Format" Version 2.4

Author: Muhammed Aoun Supervisor: Dr Dong Li

Student #: 0983222 Date: February 2003

Page 4: A Linux-based graphical user interface for the creation

USE OF THESIS

The Use of Thesis statement is not included in this version of the thesis.

Page 5: A Linux-based graphical user interface for the creation

STANDARD DECLARATION

I certify <hat this thesis does not, to the best of my knowledge and belief:

(i)

(ii)

(iii)

incorporate without acknowledgment any material previously submitted for a degree or diploma in any institution of higher education; contain any material previously published or written by another person except where due reference is made in the text; or

contain any defamatory S/S,/o}

Page 6: A Linux-based graphical user interface for the creation

Honours Research Thesis Mlthlmmed Aoun

Contents

1.0 Abstract 4

2.0 Fig11res and Tables Overview 5

2.1 List of Figures 5

2.2 List of Tables 5

3.0 Introduction 6

3.1 Background 6

3.2 Significance and Purpose 7

3.3 Research Question 10

3.4 Previous Studies in this Field. II

4.0 Literature Review 12

4.1 Specification of a Common Data Frame Format for Interferometric Gravitational Wave Detectors (IGWD) 13

4.2 Frame Library (Fr) User's Manual 15

4.3 QT 17

5.0 Req11irements and Materials 19

5.1 Requirements 19 5.1.1 Tatget Population 20 5.1.2 Research Questions 20 5.1.3 Requirements Limitations 23 5.1.4 Summary of Requirements 23

5.2 Preliminary Investigation 24 5.2.1 Specific QT investigation 24

5.3 Materials 25 5.3.1 Frame Libraries Analysis 25 5.3.2 QT Interest Group 29 5.3.3 QT Libraries Analysis 29 5.3.4 Interfuce Design Prototype 31

6.0 Methodology Dlld Results 33

6.1 Arbitrary data 33

6.2 Dissecting Tasks 35 6.2.1 Writing Frames 35 6.2.2 Reading Frnmes 36 6.2.3 Checking frame file integrity 38 6.2.4 Copying/Merging fmmes 39 6.2.5 Splitting 39

6.3 Automating Tasks 40

7.0 Findings 42

-2-

Page 7: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

7:l Efficiency Metrics_ 42 7 ., ~· Ease of Use and GUI Effectiveness 43

7.3 Possible Future Directions 44

'1.4 Research Limitations 45

8.0 Conclusions 46

9.0 Appendices 47

9.1 Frame Format 47

9.2 J?rame Utilities 49 9.2.1 AsciiZframe 49 9.2.2 Table2frame 51 9.2.3 Frnme Data Dump 52 9.2.4 Fmme Check (FrCheck) 53 9.2.5 Frame Copy(F!Copy) 53 9.2.6 Fmme Dump (FrDump) 55 9.2.7 !'mme Split (FrSplit) 56

9.3 QT Interface Code 57 9,3.1 Main.cpp 57 9.3.2 MainWindov:.h 57 9.3.3 MainWindow.cpp 60 9.3.4 MainWindow.uih 69

9.4 Components Relationship Overview 78

9.5 Collaborators 79

9.6 Definitions and Abbreviations 80

9.7 References 8!

9.8 Change Log 82

-3-

Page 8: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

To gain further knowledge of how the universe began, a new international CO·operated

project wishes not only to "see" stars exploding, but also to "hear" the explosion. It is

thecrised that the ability to "listen" to an explosion is possible by detecting gravitational

waves. Gravitational waves are omitted when a star explodes, travelling through the

cosmos at an exceptional speed. It is estimated that a gravity wave takes only 40

milliseconds to pass through the earth. Thus the aim of this international collaboration is

to detect a gravitational wave.

To accurately detect such waves, there needs to be several ~Jabal detectors. If a

phenomenon is detected at one detector, data from other detectors is compared; to

investigate whether this event occurred simultaneously around the world. An integral

component of gravitational wave detection includes the real· time saving of signals as data

on a generic storage media, e.g. a standard hard disk and later permanent storage e.g. on

compact discs.

It is therefore crucial that there is a con:;tant 24-hour data gathering from the detectors.

24-hours of constant data gathering requires a system that can facilitate for the

acquisition of the data and save the data into a standard format, v:hich was agreed upon

by all the global gravity wave detection sites (known as the frame format. Please refer to

appendix 9.1 for further details concerning this format.). This accommodates the

exchange of the data for analysis between detection sites.

To create exchangeable files in the frame format requires the data to be passed through C

Unix based libraries. These libraries are cumbersome to utilize, require sufficient

computing skills to use and are very inefficient when working with large amounts of data.

The purpose of this honours project is to research and construct a graphical user interface

under the Linux Operating System, to the frame libraries, in order to greatly assist in the

data storage and exchange process.

-4-

• ••

Page 9: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

The figures and tables numbering convention, begin with the section the table or figure is

located in, followed by an index number.

4.3.1 QString QButton text() function.

5.3.3.1 QPushButton image.

5.3.4.1 Frame manipulation tool interface prototype.

6.3.1 Checkbox options example.

9;1.l Framo file format makeup

9.4.1 Data acquisition hardware system.

5.3.1 Main widgets used for the graphical interface

6.1.1 Ascii2framc sample data I

6.1.2 Ascii2frame sample data 2

6.1.3 Table2frame sample data I

7.1.1 Efficiency metrics scenarios

·5· . ~ .. •• ·-

Page 10: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

This document will endeavour to cover the scope of the :t!onours research that shall take

place. It will cover such areas as the background of the study, its significance and its

purpose.

Whilst adhering to the traditional requirements of a "thesis document", this paper also

explores a practical methodology of developing an application which meets the criteria

requested by ACIGA (Australian Consortium for Interferometric Gravitatior.al

Astronomy), i.e. simply put, construction of a Graphical User Interface to the frame

manipu!ation libraries.

Significant achievements have been made in the field of space exploration. It is now

possible to observe and catch glimpses of distant stars and planets through such

instruments as the Hubble Telescope and similarly, it is possible to witness ili.ese as they

explode, giving scientists an insight of how the universe began.

Albert Einstein had theorised the existence of gravity waves. When a star explodes, it is

believed that a wave of gravity is omitted. This gravity wave is said to travel at the speed

of light sweeping across the cosmos, including travelling through the earth. These waves

are so tiny however, that the human being cannot sense their existence. To detect these

waves, a gravity wave detector must be capable of detecting a pin drop on the other side

of the earth.

Gravitational wave detectors have been under development for over 30 years. Increased

funding in the mid 90's has opened the gate for a new generation of gravitational wave

detectors in the form of Interferometers. Four major global locations are currently

developing the detectors. They are listed in the Appendix, Section 9.5.

-6-

Page 11: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

These detectors are located in specific locations to allow the best detection. It was

important to include a detector in the southern hemisphere, thus the location of the AIGO

site near Gingin.

Note: !t is beyond the scope of this document to discuss in detail the Laser

Interferometers. References are made however, to relative literature.

The AIGO detector site remains under the supervision of the physics department of the

University of Western Australia.

The Interferometers, once functioning, will be "online" constantly, thus continues data

gathering is essential. Seismic noise such as wind, voices or even moving people or cars

may effect the detection of gravity waves due to their sheer frailty. Therefore as a basic

necessity, all these noise omitting elements must be counted for and factored out by the

detectors. Various instruments are used to sense these seismic activities. The data from

these instruments also must be saved in the frame format for any future inspection.

Similarly, seismic activity may occur at any time. Consequently, continuous data

gathering is also essential.

The real-time data acquisition from the interferometer and seismic instruments are time

stamped with a GPS signal. Let us assume some detection occurred through the

Interferometer. Data gathered at the same time as the detection, from the seismic

instrwnents, will be analysed to notice whether seismic activity occurred at the same

time, meaning that the Interferometric reading likely occurred due to seismic noise.

For example, a phenomenon was discovered in one detector, say in Japan. The Japanese

site wishes to investigate if any simultaneous phenomena occurred at the other detection

sites. It then requests to have all data gathered during the particular time the phenomena

occurred. The data storerl at the other detection sites cannot be raw. Having so opens the

door to ambiguity and confusion concerning what the data represents, what time it was

taken, etc.

-7-

Page 12: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

As has previously been mentioned, several detectors exist globally, with each detector

requiring constant data acquisition from various sources. This constant gathering builds

up to large amounts of data per day.

Personal size approximation of gathered data depends on several factors. These are based

on:

• Which instrument is used to gather data? (Refer to appendix 9.4 for an overview

of data gathering instrumentation)

• The sample rate at which the instruments are gathering data.

• The timing at which the data is gathered (e.g. perhaps 5 minutes in every hour).

• The number of channels attributed to the instrument.

We can get a brief insight to the expected amount of data to be gathered by doing a

simple calculation based on an anemometer (wind speed and direction measuring

instrument). Although the significance behind the use of the anemometer for the ACIGA

project will not be explored, it is enough to say wind may affect the integrity of

gravitational wave detection, and therefore wind speed and direction measurements are

essential.

A preliminary test carried out by the ACIGA group has found the anemometer has

sampling rate of 1024 hertz, with a sampling depth of2 bits (1 pulse (bit) for wind speed

infonnation and the other for wind direction). 1024 * 2 * 60 (seconds) * 60 (for an hour)

' 24 (for a day) ~ 21 megabytes of data.

21 Mbytes is quite large. Remembering this data only comes from one instrument, with 2

channels, at a medium sampling rate, for 1 day worth of data. The AClGA project

management have quoted LIGO (detector site located in the United States) project team

as saying they gather approximately 1 Terabyte of data per week. It is quite phenomenal.

The "frame format" was agreed upon by all project members as the fonnat in which data

is stored. It requires various pieces of information to be supplied within the frames (see

.g.

Page 13: A Linux-based graphical user interface for the creation

Honours Researc-h Thesis Muhammed Aoun

appendix 5.1 for frame format). This includes the source of the data, GPS timing, channel

names, and various parts of information depending on 'Lhe nature of the data.

LIGO has produced UNIX command based C programs to save data into the frame

format. The ACIGA project bas not bad the capability and know-how thus far to process

raw data into the fiame format, mcinly due to the expertise required to work under a

UNIX environment and the mere cuml'lersome development method of the frame making

programs.

The nature of these programs is command line based. If several files of data are required

for processing, 1 command line has to be manually inputted for every file that is to be

processed. This can be a gruelling task. LIGO stores their data in raw format and not in

frame format. Any data which is required to be exchang~d with other detector sites is

then converted to frames. However, little data exchange at the moment is taking place

due to the fact that the global gravity wave detec.tors are yet to be up and running, thus

the urgency for more efficient data exchange methodologies are not required in the

present, but sometime in the future.

ACIGA wishes to store all their gathered data in the frame format. The rational behind

this is, if any other detector site requires a piece of data, the data will be available online,

with special access privileges to the other detector sites. This saves the hassle of locating

the data, compressing and converting it to frame files, then sending the file to its

destination.

The ACIGA project requires a user friendly, Linux Graphical User Interface (GUI)

application to cater for frame composition from raw data, as well as reading the data

within frame files. The application is to allow automated multi-conversion capabilities

and to limit the repetitive manual conversion requirements when using the LIGO frame

libraries.

-9-

Page 14: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Several research questions exist concerning the methodological approach to developing

the application.

1. Frame libraries

a. How much information on the frame libraries is available and is it freely

accessible?

b. Do the frame libraries allow foreign application interactivity?

2. Programming language

a. Which is the most appropriate language to use for development?

b. Docs the language facilitate foreign library interactivity and is it the most

efficient to use?

c. Does the language facilitate simplifi~d graphical interface construction?

3. Design specifics.

a. How will training in using the applic<:tion take place?

b. What support features will be available to assist in using the application?

c. How will the application be constructed in such a way, that its ease of use

is maximised, whilst addressing the required functionality?

4. Efficiency metrics

a. What will be the improved speed of execution of conversion of frames

files?

b. How will a feasibility study be carried out to ensure an accurate

cost/benefit analysis?

5. Addressing the above queries.

a. Who needs to be interviewed and what needs to be asked?

Page 15: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Three fundamental elements form the basis of the studies in this field.

I. Studies into Linux GUI development.

2. Studies into the frame format and libraries.

3. Studies into constructing a Linux based GUt for the frame libraries.

Studies in Linux GUI interfaces are no doubt large. The sht:er development of tools and

applications are witness to such studies. Linux, which is bas!!d on UNIX, is very much a

command line operating system and "is essentially faceless. The child of the console

generation, Unix began to develop into a life of its own back in the late 1970's on text~

only, teletype and CRT oriented systems that lacked anything remotely resembling

graphical user interfaces."1

In contrast however, studies into the frame format and the frame libraries would be sparse

and extremely limited. Simple reason is due to the fact that the frame format i!:. of little

use to anyone outside the gravitational wave detection project.

This leads to the third and most important element, i.e. studies into GUI development for

the frame libraries. Such a study would undoubtedly be confined to any of the

gravitational wave project groups, since they are the only individuals with any interest in

the frame libraries.

Naturally, close collaboration takes place between the various b'Tavitational wave

detection groups. Contacts with VIRGO and LIGO developers of the frame libraries have

suggested no study into an interface for the frame libraries currently exists, however it

was to be considered in the future.

1 Hammel, M.J. (2001) Ljnux Magazine: The History ofXFree86. Over a Decade ofDevelonment

Page 16: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Answering:

How much information on the frame libraries is available and is it freely accessible?

Which is the most appropriate language to use for development?

Does the language facilitate simplified graphical interface construction?

An investigation of currently available literature related to the frame format is found in

this se~;tion. The frame format was created specifically to suite the needs of the

gravitational wave detection project and thus its use is limited to the domain of the

project participators. Naturally, due to this limited use, very little documentation and

knowledge base is attributed to this format, basically due to the fact that it is a virtually

useless tool for those beyond the scope of the project.

(VIR-MAN-LAP-5400-103, 2002) and (LIGO-T970130-D-E, 2000) are the only two

formal documentations published in relation to the frame format, its specifications and

know-how of the usc of its libraries. Both texts pay specifk details to the make up of the

libraries and explicit descriptions concerning variable attributes. Therefore it is without

choice that frame related literature review be bound by these two documents.

The same must be said concerning QT, the GUI development environment. "There are

only 2-3 books regarding Qt, the popular GUI C++ Toolkit for UNIX, Windows, MacOS

and embedded Linux. Without doubt, the most important and up-to-date book for Qt until

now is "Programming with QT, 2nd Edition", by Matthias Kalle Dalheimer, published by

O'Rcilly."2

It is for this reason, virtually all well known literature ~..:onceming the frame format, and

the QT development environment, will be reviewed. Reasons as to why QT was the

choice of development environment shall also be discussed.

2 Queru, E. (2002) ~eyjcw· Prol!mmming with Ot. 2"" EW.ilim:

Page 17: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Literature title: Specification of a Common Data Frame Format for Interferometric

Gravitational Wave Detectors (IGWD)

Code and Version: VIRGO-SPE-LAP-5400-1 02 December 2000

Available online at: http://wwwlapp.in2p3.fr/virgo/FrameLrf970 130-D-E.pdf

Description - Summary

"This specification fonnally defines the IGWD Frame for data structuring and exchange

that is to be used whe~e applicable"

This document deals intensely with the makeup of the Frame file structure. Each of the

(following) structures is defined, explalned and its data types are listed.

"A Frame is a grouping of multiple C structures composed of the following elements:

• Frame header

• Dictionaries pennitting reconstmction of the C structures via reading of frame

data off media

• Frame history comment

• Detector/instrumental configuration

• Raw fast data

• Serial data

• Event trigger data

• Post-processed/derived data

• Simulated data"

Page 18: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Relevanct ·Evaluation and Analysis

Whilst detailed and technical explaP.ations are given to the frame file format, the question

remains, ho\\ or more specifically, does this relate to the application development. The

make up of the frame files are clearly described in this document. Any individual with

medium C language knowledge may find understanding the document straight forward.

Little mention, however, is made to instructions or examples of how to use the libraries to

create frames, remembering that it is not the aetna! conversion process that which the

application development is mainly co11cemed with, but will the libraries allow to be

executed by a foreign sour·..:e. Where relevance to the study is prevalent may exist, is in

the actual makeup of the frame files. It is required the GUt interface have the ability to

structure the frame files in specification to this literature. Whether it does ur not depends

on the subsequent research.

Page 19: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Literature title: Frame Library (Fr) User's Manual

Code and Version: VIR-MAN-LAP-5400-103 Version 6.02 October 22,2002

Available online at: http://wwwlapp.in2p3.fr/virgo/FrameL/FrDoc.html

Description- Summary

This literature really goes "hand in hand" so to speak, with the above literature. Whilst

the above docume~t deals with the specification of the construction of the fr~me fi!e, this

document deals with the specifications of the construction of t!Je frame libraries, making

reft:rcnce to the frame construct where possible. "The data are stored in a set of C

structw·es descnbed in the document Specification of a Common Data Frame Format for

Interferometric Gravitational Wave Detector (IGWD) (VIR-SPE-LAP-5400-102 and

LIGO-T970l30-E). The variable names cfthc C structures are exactly the one given in

this document" (VIR MAN LAP-5400-103, 2002).

Here, the various libraries available are listed, and each one of them is described. Whilst

not giving the full code of the libraries themsel•tes, what is described is the Input and

Output of variables to the C structures. An example of one such library is FrCheck (i.e.

frame check). This program will do a check on the converted frame file to see whether it

can be read successfully, meaning it was converted successfully. (see section 5.3.1 for

further details concerning FrCheck )

Relevance- Evaluation and Analysis

This document includes the very basis of the instructions needed to know how to run the

frame libraries, clearly signifying the importance to the application development. Let us

revisit the FrCheck library, the following reference is made:

The syntax is: FrCheck options

where option could be:

Page 20: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

-i <input file> Only one file should be used

~d <debug level> (default 1 ). 0 will supress all info and error messages.

-t to scan the file using only the TOC

-s to scan the file using only sequentiel read(TOC not used)

-fGPS time of the first frame to scan (defaul~O) (only used when doing

the random access)

-1 GPS time of the last frame to scan (default: 999999999.) (only used

when doing the random access).

-h to get the help

Using a command under Linux, and from the above information, we may do a basic

check a file similar to the following manner:

$: FrCheck -1 nameoffile

Knowledge of the options of the libraries is essential, for such options have to be

implemented in the GUI and automated, to save the hassle, for e.g. of doing the above

line multiple times.

Page 21: A Linux-based graphical user interface for the creation

Honours Research Thesis

Literature title: Qt Reference Documentation

Version: Qt version 3.1.0

Available online at: http://doc.trolltech.com/3.1/

Description- Summary

Muhammed Aoun

The most comprehensive documentation attributed to the QT development environment

no doubt comes from Trolltech, the developers of QT. The reference documentation is

broken up into several major parts, i.e. Getting started, API Reference and Tools.

Relevance- Evaluation and Analysis

Getting started documentation is excellent in the way it assists new users of QT.

Whitepapers are available which give an overview of the whole QT environment. The

most helpful characteristics however, is the vast number of coding examples that's

included with the literature. "Qt ships with lots of small and some medium-sized example

programs that teach you how to implement various tasks with Qt." "Lots" means

approximately 60. These cover all major aspects from code, to widgets and to using the

various tools.

Perhaps more importantly from the developers point of view is the API reference

documentation. Every single QT class and function is given, explained and links are

availahle to related subjects. For example3:

QString QButton::text () const

Returns the text shown on the button. See the "text'~ orooertv for details. Flgure4J.l

The above reference implies that if one wishes to return the text property of a QButton,

they call the textQ function which is a QString (i.e. string) variable, in the following

manner

QString button Text= new my button->text();

3 Trol\tech Technologies. (2002) OT Reference Documentation

Page 22: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Literature title: Programming with QT: Writing Portable GUI Applications on Ur.ix &

Win 32- znd Edition

Publication:

Author: Matthias Kalle Dalheimer

Description- Summary

"The book is one of the richest and most complete guides of any GUI Toolkit books I

read so faL It starts with a really good introduction for <2t. and also pinpoints the reasons

why Qt is using Gill emulation and not API emulation (Motif, MFC) or API layering

(wxWindows). Quite some food for thought, really."4

Dalheimer explains, "other products allow portable programmmg for Unix and MS

Windows. These products include commercial libraries like Zinc and free libraries like

wxWindows. I have evaluated most of them for my projects and have always found QT

to be the best option"5

Relevance- Evaluation and Analysis

Of particular importance in this book, Dalheimer discusses child processes spawniHg

from the application. "With QProcess, you spawn a process, write to the standard input

channel of this process, read from its standard output and standard error channels, and are

notified when the process has finished working. ,,6

Just as important is the example which is given, giving the reader a greater insight in how

QTworks.

Process = new QProcess();

Process->:;.ddArgument( "Is");

Process->start();

This element fill fonn the base ability in which the GUI can communicate with the frame

libraries.

4 Queru, E. (2002) Book Review: Programming with Ot. 2nd Edition 'Dalheimer, M.K. (2002) Programming with QT 2"d Et\ition: O'Rie\ly 6 Dalheirner, M.K. (2002) Programming with OT 2"~Edition · O'Rielly

-!&

Page 23: A Linux-based graphical user interface for the creation

Honours Research 11tesis Muhammed Aoun

Answering:

Does the language facilitate foreign lib1·ary interactivity and is it the most efficient

to liSe?

How will the application be constructed in such a way, that its case of use is

maximised, whilst addressing the required functionality?

This section explores answers to the research questions. It describes the approach which

data needs to be gathered concerning the desi!,rn and implementation of application, as

well as what tools a1~ to be used to gather this information.

Design considerc.tions include the following investigations:

• Interface design - How is the application to look like. Such requirements are

solely to the preferences of the ACIGA group.

o Range of functionality- is the application limited to only interface to the frame

libraries.

These considerations will take place through interviews. Such information need only

extracted through low-level informal consultation with the target population.

Each consideration shall be evaluated in terms of time I efficiency of implementation.

Time to collect such information is not extensive.

Understanding of the frame libraries takes the bulk of the data gathering; this consists of

understanding the frame structure and the frame libraries. Such information is gathered

through relevant literature reviews and specifications.

Page 24: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

The only pop11laces to benefit from any data gathered, relative to gravitational wave

detection, are those directly or indirectly related to the project. These include the TAMA,

LIGO and VIRGO projects and their individual subordinates. Please refer to Section for

further infonnation concerning these projects.

As previously mentioned, all three have agreed upon that the standard data exchange

format between the detection sites be that of the frame fonnat.

The ACIGA project is the main point of concern. It will be the sole user of any developed

application.

The primary objective of the research, which must be met to satisfy the thesis, is that of

understanding the Frame Libraries and its construction.

To do so, a beneficial method would be that similar to experimental action research.

"'Action Research is a fancy way of saying let's study what's happening at our school and

decide how to make it a better place" (Emily Calhoun, 1994). In tills situation we really

would say "let's study what's happening with the frame libraries and decide how to make

their use much better"

The research questions involve several elements that need to be al~dressed for the creation

and testing of the application.

Page 25: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Frame libraries

How much infOrmation on the frame libraries is available and is it freely accessible?

The best approach to answer this question is basically to do more researching, with the

most efficient method being to contact LIGO and VIRGO directly and asking whether

there are other then the two literatures mentioned above relating to frames.

Do the frame libraries allow fOreign application interactivity?

A study of the libraries themselves would be the best procedure here. Obtaining the

libraries (freely downloadable from the WWW) and creating a small testing application

to check whether interactivity is possible.

Programming language

Which is the most appropriate language to use tor development?

One criterion must be met here. This is whether th~ language can be compiled under the

Linux Operating System environment. If so, the next step is to estimate the easy of use of

the language, for ease of use speeds up production. One critical element is the ease of

creating a GUI. The selection of such languages is not wide, with ANSI C++ being the

most likely option. An exploration of the various languages will take place. Fortunately

most language compilers found under the Linux OS are open~source and freely available

for download.

Does the language [acilitaM foreign library interactivity and is it the most eUicient to

Y..se?

Again, this needs to be addressed by exploring the language itself.

Does the language facilitate simplified graphical inter{i:rce construction?

It is possible to create a GUI using the assembly language, but naturally this 1st

generation language would be a gruesome approach for such a task. Perhaps the real

question here is how easy is it to construct a GUI using the selected language,

Page 26: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

remembering such languages as C++ offer object libraries, where Glli objects sur.h as

windows and menus are a]ready available for use.

Design specifics

How will training in using the application take place?

Remembering that the application is to be used mainly by physicists, not all are

completely computer literate. Perhaps the easiest approach here is to simply ask the target

population if training is required after presenting them with the fmished product.

How will the application he constrncted in such a wav. that its ease o[use is maximised,

whilst addressing the required functionality?

Three issues need to be addressed here, firstly the actual application development. The

libraries may well contain a large array of functionality, with much that may or may not

be needed to be used by d1e ACIGA group. There is constant consultation with

individuals in the ACIGA group; the answer to what functions are needed may be

addressed by them. However, the available functions themselves must be obtained; this is

through the exploration of the frame libraries.

Efficiency metrics

What will be the improved speed of execution of conversion o[frames files?

Arbitrary data will be created, which represents the output of a number channels from,

say, seismic instruments. This data is then passed through the frame libraries to construct

the frames. Various fonns of data will be passed through the libraries, ranging from one

column per one file inputs, to various columns in various files, with files describing the

data that is to be passed through the libraries. It is likely the construct of the arbitrary data

be to a certain specification, likely to be found in the literatures reviewed. The arbitrary

data needed will be provided for by the ACIGA group.

Results will be documented, analysed and used as a basis for the applications

implementation.

Page 27: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

How will a feasibility study be carried out to ensure an accurate co.~t/benefit analvsis?

Basically this is a two step procedure. I) To test the efficiency of the frame libraries. I.e.

how many tasks need to be executed to reach a certain goal? 2) Using the same method,

only with a semi constructed prototype of the GUI to obtain a similar measurement.

Two train limitations exist that may fetter the stud.y impartially.

1. Due to frame libraries being used by only a small audience, infonnation

concerning its system is limited, although the C code is freely published. This

brings the number 2 limitation ...

2. Comprehensive knowledge of the C language is required for understanding the

published code. C is a third generation language requiring time to grasp its

concepts.

1. The ability to create frames from data produced by seismic and other instruments.

a. This includes batch processing data files. It is insufficient if files must be

processed manually one at a time.

2. The ability to read these frame files, and to read the specific contents of them.

3. The :!bility to manipulate the frame files, e.g. extract data from only certain parts of

the frame files, add new data to the frame files, etc.

4. Ensure all frame files coming in or leaving from the ACIGA workstations pass

through inspection of integrity so as to adher~ to the requirements of foreib'll detector

sites.

5. The ability to do the above through a simple to learn, simple to usc graphical user

interface.

Page 28: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

A preliminary investigation assisted in selecting the right development environment to

produce the b'l'aphical interface. The conclusion of this preliminary investigation, as most

likely concluded already, is the QT environment. But it is important to briefly discuss

how, and more specifically why the preliminary investigation came to this conclusion.

Lintl.X Basecf.

The frame libraries and utilities currently only exist under Unix based operating systems.

Due to this necessity, it was left to examine C++ graphical environments under Linux.

Linux is a fairly new operating system, particularly in the field of Windows type

environments (i.e. X windows, Gnome and KDE), the monopolies on graphical

development environments are restricted to Gtk (Gnome Tool Kit) and KDevelop (for

developing KDE native applications) and QT. QT stands out has being portable across

both operating systems, but has the unique capability of also being portable to windows

based systems.

"On Unix systems, QT is the best option; it's portable, fast, and easy to use ... ifyou want

to develop not only for Unix and MS Windows, but also for Macintosh, there is no

alternative but QT. If you are developing for embedded systems (notably, embedded

systems running a version of Linux), you would have a hard time finding any GUJ toolkit

that comes close to QT in tenns of functionaliy"7

Furthennore, "(22. Aug 2002) ~ SANTA CLARA, California ~ Trolltech, the le3der in

single~source, multiplatform software development, today announced that Qt!Embedded

won the "Best Embedded Linux Solution" at last week's LinuxWorld Conference &

Expo. This is the second straight year Trolltech's Qt/Embedded has won this award.',~~

1 Dalbeimer, M.K (2002) Programming with QT 2"rl Edition: O'Rielly s Trolltech Technologies. Trol\tech Wins "Best Embedded Solution" for Scwpd Stmight Year (2002)

Page 29: A Linux-based graphical user interface for the creation

Honours Research TI1esis Muhammed Aoun

In tenns of simplicity; "in their background fN the decision (for the award), the judges

explain, "Qt has by far the more elegant object~orientcd library of classes. Qt excels

because it is a more abstract class library ( ... ]which minimizes the amount of work the

programmer must do in order to write applications. '"'9

Preliminary T! ~h (above) has gathered that a reliable and efficient tool to interface to

the frame library is the QT C++ GUl application framework XII edition (i.e. Linux

edition), see section above.

Hence, it is critical to understand and analyse the two components essential for the GUI

to be investigated further, in particular, concentrating on the most relevant clements

necessary to fulfil the derived requirements. These are the frame libraries and associated

utilities, and offcourse, the QT development environment. These will now be

comprehensively analysed.

Answering: How much information on the frame libraries is available and is it

freely accessible?

The information derived from the requirements analysis leads to a contained number of

frame utilities needed to conclude the development of the graphical interface.

The list of frame manipulating utilities required is listed below:

o Ascii2frame

• Table2frame

o FrameDataDump

• FrCheck

• FrCopy

9 Trolltoch Technologies. (1999) Q1 2 0 Wjns LjnuxWw!d Awan!

·'

Page 30: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

• FrDump

• FrSplit

Each of the listed utilities has specific options in which to run with. For a list and a full

description of these options, please refer to appendix 9.2.

It is very important to differentiate between frame libraries and frame utilities to limit

confusion of the two. Frame utilities are listed above. Frame utilities basically are C

applications which interface to C libraries, and allow the creation, reading, checking, and

splitting of frame files. The GUI will interface to the frame utilities, which in tum,

interface to the frame libraries. Note, as a pre-requisite, the frame utilities will not run

without the frame libraries, and the GUI will not operate without the frame utilities.

Discussing tire Frame LibrarY fFrJ versio11 6 release 02 (October 22, 2002).

The base libraries needed to run the frame manipulation applications/utilities are

adequately called, the Frame Library. "The Frame Library is a software dedicated to the

frame manipulation including file input/output." The basic C structures which interfaces

to upper-level problfams e.g. FrDump (which will be discussed further below) are listed

below.

• Library control

• Frame Handling

• Input File: FrFilel

• Output File: FrFileO

• File checksum

• Error Handling

• FrAdcData

• FrDctector

• FrHistory

• FrMsg

Page 31: A Linux-based graphical user interface for the creation

Honours Research Thesis

• FrProcData

• PrSerData

• FrSimData

o FrSimEvent

• FrStatData

• FrSummary

• FrTable

o FrEvent

• FrVect

Muhammed Aoun

Whilst specific d(;tail in how these libraries operate is beyond the scope of the research, it

is important to briefly discuss how the following utilities, which are needed for the GUI

to interface to, may be affected by the libraries. The utilities incorporate, or make

reference to, these libraries in their code. The utilities cover the range of tasks requested

to be handled for the ACIGA research group (see section 5.1.4 for a summary of

requirements). The following utilities cover such tasks. Their practical use is covered in

section 6.2, where examples can be found.

Ascii2frame

"ascii2frame creates frames containing several channels at different sampling rates,

starting from several series of ASCII files."10

The Ascii2Frame utility inputs a file which contains a single column of data, and outputs

a single frame file. The frame file outputted named similar to P-715231934.F where the

number represents the time at which the file was created. The time is given in Unix local

time.

10 Vicere, A (2002) Frame builder emulation (Fbc) library yl r2

Page 32: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Table2frame

"table2frame converts a single column-formatted file into frames with several channels

all at the same sampling rate."11

By default, table2frame stores the data in SimData structures in the frame file. Looking at

the options (see section 9.2) which come with table2frame, we one such option being­

iype.

The type can be adc, proc, sim. Default sim. Please use

• adc for raw data (adc counts)

• proc for processed data

• sim for simulated data.

This has implications when reading the frame file through FrameDataDump. SimData

structure is not read by FrameDataDump, for the only data structures which are read are

adc (raw data). Thus if we produce a frame file without us"ing the option -type adc, we

would get an error when reading the frame file through FrameDataDump.

FrameDataDump

This utility extracts data stored in a frame file, and allows the options of outputting to a

binary file, or to the screen. It is limited that it allows the output of one channel at a time.

This is where a GUI to this utility is practically useful, in that the application may signal

output of data from a single channel, multiple times automatically.

FrCheck

"This program checks that the frame file could be read successful1y. The file checksum

are also checked if they are available. In case of success, this program returns a positive

value, the number of frames in the file. It returns a negative value in case of error."n

11 Vffi-MAN-LAP-5400-103, (2002) FrnmeLibmty (Frl Users Manual

Page 33: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

This tool is particularly important to use when exchangtng frame files between detectcr

sites. Checking

FrCopv

"This program reads frames from one or more input files, merge them if requested and

write them to one or more output file, using or not data compression. See the help

function bellow for program use." 13

As suggested in the Literature Review section, limited literature is available which helps

users of QT in technical aspects of its use. There does exist however an online QT­

lnterest group which consists of QT users, whom discuss anything related to QT, from

examples of code, to more theoretical know-how. Being part of this group has been

particularly useful, since many practical problems may be asked, and a response from

experienced users and staff is likely to come with a solution to most problei!ls.

Previous questions are archived which fonn a large searchable knowledge base, which is

also an extremely helpful material which assists with the research and development.

This section explores the QT libraries. The combinations of these libraries really make up

the whole of the QT development environment. Let us take the QButton library for

example. The QButto;, is known as a "widget". A widget is a re-usable software

component which can have generic attributes given to it, such as, size, .;:olour, label, etc.

In the example of the QButton widget, it is basically a standard button which is so

prominent in all GUis.

12 Vffi-MAN-LAP-5400-103, (2002) Fmme Library (Fr) Users Manual 13 vnt-MAN-LAP-5400-103, (2002) Frame Library (FU Users MapuHI

Page 34: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

j Fig~u::«=5;:.3~.=::, .7l,::;Q;;H;:u::;tto=n:::widget.

.OK

The QT libraries are vast, with IO's of widgets available for all sorts of tasks. Our main

concern is with widgets which are relative, and would be used in, the interface's

development. After investigation of the widgets available, the following are deemed to be

most appropriate to use in the interface:

QPopupMenu Popup menu used to link sections of the application, e.g. either then the File or Edit menus, and System Settings menu may be added to give the users the ability to tailor the application.

QCheckBox The frame libraries come with options that may be attributed to a file which is to be run through the libraries, e.g. the ascii2frame file has the -d option, which adds a detector name to the frame file. A check box may be checked if they wish to include this option.

QComboBox Used for options with a limited and confmed attributes. For example the -type option is restricted to three elements, adc, sim, or proc. It is ill advisable to allow the user to enter their choice, due to naturally occurring mistakes. A combo box ceases mistakes from occurring.

QLineEdit Line to enter file path.

QListView List of files that have been added, with their selected options.

QPushButton Tite push button shall be clicked on to commit such tasks as, Add Item to list, Process list, etc.

QSpinBox Used for options restricted to numbers only.

QTabWidget The interfaces to the frame applications, e.g. ascii2frame, table2frame etc will be split by tabs. If a user wishes to interface to the ascii2frame librarv, they select the appropriate tab.

Table 5.3.1 Mam wtdgcts used for the graphical mterface.

Page 35: A Linux-based graphical user interface for the creation

--Honours Research Thesis Muhammed Aoun

The following interface was created using QT native C++ code. For the purposes of

abiding by conventional prototype reasoning of use, and not overdoing the requirements,

it is deemed sufficient that an interface be created which only portrays the connection to

the ascii2frame utility.

Figure 5.3.4.1 Frame Manipulation Tool interface prototype.

1. Menu 2. Tab separators 3. Information on the settings 4. Settings to set before creating frame

file 5. Choice to return settings back to

default after adding a file to the list.

7. List of files with descriptions of settings for each file, ready to be processed.

8. Remove button to remove selected item from list, Clear All button to remove all items from list, and a process list button to create frame

Page 36: A Linux-based graphical user interface for the creation

Honours Research Thesis

6. Selected file path.

Muhammed Aoun

files. 9. Feedback messages returned whilst

compiling the list. 10. Progress bar shows how far into the

batc4 QIOcess the i!Jlp}ication is in.

The code for this interface can be found in appendix section 9.3.

One may notice with the naming conventions of the widgets is that they begin with Q.

Obviously this is somehow related to QT. The Q is present to make a distinction between

QT specific libraries, which has its own set of rules and modified laws, with standard

C++ ANSI conventions.

Page 37: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

The methodological approach taken is simple and straight forward.

The method for creating frame files i<; through using arbitrary data which is gathered

from seismic instruments, and plain conjured data. This data is passed through the

utilities by both command line arguments and automated QT native C++ code.

1l1e created frame files are then used to test the utilities which read, copy, check and split

frames.

The outcome of these tasks is discussed in section 7.0 (Findings).

Data used to pass through the frame libraries and utilities are very specific in the way it

must be structured in order for the outputted frame file maintains integrity.

Ascii2frame requires data to be "separated by spaces and/or tabs and/or newlines"14

Therefore the two sample data used for the Ascii2frame utility are samplel.data and

sample2.data.

Table 6.1.1 Ascii_samplel.data contents (note, this data is not in colunms, although it appears so for obvious reasons, it is in fact one long line of data).

0.134386001 0.791153962 0.360409309 0.392439577 0.314344885 0.017116691 0.654190591 0.186685965 0.159960835 0.314728504 0.002161153 0.215129909 0.550453498 0.05624062 0.807946738 0.003319073 0.227756032 0.221669527 0.110173133 0,081753268 0.658575545 0.106246538 0.197627016 0.417980481 0.59303601 0.848221333 0.357054973 0.015491877 0.981957455 0.638099036 0.373528844 0.146437451 0.377246218 0.58519152 0.343893072 0.274018182 0.881383025 0.347487023 0.086053982 0.972393313 0.801217907 0.647346491 0.184241525 0.49098594 0.330341071

14 California Institute of Technology. (2002) Laser Interferometer Gravitational Waye Observatw

Page 38: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

0.719185319 0.348997847 0.37675773 0.744136588 0.00422898 0.847754088 0.679425357 0.310810314 0.156002391 0.297214609 0.127185204 0.80245554 0.866570729 0.59593272 0.249606415 0.482744963 0.741296346 0.856891352 0.890097298 0.048943974 0.526610082 0.397751276 0.169960943 0.637812711 0.043419864 0.102925577 0.364615782 0.368817156 0.326052081 0.916720774 0.982863801 0.242212762 0.842789012 0.284964002

Table 6.1.2 ascii_sample2.data contents

I 012345678910111213141516171819202122232425262728293031 I ;lnDM~~TI38~W41QCM~~~aG50

Table2frame on the other hand, requires data be contained in 2 separate files. First file

containing various columns of data, and the 2nd file describing each column.

Table 6.1.3 table samplel.data 0.1 0.777536777 0.657849614 0.478500865 0.2 0.079988414 0.203283426 0.548240217 0.3 0.74797563 0.799714078 0.19767202 0.4 0.991196075 0.42476208 0.730983234 0.5 0.74430289 0.146442667 0.337391269 0.6 0.094966205 0.183477764 0.332463707 0.7 0.815892846 0.891759714 0.272489679 0.8 0.481988043 0.20666739 0.124026185 0.9 0.851264704 0.268098497 0.766002719 1.0 0.536466749 0.67763535 0.338107593 1.1 0.271390402 0.923680512 0.039316442 1.2 0.949094803 0.961074468 0.757950106 1.3 0.907722001 0.962707438 0.260314288 1.4 0.696741309 0.926560572 0.686696771 1.5 0.368138215 0.304217008 0.900364054 1.6 0.95551948 0.092362579 0.103929237 1.7 0.736558822 0.991027496 0.57508325 1.8 0.568325551 0.746846523 0.95238405

table descri~tionl.desc I time chi ch2 ch3 ch4 I

Page 39: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

The following sub sections will portray two methodologies:

1. Typical methods various frames are created and manipulated not using the GUI. It

is important to understand the workings of these utilities in order to allow the

interfaced application perform the same tasks but in an automated manner. Note,

an explanation of the options which are used in the command line examples can

be found in appendix 9.2.

2. The actual automated tasks being performed by the GUl using native QT C++

code, including error handling. The example we use here is the interface to the

ascii2frame utility.

All code is located in appendix section 9.4.

CreatiiJg ti'ame files using 1/Je Ascii2frame uti !ill'

Manual/y.Command Line arguments Sample one: ascii2frame --channel cht -sampling 1024 -1 ascii_samplel.data -type adc

Output one: P-723158926.F

Sample two: ascii2frame --channel chl -sampling 1024 -I ascii_sample2.data -type adc

Output two: P-723158930.F

Page 40: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Creating fi'ame files using the Tab/e2frame utilitv

Manuallv~Command Li!J}'k' Ggjr~mmm~egnl!its>:__ _______________ -, Sample one: table2frame ~i table_samplel.data -description table_samplel.desc ~type adc -type adc­type adc

Output one: P-723158945.F

Reading Frame files tlrrougtl FrameliJataDump utili!r.

Manual!v~Command Line arguments Sample one: FrameDataDump -rP-723158926.F -Cch1 -d -a

Output one: 0.134386 0.791154 0.360409 0.392440 0.314345 0.017117 0.654191 0.186686 0.159961 0.314728 0.002161 0.215130 0.550453 0.056241 0.807947 0.003319 0.227'156 0.221670 0.110173 0.081753 0.658576 0.1 Oti247 0.197627 0.417980 0.593036 0.848221 0.357055 0.015492 0.981957 0.638099 0.373529 0.146437 0.377246 0.585192 0.343l193 0.274018 0.881383 0.347487 0.086054 0.972393 0.801218 0.647346 0.184242 0.490936 0.330341 0. 719185 0.348998 0.376758 0.744137 0.004229 0.847754 0.679425 0.310810 0.156002 0.297215 0.127185 0.802456 0.866571 0.595933 0.249606 0.482745 0.7412~,6 0.856891 0.890097 0.048944 0.526610 0.397751 0.169961 0.637813 0.043420 0.102926 0.364616 0.368817 0.326052 0.916721 0.982864 0.242213 0.842789 0.284964

I files opened 79 total samples ( 1.000 s) read and 79 (1.000 s) written to standard out The sampling rate is 100.000000 samples/sec The data outPut was continuous.

Sample two: FrameDataDump -IP-723158930.F -Cch1 -d -a

Output two: 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 6.000000 7.000000 8.000000 9.000000 10.000000 11.000000 12.000000 13.000000 14.000000 15.000000 16.000000 17.000000 18.000000 19.000000 20.000000 21.000000 22.000000 23.000000 24.000000 25.000000 26.000000 27.000000 28.000000 29.000000 30.000000 31.000000 32.000000

Page 41: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

33.000000 34.000000 35.000000 36.000000 37.000000 38.000000 39.000000 40.000000 41.000000 42.000000 43.000000 44.000000 45.000000 46.000000 47.000000 48.000000 49.000000 50.000000

1 files opened 50 total samples (1.000 s) read and 50 (1.000 s) written to standard out The sampling rate is 100.000000 samples/sec The data output was continuous.

Sample three: FrameDataDump -IP-723158945.F --Cch 1 -d -a

Output three: 0.777537 0.079988 0.747976 0.991196 0.744303 0.094966 0.815893 0.481988 0.851265 0.536467

1 files opened 10 total samples (1.000 s) read and 10 (1.000 s) written to standard out The sampling rate is 10.000000 samples/sec The data outPut was continuous.

Sample four: FrameDataDump -IP-723158945.F --Cch2 -d -a

Output four: 0.657850 0.203283 0.799714 0.424762 0.146443 0.183478 0.891760 0.206667 0.268099 0.677635

J7-

Page 42: A Linux-based graphical user interface for the creation

Honours Research Thesis

1 files opened 10 total samples (1.000 s) read aod 10 (1.000 s) written to standard out The sampling rate is 10.000000 samples/sec The data O_!!_tput was continuous.

Sample five: FrameDataDump -IP-723158945.F -Cch3 -d -a

Output five: 0.478501 0.548240 0.197672 0.730983 0.337391 0.332464 0.272490 0.124026 0.766003 0.338108

1 files opened 10 total samples (1.000 s) read aod 10 (1.000 s)written to standard out The sampling rate is 10.000000 samples/sec The data outout was continuous.

Checking frame file integrity through FrCheck utilitv

Manually-Command Line arguments Sample one: FrCheck -i IP-723158926.F

Output one:

Test file P-723158926.F Scanning the file Please wait.. ..

1 frames read I frame(s) in file

No read error Checksum OK (2dc89267)

J8

Muhammed Aoun

Page 43: A Linux-based graphical user interface for the creation

Honours Research Thesis

Sample two: FrCheck -i lP-723!58945.F

Output two:

Test file P-723158945.F Scanning the file Please wait....

1 frames read I frame(s) in file

No read error Checksum OK (ef0992b9)

Copving and Merging fi'ames through Fr("'opv uti/i!J!.

Manually~Command Line arguments Sample one: FrCopy -i P-723158945.F -i P-723159876.F -f723158945

Output one: P-723159987 .F

Splitting multiple frame files through the FrSplit utility

Manually~Command Line arguments Sample one: FrSplit -o /ligoapps/ligotools/testing -i P-723159987 .F -n I

Output one:

Muhammed Aoun

P-723158945 .F and P-723159876. F in the directory nigoappsnigotools/testing

Page 44: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Three basic criteria are prevalent and need interfacing from QT code, to the frame libraries, in order to allow automation of processing.

1. The ability to select and set the options which come with each library.

2. The ability to select multiple files to process at once.

3. The ability to run the frame libraries processes from within the GUI, i.e. to start

and end the process.

The selection of options can take place through checkboxes. E.g.

if one wishes to use the -compress and -gzip options, the simply check tlte appropriate

QCheckBox and the relative QComboBox will appear. When processing, the fOllowing

C++ code will be executed to establish whether these options are to be attributed to the

file being converted or not

if( CheckBox9->isChecked() ~TRUE) {compressionLevell = ComboBoxl -> currentText();}

else {compressionLevell = "-";}

To mass process files, one adds the files with the options to the QListltem.

QListViewltem *item- new QListViewltem( ListViewl);

item->setT ext{O,path I );//path item->setT ext{l ,channell );//channel item->setT ext(2,typ e 1 );//type item->setT ext(3 ,sampling 1) ;//sampling item->setTexti4 bitsi )://bits

Page 45: A Linux-based graphical user interface for the creation

Honours Research Thesis

item->setText(S,detector 1 );//detector item->setText( 6,compression 1 );//compression item->setText(7,compressionLevell)//compression rate item->setT ext(S,secsFrame I );//sees/frame item->setT ext(9 ,limit 1 );//limit item->setText( 1 O,framesFile 1 );//frame file item->setText(ll,gpsSecl )j/gps(secs) item->setText( 12,gpsNano 1 );//gps(nano) item->setText( 13,skip 1 )j /skips item->setText( 14,g<~in 1 )j/gain

Muhammed Aonn

Finally, the actual processing takes place. Notice QTs unique ability to start a command

line process from within the actual code, parsing the appropriate options to the new

process, and receiving any feedback.

proc - r.ew QProcess( this );

proc->addArgument( "/ligoapps/ligotools!binlascii2frame" ); //path to actual library. proc->addArgument( "-channel"); II channel name proc->addArgumcnt( channell ); II String variable holding the name of the channel proc->addArgument( "-i" ); II path of file option proc->addArgument( path 1 ); II String variable holding path to file

\_proc->start();//triggcr to execute the above commands and initialize process.

A simple Repeat. .. while number_of_items > 0 loops is sufficient to automate the process.

Page 46: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Answering: Wbnt will be the improved speed and effort of execution of conversion

of frames files?

A simple efficiency metric calculates the time it takes from the beginning to the end of a

task to execute. This includes human interaction.

Four scenarios take place:

I. ascii2frame executed with 5 various 2. ascii2frame executed with 5 various

options set. Repeated once.

Path to file

/usr/local!data/anonemeter/2 _1_ 2002/

options set. Repeated once.

Path to file

/usr/locaVdata/anonemeter/2 _1_ 2002/

3. ascii2frame executed with 5 various 4. ascii2frame executed with 5 various

options set. Repeated 20 times.

Path to file

/usr/local! data/anonemetcr 12 _I_ 2002

options set. Repeated 20 times.

Path to file

/usr/localldata/anonemeter/2 1 2002 L~-:cc-.7"'=·=-=-c==-:-------'--------------l Table 7.1.1 Effic1ency metncs scenanos.

Scenario one:

"ascii2frame -channel chi -i /usr/local/data/anonmenter/2_1_2003 -rletector aciga -

seconds _per_ frame 1 -sampling 1024" is typed into the command liD_ e.

Approximately 35 second'i.

Scenario two:

1. Options set.

2. File selected through popup dialogue box directory navigator.

3. File added to list.

4. List executed.

Page 47: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Approximately 15 second~.

Scenario three:

"ascii2frame -channel chl -i /usr/local/datalanonmenter/2_1_2003 -detector aciga -

seconds _per_ frame 1 -sampling 1024" is typed 20 times into the command line.

Approximatelp I 4 minutes.

Scenario four:

I. Options set.

2. File selected through popup dialogue box directory navigator.

3. File added to list.

4. List executed.

5. Repeat the above 20 times.

Approximately 6 minutes.

The completed GUI interface prototype was exposed to the UWA ACIGA project group

for assessment.

The above timings were taken from users with reasonable computer skills. The results

were quite obvious. No fonnal questionnaires or interviews took place for feedback

concerning the use of the GUI, only infonnal discussions.

For users with limited computer technical know-how, using the manual method was

ambiguous. A user interface clearly simplified the process of creating frame files. For

those with greater computer experience, undoubtedly the interface had sped up a lot of

the conversion process.

4J.

Page 48: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhanuned Aoun

The most difficult task was using the QT development environment. Its own native

concepts meant virtually a new language had to be learnt. Limited literature and support

documentation also cause a steep learning curve to climb. However, once these basic

schemes were understood, and due to assistance from the qt-interest group, development

became straight forward.

QT is a cross-platform application development tor!kit, and is the only graphical

interface toolkit that has the capability of migrating code between various operating

systems and compiling. Linux has long had the reputation of being the "geeks" choice of

computer, signifying the need for more computing skills to use. It if; of tltis advantage,

that the application may be migrated to a windows machine and compiled.

The1e are limitations to this however. The QT development environment under Linux is

freeware and freely distributed. However under Microsoft Windows, the environment

costs hundreds of dollars to purchase.

GUI development under Linux environment is by far less available then that under

windows. As the growth trend of Linux continues, it is likely so will various tools to

assist in Gill developments.

Constant updates will also pay a key in the future roll of the GUI. The gravitational wave

detection project is dynamic. Nc doubt the frame libraries will evolve, meaning the GUI

will have to adjust with these changes.

44

Page 49: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Two major factors limited the research.

1. Lack of literature concerning QT: compared to other development

applications such as Visual Basic, the documentation and knowledge base

of QT is extremely small. Programming books are focal in assisting a

programmer develop applications.

2. The very nature of the research: in essence, the research is not realJy

considered pure research. Research involves a lot of theoretical

investigation. This project however involved a lot of practicality, t.e.

constructing a graphical interface. This limits the research in that the

researcher is limited to a set capacity of matter to explore, and

consequently elaborate upon. This is mainly due to the fact that the

research is at honours level, and confined to a short strict time barrier.

Page 50: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Frame libraries

Judging from the use of the frame libraries and utilities, it is obvious the task of creating,

reading and manipulating frame files can be time consuming, as we;a as confusing to

those who are not accustomed to the Unix "way of doing things". This is particularly true

if it is reauired to process the immense quantity of data that will eventually be produced

by the ACIGA detection facilities.

Graphical User Interface

Automated graphical user interface is the best option to assist in the processing of the

potentially vast amounts of data. Whilst maintaining all the available optim1s of the

library, the GUI helps batch process multiple files from multiple locations, something not

possible to do through one task using the frame utilities and librarit:s, severely cutting

down dispensation time.

UseofQT

QT proved to be an extremely simple to use graphical development environment. The

C++ libraries consist of ready to use objects which allowed the connection to the frame

libraries and the ability to select options, just as one selects option through the command

line.

QT provides the added ability of future portability, in that the code can be recompiled

under windows, or Macintosh systems; something which no other development tool

allows.

4&

Page 51: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

The LIGO/VIRGO Data Frame Format for Interferometric gravitational wave detectors

(IGWD) is a collaborative effort which has evolved out of a frame fonnat design

originated within the VIRGO Project This specification has evolved out of the

recognition for the need of a standard definition of this frame format which can be used

by individual (international) projects wishing to adhere to a common representation of

data produced by IGWD. It is hoped that by using a standard design for data, future

collaborative analyses of data taken by different projects can be promoted more easily.

The predominant type of data stored in frames is time series data of arbitrary duration. It

is possible, however, to encapsulate in frame structures other types of data, e.g., spectra,

lists, vectors or arrays, etc. However, the primary purpose of this specification is to

address how (raw) data are written into frame structures.

It is the intent of the Projects collaborating internationally on this frame definition and

standardization to promote a continued evolution of the standard thrm;gh formal

configuration control, scheduled updates and releases, and code maintenance. A

Consortium or Working Group with representatives from each of the participating

1-rojects will be formed and will have formal control over the contents of this

specification as it evolves.15

15 VffiGO-SPE-LAP·S400-1 02, (2002) Specification of a Common Data Frame Format for Interferometric Gmvirational Wave Detectors QGWD)

47-

Page 52: A Linux-based graphical user interface for the creation

lt~ut 1 Sl.1 m· u~: 1•1'f~ . :nlat~lvl tl)la or ,uw 1 1111.1ltun ., Ill~·

FILE

FRAME

TYPICAL STRUCTURE

FILE HEADER (1 per ~

FRAME

TMLE OF CONTENTS

END OF f'ILE (1 per e)

FRAME MAKE· UP

FRAME HEADER (1 perft:Mie)

DICTIONARV"

DATA CLASSES

END OF FRAME (1perhme)

STRUCTURE MAKE-UP

LENGTH

DATAa.ASS

COUNTER FOR INSTANCE OF ClASS IN FRAME AGGREGATE DATA (VECTOR W/VARfABL.E lYPES)

• Diclionary struc;:tuJe beh;rvior is unique in1hat 1. It pre ceed s header for first frame of file; 2. Dlctlomwy is built up incromcntaUy as addilltional

'"rj p:: ciQ' 0 I= ~ ...,

0 @

;-a ~ Cll

;..... ~

'"rj (p ; Cll

a (p

@ ~ t::t'l (')

CD" ::r C)'

,..., ::r

3 (p Cll

I» u;· ..... a I» ::-;--@ I= "0

Page 53: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

The following frame utilities consist of options needed to be included when the utilities

are executed under a command line (or in Linux tenns, a shell). For examples of

command line arguments, please refer to section 6.2.

http://www .Ida s-sw Jigo.caltech. edu/ligotools!Fbelhtmllascii2frame _ Sc-examp le. htm I

The available options are:

• -detector <name> : give this "name" to the detector

• -channel <name> : create a channel with this name

• -sampling <float> : set the sampling for this channel

• -gain <float> : set the gain for the current channel

• -bits <int> : bits to use to encode this channel

• -type <adclsimlproc>: set the type of channel

• -i <filename> : add filename to the inputs for this channel

• -skip <int> : skip these many chars at the beginning of the current file.

• -limit <int>: limit on the number of items to read from the current file (e.g.: -limit

5 means read 5 numbers.)

• -o <filename> : output base filename>

• -compress <int> : compression type

• -gzip <int> : gzip compression level

• -debug <int> : debug level [default 0]

• -GTimeS <int> : starting frame time in GPS seconds

• -GTimeN <int> : starting frame time, GPS nanoseconds

• -seconds_per_frame <int>: seconds for each frame

• -frames _per_ file <int> : how many frames per file

49-

Page 54: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Remarks:

Compression can be

• 0 no compression

• 1 gzip

• 3 differentiation + gzip

• 5 differentiation+ zero_suppression, only for short

• 6 differentiation + zero_ suppression for short. gzip for others. The default

is 6

Remarks:

The gzip level ranges from 0 (no compression) to 9 (maximum, slow). Default 1

Remarks:

The type can be adc, proc, sim. Default sim. Please use

Remarks:

• adc for raw data (adc counts)

.. proc for processed data

• sim for simulated data.

The allowed number of bits depend on the type:

.. proc or sim:

o if bits< -32, double fonnat is used

o if bits>= -32 float format is used

• adc:

o if bits > 16, long int are used

o if bits > 8, short int

o if bits> 0, char

o if bits< -32, double

o default float

Page 55: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Remarks:

The recognized names for the detectors (case unsensitive) are:

• TAJVU\_300[Tokyo,JP~

• VIRGO [Cascina, ITA]

• GEO_ 600 [Garching, GER]

• LIGO_HANFORD_2K [Hanford, WA, USA]

• LIGO_HANFORD_4K [Hanford, WA, USA]

• LIGO_LIVINGSTON [Livingston, LA, USA]

• PROTOTYPE [Caltech, 40m, Pasadena Ca]

• ALLEGRO [Baton Rouge, LA, USA]

• AURIGA [Padova, IT]

• EXPLORER [CERN, CH && FR]

• NIOBE [Perth, AU]

• NAUTILUS [Frascati, IT]

Note: The above remarks also apply to the following utility (i.e. table2frame)

http://www .ldas-sw .ligo .caltech.edu!ligotoo ls!Fbefhtml/table2frame _ 8c-examp le. html

The switches which can be used are the following:

• -detector <name> : give this "name" to the detector

• -i <file>: read data from "file", should be in tabular fonnat

• -skip <int>: how many chars to skip at the beginning of the input file

e -comment <char>: which comment to assume for the input file

o -description <file>: read from "file" the channel names

• -sampling <float>: sampling frequency

• -channel <name>: set the current channel

• -type <adclproclsim>: the kind of data to store in current cha11nel

Page 56: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

• -gain <float>: the gains to apply to the current channel

o -bits <int>: the bits to encode the current channel

o -GTimeS <int>: set starting time in seconds

• -GTimeN <int>: set nanosecond portion of the starting time

• -seconds _per_ frame <float>: seconds for each frame

• -frames_per_file <int>: how many frames per file

• -o <string>: output base file name, shall be completed with other informations,

including the GPS time.

o -compress <int>: compression type

• -gzip <int>: gzip level

o -debug <int>: debug level

• -l<path> --The path to the frame directory as well as any file search

parameters or a single file name. If search parameters are used the option must be

in single quotes, ie -I'path/*'

• -O<path> --The path to the file in which to output the data

• -C<channel>

• -N<samples>

points

• -T<seconds>

N

• -Sn<samples>

before output

--The channel to extract data from

--The number of samples to extract, -1 for all available

--The number of seconds of data to extract. Use in lieu of-

--The number of samples to skip from the frame files

• -St<seconds> --The number of seconds of data to skip. Use in lieu of -Sn

• -Sf< files> --The number of complete frame files to skip before output

• -D<#> [file} --Output frame library debug info to file; if file is stdout, output

o will be to the screen;#"" debug level"" l(min) to 4(max)

(note

Page 57: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

• ·z

• the space between the nwnber and the file name)

--Place zeros for any time gaps between frames

• -d

file

• -s

• -f

-Display sample values to the screen in lieu of\\Titing a

--Force short int's to be written to the binary file

--Force float's to be written to the binary file

• -a --Supress all output to standard out except that of the time series

This is useful to output data to an ASCll file.

http://wwwlapp.in2p3.fr/virgo/FrameL/FrDoc.html

o -i <input file> Only one file should be used

• -d <debug level> (default 1 ). 0 will suppress all info and error messages.

• -t to scan the file using only the roc • -s to scan the file using only sequential read(TOC not used)

• -f GPS time of the first frame to scan ( default=O) (only used when doing the random

access)

• -l GPS time of the last frame to scan (default: 999999999.) (Only used when doing

the random access).

• -h to get the help

http://www lapp .in2p 3. fr/virgo/F rameL/F rDoc. htm 1

• -i <input file(s)> If more than one files is given after the keyword -i they will be read

in sequence. If several input stream are defmed (several-i followed by name(s)), then

the frame content will be merged

Page 58: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

• -o <output file>

• -f <first frame: (run# frame#) or (GPS time)> Example: -fO 20 will start with nm 0

frame 20. -f6544444 will start at GPS time= 6544444. If this option is used, the

Table Of Content is mandatory and all frames will be read by increasing time.

• -1 <last frame: (run# frame#) or (GPS time)>

• -c <compression type> Compression types are -I (same compression as input file), 0

(no compression), 1 (gzip), 3 (differenciation+gzip), 5 (gzip for float+zcro suppress

forint), 6 (zero suppress forint). The default is 6.

• -a <list of input adc channels>.When this option is used, random access are

perfonned to read only the requested adc channels. Only the Frame header is

returned in addition to the adc data. Additional information like the history records is

not returned.

• -t <list of tag channels> Tag is a channel list with wild cards like: ADC122 ADC5*

If a name start by- it is interpreted as an anti-tag

• -r <new frame length in second> The reshape option works only with one output file.

It assumes that the length of the input frame is a integer number of second. The

starting GPS time of the ou~ut frame will be a multiple of the frame length. The

requested length should be larger than the input frame length.

• -decimate <number of sample to average> The decimation is done on all selected

channel by doing a simple data averaging.

• -d <debug level> (from 0 to 5)

• -noTOCts to not write TOC for time series

• -noChk.Sum to not put checksum in the output file.

• -h (to get the help)

Page 59: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

http://wwwlapp.in2p3.fr/virgo/FrameL/FrDoc.html

• ~i <input file(s)> If more than one files is given after the ke)"Nord -i they will be read

in sequence. If several input stream are defined (several ~i followed by name(s)), then

the frame content will be merged

• -f <first frame: (run# frame#) or (GPS time)> Example: -fO 20 will start with run 0

frame 20. -f 6544444 will start at GPS time~ 6544444

o -1 <last frame: (run# frame II) ,1r (GPS time)>

-t <list of tag channels> Tag is a clr .. ;] list with wild cards like: ADC122 ADC5*

11' a name start by- it is interpreted as an anti-tag

• -d <debug level> (from 0 to 5)

• -h (to get this help)

• If one of the next option is the.re, we do only a partial frame dump

-adc to dump only the FrAdcData information

-sms to dump only the FrSerData information

-proc to dump only the FrProcData information

-s1m to dump only the FrSimData information

-sum to dump only the FrSummary information

-stat to dump only the static information

-raw to dump only the raw data information

-event to dump only the FrEvent and FrSimEvent

Page 60: A Linux-based graphical user interface for the creation

Honours Research Thesis

FrSplit [-o <dirt dir2 dir3 ... >}

Remarks:

[-n <number of files per dir>}

-i <file I file2 file3 ... >

[ -c <compression type>]

• -o : The argument is a list of output directories. If this

option is not gi·;en, then all the output goes into the pwd.

If only oce output directory name is given and a positive

number of files per dir is specified, then a numeric index

is appended to the directory name, starting with 0.

For example: FrSplit -o test -n 10 -i H-input.F

will output the first 10 frames in H-input.F into test.O,

the next 10 into test. I, the next I 0 into test.2, and so on.

• -n : The argument is the number of files to put in each directory.

If this option is not given, then all the output goes into

the first dir given after -o.

• -i: The argument is a Jist of input frame files. You can use a

wildcard, which will be expanded by the shell.

For example: FrSplit -o test -i H* .n 100

• -c: 0 ==no compression, 1 == gzip, 3 =differentiate+ gzip,

5 == zero suppress for int, 6 = gzip for float + zero suppress for int

-1 ==same as input (default)

Muhammed Aoun

Page 61: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

Three files exist. "Main.cpp" is the binding file which connects the declarations header

file "MainWindow.h" to the attributes and application file "MainWindow.cpp." These

first three files offer no functionality "MainWindow.ui.h" is the extra code which is

entered by the programmer.

I* Muhammed Aoun *I 1. # include <qapplication.h> 2. #include "MainWindow.h"

3. int main( int argc, char •argv[] ) 4. ( 5. QApplicatiot1 app ( argc, argv )~

6. Main Window MainFonn; 7. app.setMainWidget( &MainForm ); 8. MainForm.show();

9. return app.exec(); 10. }

/* Muhammed Aoun */ l. #ifndef MAINWINDOW _H 2. #define MAINWINDOW _H 3. 4. #include <qvariant.h> 5. #include <qmainwindow.h> 6. class QVBoxLayout; 7. class QHBoxLayout; 8. class QGridLayout; 9. class QAction; 10. class QActionGroup; 11. class QToo1Bar; 12. class QPopupMenu; 13. class QCheckBox; 14. class QComboBox; 15. class QGroupBox;

Page 62: A Linux-based graphical user interface for the creation

Honours Research Thesis

16. class QLabel; 17. class QLineEdit; 18. class QListView; 19. class QListViewltem; 20. class QProgressBar; 21. class QPushButton; 22. class QSpinBox; 23. class QTabWidget; 24. class QTextEdit; 25. class QWidget; 26. 27. class Main Window: public QMainWindow 28. ( 29. Q_ OBJECT 30. 31. public:

Muhammed Aoun

32. Main Window( QWidget* parent= 0, const char* name =0, WFlags fl = WType TopLevel );

33. -Main Window(); 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60.

QTabWidget• TabWidget5; QWidget• tab; QProgressBar* ProgressBarl; QLabel' TextLabel1_2; QGroupBox* GroupBox9; QTextEdit* TextEdit2; QGroupBox* GroupBox4; QPushButton* PushButton&; QPushButton* PushButton II; QPushButton* PushButton9; QListView* ListViewl; QGroupBox* GroupBoxl; QLabel* TextLabel4; QLabel' TextLabe15; QLabel' TextLabelll; QLabel* TextLabel15; QPushButton* PushButtonl6; QLineEdit* LineEdit2_2; QLabel* TextLatrell; QPushButton* PushButton12; QCheckBox* CheckBox!; QLabel* TextLabel6; QCheckBox* CltcckBoxlO; QLabel* TextLabel12; QCheckBox* CheckBox9; QLabel' TextLabel7;

Page 63: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

61. QCheckBox* CheckBox?; 62. QCheckBox* CheckBox5; 63. QLabel' Textlabe18; 64. QLabel* TextLabe119; 65. QCheckBox* CheckBox4; 66. QLabe!* TextLabe!IO; 67. QLabel* TextLabel14; 68. QLabel' TextLabe19; 69. QCheckBox* CheckBox6; 70. QCheckBox* CheckBox&; 71. QCheckBox* CheckBoxll; 72. QCheckBox* CheckBox12; 73. QLabel* TextLabell3; 74. QLabel' TextLabe116; 75. QComboBox* ComboBox3; 76. QPushButton* PushButton14; 77. QLabeJ' TextLabel2; 78. QCheckBox* CheckBox3; 79. QCheckBox* CheckBox13; 80. QSpinBox* SpinBox3; 81. QSpinBox* SpinBox4; 82. QSpinBox* SpinBox6; 83. QSpinBox* SpinBox9; 84. QSpinBox* SpinBox8; 85. QSpinBox* SpinBox7; 86. QComboBox* ComboBox2; 87. QComboBox* ComboBoYl; 88. QSpinBox* SpinBoxl; 89. QSpinBox' SpinBox2; 90. QSpinBox* SpinBox5; 91. QComboBox* ComboBox7; 92. QCheckBox"' CheckBox2; 93. QLineEdit* LineEdit2; 94. QWidget• tab_2; 95. QWidget' tab_3; 96. QWidget* tab_4; 97. QWidget' tab_5; 98. QWidget* tab_6; 99. QMenuBar *menubar; 100. QPopupMenu *PopupMenu; 101. QPopupMenu *PopupMenu_2; 102. QPopupMenu *PopupMenu_3; 103. QAction* Action; 104. 105. 106. public slots:

Page 64: A Linux-based graphical user interface for the creation

Honours Research Thesis

107. virtual void getFileSlotQ; 108. virtual void addPathSlot(); 109. virtual voidcompileFileSlot(); 110. virtual void removeltem(); 111. virtual void clear All(}; 112. virtual void settingslnformation(); 113. virtual voidcheckChecked(); Jl4. 115. protected: Jl6. ); 117. JIB. #endif//MAINWINDOW_H

I* Muhammed Aoun *I

1. #include "MainWindow.h" 2. #include <qvariant.h> 3. #include <qcheckbox.h> 4. #include <qcombobox.h> 5. #include <qgroupbox.h> 6. #include <qheader.h> 7. #include <qlabel.h> 8. #include <qlineedit.h> 9. #include <qlistview.h> 10. #include <qprocess.h> 11. #include <qprogressbar.h> 12. #include <qpushbutton.h> 13. #include <qspinbox.h> 14. #include <qtabwidget.h> 15. #include <qtextedit.h> 16. #include <qwidget.h> 17. #include <qmime.h> 18. #include <qdragobject.h> 19. #include <qlayout.h> 20. #include <qtooltip.h> 21. #include <qwhatsthis.h> 22. #include <qaction.h> 23. #include <qmenubar.h> 24. #include <qpopupmenu.h> 25. #include <qtoolbar.h> 26. #include <qimage.h> 27. #include <qpixmap.h>

28. #include "MainWindow.ui.h"

Muhammed Aoun

Page 65: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

29. 30. 31. );

static QPixmap uic_load_pixmap_MainWindow( canst QString &name) { canst QMimeSource *m = QMimeSourceFactory::defaultFactory()->data( name

32. if( !m) 33. return QPixmap(); 34. QPixmap pix; 35. QlmageDrag::decode( m, pix); 36. return pix; 37. } 38. /* 39. Constructs a Main Window which is a child of 'parent', with the 40. name 'name' and widget flags set to 'f. 41. * 42. */ 43. MainWiodow::MainWindow( QWidget* parent, const char* name, WFlags fl) 44. : QMainWindow( parent, name, fl) 45. { 46. (void)statusBar(); 47. if(!name) 48. setName( "Main Window"); 49. setEnab1ed( TRUE ); 50. resize( 697, 552 ); 51. setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType )I, 0, 0, sizePolicy().hasHeightForWidth()) ); 52. setMinimumSize( QSize( 21, 80) ); 53. setMaximumSize( QSize( 697, 552) ); 54. setPa1etteForegroundColor( QColor( 0, 85, 127 ) ); 55. setPa1etteBackgroundCo1or( QColor( 0, 85, 127) ); 56. setCaption( trUtfB( "Frame Manipulation Tools" ) ); 57. setlcon( uic _load _pix map_ Main Window( "" ) ); 58. setlconText( trUtf8( "" ) ); 59. setCentraiWidget( new QWidget( this, "qt_central_widget") );

60. TabWidget5 ~new QTabWidget( centra1Widgq), "TabWidgetS" ); 61. TabWidgetS->setGeometry( QRect( 0, 0, 700,510) ); 62. TabWidgetS->setPaletteForegroundColor( QColor( 255,255,255) ); 63. TabWidget5->se:Pa1otteBackgroundColor( QColor( 0, 85, 127 ) ); 64. QFont TabWidget5_font( TabWidget5->font() ); 65. TabWidgetS_font.setFamily( "Times [Urw]" ); 66. Tab WidgetS _font.setBold( TRUE); 67. TabWidget5->setFont( TabWidget5 _font);

68. tab~ new QWidget( TabWidgetS, "tab");

69. ProgressBarl """new QProgressBar( tab, "ProgressBarl" );

Page 66: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

70. ProgressBarl->setGeometry( QRect( 358,454,200,22) ); 71. ProgressBarl->setPaletteBackgroundColor( QColor( 220,220,220) );

72. TextLabel1_2 ~new QLabel( tab, "TextLabel1_2" ); 73. TextLabel1_2->setGeometry( QRect( 38, 455,201,21) ); 74. TextLabel1_2->setPaletteForegroundColor( QColor( 255, 255, 255 ) ); 75. TextLabel1_2->setPaletteBackgroundColor( QColor( 0, 85, 127) ); 76. QFont TextLabel1_2_font( TextLabel1_2->font() ); 77. TextLabel1_2 _font.setFamily( ''lkarus Vulture"); 78. TcxtLabel1_2_font.setltalic( TRUE); 79. TextLabel1_2->setFont( TextLabel1_2_font ); 80. TextLabe11_2->setFrameShape( QLabel::NoFrame ); 81. TextLabell_ 2->setFrameShadow( QLabel::Plain ); 82. TextLabell_2->setText( trUtf8( "ACIGA") ); 83. TextLabel1_2->setAlignment( int( QLabel::AlignCenter) );

84. GroupBox9 =new QGroupBox( tab, "GroupBox9" ); 85. GroupBox9->setGeometry( QRect( IO, 340,681, 110) ); 86. GroupBox9->setPaletteForegroundColor( QColor( 255, 255, 255) ); 87. GroupBox9->setTitle( trUtf8( "Messages"));

88. TextEdit2 =new QTextEdit( GroupBox9, "TextEdit2" ); 89. TextEdit2->setGeometry( QRect( 10, 20, 661,77) );

90. GroupBox4 =new QGroupBox( tab, "GroupBox4" ); 91. GroupBox4->setGeometry( QRect( 10, 199,680, 140) ); 92. GroupBox4->setPaletteForegroundColor( QColor( 255, 255, 255 ) ); 93. GroupBox4->setTitle( trUtf8( "List of Single Column Ascii Files to Convert"));

94. PushButton&= new QPushButton( GroupBox4, "PushButton&"); 95. PushButton8->setGeometry( QRect( 590, 90, 80,30) ); 96. PushButton8->setText( trUtf8( "Process List" ) );

97. PushButton II =new QPushButton( GroupBox4, "PushButton II"); 98. PushButtonll->setGeometry( QRect( 590,20, 80,20) ); 99. PushButtonll->setText( trUtf8( "Remove Item"));

100. PushButton9 =new QPushButton( GroupBox4, "PushButton9" ); 101. PushButton9->setGeometry( QRect( 590, 50, 80, 16) ); 102. PushButton9->setText( trUtf8( "Clear All"));

103. ListViewl =new QListView( GroupBox4, "ListViewl" ); 104. ListViewl->addColumn( trUtf8( "Path ") ); 105. List View 1->header()->setCiickEnabled( FALSE, List View 1->header{)->count() -1 ); 105. ListViewl->addColumn( trUtf8( "Channel"));

Page 67: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

107. List View 1->header()->setClickEnabled( FALSE, List View 1->header()->count() -1 ); 108. ListViewl->addColumn( trUtf8( "Type")); 109. List View 1->header()->setClickEnabled( FALSE, List View 1->header()->count() -1 ); 110. ListViewl->addColumn( trUtf8( "Sampling")); 111. List View 1->header()->setClickEnabled( FALSE, List View 1->header()->count() -1 ); 112. ListViewl->addColumn( trUtf8( "Bits")); 113. ListViewl->header()->setClickEnabled( FALSE, ListViewl->header()->count()-1 ); 114. ListViewl->addColumn( trUtf8( "Detector")); 115. List View 1->header()->setClickEnabled( FALSE, List View 1->header()->count() -1 ); 116. ListView1->addColumn( trUt£8( "Compression")); 117. ListView1->header()->setClickEnabled( FALSE, ListView1->header()->count()-1 ); 118. ListViewl->addColumn( trUtf8( "Comp. Level")); 119. List View 1->header()->setClickEnabled( FALSE, List View 1->header()->count() -1 ); 120. ListViewl->addColumu( trUtf8( "Sees/frame")); 121. List View 1->header()->setClickEnabled( FALSE, List View 1->header()->count() -1 ); 122. ListViewl->addColumn( trUtf8( "Limit")); 123. List View 1->header()->setClickEnabled( FALSE, List View 1->header()->count() -1 ); 124. ListViewl->addColumn( trUtf8( "Frames/file")); 125. ListViewl->header()->setClickEnabled( FALSE, ListViewl->header()->count()-1 ); 126. ListViewl->addColumn( trUtf8( "GPS(secs)") ); 127. List View 1->header()->setClickEnabled( FALSE, ListViewl->header()->count() -1 ); 128. ListViewl->addColumn( trUtf8( "GPS(nano)") ); 129. ListViewl->header()->setClickEnabled( FALSE, ListView1->header()->count()-1 ); 130. ListViewl->addColumn( trUtf8( "Skip")); 131. List View 1->header()->setCiickEnabled( FALSE, List View 1->header()->count() -I ); 132. ListViewl->addColumn( trUtf8( "Gain")); 133. ListViewl->header()->setCiickEnabled( FALSE, ListViewl->header()->count()-1 ); 134. ListViewl->setGeometry( QRect( I 0, 20, 570, 104) );

135. GroupBoxl =new QGroupBox( tab, "GroupBox1" ); 136. GroupBoxl->setGeometry( QRect( 10, 0, 680,195) ); 137. GroupBoxl->setPaletteForegroundColor( QColor( 255,255,255) );

Page 68: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

138. GroupBoxl->setTitle( trUt£8( "Conversion Settings"));

139. TextLabe14 ~new QLabe1( GroupBox1, "TextLabe14" ); 140. TextLabe14->setGeometry( QRect( 184,-42,66, 21) ); 141. TextLabe14->setText( trUtf8( "TextLabe14") );

142. TextLabe15 ~new QLabe1( GroupBox1, "TextLabe15" ); 143. TextLabe15->setGeometry( QRect( 11, 86, 65, 30) ); 144. TextLabe15->setPa1etteForegroundCo1or( QCo1or( 255, 255, 255) ); 145. TextLabe15->setText( trUtf8( "Sees/frame"));

146. TextLabel11 ~new QLabe1( GroupBox1, "TextLabel11" ); 147. TextLabel11->setGeometry( QRect( 12, 55, 50,22) ); 148. TextLabel11->setPa1etteForegroundCo1or( QCo1or( 255, 255, 255 ) ); 149. TextLabel11->seffext( trUtf8( "Sampling"));

150. TextLabell5 ~new QLabe1( GroupBox1, "TextLabell5" ); 151. TextLabell5->setGeometry( QRect( 10, 20, 81,20) ); 152. TextLabell5->setPaletteForegroundColor( QCo1or( 255,255, 255) ); !53. TextLabell5->setText( trUtf8( "Channel Name"));

154. PushButtonl6 =new QPushButton( GroupBoxl, "PushButton16" ); 155. PushButtonl6->setGeometry( QRect( 330, !63, 20,21) ); 156. PushButtonl6->setText( trUtf8( " ... ") );

157. LineEdit2 _2 =new QLineEdit( GroupBoxl, "LineEdit2_2" ); 158. LineEdit2_2->setGeometry( QRect( 100, !63, 220,22) );

159. TextLabell ~new QLabe1( GroupBox1, "TextLabell" ); 160. TextLabell->setGeometry( QRect( 10, 163,84,21) ); 161. TextLabell->setText( trUtf8( "Select data file"));

162. PushButton12 =new QPushButton( GroupBoxl, "PushButtonl211 );

163. PushButton12->setGeometry( QRect( 370, 163, 110,21) ); 164. PushButtonl2->setText( trUtf8( "Add Item to List"));

165. CheckBox! ~new QCheckBox( GroupBox1, "CheckBox!"); 166. CheckBoxl->setGeometry( QRect( 500, 163, 160,21) ); 167. CheckBox1->setTcxt( trUtf8( "Return to default settings"));

168. TextLabel6 ~new QLabel( Group Box!, "TextLabel6" ); 169. TextLabel6->setGeometry( QRect( 526, 90, 66, 22) ); 170. TextLabe16->setText( trUtf8( "Frames/file" ) );

171. CheckBox!O ~new QCheckBox( Group Box!, "CheckBox!O" ); 172. CheckBox!O->setGeometry( QRect( 598,92, 21,21) );

Page 69: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

173. CheckBoxiO->setText( trUtfl!( "CheckBoxiO") );

174. TextLabell2 ~new QLabel( GroupBoxl, "TextLabell2" ); 175. TextLabell2->setGeometry( QRect( 354,86, 73,30) ); 176. TextLabell2->setPaletteForegroundColor( QColor( 255, 255, 255) ); 177. TextLabell2->setText( trUtf8( "Compression \n" 178. "Level"));

179. CheckBox9 =new QCheckBox( GroupBox1, "CheckBox9" ); 180. CheckBox9->setGeometry( QRect( 429,92, 21,21) ); 181. CheckBox9->setText( trUtfl!( "CheckBox9") );

182. TextLabel7 ~new QLabel( GroupBoxl, "TextLabe17" ); !83. TextLabe17->setGeometry( QRect( 172, 90, 73, 22) ); 184. TextLabel7->setText( trUtf8( "Compression"));

185. CheckBox?= newQCheckBox( GroupBox1, "CheckBox?"); 186. CheckBox7->setGeometry( QRect( 253,92, 21,21) ); 187. CheckBox7->setText( trUtfll( "CheckBox7") );

188. CheckBoxS =new QCheckBox( GroupBox1, "CheckBox5" ); 189. CheckBox5->setGeometry( QRect( 465,52, 21,21 ) ); 190. CheckBox5->setText( trUtf8( "CheckBox5") );

191. TextLabe18 =new QLabel( GroupBox1, "TextLabel8" ); 192. TextLabel8->setGeometry( QRect( 426,52, 30,22) ); 193. TextLabel8->setPaletteForegroundColor( QColor( 255,255,255) ); 194. TextLabel8->setText( trUtf8( "Limit"));

195. TextLabell9 ~new QLabel( GroupBoxl, "TextLabell9" ); 196. TextLabell9->setGeometry( QRect( 289,51, 30,22) ); 197. TextLabell9->setText( trUtfl!( "Gain"));

198. CheckBox4 =new QCheckBox( GroupBox1, "CheckBox4" ); !99. CheckBox4->setGeometry( QRect( 324,52, 21,21) ); 200. CheckBox4->setText( trUtf8( "CheckBox4") );

201. TextLabellO =new QLabel( GroupBox1, "TextLabellO" ); 202. TextLabellO->setGeometry( QRect( 165, 54, 25,22) ); 203. TextLabellO->setPaletteForegroundColor( QColor( 255,255,255) ); 204. TextLabellO->setText( trUtfl!( "Bits"));

205. TextLabel14 =new QLabel( GroupBox1, "TextLabel14" ); 206. TextLabell4->setGeometry( QRect( 10, 126,63,22) ); 207. TextLabell4->setPaletteForegroundColor( QColor( 255,255,255) ); 208. TextLabell4->setText( trUtfl!( "GPS (sees)"));

Page 70: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

209. TextLabel9 ~new QLabel( GroupBoxl, "TextLabel9" ); 210. TextLabel9->setGeometry( QRect( 569,50, 26,22) ); 211. TextLabel9->setPaletteForegroundColor( QColor( 255, 255, 255 ) ); 212. TextLabel9->setText( trUtf8( "Skip"));

213. CheckBox6 =new QCheckBox( GroupBoxl, "CheckBox6" ); 214. CheckBox6->setGeometry( QRect( 601,52, 21,21) ); 215. CheckBox6->setText( trUtf8( "CheckBox6") );

216. CheckBox8 = newQCheckBox( Group Box I, "CheckBox8" ); 217. CheckBox8->setGeometry( QRect( 81, 92, 21, 21 ) ); 218. CheckBox8->setText( trUtf8( "CheckBox8") );

219. CheckBox II~ new QCheckBox( GroupBoxl, "CheckBox II"); 220. CheckBoxll->setGeometry( QRect( 8!, 128,21,21) ); 221. CheckBoxll->setText( trUtf8( "CheckBox II"));

222. CheckBox12 =new QChcckBox( GroupBoxl, "CheckBoxl2" ); 223. CheckBoxl2->setGeometry( QRect( 314,128,21,21) ); 224. CheckBoxl2->setText( trUtf8( "CheekBoxl2") );

225. Tex!Labell3 ~new QLabel( GroupBoxl, "TextLabell3" ); 226. TextLabeli3->setGeometry( QRect( 247,126,64,22) ); 227. TextLabel!3->setPaletteForegroundColor( QColor( 255,255,255) ); 228. TextLabell3->setText( trUtf8( "GPS (nano)") );

229. TextLabel!6 ~new QLabel( GroupBoxl, "TextLabel!6" ); 230. TextLabeli6->setGeornetry( QRect( 274,20, 31, 22) ); 231. TextLabel!6->setPaletteForegroundCo!or( QColor( 255,255,255) ); 232. TextLabel!6->setText( trUtf8( "Type"));

233. CotnboBox3 =new QComboBox( FALSE, GroupBoxl, "ComboBox3" ); 234. ComboBox3->insertltem( trUtf8( "a de")); 235. ComboBox3->insertltem( trUtfF: "proc") ); 236. ComboBox3->insertltem( trUtf8( "sim") ); 237. ComboBox3->setGeometry( QRect( 314, 20, 80, 22) );

238. PushButtonl4 =new QPushButton( GroupBoxl, "PushButton14" ); 239. PushButtonl4->setGeometry( QRect( 455,20, 190,21) ); 240. PushButton14->setText( trUt£8( "lnfonnation About These Settings"));

241. TextLabel2 ~new QLabel( GroupBoxl, "TextLabel2" ); 242. TextLabel2->setGeometry( QRect( 493, 128,52,21) ); 243. TextLabel2->setPaletteForegroundColor( QColor( 255, 255, 255) ); 244. TextLabel2->setText( trUtf8( "Detector"));

66

Page 71: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

245. CheckBox3 =new QCheckBox( GroupBoxl, "CheckBox3" ); 246. CheckBoxJ->setGeometry( QRect( 195, 54, 21, 21 ) ); 247. CheckBoxJ->setText( trUtfB( "CheckBox)"));

248. CheckBox!J ~new QCheckBox( GroupBoxl, "CheekBox!3" ); 249. CheckBox!J->setGeometry( QRect( 554, 128,21,21) ); 250. CheckBoxll->setText( trUt!S( "CheckBox!J") ); 251. CheckBox!J->setChecked( TRUE);

252. Spinl3ox3 ""new QSpinBox( GroupBox1, "SpinBox3" ); 253. SpinBoxJ->setEnabled( FALSE); 254. SpinBox3->setGeometry( QRect( I 03, 54, 40, 22) ); 255. QPalerte pal;

256. pal.setDisabled( cg ); 257. ComboBox7->setPalette( pal);

258. CheckBox2 =new QCheckBox( GroupBoxl, "CheckBox2" ); 259. CheckBox2->setGeometry( QRect( 81, 56, 21,21) ); 260. CheckBox2->setText( trUtfB( "CheckBox2") );

261. LineEdit2 ""new QLineEdit( GroupBoxl, "LineEdit2" ); 262. LineEdit2->setGeometry( QRect( I 02, 20, 130, 22) ); 263. LineEdit2->setFocusPolicy( QLineEdit::StrongFocus ); 264. LineEdit2->setMaxLength( 20 ); 265. TabWidget5->insertTab( tab, trUtf8( "To Frames- Single Ascii"));

266. tab_2 ~new QWidget( TabWidget5, "tab_2'' ); 267. TabWidget5->insertTab( tab_2, trUtfB( "To Frames- Ascii table"));

268. tab_3 ~new QWidget( TabWidget5, "tab_3" ); 269. TabWidget5->insertTab( tab_3, trUtf8( "Split Frames"));

270. tab_ 4 ~new QWidget( TabWidget5, "tab_ 4" ); 271. TabWidget5->insertTab( tab_4, trUtfB( "Merge/Copy"));

272. tab_5 ~new QWidget( TabWidget5, "tab_5" ); 273. TabWidget5->insertTab( tab_5, trUtfB( "Output to Screen"));

274. tab_6 ~new QWidget( TabWidgetS, "tab_6" ); 275. TabWidget5->insertTab( tab_6, hUtf8( "Integrity Check"));

276. II actions 277. Action= new QAction( this, "Action"); 278. Action->setText( trUtf8( "Action"));

Page 72: A Linux-based graphical user interface for the creation

Honours Research 11tesis Muhammed Aoun

279. II toolbars

280. II menubar 281. menubar ==new QMenuBar( this, "menubar" );

282. PopupMenu ==new QPopupMenu( this); 283. menubar->insertltem( trUtfS( "&File"), PopupMenu );

284. PopupMenu_2 =new QPopupMenu( this); 285. menubar->insertltem( trUtfS( "&System Settings"), PopupMenu_2 );

286. PopupMenu_3 =new QPopupMenu( this); 287. menubar->insertltem( trUtfS( "&Help"), PopupMenu_3 );

288. II signals and slots connections 289. connect( PushButtonl6, SIGNAL( clicked()), this, SLOT( getFileSiot()) ); 290. connect( PushButtoni2, SIGNAL( clicked()), this, SLOT( addPathSiot()) ); 291. connect( PushButton&, SIGNAL( clicked()), this, SLOT( compileFileSiot()) ); 292. connect( PushButtonl4, SIGNAL( clicked()), this, SLOT( settingsinformation()) ); 293. connect( PushButton!!, SIGNAL( clicked()), this, SLOT( removeltem()) ); 294. connect( PushButton9, SIGNAL( clicked()), this, SLOT( clear All())); 295. connect( CheckBox2, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 296. connect( CheckBox3, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 297. connect( CheckBox4, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 298. connect( CheckBox5, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 299. connect( CheckBox6, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 300. connect( CheckBox&, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 301. connect( CheckBox7, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 302. connect( CheckBox9, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 303. connect( CheckBoxiO, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 304. connect( CheckBox!!, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 305. connect( CheckBoxl2, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 306. connect( CheckBoxl3, SIGNAL( clicked()), this, SLOT( checkChecked()) ); 307. }

308. /* 309. Destroys the object and frees 'ny allocated resources 310. */ 311. MainWindow::~MainWindow() 312. {

Page 73: A Linux-based graphical user interface for the creation

Honours Research Thesis

313. II no need to delete child widgets, Qt does it all for us J 14. I

Muhammed Aoun

1. ~~·~~~··~··~················~··································· 2. •• ui.h extension file, included from the uic-gcnerated form implementation. 3. u

4. •• If you wish to add, delete or rename slots use Qt Designer which will 5. • • update this file, preserving your code. Create an in it() slot in place of 6. •• a constructor, and a destroy() slot in place of a destructor. 7 .••••••••••••• , •••••••••••••••••••••••••••••••••••••••••••••••••• , 8. #:nclude <qfiledialog.h> 9. #include <qfiledlg.h> \0. #include <qlistview.h> II. #include <qmessagebox.h> 12. #include <qprocess.h> 13. #include <qfilcinfo.h> 14. #include -:qvalidator.h> 15. #include <ctypc.h> \6. #include <qlineedit.h> 17. #include <qregexp.h> 18. #include <qapplication.h>

19. QString type\; 20. QString channel!; 21. QString compression\; 22. QString compression Levell; 23. QString detector!; 24. QString path I: 25. QString sampling!; 26. QString secsFramel; 27. QString framesFilel; 28. QStriflg gpsSecl; 29. QString gpsNano 1; 30. QString bits I; 31. QString limit 1; 32. QString skip I; 33. QString gain\; 34. int choice; 35. QRcgExp rx("[\\w ]"):1/abcdcfghijklmnopqrstuvwxyz 1234567890 _ 36. QRegExpValidator validator(rx,O);

37. void MainWindow::gctFileSlot()

Page 74: A Linux-based graphical user interface for the creation

Honours Research Thesis

38. { 39. QString filename= QFileDialog::getOpenFileName("l","*.*"); 40. LineEdit2_2 -> setText (filename); 41.}

42. void MainWindow::addPathSlot() 43. {

44. type 1 = ComboBox3 -> currentText(); 45. channel!= LineEdit2 ->text(); 46. path I = LineEdit2_2->text();

47. if ( CheckBox7->isCheckcd() ==TRUE) 48. { 49. compression 1 = ComboBox2 -> currentText(); 50 1 51. else 52. { 53. compression! = "-"; 54. }

55. if ( CheckBox9->isChecked() ==TRUE) 56. { 57. compressionLevell = ComboBoxl -> currentText(); 58. } 59. else 60. { 61. compressionLevell = "-"; 62. }

63. if ( CheckBoxl3->isChccked() ==TRUE) 64. { 65. detector!= ComboBox7 ->current Text(); 66. } 67. else 68. { 69. detector!= "-"; 70. )

71. if( CheckBox2->isChecked() ==TRUE) 72.{ 73. sampling!= SpinBox3 -> cleanText(); 74. ) 75. else 76. {

Muhammed Aoun

Page 75: A Linux-based graphical user interface for the creation

Honours Research Thesis

77. sampling I= "~"; 78. }

79. if ( CheckBox8->isChecked() ~~TRUE) 80. ( 81. secsFramel = SpinBox7-> cleanText(); 82.} 83. else 84. ( 85. secsFramel = "-";

86. }

87. if ( CheckBox I 0->isChecked() ~ TRUE) 88. ( 89. framesFilel = SpinBoxl -> cleanText(); 90. } 91. else 92. ( 93. framesFilel = "-";

94. }

95. if ( CheckBox 11->isChecked() ~TRUE) 96. ( 97. b'PSSecl = SpinBox2 -> cleanTextO; 98. } 99. else 100. 101. 102.

gpsSecJ = "~";

}

103. if( CheckBox12->isChecked() ~TRUE) 104. ( 105. gpsNanol = SpinBox5 ->clean Text(); 106. } 107. else 108. 109. gpsNanol = "-";

II 0. }

Ill. if ( CheckBox3->isChecked() ~~TRUE) 112. ( 113. bits!= SpinBox4 -> cleanText(); 114. } 115. else 116. 117. bits!="-";

Muhammed Aoun

Page 76: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

118. )

119. if( CheckBox5->isChecked() ~~TRUE) 120. { 121. limitl = SpinBox9 ·> cleanText(); 122. ) 123. else 124. { 125. Iimitl = "-"; 126. )

127. if( CheckBox6->isChecked() ~~TRUE) 128. { 129. skip I= SpinBox8 ·>clean Text(); 130. ) 131. else 132. { 133. skip] = "-";

134. )

135. if( CheckBox4->isChecked() ~~TRUE) 136. { 137. gain I = SpinBox6 .>clean Text(); 138. ) 139. else 140. { 141. gain! = "-"; 142. ) 143. if ( channell.isEmpty() ~FALSE) 144. { 145. QFi!elnfo filelnQuestion(pathl); 146. if (filelnQuestion.isFi1e()) 147. { 148. QListViewltem *item= new QListViewitem( ListViewl);

149. item->setText(O,pathl );//path 150. item->setText( l,channel I );//channel 151. item->setText(2,type I );//type 152. item·>setText(3,sampling I )//sampling 153. item->setText(4,bitsl);/Jbits 154. item·>setText(5,detector I );//detector 155. item.>setT ext( 6,compression 1 );//compression 156. item->setText{7,compressionLevell );//compression rate 157. item·>setText(8,secsFrame I );//sees/frame 158. item->setText(9,limit1 );1/]imit 159. item.>setText(lO,framesFilel);l/frame file

Page 77: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

160. item->s.etText(ll,gpsSecl)j/gps(secs) 161. item->setText(12,gpsNano I );//gps(nano) 162. item->setText(IJ,skipl)//skips 163. item~>setText(14,gain1);//gain

164. int count; 165. count= (ListViewl~> childCount()); 166. Spin Box 1 -> setValue{C.."'~Unt); 167. if ( CheckBox 1->isChecked() == TRUE) 168. { 169. ComboBox3 -> setCurrentText("adc")//type 170. LineEdit2 -> setText('"');//channel 171. LineEdit2_2->setText("/");//path 172. ComboBox2 ~> setCurrentText("3");//compression 173. ComboBoxl -> setCurrentText("l ");//compression level 174. ComboBox? ~> setCurrentText("ACIGA");//detector 175. Sp:,~i·i~n3 -> setValue(O);//sampling 176. Spin8•.:;J7~-' , .. ,tValue(l );//sees per frame 177. SpmBoxl -- ,dValue{1 );//frames per file 178. SpinBox2 -> setValue(O);//gps sees 179. SpinBoxS -> setValue(O);//gps nano 180. SpinBox4 -> setValue(-32);/,bits 181. SpinBox9 -> setValue(O);II1imit 182. SpinBox8 -> setValue(O);//skip 183. SpinBox6 -> setValue(O);//gain 184. ) 185. )

186. else 187. { 188. QMessageBox::waming {0, "File Error", "Sorry, the file you selected is

not valid.", "OK","", QString::null, 0, I); 189. ) 190. )

191. else 192. { 193. QMessageBox::waming {0, "Channel Error'', "Please enter a valid channel

name.", "OK","", QString::null, 0, 1); 194. )

195. )

196. void MainWindow::compileFileSlotO 197. { 198. intx=O;

Page 78: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

199. while ( x < ListViewl~>childCount()) 200. { 201. QListViewltem *itemf= new QListViewltem( ListViewl); 202. QString bllah; 203. bllah- itomf->text(l); 204. TextEdit2->insert(bllah); 205. /*QProcess *proc; 206. proc =new QProcess( this);

207. proc~>addAr!,TUment( "/ligoapps/ligotools/binfascii2frame" ); 208. proc~>addArgument( "~channel" ); 209. proc~>addArgument( "channell" ); 210. proc~>addArgument( "~i" ); 211. proc~>addArgument( "/ligoapps/ligotools/bin/ascii_samplel.data" ); 212. proc·>addArgument( "·type"); 213. proc·>addArgument( "adc" ); 214. proc->start();'/ 215. //proc->kill(); 216. //QCString five= 5; //This line converts an int (5) to a string. 217. //QMessage80x::warning (0, "Channel Error", "Please enter a valid

channel name.", "OK","", QString::null, 0, 1); 218. x++; 219. }

220. }

221. void Main Window::removeitem() 222. { 223. QListViewltem* i = ListViewl~>currentltem(); 224. if (ListViewl~>isSelected(i)) 22·;. ListViewl->removeitem(i); 226. }

227. void MainWindow::clearAll() 228. { 229. choice= QMessageBox::warning (0, "Clear All", "Are you sure you want

to clear the whole list?", "Yes", "No", QString::null, 0, 1);

230. if(choice ~ 0) 231. List View 1->clear(); 232. }

233. void MainWindow;;settingslnfonnation() 234. { 235. QString channellO;

Page 79: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

236. channellO = "abcdefg1'/ILineEdiQ->text() 237. LineEdit2->setText(chfumellll); 238. /*int ret= rx.search(channeHO); 239. if(ret!~-1) 240. QMessageBox::warning(O, "Cleru All", "FALSE", "OK","",

QString::null, 0, \); 241. else 242. QMessageBox::warning (0, "Clear All", "TRUE", "OK","", QString::null,

0, 1);*/ 243. }

244. void Main Window: :checkChecked() 245. {

246. if ( CheckBox2->isChecked() ~~TRUE) 247. { 248. SpinBox3->setEnabled(TRUE); 249. } 250. else 251. { 252. SpinBox3->setEnab!ed(F ALSE); 253. }

254. if( CheckBox3->isChecked() ~~TRUE) 255. { 256. SpinBox4->setEnabied(TRUE); 257. ) 258. else 259. { 260. SpinBox4->setEnabled(F ALSE); 261. )

262. if( CheckBox4->isChecked() ~~TRUE) 263. { 264. SpinBox6->setEnabled(TRUE); 265. ) 266. else 267. { 268. SpinBox6->setEnabled(F ALSE); 269. }

270. if ( CheckBox5->isChecked() ~~TRUE) 271. { 272. SpinBox9->setEnabled(TRUE); 273. }

Page 80: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

274. else 275. { 276. SpinBox9->setEnabled(F ALSE); 277. }

278. if( CheckBox6->isChecked() ~TRUE) 279. { 280. SpinBox8->setEnabled(TRUE); 281. } 282. else 283. { 284. Spin Box8->setEnabled(F ALSE); 285. }

286. if ( CheckBox? ->isChecked() == TRUE) 287. { 288. ComboBox2->setEnabled(TRUE); 289. } 290. else 291. { 292. ComboBox2->setEnabled(FALSE); 293. }

294. if( CheckBox8->isCheckedQ ~TRUE) 295. { 296. SpinBox7->setEnabled(TRUE); 297. } 298. else 299. { 300. SpinBox7 -> setEnabled(F ALSE); 301. }

302. if ( CheckBox9->isChecked0 == TRUE) 303. { 304. ComboBox I M>setEnabled(TRUE); 305. } 306. else 307, { 308. ComboB1X 1->setEnabled(F ALSE); 309. }

310. if( CheckBoxiO->isChecked() ==TRUE) 311. { 312. SpinBox 1->setEnab led(TR UE); 3!3. } 314. else

Page 81: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

315. { 316. SpinBox1->setEnabled(F ALSE); 317. }

318. if ( CheckBoxll->isChecked() ~ TRUE) 319. { 320. SpinBox2->setEnab1ed(TRUE); 321. } 322. else 323. { 324. SpinBox2->setEnab1ed(F ALSE); 325. }

326. if ( CheckBox12->isChecked() ~TRUE) 327. { 328. SpinBox5->setEnabled("!'RUE); 329. } 330. else 331. { 332. SpinBox5->setEnab1ed(FALSE); 333. }

334. if( CheckBox13->isChecked() ~TRUE) 335. { 336. ComboBox7->setEnab1ed(TRUE); 337. } 338. else 339. { 340. ComboBox7->setEnab1ed(FALSE); 341. }

342. }

Page 82: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

I GPS I

I &!itmk Sig!tall I lbennome18r Svndm~nltatloil

''"""' in18r&l:e

l ! ADC In~du:e I ADC I RS-232 I l 11/J L G.P.LD. ~ Data

Acquisition Nl-Field Point

Station

EtMIMI connection

X Analyris Him Bandwidth Nodc1

Station

Figure 9.4.1 Data acquisition hardware system.

Data Acquisition St2tion: The computer where all data gathering instruments and their interfaces is connected.

Analysis Station: Data from the Data Acquisition Station is sent to the Analysis Station for storage, analysis and conversion into the frame format. This separate system is needed so no system resources are taken that may slow down Data Acquisition. The Analysis station will be online and access give for other detector sites to requr~st data any time needed.

Seismic Signals: These include wind signals, electro-magnetic signals etc. Basically any seismic even that may affect the gravity wave signal.

GPS: The GPS time is needed to be recorded simultaneously with the data gathered from the Seismic signals. This is for the purposes of allowing other observatories to compare what data they had gathered at the exact same time.

Page 83: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

AIGO (Australian International Gravitational Observatory) • http://www.gravity.uwa.edu.au • Locations is in Gingin, Western Australia • Institutes involved in the Australian project include:

o University of Western Australia o The Australian National University o University of Adelaide o Monash University

LIGO (Laser Interferometer Gravitational Wave Observatory) • http://www.ligo.caltech.edu/ • Location is in Livingston, U.S.A. • Institutes part of the U.S. project include:

o California Institute of Technology o Massachusetts Institute of Technology o NASA (Project LISA: Laser Interferometer Space Antenna)

11 http://lisa.jpl.nasa.gov/

VIRGO (European Gravity Wave observatory) • http://www.virgo.infn.itl • Virgo is located at Cascilla, near Pisa on the Amo plain, Italy. • Collaboration between both France and Italy.

TAMA (Japanese Gravity Wave observatory) • http://tamago.mtk.nao.ac.jp/ • T AMA is located at Saitama, Japan

Page 84: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

AIGO =Australian International Gravitational Observatory.

GPS time-stamping = A GPS satellite which omits a global time in nanoseconds. A

satellite omits pulses giving the same number of nanoseconds any where on earth.

Gravity waves = A hypothetical wave that is held to propagate the force of gravity and to

travel at the speed oflight, also called gravity wave.

Gingin = Large district located 1 hour north of Perth.

Interferometer= "Any of several optical, acoustic, or radio frequency instruments that

use interference phenomena between a reference wave and an experimental wave or

between two parts of an experimental wave to determine wavelengths and wave

velocities, measure very small distances and thicknesses, and calculate indices of

refraction." 16

LIGO =Laser Interferometer Gravitational Observatory

Linux = An Operating System which simulates the UNIX system, and can be run on Intel

or Motorola CPU machines.

Seismic data = Data of which represents th~ measurement of environmental phenomena

extracted from seismic instruments.

TAMA =Gravity wave detector site in Japan.

VIRGO= Variability of solar Infrared-Radiance and Gravity Oscillations

16 http://www.dictionary.com

Page 85: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

California Institute of Technology. Laser Interferometer Gravitational Wave Observatory [on-line] Available WWW: http://www.ligo.caltech.edul [January, 2003]

Dalheimer, M.K.(2002) Programming with OT, znd Edition O'Rielly: New York

Hammel, M.J. Linux Magazine: The HistoryofXFree86- Over a Decade of Development [on-line} Available WWW: http://www .linux-mag.com/200 1-12/xfree86 _ 0 l.html [Dec, 2001]

Hubbard, J. (2000) Programming with C++ 2nd Edition McGraw-Hill: New York

Lexica LLC, Diction;rry.com [on-line]. Available WWW: http://www.dictionary.com [June 2002]

Queru, E. Book Review: Programming with Qt. 2nd Edition [on-line] Available WWW: http://www.osnews.com/story.php?news_id-745 [Mar, 2002]

TAMA. The 300m Laser Interferometer Gravitational Wave Antenna [on-line] Available WWW: http://tamago.rntk.nao.ac.jp/ [December, 2002]

Trolltech Technologies. OT Reference Documentation {on-line] Available WWW: http://doc.trolltech.com/3.11 [January, 2003]

Trolltech Technologies. Trolltech Wins "Best Embedded Solution" for Second Straight Year [on-line] Available WWW: http://www.trolltech.com/company/announce.html?Action=Show&AID=l04 [August, 2002]

Trolltech Technologies. Ot 2.0 Wins LinuxWorld Award [on~ line] Available' WWW: http://www.trolltech.com/company/announce.html?Action=Show&AID=6'J [August, 1999]

University of Western Australia. Australian International Gravitational Research Centre [on-line] Available WWW: http://www.gravity.uwa.edu.au [December, 2002}

Vicere, A. Frame builder emulation (Fbe} library vlr2 [on-line} Availa'Jle WWW: http: //www.ldas-sw .li go .caltech.edulligotools/Fbelhtml/ [January, 2003}

VIRGO. VIRGO Project Central Web Site [oft-line} Available WWW: http://www.virgo.infn.itl [November, 2002}

VIRGO-SPE-LAP-5400-102, Specification of a Common Data Frame Format· for Interferometric GravitRtional Wave Detectors CIGWD [Available WWW:

8!-

Page 86: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

http://wwwlapp. in2p3. frf,orgo/FrameLff970130-D-E.pdf[Dec, 2000]

VIR-MAN-LAP-5400-103, Frame Library (Fr} Users Manual [on-line]. Available WWW: http://wwwlapp.in2p3.fr/virgo/FrameL/FrDoc.html [May, 2002]

Current version- version 2.5 (February 2003)

Major revisions for version 2:

e Minor spelling errors fixed throughout.

~ Reformatted Si~:,rnificance and Purpose sections. Combined them into one (section

2.2)

• Included a "Previous studies in this field" section which was missing but critical

(section 2.5)

• Included new section QT -Interest group. (section 2.4)

• Change log (section 2.6)

• Removed foreign findings from conclusion section.

• Updated referencing; used ECU standard.

• Editing and minor grammar corrections.

• Total revamp of section 7.2. Added infonnation concerning user evaluation of

GUI, and how such evaluation occurred.

Major revisions for version 1 (October 2002):

e Spelling errors throughout document corrected, Australian vs. USA spelling

issues.

• Purpose of study statement re-evaluated, added the problem of large amounts of

data needing to undergo an automated process. (section 2.3)

• Included a calculation example of vast data amount. (section 2.3)

• Several more research questions have been added, mainly in respect to design and

efficiency metrics issues (section 2.4)

• Complete overhaul ofliterature review, greater in-depth analysis. (section 3.0)

Page 87: A Linux-based graphical user interface for the creation

Honours Research Thesis Muhammed Aoun

• More detailed information concerning the instmments and procedures to carry out

the resc;uch with reference to an action research approach explained further.

(section 4.3)

• Change log (s ::lion 5.6)